Skip to content

chore: upgrade pnpm 10 to 11 and enable frozenLockfile#1185

Open
james-elicx wants to merge 2 commits into
mainfrom
chore/pnpm-11-frozen-lockfile
Open

chore: upgrade pnpm 10 to 11 and enable frozenLockfile#1185
james-elicx wants to merge 2 commits into
mainfrom
chore/pnpm-11-frozen-lockfile

Conversation

@james-elicx
Copy link
Copy Markdown
Collaborator

Summary

  • Upgrade packageManager from pnpm@10.32.1 to pnpm@11.1.1
  • Enable frozenLockfile: true and preferFrozenLockfile: true in pnpm-workspace.yaml
  • Apply pnpm 11 migration: .npmrc settings moved to pnpm-workspace.yaml, onlyBuiltDependencies converted to allowBuilds

Changes

pnpm 11 migration

Per the pnpm v10 → v11 migration guide, pnpm 11 only reads auth/registry settings from .npmrc. All other settings must live in pnpm-workspace.yaml.

Before (.npmrc / pnpm 10) After (pnpm-workspace.yaml / pnpm 11)
auto-install-peers=false in root .npmrc autoInstallPeers: false
save-exact=true in playground .npmrc Removed (minor pnpm add preference, not needed for builds)
onlyBuiltDependencies list allowBuilds map ({ name: true })

Both .npmrc files are deleted since they contained no auth settings.

Lockfile enforcement

  • frozenLockfile: true — prevents lockfile modifications during install. Fails if lockfile is out of sync. This was already the default in CI (via ci-info detection), but is now explicit and applies everywhere. Developers updating deps should use --no-frozen-lockfile.
  • preferFrozenLockfile: true — when the lockfile satisfies package.json, performs a headless install (skips dependency resolution entirely). Faster installs when nothing changed.

minimumReleaseAgeExclude

All five exclusions (@vitejs/plugin-rsc, react-server-dom-webpack, react-dom, react, next) are retained. These are fast-moving core dependencies where the team wants to adopt new versions immediately without waiting 24h.

Verification

  • vp install --no-frozen-lockfile completed successfully with pnpm 11.1.1
  • vp check passed (format, lint, type checks)
  • Lockfile unchanged (pnpm 11 is compatible with existing lockfile)

- Bump packageManager from pnpm@10.32.1 to pnpm@11.1.1
- Migrate .npmrc settings to pnpm-workspace.yaml (pnpm 11 only reads auth/registry from .npmrc)
  - auto-install-peers=false -> autoInstallPeers: false
  - Remove playground save-exact=true (minor pnpm add preference, not needed for builds)
- Convert onlyBuiltDependencies list to allowBuilds map (pnpm 11 format)
- Add frozenLockfile: true and preferFrozenLockfile: true
- Delete .npmrc files (contained no auth settings)
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 12, 2026

Open in StackBlitz

npm i https://pkg.pr.new/vinext@1185

commit: 267cd55

@github-actions
Copy link
Copy Markdown

Example Preview Production Original
app-router-cloudflare preview production
pages-router-cloudflare preview production
app-router-playground preview production original
realworld-api-rest preview production
nextra-docs-template preview production
benchmarks preview production
hackernews preview production original

@james-elicx james-elicx force-pushed the chore/pnpm-11-frozen-lockfile branch 3 times, most recently from 3dcb1e1 to 77827e0 Compare May 12, 2026 22:41
@james-elicx james-elicx enabled auto-merge (squash) May 12, 2026 22:42
@james-elicx james-elicx force-pushed the chore/pnpm-11-frozen-lockfile branch from 77827e0 to da8bfdd Compare May 12, 2026 22:43
@james-elicx james-elicx disabled auto-merge May 12, 2026 22:44
@james-elicx
Copy link
Copy Markdown
Collaborator Author

/bigbonk review

Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk Bot left a comment

Choose a reason for hiding this comment

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

Review

Clean migration. The .npmrcpnpm-workspace.yaml moves, onlyBuiltDependenciesallowBuilds conversion, and CI env overrides all look correct per the pnpm v11 migration guide.

One question

minimumReleaseAgeExclude removal — The PR removes all five exclusions (@vitejs/plugin-rsc, react-server-dom-webpack, react-dom, react, next) without replacement. The PR description says they are "retained", but the diff shows them deleted. This means new releases of these packages will now be subject to the 24-hour minimumReleaseAge: 1440 hold.

Is this intentional? These are fast-moving core deps where the team previously wanted immediate adoption. If you still want that behavior, add the list back:

minimumReleaseAgeExclude:
  - "@vitejs/plugin-rsc"
  - react-server-dom-webpack
  - react-dom
  - react
  - next

The setting is still supported in pnpm 11, so this isn't a migration requirement — it looks like an accidental deletion in the second commit ("fix: handle pnpm 11 strictDepBuilds, preserve autoInstallPeers, remove minimumReleaseAgeExclude"). The commit message even says "Remove minimumReleaseAgeExclude entirely", but the PR body says the opposite. One of these is wrong.

Everything else LGTM

  • autoInstallPeers: false correctly preserves the .npmrc behavior.
  • frozenLockfile: true + preferFrozenLockfile: true are the right lockfile settings.
  • allowBuilds map is correct — unrs-resolver: false explicitly denies its build scripts, which is the right call.
  • pnpm_config_strict_dep_builds: "false" on the two create-next-app CI steps is the correct fix — the scaffolded project is outside the workspace so our allowBuilds config doesn't apply, and pnpm 11's default strictDepBuilds: true would abort on unreviewed build scripts from CNA's deps.
  • Both .npmrc deletions are safe (no auth settings).

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented May 12, 2026

Review posted on PR #1185.

Summary: The pnpm 10 → 11 migration is clean and mechanically correct. The one issue I flagged is a contradiction between the PR description (which says the minimumReleaseAgeExclude list is "retained") and the actual diff (which deletes it entirely). The commit message confirms the deletion was intentional, so the PR body needs updating — or the exclusions need to be added back if the team still wants immediate adoption of @vitejs/plugin-rsc, react, react-dom, react-server-dom-webpack, and next.

github run

@james-elicx james-elicx force-pushed the chore/pnpm-11-frozen-lockfile branch from da8bfdd to 149ee89 Compare May 12, 2026 22:47
…e minimumReleaseAgeExclude

- Add unrs-resolver: false to allowBuilds (reviewed, deny build scripts)
- Keep autoInstallPeers: false to match existing lockfile
- Remove minimumReleaseAgeExclude entirely
- Pre-seed pnpm-workspace.yaml with allowBuilds in the scaffolded
  create-next-app directory so pnpm 11 doesn't abort on unreviewed
  build scripts (sharp, unrs-resolver)
@james-elicx james-elicx force-pushed the chore/pnpm-11-frozen-lockfile branch from 149ee89 to 267cd55 Compare May 12, 2026 22:48
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.

1 participant