Skip to content

Switch root package manager to pnpm 10#1321

Open
styfle wants to merge 9 commits into
mainfrom
styfle-ai/switch-to-pnpm-26d0
Open

Switch root package manager to pnpm 10#1321
styfle wants to merge 9 commits into
mainfrom
styfle-ai/switch-to-pnpm-26d0

Conversation

@styfle
Copy link
Copy Markdown
Member

@styfle styfle commented May 21, 2026

Summary

  • pin the root package manager to pnpm 10.33.0 with the requested integrity string
  • add root pnpm workspace settings with minimumReleaseAge: 2880, scoped to the root package so standalone examples keep their own dependency graphs
  • keep pnpm native build approvals in pnpm workspace files instead of package manifests
  • update CI to enable pnpm through Corepack and install with a frozen lockfile, without package-manager cache logic
  • simplify the CI Corepack step to corepack enable pnpm
  • add the Prettier package-json plugin required by the shared style guide under pnpm 10
  • preserve standalone pnpm installs for example app folders via exact .npmrc files with ignore-workspace=true
  • replace SEO vercel.json install overrides with standalone pnpm workspace/npmrc config
  • ignore generated next-env.d.ts files in root Prettier checks

Testing

  • pnpm install --frozen-lockfile
  • pnpm test
  • pnpm install --frozen-lockfile && pnpm build in basics/learn-starter/
  • pnpm install --frozen-lockfile && pnpm exec next --version in dashboard/final-example/
  • pnpm install --frozen-lockfile && pnpm exec next --version in dashboard/starter-example/
  • pnpm install --frozen-lockfile && pnpm build in seo/
  • pnpm install --frozen-lockfile && pnpm build in seo/demo/
  • PR checks passed: test, Socket Security, and all Vercel preview deployments
Open in Web Open in Cursor 

Co-authored-by: Steven <styfle@users.noreply.github.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
next-learn-dashboard Ready Ready Preview, Comment, Open in v0 May 21, 2026 10:36pm
next-learn-starter Ready Ready Preview, Comment, Open in v0 May 21, 2026 10:36pm
next-seo-starter Ready Ready Preview, Comment, Open in v0 May 21, 2026 10:36pm

Co-authored-by: Steven <styfle@users.noreply.github.com>
@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 21, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​next@​14.2.33 ⏵ 14.2.3557 +150 +2194 +199 +4970
Addednpm/​lodash@​4.18.1761008785100
Updatedgithub/​actions/​setup-node@​3235b876344d2a9aa001b8d1453c930bba69e610 ⏵ 49933ea5288caeca8642d1e84afbd3f7d682002099 +1810010010080 +21
Addednpm/​@​tailwindcss/​forms@​0.5.1110010010090100

View full report

Co-authored-by: Steven <styfle@users.noreply.github.com>
Co-authored-by: Steven <styfle@users.noreply.github.com>
Co-authored-by: Steven <styfle@users.noreply.github.com>
Co-authored-by: Steven <styfle@users.noreply.github.com>
Co-authored-by: Steven <styfle@users.noreply.github.com>
Co-authored-by: Steven <styfle@users.noreply.github.com>
"@types/node": "22.10.7",
"@types/react": "19.0.7",
"@types/react-dom": "19.0.3"
},
Copy link
Copy Markdown
Contributor

@vercel vercel Bot May 21, 2026

Choose a reason for hiding this comment

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

Commit c3c8c19 removed pnpm.onlyBuiltDependencies from sub-project package.json files, breaking native module builds when these projects are installed standalone (outside the workspace).

Fix on Vercel

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

They were moved into pnpm-workspace.yaml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The pnpm-workspace.yaml settings won't apply to these sub-projects when they're installed standalone. I verified this locally:

With --ignore-workspace (as used in seo/vercel.json and seo/demo/vercel.json):
The parent pnpm-workspace.yaml's onlyBuiltDependencies is ignored, and pnpm outputs:

Ignored build scripts: sharp@0.33.5.
Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts.

With pnpm.onlyBuiltDependencies in the sub-project's own package.json:
Sharp's install script runs correctly:

.../sharp@0.33.5/node_modules/sharp install$ node install/check
.../sharp@0.33.5/node_modules/sharp install: Done

Since --ignore-workspace causes pnpm to ignore the entire pnpm-workspace.yaml file (not just workspace package linking), the standalone sub-projects need their own pnpm.onlyBuiltDependencies in their package.json.

Comment thread dashboard/final-example/package.json
Co-authored-by: Steven <styfle@users.noreply.github.com>
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