Skip to content

Commit 1d8832d

Browse files
committed
test(coverage/typescript): Add reviewed tsc diagnostics error codes (#15542)
Finally fixes #11582 This PR adds a script that generates a list of TSC error codes. The codes are collected based on the TypeScript version managed by `just submodules`. And the list is then committed to Git. When the submodule version is updated, the script is also called and the list is regenerated. If TSC introduces new diagnostic codes, the diff will show the added code, which we need to review. Either leave it for the parser to report or ignore it if we cannot support it.
1 parent 5df7999 commit 1d8832d

File tree

7 files changed

+1212
-2
lines changed

7 files changed

+1212
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ target/
1111
/benchmark/node_modules/
1212
/tasks/benchmark/codspeed/node_modules/
1313
/tasks/transform_conformance/node_modules/
14+
/tasks/coverage/tsc-diagnostics-codes/node_modules/
1415
/tasks/compat_data/node_modules/
1516
/tasks/e2e/node_modules/
1617
/tasks/e2e/tests/nestjs/node_modules/

justfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ init:
2424
submodules:
2525
.github/scripts/clone-parallel.sh
2626
just update-transformer-fixtures
27+
just update-tsc-diagnostics-codes
2728

2829
# Install git pre-commit hook to format files
2930
install-hook:
@@ -133,7 +134,10 @@ ast:
133134

134135
# ==================== PARSER ====================
135136

136-
# Parser-specific commands will be added here as needed
137+
# Update reviewed TSC diagnostics codes
138+
update-tsc-diagnostics-codes:
139+
node tasks/coverage/tsc-diagnostics-codes/main.ts
140+
git diff --exit-code
137141

138142
# ==================== LINTER ====================
139143

pnpm-lock.yaml

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

pnpm-workspace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ packages:
66
- editors/*
77
- tasks/transform_conformance
88
- tasks/compat_data
9-
- tasks/mcp
9+
- tasks/coverage/tsc-diagnostics-codes
1010

1111
catalog:
1212
'@napi-rs/cli': 3.4.1

0 commit comments

Comments
 (0)