Skip to content

Pin npm toolchain - #31

Merged
foundev merged 2 commits into
masterfrom
agent/pin-npm-toolchain
Aug 3, 2026
Merged

Pin npm toolchain#31
foundev merged 2 commits into
masterfrom
agent/pin-npm-toolchain

Conversation

@foundev

@foundev foundev commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • declare npm 10.9.4 as the repository package manager
  • enforce that exact npm version for local install, ci, and run commands through devEngines
  • install npm 10.9.4 explicitly in every GitHub Actions job before npm ci

Why

PR #30 exposed a cross-major npm lockfile rewrite: npm 11 removed Vitest's required nested esbuild 0.28.1 platform packages, while the Node 22 CI environment rejected that lockfile. Regenerating with npm 10 fixed the immediate lockfile, but without a toolchain pin the next npm 11 dependency update could recreate the failure.

packageManager documents the selected tool, while devEngines prevents a mismatched npm from mutating the project. The workflow setup makes CI independent of whichever npm minor ships with Node 22.

Validation

  • npm 11.16.0 project install rejected with EBADDEVENGINES before lockfile mutation
  • clean npm ci with npm 10.9.4
  • full npm test
  • workflow YAML parse
  • assertion that all five npm ci jobs pin npm 10.9.4
  • git diff --cached --check

@foundev
foundev marked this pull request as ready for review August 3, 2026 13:18
@foundev
foundev merged commit fafa3bf into master Aug 3, 2026
7 checks passed
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.

1 participant