Skip to content

v4: embed typescript-native-bridge, drop Volar-based framework support - #103

Open
johnsoncodehk wants to merge 4 commits into
masterfrom
v4
Open

johnsoncodehk wants to merge 4 commits into
masterfrom
v4

Conversation

@johnsoncodehk

@johnsoncodehk johnsoncodehk commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

First milestone of v4 (Phase 0–2 of the v4 plan): move the CLI onto the TypeScript 7 engine and remove the Volar-based framework support.

  • Engine swap: @tsslint/cli now embeds typescript-native-bridge (pinned 6.0.3-bridge.16.tsgo.7.0.2) as a direct dependency, replacing the typescript peer dep. Type checking runs on the TS 7 (tsgo 7.0.2) engine — no API changes, TNB is a drop-in for the classic typescript surface.
  • Volar removal: the --vue-project / --vue-vine-project / --mdx-project / --astro-project / --ts-macro-project flags and all Volar wiring (@volar/language-core, @volar/language-hub, @volar/typescript, proxy language service, diagnostic mapping) are removed (-1,497 lines).
  • Cleanup: untracked tsgo/relay experiment artifacts, the orphaned meta-frameworks fixture, and the languages plumbing left behind in the cache layer.
  • Docs: docs/migration-v4.md (breaking changes, flag → contentMappers mapping, engine behavior, editor status) and updated README requirements.

What's next (not in this PR)

  • Content mapper support: meta-framework support returns via the TS 7.1 content mapper (tsconfig contentMappers), gated on TNB rebasing onto tsgo 7.1. Diagnostics will be mapped back through spanMap; fixes only on Exact/Verbatim spans.
  • Editor line rework: the tsserver plugin (@tsslint/typescript-plugin) and VS Code extension will be rebuilt on the TS 7 LSP extension points, also gated on TS 7.1.

Verification

Full CI-equivalent suite run locally on the final tree:

  • pnpm install, pnpm run build, compat-eslint bench (107 rules × 33 files = clean parity), upstream scope-manager (212/225, 13 known divergences, 0 regressions), predicate coverage (152/152), JSX react-x parity, lazy-estree parity, compat-pipeline, selector-analysis, ts-ast-scan, core probe / builder-program-poc / skip-rules, CLI cache / cache-flow / integration / incremental-state — all pass
  • npm run lint on the repo itself: 59 passed
  • TNB ACTIVE banner confirmed on stderr; require.resolve points at the bridge
  • Fixtures output identical to the pre-TNB TS 6.0.3 baseline (zero diagnostic drift on this corpus)

Notes

  • TNB requires Node ≥ 20.19 (CLI already requires 22.6) and does not support musl/Alpine — documented in docs/migration-v4.md
  • Cross-package type boundaries use type-only casts (ts as unknown as typeof import('typescript')) since @tsslint/core typings are declared against stock typescript; the runtime object is identical

- @tsslint/cli now depends on typescript-native-bridge (pinned
  6.0.3-bridge.15.tsgo.7.0.2) instead of the typescript peer dep;
  type checking runs on the TS 7 (tsgo) engine
- Remove --vue-project/--vue-vine-project/--mdx-project/--astro-project/
  --ts-macro-project flags and the Volar language plugin wiring
  (@volar/language-core, @volar/language-hub, @volar/typescript)
- Meta-framework support will be provided by the TS 7.1 content mapper
  (tsconfig contentMappers) once TNB rebases onto tsgo 7.1
- Remove fixtures/meta-frameworks and untracked tsgo/relay experiments
The file was deleted with the Volar wiring; the hardcoded corpus list
in packages/compat-eslint/test/bench/dogfood-corpus.ts still referenced
it, failing lazy-estree.test.js with ENOENT in CI.
…lumbing

- packages/cli now pins typescript-native-bridge 6.0.3-bridge.16.tsgo.7.0.2
- remove the languages parameter from the cache layer (dead since the Volar
  removal); the cache key no longer carries it, which also invalidates
  existing caches
- README: real framework-support section (tsconfig contentMappers), updated
  requirements (bundled engine, no typescript pin, musl unsupported)
- docs/migration-v4.md: breaking changes, flag -> contentMappers mapping,
  engine behavior notes, editor status, availability gates
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