Repository navigation
Conversation
…ects save ts-morph 23 bundles TypeScript 5.5, which cannot read @types/node 26 (IteratorObject) and refuses every save in a project on it. ts-morph 28 bundles TypeScript 6.0, which also accepts moduleResolution bundler with module commonjs, so the checker no longer swaps the module to preserve.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Every Builder save in a project on
@types/node26 fails, so the Builder can't edit template-dms-demo at all. Found by ANT-2135 while retesting template-dms-demo#170. The Builder typechecks each save with ts-morph 23, which bundles TypeScript 5.5.2. That compiler can't read@types/node26 (Cannot find name 'IteratorObject'). As a result it rejectscreateInterface({ input })in the demo'ssrc/capture-start.ts:106withNo overload matches this call, even though the project's own TypeScript 7.0.2 accepts that line.What
ts-morphgoes from^23.0.0to^28.0.0, which bundles TypeScript 6.0.2. That version reads@types/node26.CHECKER_MODULE = "preserve"swap inengine/project.tsis deleted. It only existed because TypeScript 5.5 rejectedmoduleResolution: "bundler"withmodule: "commonjs". TypeScript 6 accepts that pair, so a project without atsconfig.jsonis now checked with the template's own options.@types/nodedev dependency goes to^26.6.5so the new spec checks against it.node-types-typecheck.spec.ts. It saves a category and a page in a project on@types/node26 that uses the DMS template's compiler options, with a file that callscreateInterface({ input })on a child's streams. A checker on TypeScript 5.5 fails it.Two options were considered:
typescript. This doesn't work for the project that hit the bug. TypeScript 7 (typescript@7.0.2) ships the native compiler, and its package exports onlyversionand anunstable/syncAPI, not the compiler API that ts-morph drives. ts-morph can't load it.Proof
New spec, with ts-morph 23 (main) and
@types/node26 installed:After:
End to end, on a fresh clone of template-dms-demo
main(b9b19c7) afterpnpm install --frozen-lockfile, with no edit. The engine'sAddQueryadds a Sum oftotaloverhelio/invoicesto Home, the same save path/api/buildercalls:The branch wrote
src/home.tsandsrc/helio/finance/database.ts. Then the project's ownpnpm exec tsc --noEmit(TypeScript 7.0.2) exits 0.ConfigurePageon/homegives the same result: main fails oncapture-start.ts:106, and the branch saves.pnpm --filter @antelopejs/dms-builder test:unit: 528 passing.pnpm run checks:Checks: 12 passed, 0 failed.