[PR #7062] [MERGED] [AI] Enable TypeScript composite project references across monorepo #21274

Closed
opened 2026-04-14 22:00:02 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7062
Author: @MatissJanis
Created: 2/23/2026
Status: Merged
Merged: 3/4/2026
Merged by: @MatissJanis

Base: masterHead: matiss/ts-composite-references


📝 Commits (10+)

  • 4f7648d [AI] Enable TypeScript composite project references across monorepo
  • 6589f9b Remove obsolete TypeScript configuration for API and update build script to emit declarations directly to the output directory. This streamlines the build process and ensures compatibility with the new project structure.
  • 9e5f1de Refactor TypeScript configuration in API package to remove obsolete decl-output directory and update build scripts. The changes streamline the build process by directing declaration outputs to the @types directory, ensuring better organization and compatibility with the new project structure.
  • a3e3b08 Add TypeScript declaration emission for loot-core in desktop-electron build process
  • b3aa9ad Refactor TypeScript configuration in API package to utilize composite references and streamline build scripts. Update include and exclude patterns for improved file management, ensuring better organization of declaration outputs and migration SQL files.
  • 1f5d8a4 Refactor TypeScript configuration in loot-core and desktop-client packages to streamline path management and remove obsolete dependencies. Update paths in tsconfig.json files for better organization and compatibility, and adjust yarn.lock to reflect changes in workspace dependencies.
  • 7509f5b Update desktop-electron package to utilize loot-core as a workspace dependency. Adjust TypeScript import paths and tsconfig references for improved organization and compatibility across packages.
  • 85c9acf Merge branch 'master' into matiss/ts-composite-references
  • caaa7ee Enhance Vite configuration for desktop-client to support Electron-specific conditions and update loot-core package.json to include Electron as a platform for client connection. This improves compatibility for Electron builds.
  • dccd5b3 Refactor TypeScript configuration across multiple packages to streamline path management. Update tsconfig.json files in root, api, and loot-core packages to improve import paths and maintain compatibility with internal typings.

📊 Changes

24 files changed (+115 additions, -70 deletions)

View changed files

📝 .gitignore (+2 -0)
📝 bin/package-electron (+3 -0)
📝 package.json (+3 -3)
📝 packages/api/tsconfig.json (+6 -1)
📝 packages/component-library/.storybook/preview.tsx (+1 -0)
📝 packages/component-library/package.json (+1 -0)
📝 packages/component-library/tsconfig.json (+7 -2)
📝 packages/crdt/tsconfig.json (+4 -1)
📝 packages/desktop-client/package.json (+0 -1)
📝 packages/desktop-client/tsconfig.json (+18 -2)
📝 packages/desktop-client/tsconfig.service-worker.json (+4 -1)
📝 packages/desktop-client/vite.config.mts (+9 -2)
📝 packages/desktop-electron/preload.ts (+1 -0)
📝 packages/desktop-electron/tsconfig.json (+5 -1)
📝 packages/loot-core/bin/build-api (+3 -13)
📝 packages/loot-core/package.json (+3 -4)
📝 packages/loot-core/src/platform/client/undo/index.ts (+3 -3)
packages/loot-core/tsconfig.api.json (+0 -17)
📝 packages/loot-core/tsconfig.json (+15 -2)
📝 packages/plugins-service/tsconfig.json (+4 -0)

...and 4 more files

📄 Description

Description

Enable composite references across the monorepo. This allows each "package" to be built independently. And thus brings us one step closer to un-tangling all the invalid cross-package dependencies. Plus should make TypeScript upgrade and strict migration to v7 easier as we can do it per-package.

There are a few TODO comments. I am planing to address these with follow-up cleanups.

N/A

Testing

Mostly manual.. verifying things still build.

Checklist

  • Release notes added (see link above)
  • No obvious regressions in affected areas
  • Self-review has been performed - I understand what each change in the code does and why it is needed

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 27 14.89 MB 0%
loot-core 1 5.82 MB 0%
api 1 4.43 MB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
27 14.89 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/index.js 9.54 MB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 12.94 kB 0%
static/js/workbox-window.prod.es5.js 5.64 kB 0%
static/js/ca.js 188.11 kB 0%
static/js/da.js 106.35 kB 0%
static/js/de.js 180.07 kB 0%
static/js/en-GB.js 7.18 kB 0%
static/js/en.js 170.33 kB 0%
static/js/es.js 174.55 kB 0%
static/js/fr.js 179.6 kB 0%
static/js/it.js 171.16 kB 0%
static/js/nb-NO.js 156.96 kB 0%
static/js/nl.js 113.21 kB 0%
static/js/pl.js 88.37 kB 0%
static/js/pt-BR.js 183.19 kB 0%
static/js/th.js 181.87 kB 0%
static/js/uk.js 214.88 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 120.54 kB 0%
static/js/ReportRouter.js 1.16 MB 0%
static/js/narrow.js 637.77 kB 0%
static/js/TransactionList.js 106.22 kB 0%
static/js/wide.js 164.15 kB 0%
static/js/AppliedFilters.js 9.71 kB 0%
static/js/usePayeeRuleCounts.js 10.04 kB 0%
static/js/useTransactionBatchActions.js 13.23 kB 0%
static/js/FormulaEditor.js 1.04 MB 0%

loot-core

Total

Files count Total bundle size % Changed
1 5.82 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.MNtpiHkH.js 5.82 MB 0%

api

Total

Files count Total bundle size % Changed
1 4.43 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
bundle.api.js 4.43 MB 0%

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/7062 **Author:** [@MatissJanis](https://github.com/MatissJanis) **Created:** 2/23/2026 **Status:** ✅ Merged **Merged:** 3/4/2026 **Merged by:** [@MatissJanis](https://github.com/MatissJanis) **Base:** `master` ← **Head:** `matiss/ts-composite-references` --- ### 📝 Commits (10+) - [`4f7648d`](https://github.com/actualbudget/actual/commit/4f7648d8cd50e7188be00a28c5051bae85700386) [AI] Enable TypeScript composite project references across monorepo - [`6589f9b`](https://github.com/actualbudget/actual/commit/6589f9b6253d9425b200238991c22b6ad99dc677) Remove obsolete TypeScript configuration for API and update build script to emit declarations directly to the output directory. This streamlines the build process and ensures compatibility with the new project structure. - [`9e5f1de`](https://github.com/actualbudget/actual/commit/9e5f1de0504c223716e86decd25c951c41e16e8d) Refactor TypeScript configuration in API package to remove obsolete decl-output directory and update build scripts. The changes streamline the build process by directing declaration outputs to the @types directory, ensuring better organization and compatibility with the new project structure. - [`a3e3b08`](https://github.com/actualbudget/actual/commit/a3e3b08f7363e0195461773a30c277ead4811194) Add TypeScript declaration emission for loot-core in desktop-electron build process - [`b3aa9ad`](https://github.com/actualbudget/actual/commit/b3aa9ade12a3f41910d7ed9d99b78d6376151167) Refactor TypeScript configuration in API package to utilize composite references and streamline build scripts. Update include and exclude patterns for improved file management, ensuring better organization of declaration outputs and migration SQL files. - [`1f5d8a4`](https://github.com/actualbudget/actual/commit/1f5d8a4cd6ef7db338115ae7fc7852b6c567aead) Refactor TypeScript configuration in loot-core and desktop-client packages to streamline path management and remove obsolete dependencies. Update paths in tsconfig.json files for better organization and compatibility, and adjust yarn.lock to reflect changes in workspace dependencies. - [`7509f5b`](https://github.com/actualbudget/actual/commit/7509f5bbe671e9e304cac0e4f11abfee2c409fac) Update desktop-electron package to utilize loot-core as a workspace dependency. Adjust TypeScript import paths and tsconfig references for improved organization and compatibility across packages. - [`85c9acf`](https://github.com/actualbudget/actual/commit/85c9acfdece215864f6e46cbe3e05b9b3700f2e0) Merge branch 'master' into matiss/ts-composite-references - [`caaa7ee`](https://github.com/actualbudget/actual/commit/caaa7eed227fa3043f105eba90b2992432577e9c) Enhance Vite configuration for desktop-client to support Electron-specific conditions and update loot-core package.json to include Electron as a platform for client connection. This improves compatibility for Electron builds. - [`dccd5b3`](https://github.com/actualbudget/actual/commit/dccd5b3d92be1e2475aea631686b4aae240823ac) Refactor TypeScript configuration across multiple packages to streamline path management. Update tsconfig.json files in root, api, and loot-core packages to improve import paths and maintain compatibility with internal typings. ### 📊 Changes **24 files changed** (+115 additions, -70 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+2 -0) 📝 `bin/package-electron` (+3 -0) 📝 `package.json` (+3 -3) 📝 `packages/api/tsconfig.json` (+6 -1) 📝 `packages/component-library/.storybook/preview.tsx` (+1 -0) 📝 `packages/component-library/package.json` (+1 -0) 📝 `packages/component-library/tsconfig.json` (+7 -2) 📝 `packages/crdt/tsconfig.json` (+4 -1) 📝 `packages/desktop-client/package.json` (+0 -1) 📝 `packages/desktop-client/tsconfig.json` (+18 -2) 📝 `packages/desktop-client/tsconfig.service-worker.json` (+4 -1) 📝 `packages/desktop-client/vite.config.mts` (+9 -2) 📝 `packages/desktop-electron/preload.ts` (+1 -0) 📝 `packages/desktop-electron/tsconfig.json` (+5 -1) 📝 `packages/loot-core/bin/build-api` (+3 -13) 📝 `packages/loot-core/package.json` (+3 -4) 📝 `packages/loot-core/src/platform/client/undo/index.ts` (+3 -3) ➖ `packages/loot-core/tsconfig.api.json` (+0 -17) 📝 `packages/loot-core/tsconfig.json` (+15 -2) 📝 `packages/plugins-service/tsconfig.json` (+4 -0) _...and 4 more files_ </details> ### 📄 Description <!-- Thank you for submitting a pull request! Make sure to follow the instructions to write release notes for your PR — it should only take a minute or two: https://github.com/actualbudget/docs#writing-good-release-notes. Try running yarn generate:release-notes *before* pushing your PR for an interactive experience. --> ## Description <!-- What does this PR do? Why is it needed? Please give context on the "why?": why do we need this change? What problem is it solving for you?--> Enable composite references across the monorepo. This allows each "package" to be built independently. And thus brings us one step closer to un-tangling all the invalid cross-package dependencies. Plus should make TypeScript upgrade and strict migration to v7 easier as we can do it per-package. There are a few TODO comments. I am planing to address these with follow-up cleanups. ## Related issue(s) <!-- e.g. Fixes #123, Relates to #456 --> N/A ## Testing <!-- What did you test? How can we reproduce the issue you are fixing or how can we test the feature you built? --> Mostly manual.. verifying things still build. ## Checklist - [x] Release notes added (see link above) - [x] No obvious regressions in affected areas - [x] Self-review has been performed - I understand what each change in the code does and why it is needed <!--- actual-bot-sections ---> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 27 | 14.89 MB | 0% loot-core | 1 | 5.82 MB | 0% api | 1 | 4.43 MB | 0% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 27 | 14.89 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/index.js | 9.54 MB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 12.94 kB | 0% static/js/workbox-window.prod.es5.js | 5.64 kB | 0% static/js/ca.js | 188.11 kB | 0% static/js/da.js | 106.35 kB | 0% static/js/de.js | 180.07 kB | 0% static/js/en-GB.js | 7.18 kB | 0% static/js/en.js | 170.33 kB | 0% static/js/es.js | 174.55 kB | 0% static/js/fr.js | 179.6 kB | 0% static/js/it.js | 171.16 kB | 0% static/js/nb-NO.js | 156.96 kB | 0% static/js/nl.js | 113.21 kB | 0% static/js/pl.js | 88.37 kB | 0% static/js/pt-BR.js | 183.19 kB | 0% static/js/th.js | 181.87 kB | 0% static/js/uk.js | 214.88 kB | 0% static/js/resize-observer.js | 18.37 kB | 0% static/js/BackgroundImage.js | 120.54 kB | 0% static/js/ReportRouter.js | 1.16 MB | 0% static/js/narrow.js | 637.77 kB | 0% static/js/TransactionList.js | 106.22 kB | 0% static/js/wide.js | 164.15 kB | 0% static/js/AppliedFilters.js | 9.71 kB | 0% static/js/usePayeeRuleCounts.js | 10.04 kB | 0% static/js/useTransactionBatchActions.js | 13.23 kB | 0% static/js/FormulaEditor.js | 1.04 MB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 5.82 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.MNtpiHkH.js | 5.82 MB | 0% </div> </details> --- #### api **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 4.43 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- bundle.api.js | 4.43 MB | 0% </div> </details> </details> <!--- bundlestats-action-comment key:combined end ---> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-14 22:00:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#21274