Skip to content

chore: convert to pnpm - #5264

Merged
straker merged 4 commits into
developfrom
garbee/pnpm
Jul 29, 2026
Merged

chore: convert to pnpm#5264
straker merged 4 commits into
developfrom
garbee/pnpm

Conversation

@Garbee

@Garbee Garbee commented Jul 28, 2026

Copy link
Copy Markdown
Member

What changed

  • Lockfile: package-lock.json removed, pnpm-lock.yaml seeded via pnpm import so resolutions carry over. packageManager in package.json pins 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+).
  • Patching: patch-package is dropped in favor of pnpm's native patchedDependencies. The colorjs.io patch moves to pnpm's naming, and prepare no longer has to run a patch step — which also removes the npm run prepare && npm run build pairing from every workflow.
  • Build scripts: pnpm-workspace.yaml declares allowBuilds explicitly. esbuild and chromedriver need their postinstall; the core-js family and es5-ext do 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.
  • Strict node_modules: core-js-pure was being used through npm's hoisting and is now a direct dependency.
  • CI: every workflow gains pnpm/action-setup ahead of setup-node (needed for cache: pnpm to resolve the store path) and uses pnpm ci.
  • Deploy pipeline: pnpm publish needs --no-git-checks because the version bump is uncommitted and the branch isn't master. pnpm version has no --ignore-scripts, so the bump writes the manifest field directly. Package validation no longer touches global package-manager state: validate-package.mjs symlinks the repo into its own node_modules instead of npm link, and validate-npm-deploy.sh installs into a throwaway project instead of globally.
  • Docs: setup instructions and command examples across CONTRIBUTING.md, doc/, and the example projects now use pnpm.

Closes: #5111

@Garbee Garbee self-assigned this Jul 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json to pin pnpm via packageManager.
  • Update GitHub Actions workflows and helper scripts to install dependencies and run builds/tests using pnpm.
  • Update READMEs/docs across the repo to reference pnpm commands instead of npm.

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.

Comment thread .github/workflows/test.yml
Comment thread .github/workflows/update-generated-files.yaml
Comment thread .github/workflows/release.yml
Comment thread .github/workflows/format.yml
Comment thread .github/workflows/deploy.yml
Comment thread .github/actions/install-deps/action.yml
Comment thread .github/bin/validate-package.mjs Outdated
Co-authored-by: Copilot Autofix powered by AI <[email protected]>

@straker straker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Garbee
Garbee marked this pull request as ready for review July 29, 2026 12:28
@Garbee
Garbee requested a review from a team as a code owner July 29, 2026 12:28
@Garbee

Garbee commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

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.

@straker
straker merged commit 0a0de92 into develop Jul 29, 2026
23 checks passed
@straker
straker deleted the garbee/pnpm branch July 29, 2026 14:30
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.

Migrate to pnpm 11

3 participants