Repository navigation
chore(deps): typecheck the API and the plain packages with tsgo - #1544
Merged
Merged
Conversation
TypeScript 7.0 ships the compiler only: require('typescript') returns a version
string, and lib/ carries no tsserverlibrary — the file typescript-eslint,
vue-tsc and the Nest CLI all load. That is why the 7.0.2 bump (#1533) turns
every gate red, and why no code change can land it.
Microsoft's side-by-side arrangement separates the compiler from the API:
`typescript` resolves to @typescript/typescript6 (bin tsc6, the TS 6 API), and
the `typescript7` alias brings 7's tsc binary. The six packages whose typecheck
is a bare `tsc --noEmit` then check with tsgo — apps/api 8.5s to 2.0s, each
plain package about 0.5s — with no emit and no behaviour change: a full API
build emits the same 3240 files, differing only in redundant parentheses and
quote style.
apps/api's build still goes through the Nest CLI on the TS 6 API, and
web/admin/ui are untouched: vue-tsc cannot load TypeScript 7 at all, so their
typecheck stays on 6 until it can. The alias is named `typescript7` rather than
the blog's `@typescript/native` so that name stays free for the 7.1 package
typescript-eslint's own tsgo backend resolves.
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.
What
typescriptinapps/apiand the five buildless packages (api-client,contracts,editor-schema,observability,workflow) now resolves to@typescript/typescript6— the compatibility package Microsoft publishes for the 7.0 transition — and a second alias,typescript7, installs TypeScript 7.0. The compat package's binary istsc6, so the plaintscon PATH is 7.0 and thetypecheckscript in all six runs on tsgo.Why
TypeScript 7.0 is the native compiler and nothing else:
require('typescript')returns{ version, versionMajorMinor },lib/has notsserverlibrary, and the programmatic API is expected back in 7.1. Three gates load that API —typescript-eslintthrows onversionMajor >= 7,vue-tscimportstypescript/lib/tsserverlibrary, and the Nest CLI compiles through it — so #1533 cannot be made green by editing code. Side-by-side is Microsoft's documented arrangement for exactly this window: https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/#running-side-by-side-with-typescript-6-0Measurements (this machine; full runs,
*.tsbuildinforemoved)apps/apitypecheck: 8.5s → 2.0sapi-client/contracts/editor-schema/observability/workflow: 0.4–0.6s eachapps/apibuild (nest build, TS 6 API): unchanged, 11.8sapp.get((ConfigService))→app.get(ConfigService)and quote style in.d.tsHonest scope: the whole
pnpm typecheckgate also runsvue-tscoverweb(17.5s), which cannot load TS 7 — so today's repo-wide gain is roughly a fifth. The rest arrives with vue-tsc.Untouched
web,admin,uistay on real TypeScript 6 withvue-tscandtypescript-eslint.apps/apibuild and dev still go through the Nest CLI on the TS 6 API.Verification
typechecktasks exit 0.apps/apinest buildexits 0.pnpm install --frozen-lockfileis consistent with the committed lock.The alias is named
typescript7, not the blog's@typescript/native, so that name stays free for the 7.1 package typescript-eslint's own tsgo backend resolves (@typescript-eslint/typescript-estree/dist/native/checkNativeVersion.jspins it to>=7.1.0-dev).Refs #1533 — it stays open until
vue-tscandtypescript-eslintcan load 7.