mirror of
https://github.com/actualbudget/actual.git
synced 2026-07-16 15:14:02 -05:00
The `Publish nightly npm packages` workflow started failing at the
"Pack the core package" step with:
Cannot find module '@actual-app/crdt' or its corresponding type declarations.
PR #7541 switched `@actual-app/crdt`'s package.json to conditional
exports (`types` → `./dist/index.d.ts`). `yarn pack` for
`@actual-app/core` triggers a prepack that runs `tsgo -b`, which now
resolves `@actual-app/crdt` via the `types` condition and expects
`packages/crdt/dist/index.d.ts`. Nothing was building crdt first
because loot-core's tsconfig didn't declare it as a project
reference.
Fix: declare the project reference so `tsgo -b` walks the graph and
builds crdt before loot-core. Sibling packages already do this.
Also adopt `@monorepo-utils/workspaces-to-typescript-project-references`
to keep each package's tsconfig `references` in sync with its
`workspace:*` deps, and wire it into a new `yarn check:tsconfig-references`
step in the `check` CI job plus lint-staged. Running the tool added
`../desktop-client` references to sync-server and desktop-electron
(both declare `@actual-app/web` as a workspace dep even though they
only use it at runtime via `require.resolve`); the extra references
are harmless — in CI the corresponding build is already cached by
earlier steps.
https://claude.ai/code/session_01AA2gEMqX24GWeq5BovNmaz
37 lines
715 B
JSON
37 lines
715 B
JSON
{
|
|
"extends": "../../tsconfig.json",
|
|
"compilerOptions": {
|
|
"composite": true,
|
|
"lib": ["ES2021"],
|
|
"noEmit": false,
|
|
"strict": false, // TODO: fix issues and remove this
|
|
"strictFunctionTypes": true,
|
|
"declaration": true,
|
|
"declarationMap": true,
|
|
"outDir": "build",
|
|
"tsBuildInfoFile": "build/.tsbuildinfo",
|
|
"plugins": [
|
|
{
|
|
"name": "typescript-strict-plugin",
|
|
"paths": ["."]
|
|
}
|
|
]
|
|
},
|
|
"references": [
|
|
{
|
|
"path": "../crdt"
|
|
},
|
|
{
|
|
"path": "../desktop-client"
|
|
}
|
|
],
|
|
"include": [
|
|
"src/**/*",
|
|
"migrations/**/*",
|
|
"types/**/*",
|
|
"app.ts",
|
|
"bin/**/*"
|
|
],
|
|
"exclude": ["node_modules", "build", "coverage"]
|
|
}
|