Drop testing for TypeScript RC (7, ts-go) and expand TS matrix to 5.8 / 5.9 / 6#228
Merged
Merged
Conversation
Copilot created this pull request from a session on behalf of
NullVoxPopuli
July 2, 2026 03:01
View session
| * | ||
| * Implemented as a small hand-written scanner instead of leaning on the | ||
| * TypeScript compiler API so it keeps working when TypeScript itself | ||
| * isn't installed, or when the installed `typescript` package exposes no |
Member
There was a problem hiding this comment.
@copilot we should not do this, it sounds like we should disable rc testing, since rc has no extension API
Contributor
Author
There was a problem hiding this comment.
Agreed — reverted src/parser/ts-patch.js and the test skip logic, and dropped rc/next from the CI matrix instead (keeping the new 5.8/5.9/6 entries). The only diff vs. main is now three lines in .github/workflows/ci.yml. Done in 2c85fbd.
Contributor
🏎️ Benchmark Comparison
Full mitata output |
NullVoxPopuli
approved these changes
Jul 2, 2026
Merged
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.
The
typescript@rctag now points to7.0.1-rc(thetypescript-gonative port), which ships no JavaScript compiler API. Insrc/parser/ts-patch.js, onetryblock was resolvingtypescriptand requiring@typescript-eslint/parsertogether; on TS 7, resolvingtypescriptthrowsERR_PACKAGE_PATH_NOT_EXPORTED, so the catch replacedreplaceExtensionswith an identity function and lefttypescriptParserunset — producing 15 test failures.Changes
src/parser/ts-patch.js—replaceExtensionsrewritten as a small hand-written scanner (skips comments, template literals, and non-specifier strings) that rewrites.gts→.mtsonly afterfrom, bareimport, orimport(. No dependency on the TS compiler API, works on any TS version, length invariant preserved.src/parser/ts-patch.js—@typescript-eslint/parseris nowrequired in its owntryblock, decoupled from the TS-compiler resolve. A missing / API-lesstypescriptinstall no longer silently disables the ts-eslint parser too..gts-only suites (parser.test.js > transform, the.gtsblocks ineslint-directive-comments.test.js, andprogram-comments-sort-order.test.js) skip whentypescriptParserisundefined. This lets TS 7 pass cleanly while every other TS version still exercises them..github/workflows/ci.yml—tsVersionmatrix gains5.8,5.9,"6".pnpm --filter '*' test:checkandtest:fixare guarded withif: matrix.tsVersion != 'rc' && matrix.tsVersion != 'next', since the workspace lint-check projects transitively load@typescript-eslint/*, which cannot currently load against TS 7.Notes
TS 7 (
typescript-go) is fundamentally incompatible with today's@typescript-eslintruntime —typescript-estreefails withERR_PACKAGE_PATH_NOT_EXPORTEDwhen trying torequire('typescript')against it. Until the upstream ts-eslint stack ships a TS-7-compatible release, therc/nextmatrix entries can only meaningfully cover our own code paths;.gtsparsing and workspace lint remain gated on ts-eslint being loadable.Verified locally across TS
5.3,5.4,5.5,5.6,5.7,5.8,5.9,6, andrc. All green (rc: 68 passed / 17 skipped for the.gts-only suites).