chore: convert to pnpm - #5264
Conversation
There was a problem hiding this comment.
Pull request overview
Migrates the repo’s development and CI tooling from npm to pnpm 11, updating scripts, workflows, and developer documentation to match the new package manager and lockfile/patching approach.
Changes:
- Add pnpm configuration (lockfile + workspace config + patched dependency) and update
package.jsonto pin pnpm viapackageManager. - Update GitHub Actions workflows and helper scripts to install dependencies and run builds/tests using pnpm.
- Update READMEs/docs across the repo to reference
pnpmcommands instead ofnpm.
Reviewed changes
Copilot reviewed 37 out of 44 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| test/wtr.debug.config.mjs | Updates debug test command example to pnpm run. |
| test/integration/rules/README.md | Updates integration test run/debug instructions to pnpm. |
| test/integration/full/README.md | Updates full integration test instructions and command examples to pnpm. |
| test/aria-practices/README.md | Updates APG test run instruction to pnpm. |
| test/act-rules/README.md | Updates ACT test run and grep instructions to pnpm. |
| README.md | Adds pnpm install example; updates build/translate command examples to pnpm. |
| pnpm-workspace.yaml | Adds pnpm build-allowlist and patched dependency configuration. |
| patches/[email protected] | Converts patch header format to pnpm-compatible patch layout. |
| package.json | Pins pnpm via packageManager, updates scripts to pnpm, removes patch-package, adds core-js-pure. |
| locales/README.md | Updates translate instructions to pnpm. |
| doc/rule-development.md | Updates rule generator instructions to pnpm. |
| doc/pull-request-checklist.md | Updates checklist commands (fmt/eslint/build/test) to pnpm. |
| doc/examples/rule-check-templates.md | Updates build note from npm to pnpm. |
| doc/examples/qunit/README.md | Allows pnpm as alternative for install/test commands in example. |
| doc/examples/puppeteer/README.md | Allows pnpm as alternative for install command in example. |
| doc/examples/mocha/README.md | Allows pnpm as alternative for install/test commands in example. |
| doc/examples/jest_react/README.md | Allows pnpm as alternative for install/test commands in example. |
| doc/examples/jasmine/README.md | Allows pnpm as alternative for install/test commands in example. |
| doc/examples/chrome-debugging-protocol/README.md | Allows pnpm as alternative for install command in example. |
| doc/developer-guide.md | Updates all dev workflow instructions (install/build/develop/test/debug) to pnpm. |
| doc/API.md | Updates api-docs generation command to pnpm. |
| CONTRIBUTING.md | Updates contributor setup/test instructions to pnpm and adds pnpm install guidance. |
| CLAUDE.md | Updates repo “fundamental standards” references from npm to pnpm. |
| build/sri-update.mjs | Updates release-script reference from npm to pnpm. |
| build/run-build/watch-mode.mjs | Updates watch-mode output hint from npm start to pnpm start. |
| build/run-build/watch-helpers.mjs | Updates doc comment to reference pnpm start. |
| build/run-build/postbuild.mjs | Switches postbuild invocation from npm to pnpm. |
| build/rule-generator.mjs | Switches auto-build invocation/messages from npm to pnpm. |
| .prettierignore | Ignores pnpm-lock.yaml for formatting. |
| .husky/pre-commit | Switches hook command from npx to pnpm exec. |
| .gitignore | Updates ignored lockfiles for pnpm migration. |
| .github/workflows/update-generated-files.yaml | Updates dependency install/build steps and caching to pnpm. |
| .github/workflows/test.yml | Updates caching and job commands from npm to pnpm; adjusts Node-matrix job to run node directly. |
| .github/workflows/release.yml | Updates caching and release steps from npm to pnpm. |
| .github/workflows/nightly-tests.yml | Updates build/test steps to pnpm; updates installing latest corpora to pnpm with build allowances. |
| .github/workflows/format.yml | Updates install/fmt steps and caching to pnpm. |
| .github/workflows/deploy.yml | Updates install/build/version/publish/metadata steps to pnpm; updates publish flags accordingly. |
| .github/bin/wait-for-npm-ready.sh | Switches registry polling from npm view to pnpm view. |
| .github/bin/validate-package.mjs | Replaces global link/unlink with a local node_modules self-symlink approach for validation. |
| .github/bin/validate-npm-deploy.sh | Changes deployment validation to use a temp project with pnpm add instead of global npm installs. |
| .github/bin/determine-version.sh | Switches manifest reads from npm pkg get to pnpm pkg get. |
| .github/actions/install-deps/action.yml | Updates composite action to set up pnpm and install deps via pnpm. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
straker
left a comment
There was a problem hiding this comment.
I took a good look at this. It looks like everything's correctly been migrated. I ran all the package scripts and made sure they ran without issues. I also compared the built axe.js to the @next build to verify they were the same. All that's left to really check is the deploy step which we won't be able to see until this merges in.
Yea, deploy stuff is essentially 1-to-1. pnpm keeps strict alignment with npm there so it is safe for porting without headaches. I don't expect any issues from that given we are on OIDC for deployment. |
What changed
package-lock.jsonremoved,pnpm-lock.yamlseeded viapnpm importso resolutions carry over.packageManagerinpackage.jsonpins pnpm 11; pnpm honors that field itself, so contributors only need pnpm installed, not a specific version (and never Corepack, which is gone in Node 25+).patch-packageis dropped in favor of pnpm's nativepatchedDependencies. Thecolorjs.iopatch moves to pnpm's naming, andprepareno longer has to run a patch step — which also removes thenpm run prepare && npm run buildpairing from every workflow.pnpm-workspace.yamldeclaresallowBuildsexplicitly.esbuildandchromedriverneed their postinstall; thecore-jsfamily andes5-extdo not. The two git-hosted W3C test corpora are keyed by resolved tarball spec, so bumping either pin means updating that key too. The nightly jobs that install those corpora from a floating branch can't know the resolved commit ahead of time, so they opt into all builds for that install.node_modules:core-js-purewas being used through npm's hoisting and is now a direct dependency.pnpm/action-setupahead ofsetup-node(needed forcache: pnpmto resolve the store path) and usespnpm ci.pnpm publishneeds--no-git-checksbecause the version bump is uncommitted and the branch isn'tmaster.pnpm versionhas no--ignore-scripts, so the bump writes the manifest field directly. Package validation no longer touches global package-manager state:validate-package.mjssymlinks the repo into its ownnode_modulesinstead ofnpm link, andvalidate-npm-deploy.shinstalls into a throwaway project instead of globally.CONTRIBUTING.md,doc/, and the example projects now use pnpm.Closes: #5111