Repository navigation
Switch from Yarn to npm - #10503
Merged
Merged
Switch from Yarn to npm#10503
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The broad migration spans dependency policies, workflows, release automation, and development setup, warranting final human review.
Review effort: Lite
Findings: None
What changed in this PR
Migrates the repository’s JavaScript tooling from Yarn to npm across applications, tests, CI, releases, and development environments.
Changes:
- Replaces Yarn/Corepack configuration, commands, and metadata with npm.
- Adds npm lockfiles, version requirements, and installation security policies.
- Updates website dependencies, visualizer compatibility, workflows, and developer documentation.
| File | Summary |
|---|---|
website/tests/visual/storybook.spec.ts |
Updates the visual-test command reference. |
website/start-optimized.sh |
Replaces Yarn commands with npm scripts. |
website/src/helpers/gitMetadata.ts |
Updates release command documentation. |
website/README.md |
Updates website setup instructions. |
website/playwright.config.ts |
Uses npm-compatible command execution. |
website/package.json |
Updates npm scripts, dependencies, and policies. |
website/AGENTS.md |
Updates website workflow guidance. |
website/.yarnrc.yml |
Removes Yarn configuration. |
website/.prettierignore |
Removes Yarn exclusions and updates lockfile ignores. |
website/.npmrc |
Configures npm installation restrictions. |
website/.gitignore |
Removes Yarn-specific ignores. |
src/Nitro/CommandLine/src/npm/chillicream-nitro/yarn.lock |
Removes the Yarn lockfile. |
src/Nitro/CommandLine/src/npm/chillicream-nitro/package.json |
Adds npm version enforcement. |
src/Nitro/CommandLine/src/npm/chillicream-nitro/package-lock.json |
Adds the npm dependency lockfile. |
src/Nitro/CommandLine/src/npm/chillicream-nitro/.yarnrc.yml |
Removes Yarn configuration. |
src/Nitro/CommandLine/src/npm/chillicream-nitro/.npmrc |
Configures npm installation restrictions. |
src/Nitro/CommandLine/src/npm/chillicream-nitro/.gitignore |
Removes Yarn-specific ignores. |
src/Nitro/CommandLine/src/npm/chillicream-nitro/.gitattributes |
Removes Yarn attributes. |
src/Mocha/src/mocha-visualizer/package.json |
Expands elkjs peer compatibility. |
src/HotChocolate/Core/test/Types.SpecVersion.Tests/node/package.json |
Adds npm version enforcement. |
src/HotChocolate/Core/test/Types.SpecVersion.Tests/node/.npmrc |
Configures npm installation restrictions. |
init.sh |
Switches repository initialization to npm. |
init.ps1 |
Switches repository initialization to npm. |
CONTRIBUTING.md |
Updates contributor instructions. |
AGENTS.md |
Updates repository workflow guidance. |
.github/workflows/release.yml |
Migrates release packaging to npm. |
.github/workflows/publish-website.yml |
Migrates website publishing to npm. |
.github/workflows/ci.yml |
Migrates CI installation and scripts to npm. |
.devcontainer/dockerfile |
Removes Corepack/Yarn setup. |
.devcontainer/devcontainer.json |
Updates the development environment for npm. |
Files not reviewed (1)
- src/Nitro/CommandLine/src/npm/chillicream-nitro/package-lock.json: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
|
✅ Nitro CLI E2E snapshots: no flow recordings changed vs |
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
website/, the Nitro CLI wrapper, and the spec-version test fixture) installs with the npm bundled with Node.js, under one policy in its.npmrc: a 7-day release-age gate,install-strategy=linked,strict-allow-scripts=true,allow-git=none, andallow-remote=none. AdevEnginesfloor of npm>=11.18.0makes an older npm fail instead of installing without the policy.yarn.lockfiles, and Corepack are removed from the repository, CI, the release workflow, and the devcontainer. The new lockfiles keep every direct dependency at itsyarn.lockversion.@chillicream/mocha-visualizerdependency (install-links=true) so its peers resolve from the website, the visualizer'selkjspeer range includes the 0.12 line the website runs, and the website declaresunist-util-visit,unified, andvfile, which the linked layout no longer exposes. CI's website job also runs for visualizer-only changes.esbuildandunrs-resolver, pinned to their versions, andfseventsis denied. Until npm/cli#10059 ships in npm 11,npm install-scripts approvewrites entries npm cannot match under the linked strategy (npm/cli#9939), soAGENTS.mdsays to add approvals by hand.After pulling
website/.yarn/andsrc/Nitro/CommandLine/src/npm/chillicream-nitro/.yarn/, which are no longer ignored.Test plan
npm ci,npm run format:check,npm run lint, andnpm run buildpass (537 static pages, as with Yarn), andnpm run test:visualreports the same results as a Yarn run ofmain.npm ci,npm run build, andnpm pack --dry-runproduce the same file list and a byte-identicaldist/cli.jsas the Yarn build.npm cirunning innode:24-alpine(npm 11.19.0) under the new.npmrc.EALLOWGIT, a tarball URL withEALLOWREMOTE, a missing or wrongly pinned script approval withESTRICTALLOWSCRIPTS, and npm 11.17.0 withEBADDEVENGINES.npm ci --os=darwinandnpm ci --os=win32succeed.