Switch root package manager to pnpm 10#1321
Conversation
Co-authored-by: Steven <styfle@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: Steven <styfle@users.noreply.github.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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" | ||
| }, |
There was a problem hiding this comment.
Commit c3c8c19 removed pnpm.onlyBuiltDependencies from sub-project package.json files, breaking native module builds when these projects are installed standalone (outside the workspace).
There was a problem hiding this comment.
They were moved into pnpm-workspace.yaml
There was a problem hiding this comment.
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.
Co-authored-by: Steven <styfle@users.noreply.github.com>
Summary
minimumReleaseAge: 2880, scoped to the root package so standalone examples keep their own dependency graphscorepack enable pnpm.npmrcfiles withignore-workspace=truevercel.jsoninstall overrides with standalone pnpm workspace/npmrc confignext-env.d.tsfiles in root Prettier checksTesting
pnpm install --frozen-lockfilepnpm testpnpm install --frozen-lockfile && pnpm buildinbasics/learn-starter/pnpm install --frozen-lockfile && pnpm exec next --versionindashboard/final-example/pnpm install --frozen-lockfile && pnpm exec next --versionindashboard/starter-example/pnpm install --frozen-lockfile && pnpm buildinseo/pnpm install --frozen-lockfile && pnpm buildinseo/demo/test, Socket Security, and all Vercel preview deployments