Skip to content

Commit a55eb49

Browse files
authored
chore: upgrade pnpm to 10.33.2 (#1211)
1 parent 4a879bb commit a55eb49

3 files changed

Lines changed: 23 additions & 12 deletions

File tree

.agents/skills/pnpm-upgrade/SKILL.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,48 @@ Use these steps to update pnpm and CI pins without blunt search/replace.
1313
- Try `pnpm self-update`; if pnpm is missing or self-update fails, run `corepack prepare pnpm@latest --activate`.
1414
- Capture the resulting version as `PNPM_VERSION=$(pnpm -v)`.
1515

16-
2. Align package.json
17-
- Open `package.json` and set `packageManager` to `pnpm@${PNPM_VERSION}` (preserve trailing newline and formatting).
18-
19-
3. Find latest pnpm/action-setup tag
16+
2. Resolve pnpm package integrity
17+
- Query npm registry for the exact package integrity: `curl -fsSL "https://registry.npmjs.org/pnpm/${PNPM_VERSION}" | jq -r .dist.integrity`.
18+
- Store the result as `PNPM_INTEGRITY`.
19+
- Abort if the integrity is missing or does not start with `sha512-`.
20+
- Convert the base64 digest after `sha512-` to lowercase hex, for example:
21+
```bash
22+
printf '%s' "${PNPM_INTEGRITY#sha512-}" | base64 -d | xxd -p -c 256
23+
```
24+
- Store the result as `PNPM_SHA512_HEX`.
25+
26+
3. Align package.json
27+
- Open `package.json` and set `packageManager` to `pnpm@${PNPM_VERSION}+sha512.${PNPM_SHA512_HEX}` (preserve trailing newline and formatting).
28+
29+
4. Find latest pnpm/action-setup tag
2030
- Query GitHub API: `curl -fsSL https://api.github.com/repos/pnpm/action-setup/releases/latest | jq -r .tag_name`.
2131
- Use `GITHUB_TOKEN`/`GH_TOKEN` if available for higher rate limits.
2232
- Store as `ACTION_TAG` (e.g., `v4.2.0`). Abort if missing.
2333

24-
4. Resolve the action tag to an immutable commit SHA
34+
5. Resolve the action tag to an immutable commit SHA
2535
- Run `git ls-remote https://github.com/pnpm/action-setup "refs/tags/${ACTION_TAG}^{}"` and capture the SHA as `ACTION_SHA`.
2636
- If the dereferenced tag is missing, fall back to `git ls-remote https://github.com/pnpm/action-setup "refs/tags/${ACTION_TAG}"`.
2737
- Abort if `ACTION_SHA` is empty.
2838

29-
5. Update workflows carefully (no broad regex)
39+
6. Update workflows carefully (no broad regex)
3040
- Files: everything under `.github/workflows/` that uses `pnpm/action-setup`.
3141
- For each file, edit by hand:
3242
- Set `uses: pnpm/action-setup@${ACTION_SHA}`.
3343
- If a `with: version:` field exists, set it to `${PNPM_VERSION}` (keep quoting style/indent).
3444
- Do not touch unrelated steps. Avoid multiline sed/perl one-liners.
3545

36-
6. Verify
37-
- Run `pnpm -v` and confirm it matches `packageManager`.
46+
7. Verify
47+
- Run `pnpm -v` and confirm it matches the version portion of `packageManager`.
48+
- Confirm `packageManager` keeps the exact `+sha512.${PNPM_SHA512_HEX}` suffix.
3849
- `git diff` to ensure only intended workflow/package.json changes.
3950

40-
7. Follow-up
51+
8. Follow-up
4152
- If runtime code/build/test config was changed (not typical here), run `$code-change-verification`; otherwise, a light check is enough.
4253
- Commit with `chore: upgrade pnpm toolchain` and open a PR (automation may do this).
4354

4455
## Notes
4556

46-
- Tools needed: `curl`, `jq`, `node`, `pnpm`/`corepack`. Install if missing.
57+
- Tools needed: `curl`, `jq`, `base64`, `xxd`, `node`, `pnpm`/`corepack`. Install if missing.
4758
- Keep edits minimal and readable—prefer explicit file edits over global replacements.
4859
- GitHub Actions must stay pinned to commit SHAs, not tags. Use the latest release tag only to discover the commit SHA to pin.
4960
- If GitHub API is rate-limited, retry with a token or bail out rather than guessing the tag.

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
# with:
3838
# path: . # The root location of your Astro project inside the repository. (optional)
3939
# node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional)
40-
package-manager: pnpm@10.33.0 # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
40+
package-manager: pnpm@10.33.2 # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
4141

4242
deploy:
4343
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,5 @@
9292
"@types/node": "22.19.13"
9393
}
9494
},
95-
"packageManager": "pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319"
95+
"packageManager": "pnpm@10.33.2+sha512.a90faf6feeab71ad6c6e57f94e0fe1a12f5dcc22cd754db40ae9593eb6a3e0b6b12e3540218bb37ae083404b1f2ce6db2a4121e979829b4aff94b99f49da1cf8"
9696
}

0 commit comments

Comments
 (0)