Skip to content

chore: migrate compiler dependency to microsoft/TypeScript - #2065

Merged
fansenze merged 4 commits into
mainfrom
codex/migrate-to-typescript
Sep 5, 2026
Merged

chore: migrate compiler dependency to microsoft/TypeScript#2065
fansenze merged 4 commits into
mainfrom
codex/migrate-to-typescript

Conversation

@fansenze

@fansenze fansenze commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Move the archived microsoft/typescript-go compiler dependency to microsoft/TypeScript, pinned to 1f70213d4922b434345f639b441681e470c7cfc1. Keep the checkout at typescript-go/; the Go module now lives in tsc/ and the JS AST API in packages/typescript/.

The previous SHA was rewritten during import. Its equivalent commit has an identical compiler tree but retains an unmapped nested submodule that breaks recursive Git operations, including checkout authentication setup. The selected main commit has the completed repository layout; the v7.0.2 stable tag predates that layout.

  • Update Go module/import/linkname paths, JS API exports, declaration-build inputs, CI cache paths, and standard-library packaging. Most changed files are mechanical namespace replacements or regenerated shims.
  • Adapt identifier caches, heritage AST nodes, compiler/resolver/LSP interfaces, and macOS native case-alias handling. Wait for the intended typed diagnostic in fixAll editor tests.
  • Preserve member-expression behavior in interface extends and class implements, which the new compiler represents as TypeReference / QualifiedName. This prevents missed reports such as no-restricted-properties on interface I extends Foo.bar {} and unwanted id-denylist reports on the property name. Cover 14 affected rules, including Unicorn, React and type-aware unbound-method; retain ordinary type-name and wildcard behavior.
  • Mirror private generic checker stores and validate field layout for all eight mirrored checker structures. Make the update helper resolve the exact pinned revision, regenerate/tidy modules reproducibly, build both Go entrypoints, and run the layout check. Document the migration and update workflow.

Regression coverage

  • Add a shared corpus of 168 cases covering 11 core rules in expressions, both heritage forms, ordinary type references, type queries and type arguments, with option and nested-member variants. Each expectation was checked against the previous main compiler and ESLint; Go and JS both consume the corpus. The JS test runs ESLint and rslint and compares diagnostic messages and exact ranges, and is explicitly included in the CI test configuration.
  • Add 38 Go cases for react/no-deprecated, unicorn/prefer-number-properties (including fixed output) and @typescript-eslint/unbound-method, plus six wildcard boundary cases. Include valid cases and exemptions to catch false positives as well as missed diagnostics.
  • Verify new regression tests fail before their fixes. Existing suites lacked the intersection of qualified heritage names and these rule options; their passing result did not exercise the changed AST semantics.

Validation

Validated with main at 3ccaa0ae, including its new React, Rstest and Unicorn rules, shared scope and disable-directive changes, and shorthand-binding symbol API.

  • Full Go suite plus compiler shim layout check — 657 packages passed; 36 packages have no tests. Affected rule packages and the shared corpus also passed their final scoped checks.
  • JS core: 842 tests passed. Full JS/CLI and rule fixtures: 4,799 tests passed across 660 files, with 30 skipped and no snapshot updates.
  • VS Code integration: 162 tests across 13 suites passed locally. Used a temporary local executable-path override for @vscode/test-electron 2.5.2 to launch the renamed Code binary in VS Code 1.136.1 on macOS.
  • Rust tsgo-client: all 7 integration tests passed, including shorthand-binding property symbols.
  • Project and Playground builds, typecheck, Go lint against origin/main, spelling, and formatting checks passed.
  • Upstream library build produced 108 declarations matching the compiler's bundled libraries. Re-running the update helper changed none of the 99 module/shim files checked.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 5, 2026

Copy link
Copy Markdown

Deploying rslint with  Cloudflare Pages  Cloudflare Pages

Latest commit: d5be11c
Status: ✅  Deploy successful!
Preview URL: https://41a89d1f.rslint.pages.dev
Branch Preview URL: https://codex-migrate-to-typescript.rslint.pages.dev

View logs

@fansenze
fansenze merged commit 72cd2b1 into main Sep 5, 2026
14 checks passed
@fansenze
fansenze deleted the codex/migrate-to-typescript branch September 5, 2026 11:47
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