Repository navigation
chore: run local TypeScript tooling on the native TypeScript 7.1 nightly - #1730
Merged
Merged
Conversation
leonidaz
marked this pull request as ready for review
October 4, 2026 20:34
Contributor
Benchmark report🟢 No budget breaches, no added work, and no timing changes beyond ±3%. Compares js-framework: 1k/10k row operationsAll 20 timed operations (20 without a verdict)
All 64 work counters are unchanged. Application bundle size (bytes)No changes across 60 measured values. Public-import reachability bundles (bytes)No changes across 111 measured values. |
24 of 25 tasks
3 of 6 tasks
…y's only TypeScript 7 The native catalog now holds one entry, `typescript-native`, an alias of the pinned 7.1 nightly, so a package can keep the classic `typescript` (default catalog, 5.9) beside it. octane-tsc and base-ui's and base-ui-utils' native pristine type lanes use it; those lanes ran TypeScript 7.0.2 through their own `typescript-pristine-native` alias, and the root typecheck now calls the native tsc by path instead of the package's ambiguous `.bin/tsc`. Both pristine lanes pass on the nightly, and UPSTREAM.md says the lane no longer runs upstream's 7.0.2. With that alias gone, nothing installs TypeScript 7.0.2. The optional `typescript` peers that pnpm had filled with it (@tsrx/ripple, vue, i18next, valibot, cosmiconfig) resolve to the classic 6.0.3 or 5.9.3 already in the workspace; every other locked version is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`createNativeTypeEvidenceProgram(rootNames, project)` builds the react-port type-evidence program on `typescript-native` (the native catalog's 7.1 nightly) through `typescript/unstable/sync`. A sibling wrapper tsconfig, as in octane-tsc, enables @tsrx/content-mapper with Octane's Volar compiler, so `.tsrx` imports are typed instead of `any`; the new test fails without the mapper. octane-tsc's native compiler path, `.tsrx` content-mapper entry and TypeScript 5.9 compatibility options move to scripts/octane-tsc/native.mjs, which both share. The classic `createTypeEvidenceProgram` stays for evidence.mjs and generate-public-contract-tests.mjs until they move to the TypeScript 7 AST and checker. Over base-ui's adapted type specs (575 files, 4,227 exports) the native program builds in about half the time and gives every export the same type, apart from union member order (213) and literal quote style (4) in `typeToString` text. Co-Authored-By: Claude Opus 5.5 <[email protected]>
evidence.mjs, pinned-public-types.mjs and generate-public-contract-tests.mjs now read the react-port type-evidence program through TypeScript 7's `typescript/unstable/sync` API, and the classic Volar-proxied program is removed. `createTypeEvidenceProgram(rootNames, project)` builds it from the project's tsconfig with the `.tsrx` content mapper, and throws when the mapper cannot resolve (TS100031) instead of checking imported TSRX as `any`. TypeScript 7 differs from the classic API in ways that would otherwise read as `undefined` rather than fail, so scripts/react-port/native-types.mjs keeps them in one place: symbols, types and signatures refer to each other by id behind getters (`getSymbol()`, `getTypes()`, `getParameters()`); declarations are handles to resolve; `getTarget()` throws for a type without a target; alias type arguments are `[]` rather than absent; index infos carry `valueType`; a type parameter's default is `defaultType`; boolean literals carry `value` rather than an intrinsic name; TypeScript's own declarations live in the native platform package, which has no `hasNoDefaultLib`; and modifiers are read by `SyntaxKind`. Classic TypeScript remains only to parse tsconfig files and upstream sources, never program nodes. The regenerated base-ui and base-ui-utils published contracts keep every assertion; four gain members from TypeScript 7.1's newer DOM and Temporal lib declarations (`customElementRegistry`, `moveBefore`, `oncommand`, `toTemporalInstant`), the same libs octane-tsc checks them with, and group numbering follows TypeScript 7's export order. Test fixtures outside the repository link @tsrx/content-mapper and octane, as a workspace package resolves them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
leonidaz
force-pushed
the
feat/ts7-type-program
branch
from
October 7, 2026 22:21
e7b31e3 to
d25e61b
Compare
#1868 added .rulesync/skills/perf-review without mapping it in REPO_SKILLS, so octane_skill could not reach it and the MCP server test that compares the map with the directory fails. It fails on main too (37a1c14, test shard 3/4), and so on every PR merged with main. Map it and list it in the README. Co-Authored-By: Claude Opus 5.5 <[email protected]>
5 of 7 tasks
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.
Summary
#1399 has merged, and this branch is rebased onto
main, so it carries only this PR's own three commits.nativecatalog's TypeScript 7.1 nightly the repository's only TypeScript 7: one alias,typescript-native, used byoctane-tsc, local tools, and base-ui's native pristine type lanes. Nothing installs TypeScript 7.0.2 anymore.typescript/unstable/syncAPI, beginning with the react-port type-evidence program.typescript(default catalog, 5.9) for every published module that uses the JavaScript API, so applications on TypeScript 5.9 or 6 keep working.Why
TypeScript 7's npm package has no classic compiler API:
import ts from 'typescript'returns only{ version, versionMajorMinor }. Its API lives intypescript/unstable/*and talks to the native compiler over IPC. Only 7.1 nightlies can type-check.tsrx, through--runExternalCodeand@tsrx/content-mapper. Local tooling can therefore use one pinned nightly for everything, while code that runs inside applications must keep the classic API for whatever TypeScript they install.Changes
One TypeScript 7. The
nativecatalog holdstypescript-native: npm:[email protected]. The alias lets a package keep the classictypescriptbeside it.typescript-pristine-native: npm:[email protected]for it. Their pristine type lanes pass on the nightly, and UPSTREAM.md says they no longer run upstream's 7.0.2.typecheckcalls their nativetscby path instead of the ambiguous.bin/tsc.typescriptpeers pnpm had filled with 7.0.2 (@tsrx/ripple, vue, i18next, valibot, cosmiconfig) resolve to the classic 6.0.3 or 5.9.3 already in the workspace. Every other locked version is unchanged.scripts/octane-tsc/native.mjs. The native compiler path, the.tsrxcontent-mapper entry and the TypeScript 5.9 compatibility options, shared byoctane-tscand the native tools.createNativeTypeEvidenceProgram. The react-port type-evidence program ontypescript/unstable/sync..tsrximports are typed instead ofany. The new test fails without the mapper.typeToStringtext: union member order (213) and literal quote style (4).Type evidence on TypeScript 7.
scripts/react-port/evidence.mjs,pinned-public-types.mjsandgenerate-public-contract-tests.mjsread the evidence program through the TypeScript 7 API, and the classic Volar-proxied program is removed.createTypeEvidenceProgram(rootNames, project)throws when the.tsrxcontent mapper cannot resolve (TS100031) instead of checking imported TSRX asany.scripts/react-port/native-types.mjsholds the TypeScript 7 differences that would otherwise read asundefined:getTarget()throwing for a type without a target;[]alias arguments;valueType,defaultType, booleanvalue;SyntaxKind.customElementRegistry,moveBefore,oncommand,toTemporalInstant), the libsoctane-tscchecks them with.@tsrx/content-mapperandoctane, as a workspace package resolves them.Follow-up
octane/compiler/typescript(textTypes) andvalidateNativeSignalNameson TypeScript 7.1 (keeping the classic backend for TypeScript 5.9 and 6), the remaining local tools on the classic API, replacing the unused-declaration compile with tsconfig flags,octane-tsccleanups (including atypecheck:filesoptions bug), the nightly and@tsrx/oxcbumps waiting on upstream, a consumer TypeScript matrix, and smaller findings. octane init: let the user choose the TypeScript version (it installs a 7.1 nightly today) #1729 tracks theoctane initTypeScript version.Context.Provider, which feat: remove legacy Context.Provider support #1138 removed;packages/base-ui/tests/types/tsconfig.jsonis not in the root typecheck.Validation
node --test scripts/react-port/*.test.mjs(374 pass),scripts/check-source-publication.test.mjs(19 pass), andoctane-tscon sample projects after the shared-module refactor.pinned-public-types.test.mjs(57 pass),evidence-cli.test.mjs(74 pass),type-program.test.mjs(2 pass, one pinning the unresolvable-mapper failure),generate-public-contract-tests.mjsfor base-ui and base-ui-utils compared by meaning with the classic output,pnpm react-parity:validate, and the base-ui source ledgers.pnpm typecheck:coverage,pnpm react-parity:validate,pnpm packages:source:check,pnpm ci:workflow:test,pnpm sync.pnpm install --frozen-lockfile; the lockfile drops every TypeScript 7.0.2 entry and nothing else.pnpm format:check,pnpm typecheck,pnpm test: left to CI.Risk / follow-ups
= {}default in an annotated parameter (regression from #64043) microsoft/TypeScript#64431 is fixed.typescript/unstable/*can change between nightlies, so a bump movesoctane-tscand every native tool together.Provenance
agent-authored)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Pristine upstream type lanes now run a pinned 7.1 nightly instead of upstream's 7.0.2, and local tooling depends on unstable
typescript/unstable/*APIs that move with nightly bumps.Overview
This PR makes the
nativecatalog'stypescript-nativealias (TypeScript 7.1 nightly) the repo's only TypeScript 7 install, replacing per-packagetypescript-pristine-native@ 7.0.2. base-ui and base-ui-utils pristine type lanes, roottypecheck, andoctane-tscall invoke that compiler viascripts/octane-tsc/native.mjs(shared path, content mapper, and TS 5.9 compatibility defaults).React-port type evidence moves off the classic Volar-proxied program onto
typescript/unstable/sync, withnative-types.mjswrapping TS 7's remote-object API.createTypeEvidenceProgramfails if the.tsrxmapper cannot resolve instead of silently typing TSRX asany. Regenerated published-contract tests pick up a few DOM lib members under the nightly.Lockfile and react-parity manifests refresh (lockfile hash, pristine lane
compilerBins, manifest script hashes).octane-mcp-serverregisters theperf-reviewskill. Classictypescript5.9 stays for packages that need the JS API in apps.Reviewed by Cursor Bugbot for commit 8c79232. Bugbot is set up for automated code reviews on this repo. Configure here.