Skip to content

chore: keep the pnpm integrity hash when the dependency update bumps pnpm - #813

Merged
Patrick Lafrance (patricklafrance) merged 3 commits into
mainfrom
fix/pin-package-manager-hash
Nov 25, 2026
Merged

Patrick Lafrance (patricklafrance) merged 3 commits into
mainfrom
fix/pin-package-manager-hash

Conversation

@patricklafrance

@patricklafrance Patrick Lafrance (patricklafrance) commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Summary

The weekly dependency update dropped the integrity hash of the root packageManager field (review comment on #809). pnpm update -r --latest also bumps that field and writes it bare: pnpm@12.21.0. Nothing put the hash back. On Nov 17 the agent restored it by hand; on Nov 24 it only mentioned the drop in the pull request text.

This pull request also removes the tests of the agent tooling scripts and the CI step that ran them.

Changes

  • .github/scripts/pinPackageManagerHash.ts: copies the hash pnpm recorded in pnpm-lock.yaml for the new pnpm version into the packageManager field. A field that already carries a hash is left alone. It fails when the lockfile has no integrity for that version.
  • package.json: a update-outdated-deps:pin-package-manager script, right after update-outdated-deps:update-versions. It runs for the weekly workflow and for a local /_update-dependencies alike.
  • ci.yml: the "Test agent tooling" step is removed. There is no CI check on the field itself.
  • The script tests are removed: listSkillPins.test.ts and listUpdateDependenciesPrs.test.ts, which both predate this pull request. _update-skills/DESIGN.md no longer points at the first one.
  • _update-skills/SKILL.md: the pnpm row no longer says update-outdated-deps never bumps pnpm.
  • CONTRIBUTING.md and agent-docs/references/development.md: what the new script does.

The change to how the workflow closes earlier update pull requests is no longer part of this pull request: #815 replaced it on main.

Verification

In a worktree of main at pnpm 12.19.0, before #809 was merged:

  • pnpm run update-outdated-deps:update-versions alone: the field went from pnpm@12.19.0+sha512.… to pnpm@12.21.0, and the lockfile already recorded the integrity of pnpm@12.21.0.
  • pnpm update-outdated-deps with the new step, then pnpm install --no-frozen-lockfile: the field ended as pnpm@12.21.0+sha512.66fd8278…6ef0, unchanged by syncpack fix, oxfmt and the install, which ran with pnpm 12.21.0.
  • That hash is the registry's integrity for pnpm@12.21.0 and the sha512 of its tarball. It is the one chore: update dependencies 2026-11-24 #809 was merged with.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings November 24, 2026 19:29
@pkg-pr-new

pkg-pr-new Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@squide/core

pnpm add https://pkg.pr.new/@squide/core@813

@squide/env-vars

pnpm add https://pkg.pr.new/@squide/env-vars@813

@squide/fakes

pnpm add https://pkg.pr.new/@squide/fakes@813

@squide/firefly

pnpm add https://pkg.pr.new/@squide/firefly@813

@squide/firefly-storybook

pnpm add https://pkg.pr.new/@squide/firefly-storybook@813

@squide/i18next

pnpm add https://pkg.pr.new/@squide/i18next@813

@squide/launch-darkly

pnpm add https://pkg.pr.new/@squide/launch-darkly@813

@squide/msw

pnpm add https://pkg.pr.new/@squide/msw@813

@squide/react-router

pnpm add https://pkg.pr.new/@squide/react-router@813

commit: 397b3c4

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The PR cleanup can miss older dependency-update PRs because listing defaults to 30 results, and its branch-prefix filter can close contributors’ fork PRs without verifying repository ownership.

1 open issue
What changed in this PR

This PR preserves pnpm’s integrity hash during Squide’s dependency updates and narrows how the weekly workflow identifies superseded pull requests.

Changes:

  • Restore the root packageManager hash from the lockfile after updating versions.
  • Add nine tests and include them in CI’s agent-tooling checks.
  • Replace title-based PR matching with branch-prefix matching and update related documentation.
File Description
package.json Runs hash restoration immediately after version updates.
CONTRIBUTING.md Documents automatic hash restoration.
agent-docs/​references/​development.md Explains hash restoration and required script ordering.
.github/​workflows/​ci.yml Adds the new script’s tests to CI.
.github/​scripts/​pinPackageManagerHash.ts Restores pnpm’s integrity hash from the lockfile.
.github/​scripts/​pinPackageManagerHash.test.ts Tests hash extraction, unchanged fields, and missing integrity.
.github/​prompts/​update-dependencies.md Selects superseded PRs by branch prefix rather than title.
.claude/​skills/​_update-skills/​SKILL.md Removes the incorrect claim that dependency updates never bump pnpm.

Review effort: Balanced

Comment thread .github/prompts/update-dependencies.md Resolved
…pnpm

pnpm update also bumps the root packageManager field and writes it without its
+sha512 hash. A new update-outdated-deps step copies the hash back from
pnpm-lock.yaml. The weekly workflow also closes only the pull requests on an
agent/update-deps-* branch instead of every pull request matching a title search.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@patricklafrance
Patrick Lafrance (patricklafrance) merged commit 7682dd6 into main Nov 25, 2026
8 checks passed
@patricklafrance
Patrick Lafrance (patricklafrance) deleted the fix/pin-package-manager-hash branch November 25, 2026 22:40
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.

2 participants