Skip to content

Commit c0478d3

Browse files
paldepindCopilot
andcommitted
JS: Migrate the parser to native TypeScript 7.1
Pin the native compiler and adopt its ESM API. Project native AST nodes into the existing JSON protocol and adapt Java conversion to native fields, token kinds, namespaces, and import attributes. Reuse one lazy API instance across files and prepare-files batches, disposing each program after serialization. Close the API on reset, quit, EOF, and failure. Add wrapper, lifecycle, and Java regression coverage, teach the Java test harness to install native runtimes, and regenerate import-attribute expectations. Cover source-phase import bindings with a QL fixture. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9f12f7cb-26aa-405b-a1f0-9dcc239778cb
1 parent dba7357 commit c0478d3

15 files changed

Lines changed: 2185 additions & 1134 deletions

File tree

‎javascript/extractor/lib/typescript/package-lock.json‎

Lines changed: 131 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎javascript/extractor/lib/typescript/package.json‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
{
22
"name": "typescript-parser-wrapper",
33
"private": true,
4+
"type": "module",
5+
"engines": {
6+
"node": ">=16.20.0"
7+
},
48
"dependencies": {
5-
"typescript": "5.9"
9+
"typescript": "7.1.0-dev.20261015.1"
610
},
711
"scripts": {
8-
"build": "tsc --project tsconfig.json",
9-
"check": "tsc --noEmit --project . && tslint --project .",
12+
"build": "node node_modules/typescript/lib/tsc.js --project tsconfig.json",
13+
"check": "node node_modules/typescript/lib/tsc.js --noEmit --project . && tslint --project .",
14+
"test": "npm run build && node --test test/lifecycle.test.mjs test/wrapper.test.mjs",
1015
"lint": "tslint --project .",
1116
"lint-fix": "tslint --project . --fix",
12-
"watch": "tsc -p . -w --sourceMap"
17+
"watch": "node node_modules/typescript/lib/tsc.js -p . -w --sourceMap"
1318
},
1419
"devDependencies": {
1520
"@types/node": "^24.3.1"

0 commit comments

Comments
 (0)