chore: upgrade pnpm 9 → 11 with supply-chain protection#235
Open
cameronapak wants to merge 2 commits into
Open
chore: upgrade pnpm 9 → 11 with supply-chain protection#235cameronapak wants to merge 2 commits into
cameronapak wants to merge 2 commits into
Conversation
- Upgrade pnpm 9.0.0 → 11.1.1 (packageManager, engines, corepack) - Add minimumReleaseAge: 4320 (3-day cooldown) to pnpm-workspace.yaml - Move overrides from package.json → pnpm-workspace.yaml (pnpm 11 requirement) - Add @internal/eslint-config and eslint-plugin-storybook as root devDeps - Add allowBuilds for esbuild, @parcel/watcher, msw - Remove version pins from CI workflows (reads from packageManager field) - Update AGENTS.md with pnpm 11 refs and supply-chain docs
|
- Bump node-version from 20 → 22 in ci.yml and storybook.yml (pnpm 11 requires Node >= 22.13) - Bump engines.node from >=20 → >=22 in package.json - Remove minimumReleaseAgeExclude — workspace packages bypass the gate inherently - Update AGENTS.md Node requirement references
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The recent news of seeing more and more supply-chain attacks via npm has caused me to want to make sure we're as secure as can be. That's what this PR does.
Summary
minimumReleaseAge: 4320(3-day cooldown) to mitigate supply-chain attacks on new package versionspackage.json→pnpm-workspace.yaml(pnpm 11 breaking change — overrides in package.json no longer enforce for auto-installed peers)pnpm/action-setup@v4now reads frompackageManagerfield (single source of truth)Changes
package.jsonpackageManager: "pnpm@11.1.1",engines.pnpm: ">=11.0.0", removedpnpm.overrides, added@internal/eslint-config+eslint-plugin-storybookas root devDepspnpm-workspace.yamlminimumReleaseAge,overrides,allowBuilds.github/workflows/ci.ymlversion: 9.0.0pins.github/workflows/release.ymlversion: 9.0.0pin.github/workflows/storybook.ymlversion: 9.0.0pinAGENTS.mdpnpm 11 breaking changes handled
pnpm-workspace.yaml(notpackage.json) to enforce for auto-installed peersallowBuildsapproval (esbuild, @parcel/watcher, msw)@internal/eslint-configandeslint-plugin-storybookmust be root devDependenciesminimumReleaseAgeblocks packages published < 3 days ago; override with--forceif needed urgentlyVerification
pnpm lint— all 7 packages passpnpm typecheck— all 6 packages passpnpm test— 88 tests pass (core: 288, hooks: 261, ui: 88)Greptile Summary
This PR upgrades pnpm 9 → 11.1.1 across the monorepo, migrating overrides to
pnpm-workspace.yaml, adding a 3-dayminimumReleaseAgesupply-chain guard, and bumping all CI workflows from Node 20 → 22 with pnpm version now read from thepackageManagerfield.overridesblock previously inpackage.json, aminimumReleaseAge: 4320guard, andallowBuildsentries foresbuild,@parcel/watcher, andmsw(all required for pnpm 11's stricter postinstall approval).ci.yml, plusrelease.ymlandstorybook.yml, drop their hardcodedversion: 9.0.0pins —pnpm/action-setup@v4now reads the version from thepackageManagerfield, establishing a single source of truth.@swc/core/terserdropped as satisfied tsup/vite peers (noted in a previous review comment).Confidence Score: 5/5
Safe to merge — the toolchain upgrade is well-scoped and all tests, lint, and typecheck pass.
The changes are a clean toolchain bump with no application logic touched. Overrides, allowBuilds, and minimumReleaseAge are correctly configured for pnpm 11. The only discrepancy is that engines.node declares >=22.0.0 while AGENTS.md notes pnpm 11 actually needs >=22.13 — this surfaces as a pnpm-level error rather than silent misbehavior, so it does not block merging.
package.json — the engines.node floor (22.0.0) is looser than pnpm 11's actual Node requirement (22.13); worth tightening before a developer runs into a confusing error.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A["packageManager field\npnpm@11.1.1+sha512"] --> B["pnpm/action-setup@v4\n(reads packageManager)"] B --> C["pnpm install\n--frozen-lockfile"] C --> D{"minimumReleaseAge\n4320 min check"} D -->|"Package < 3 days old"| E["Install blocked\n(use --force to override)"] D -->|"Package >= 3 days old"| F["Proceed with install"] F --> G["allowBuilds check\n(@parcel/watcher, esbuild, msw)"] G --> H["overrides enforced\n(pnpm-workspace.yaml)\nreact 19.1.2 / vite >=5.4.21"] H --> I["Build & Test\npnpm build / pnpm test"]Comments Outside Diff (1)
pnpm-lock.yaml, line 194-195 (link)@swc/coreno longer resolved as atsuppeerAcross every package (
root,packages/core,packages/hooks,packages/ui),tsup@8.5.0previously resolved with@swc/core@1.13.5as a satisfied peer; after this upgrade it resolves without it. This means tsup will now use esbuild as its transformer instead of SWC. If any package'stsup.config.tsexplicitly sets esbuildOptions or SWC-specific options, behaviour changes silently. The test suite passing is reassuring, but it's worth confirming notsup.configreferencesexperimentalDtsor similar options that behaved differently under SWC.Prompt To Fix With AI
Prompt To Fix All With AI
Reviews (2): Last reviewed commit: "fix: bump Node to 22 in CI, remove redun..." | Re-trigger Greptile