Skip to content

fix: use @typescript/typescript6 for AST parsing - #21

Merged
mvantellingen merged 1 commit into
mainfrom
fix/typescript-7-compat
Jul 17, 2026
Merged

fix: use @typescript/typescript6 for AST parsing#21
mvantellingen merged 1 commit into
mainfrom
fix/typescript-7-compat

Conversation

@mvantellingen

Copy link
Copy Markdown
Member

TypeScript 7.0 ships without the classic JavaScript compiler API, so
ts.createSourceFile / ts.ScriptTarget / the is* node guards are no
longer available when a consumer resolves the typescript peer to 7.x.
This broke extraction with "Cannot read properties of undefined (reading
'Latest')".

Depend on the @typescript/typescript6 compat package (bundling the
stable TS 6.0 API) instead of the consumer's typescript peer. This
decouples the extractor from the consumer's compiler version and drops
the typescript peer dependency.

TypeScript 7.0 ships without the classic JavaScript compiler API, so
`ts.createSourceFile` / `ts.ScriptTarget` / the `is*` node guards are no
longer available when a consumer resolves the `typescript` peer to 7.x.
This broke extraction with "Cannot read properties of undefined (reading
'Latest')".

Depend on the `@typescript/typescript6` compat package (bundling the
stable TS 6.0 API) instead of the consumer's typescript peer. This
decouples the extractor from the consumer's compiler version and drops
the typescript peer dependency.
@mvantellingen
mvantellingen merged commit 310a1ec into main Jul 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant