Skip to content

feat: default to Yarn Modern on fresh installs - #922

Closed
Aschenbath wants to merge 1 commit into
nodejs:mainfrom
Aschenbath:feat/yarn-modern-default-812
Closed

Aschenbath wants to merge 1 commit into
nodejs:mainfrom
Aschenbath:feat/yarn-modern-default-812

Conversation

@Aschenbath

Copy link
Copy Markdown

A fresh Corepack installation now offers Yarn Modern for commands such as yarn create, using the bundled Yarn 4.18.0 release when latest lookups are disabled and the stable Yarn release index otherwise.

  • Keep the weekly version sync on Yarn Modern and document the default; project pins and explicitly activated Yarn Classic releases remain supported.
  • Resolve Yarn Modern through @yarnpkg/cli-dist when COREPACK_NPM_REGISTRY is configured. Verify the downloaded tarball separately from the extracted binary so registry integrity hashes are not treated as binary hashes.
  • Cover fresh installs, stable release selection, custom registries, offline reuse, and Classic compatibility.

Validation:

  • ./node_modules/.bin/tsc --noEmit
  • ./node_modules/.bin/eslint --max-warnings=0
  • Vitest with NOCK_ENV=replay, using this checkout's node_modules; proxy variables cleared for the replay/custom-registry suites, and the live npm key-store check run separately with the environment proxy. The two offline cases were rerun with the inherited NODE_USE_ENV_PROXY unset because their dummy proxy values otherwise fail during Node startup.

Results: 180 tests passed across all 9 test files, plus 1 existing expected-failure case (full replay run, offline-case rerun, and the separate npm key-store check). The 42 focused default/registry/integrity tests also passed.

Closes #812

Signed-off-by: Aschenbath <Aschenbath@users.noreply.github.com>
@aduh95

aduh95 commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

This account has opened more than 10 PRs in the last 24 hours. This looks like bot activity, and will result in a ban if the behavior continues.

@aduh95 aduh95 closed this Oct 20, 2026
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.

Unsupported Yarn v1 Classic used as default after Corepack installation

2 participants