Skip to content

fix(ci): unblock releases from TypeScript 7 - #19

Merged
Fiona2016 merged 4 commits into
publishfrom
fix/ts7-compat-toolchain
Aug 7, 2026
Merged

fix(ci): unblock releases from TypeScript 7#19
Fiona2016 merged 4 commits into
publishfrom
fix/ts7-compat-toolchain

Conversation

@Fiona2016

@Fiona2016 Fiona2016 commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Why this is blocking

deploy-auto.yml's release preflight runs yarn test:compat:tsc, and that check is red — so every release is blocked right now, whatever its contents. A re-release of v0.0.6 would fail the same way.

It is not caused by anything in #18, and not by our type definitions:

evidence result
Files #18 touched under test/, scripts/, yarn.lock, .yarnrc.yml, root package.json none
test/apps/vanilla tree hash, v0.0.6 vs publish identical (faccbb67)
The three pinned-TypeScript checks (3.8.2, isolated modules, 4.1.6) pass
Errors reported all in test/apps/vanilla/tsconfig.json, none in any .d.ts

The trigger is time, not a commit: typescript@latest is now 7.0.2, where it was 5.x when this last went green.

What broke, in order

1. Yarn could not install it. Yarn applies a builtin compatibility patch to the typescript package, and 4.9.1's cannot be applied to TypeScript 7 — yarn add --dev typescript@latest failed inside patchPackage before any type checking ran.

2. The check asked for a configuration that no longer exists. TypeScript 7 removed target: es5 and moduleResolution: node10, the two options the test app's tsconfig is built on:

tsconfig.json:6  TS5108: Option 'moduleResolution=node10' has been removed
tsconfig.json:7  TS5108: Option 'target=ES5' has been removed

So the three checks that run against latest were compiling our definitions under a setup no consumer on a current TypeScript can have.

The change

Yarn 4.9.1 → 4.17.1, which is what upstream is on, and which installs TypeScript 7 cleanly.

The latest checks now override the two removed options with what such a consumer uses instead — target: es2015, module: preserve, moduleResolution: bundler — which is also what this test app already is, a bundler-resolved web app. es2015 is the oldest target TypeScript 7 still accepts, so they keep proving what the older pinned checks prove: that the definitions survive a low target. The pinned 3.8.2 and 4.1.6 checks keep the existing tsconfig untouched; that configuration is exactly what they exist to verify.

ignoreDeprecations: '6.0' is dropped — the options it silenced are removed rather than deprecated, so it no longer does anything. Verified by running without it.

What the upgrade dragged in

Two things the new yarn changes underneath, both handled deliberately rather than by accepting what it wrote:

Lockfile format. Yarn 4.17 writes format 10 and re-hashes the builtin resolve patch. yarn install --immutable, which every CI job starts with, refuses an install that would rewrite the lockfile, so both lockfiles are migrated here.

Install scripts are now off by default, where 4.9 ran them. The e2e suite depends on one: puppeteer fetches the Chrome it drives from its own install script, and without it the suite fails looking for a browser nothing downloaded. enableScripts: true restores the behaviour the repository already had. Leaving scripts off is a worthwhile change on its own — it needs the browser fetched another way first, and that is not this.

Running the new yarn also rewrote .yarnrc.yml by itself: it dropped the comment explaining why the global cache is off, and added approvedGitRepositories: "**" and npmMinimalAgeGate: 0, which turn off a supply chain protection and let any git host serve a dependency. None of that is in this branch — CI installs cleanly without it, so a toolchain upgrade is not the place to quietly relax either.

Verified

CI green on all five jobs. Locally, the whole release preflight: yarn install --immutable · yarn build · yarn lint · node scripts/check-packages.js · yarn typecheck · yarn test:unit (2682) · yarn test:compat:tsc (all six checks) · yarn test:compat:ssr.

Noted, not fixed

  • check-typescript-compatibility.js runs yarn add outside the try, so an install failure skips restoreFiles and leaves the test app mutated — which is what made this awkward to diagnose.
  • npmMinimalAgeGate now defaults to 24 hours. The compatibility check installs typescript@latest, so it will fail for a day after each TypeScript release until that is handled.

The release preflight runs the TypeScript compatibility check, so this has
been blocking every release, whatever its contents, since TypeScript 7
became `latest`.

Two things broke, in sequence. Yarn 4.9.1 could not install TypeScript 7 at
all: it applies a builtin compatibility patch to the package, and that patch
cannot be applied to a TypeScript this new, so `yarn add` failed inside
`patchPackage` before any type checking happened. Yarn 4.17.1 installs it
cleanly.

Past that, the check itself was asking for a configuration that no longer
exists. TypeScript 7 removed `target: es5` and `moduleResolution: node10`,
the two options the test app's tsconfig is built on — so the three checks
that run against `latest` were compiling our type definitions under a setup
nobody on a current TypeScript can have. They now override those two options
with what such a consumer uses instead, at the oldest target still available,
which keeps what the older pinned checks are there to prove.

`ignoreDeprecations: '6.0'` goes with them: the options it silenced are gone
rather than deprecated, so it no longer has anything to do.

The lockfile bump is yarn writing its current format, and the ignore entry is
for a file yarn writes into the test apps by itself.
`yarn install --immutable`, which every CI job starts with, refuses an
install that would rewrite the lockfile — and the new yarn rewrites this one:
it bumps the format version and re-hashes the builtin `resolve` patch.

Missed on the first pass because building and testing locally reuses an
existing `node_modules` and never re-runs the install the way CI does.
Running the new yarn rewrote `.yarnrc.yml` on its own: it dropped the
comment explaining why the global cache is off, and added
`approvedGitRepositories: "**"`, `enableScripts: true` and
`npmMinimalAgeGate: 0` — the last two of which turn off a supply chain
protection and let any git host serve a dependency. None of it belongs in a
toolchain upgrade, and none of it is needed: `yarn install --immutable` and
all six compatibility checks pass with the file as it was, plus the new
yarn path.

The ignore entry goes with them. The file it covered is written into the
test apps by yarn only when the settings above are set at the root, so with
those gone nothing generates it, and ignoring it would only have hidden them
coming back.
Yarn 4.17 stopped running them by default, where 4.9 ran them, and the e2e
suite depends on one: puppeteer fetches the Chrome it drives from its own
install script. Without it the suite fails on every run looking for a browser
nothing ever downloaded.

Restoring it keeps the upgrade to the toolchain. Leaving scripts off is a
worthwhile change on its own, but it needs the browser fetched some other way
first, and that is not this.
@Fiona2016
Fiona2016 merged commit f824571 into publish Aug 7, 2026
5 checks passed
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