Upgrade Yarn to 4.18.0 to fix TypeScript 7 install failure - #308
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
wiki-japanfinance | 3aa1c77 | Aug 02 2026, 05:18 AM |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
Dependabot's daily typescript bump attempt (6.0.3 -> 7.0.2) was failing with: YN0001: typescript@patch:...builtin<compat/typescript>: ENOENT: no such file or directory, lstat '/node_modules/typescript/lib/_tsc.js' Yarn's builtin compat/typescript patch assumes the legacy JS compiler file layout, which TypeScript 7's native compiler package no longer has. This was fixed upstream in yarnpkg/berry#7190 (released in Yarn 4.17.1) by bounding the patch to TypeScript <7 and making optional patch failures non-fatal. 4.18.0 additionally picks up #7216, a related bin-precedence fix for the recommended TS 6/7 side-by-side setup. Verified by reproducing Dependabot's exact command (`yarn install --mode=update-lockfile` with typescript bumped to 7.0.2) against the new Yarn version, which now succeeds. Also keeps enableScripts on Yarn's actual default (false, since 4.14) rather than the blanket `true` its version-migration step would otherwise have pinned, and allowlists only the three packages that ship native binaries this project's tooling actually needs (esbuild, @swc/core, workerd) via dependenciesMeta.built. core-js's postinstall is a no-op sponsorship banner and doesn't need it. approvedGitRepositories is left empty since this repo has no git dependencies.
shakuzen
force-pushed
the
claude/dependabot-docusaurus-theme-failure-71a52d
branch
from
August 2, 2026 05:16
b912985 to
3aa1c77
Compare
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
Dependabot's daily attempt to bump
typescript(6.0.3 → 7.0.2) has been failing since TypeScript 7 shipped, blocking that update entirely (see the failing Dependabot Updates run):Yarn's builtin
compat/typescriptpatch assumes the legacy JS-compiler file layout (renaminglib/tsc.js→lib/_tsc.js), but TypeScript 7 ships a restructured native compiler package that no longer has those files, so applying the patch fails and the whole install aborts.This is a known upstream bug (yarnpkg/berry#7191), fixed by yarnpkg/berry#7190 — released in Yarn 4.17.1 — which bounds the compat patch to TypeScript
<7and makes optional-patch failures non-fatal instead of aborting the install. This PR upgrades to 4.18.0 (latest), which also includes #7216, a related bin-precedence fix for Yarn's recommended TS 6/7 side-by-side setup.Changes
packageManagerinpackage.json:yarn@4.13.0→yarn@4.18.0.yarn/releases/: swappedyarn-4.13.0.cjsforyarn-4.18.0.cjs.yarnrc.yml:approvedGitRepositories: []— new supply-chain gate (Yarn 4.15+) forgit:-protocol deps, which can run arbitrary code viapackscripts even withenableScripts: false. Set to the empty default since this repo has nogit:dependencies.enableScripts: false— this is actually Yarn's real default as of 4.14 (postinstall scripts off by default for supply-chain safety). Yarn's version-migration step tried to pin this totrueto preserve pre-upgrade behavior, but that's unnecessarily broad.package.json: added adependenciesMetaallowlist so only the packages that actually need their install scripts get them, instead of enabling scripts project-wide:@docusaurus/faster, and the Cloudflare Workers runtime used bywrangler).core-js/core-js-purewere deliberately left off the list — their postinstall is just a sponsorship banner with no functional effect (and it self-skips on CI anyway).yarn.lock: lockfile format bump (v8 → v10), an updated builtin compat-patch hash forresolve(an incidental one-line cleanup bundled into the same upstream release that fixed the TypeScript issue), and the newdependenciesMetarecorded against the workspace entry.Test plan
yarn install --immutable(what CI'sbuild.ymlruns) passes cleanyarn typecheckpasses cleanyarn docusaurus buildsucceeds with a from-scratchnode_modules(verifies theenableScripts: false+ allowlist combination doesn't silently break the build)yarn wrangler deploy --dry-runsucceeds (confirmsworkerd's absence wouldn't matter for deploy either way, since this is an assets-only Workers site)yarn install --mode=update-lockfilewithtypescriptbumped to7.0.2— against the upgraded Yarn, and confirmed it now succeeds instead of throwingENOENTubuntu-latest) as the real confirmation, since native-binary script behavior can differ by OS