chore: migrate to pnpm, bump Node matrix to 22/24/26, fix audit vulns#238
chore: migrate to pnpm, bump Node matrix to 22/24/26, fix audit vulns#238matt-evervault wants to merge 2 commits into
Conversation
- Migrate package manager from npm to pnpm 11.9.0: add packageManager field, replace package-lock.json with pnpm-lock.yaml, convert all workflows to pnpm/action-setup + `pnpm install --frozen-lockfile`, `pnpm publish --no-git-checks` (preserves OIDC trusted publishing), and update husky hook + CONTRIBUTING. - Add flake.nix/flake.lock providing a pinned Node.js + pnpm 11.9.0 dev shell (`nix develop`). - Update CI Node matrix from 18/20/22 to 22/24/26 (18/20/23/25 are EOL). - `pnpm audit --fix`: 0 vulnerabilities. Overrides for js-yaml, serialize-javascript and uuid consolidated into pnpm-workspace.yaml (the stale package.json js-yaml@4.1.1 pin was itself flagged). - Regenerate ssl-cert-snakeoil fixture as 2048-bit; the old 1024-bit key is rejected by modern OpenSSL (ERR_SSL_EE_KEY_TOO_SMALL), which had broken the HttpsProxyAgent suite on current Node (now 208 passing). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
`pnpm run test:filter attestGA` hangs indefinitely when launched under LD_PRELOAD=libfaketime (CI log shows apt-get completing, then 30 min of silence in the test command). pnpm is a heavier Node process than the npm it replaced and deadlocks under faked time. Invoke the mocha binary directly so only the test process is wrapped by libfaketime. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Summary
Migrates the repo from npm to pnpm 11.9.0, refreshes the CI Node matrix to 22 / 24 / 26, and clears all
pnpm auditfindings. Also adds a Nix flake for a reproducible dev toolchain.Changes
npm → pnpm
packageManager: "pnpm@11.9.0"; replacepackage-lock.jsonwithpnpm-lock.yaml.pnpm/action-setup@v4(beforesetup-node, withcache: 'pnpm') andpnpm install --frozen-lockfile.pnpm publish --no-git-checks(the--no-git-checksreplaces npm's lack of branch checks, since the publish job runs on a detached tag). The existing OIDC trusted publishing flow is preserved — pnpm 11.9.0 includes the fix from pnpm#11526 (merged 15 May 2026, before the 11.9.0 release) that drops the unresolved${NODE_AUTH_TOKEN}placeholder and falls back to OIDC.CONTRIBUTING.mdupdated to pnpm.Nix flake
flake.nix/flake.lockprovide a pinned Node.js + pnpm 11.9.0 dev shell (nix develop). Contributors without Nix can use Corepack (pinned via thepackageManagerfield).Node matrix
18, 20, 22→22, 24, 26. Dropped versions are all EOL (18, 20 since Mar 2026; 23, 25 also EOL). 22 & 24 are Active LTS, 26 is Current.pnpm audit --fixpnpm-workspace.yaml(pnpm's native location, whereaudit --fixwrites). The oldpackage.jsonoverrideswere removed — itsjs-yaml@4.1.1pin had itself become the flagged vulnerable version; the lodash override was carried over.Test/CI fixes required for green CI on current Node
tests/utilities/ssl-cert-snakeoil.{key,pem}as a 2048-bit self-signed cert (was 1024-bit, expired Jul 2025). Modern OpenSSL rejects the 1024-bit key withERR_SSL_EE_KEY_TOO_SMALL, which broke theHttpsProxyAgentbefore allhook and silently disabled ~16 tests. Suite now reports 208 passing (was 190 + 2 failing). Same CN; no test pins its identity.pnpm rununderLD_PRELOAD=libfaketime.pnpm run …hangs indefinitely when launched under libfaketime (CI log showed apt-get completing, then 30 min of silence); pnpm is a heavier Node process than the npm it replaced. Invoking./node_modules/.bin/mocha … --grep attestGAwraps only the test process.Verification — CI green ✅
pnpm install --frozen-lockfile,pnpm run lint,pnpm run test:coverage(208 passing) and the libfaketime attestation step all pass on Node 22, 24 and 26.pnpm run generate-types, andpnpm audit(clean) via the flake.Notes for reviewers
audit --fixhardened the dev tree via overrides (which don't propagate to consumers);dependencies.uuidis intentionally left at^8.1.0. uuid is only used ine2e/({ v4 }, stable v8→v11), never inlib/, so consumers have no real exposure. Bumping/moving uuid todevDependenciesis a reasonable separate follow-up.pnpm publishOIDC path (and provenance) behaves like the previousnpm publish.