pnpm-upgrade
SKILL.md
pnpm Upgrade
Use these steps to update pnpm and CI pins without blunt search/replace.
Steps (run from repo root)
-
Update pnpm locally
- Try
pnpm self-update; if pnpm is missing or self-update fails, runcorepack prepare pnpm@latest --activate. - Capture the resulting version as
PNPM_VERSION=$(pnpm -v).
- Try
-
Resolve pnpm package integrity
- Query npm registry for the exact package integrity:
curl -fsSL "https://registry.npmjs.org/pnpm/${PNPM_VERSION}" | jq -r .dist.integrity. - Store the result as
PNPM_INTEGRITY. - Abort if the integrity is missing or does not start with
sha512-. - Convert the base64 digest after
sha512-to lowercase hex, for example:printf '%s' "${PNPM_INTEGRITY#sha512-}" | base64 -d | xxd -p -c 256 - Store the result as
PNPM_SHA512_HEX.
- Query npm registry for the exact package integrity: