Skip to content

Migrate to pnpm v10 as package manager - #435

Merged
nohwnd merged 3 commits into
pester:mainfrom
fflaten:pnpm
Aug 11, 2026
Merged

Migrate to pnpm v10 as package manager#435
nohwnd merged 3 commits into
pester:mainfrom
fflaten:pnpm

Conversation

@fflaten

@fflaten fflaten commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Replaces yarn v1 (classic) with pnpm v10 as new package manager. pnpm is a popular and modern package manager:

  • It's really fast - and will soon become even faster with v12, a v11-compatible rewrite in Rust
  • Uses a global store that reuses packages between projects, saving disk-space
  • Great security features for less chain-supply risk etc. Even though it's not really important for this static site.

Pinning pnpm v10 for now because Dependabot-support for v11 is still in beta. Might go straight to v12 when ready.

One of the security features is blocking postinstall-scripts in packages. Currently configured:

  • @swc/core: Allowed. Used by docusaurus. Downloads a OS-dependent native binary.
  • core-js: Denied. Just a funding notice.

Fix #275

@fflaten

fflaten commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

@nohwnd I just noticed Netlify has been using npm run build and not yarn build until now (and pnpm build here). If this is approved, do you want to update in UI or should I commit a netlify.toml in the repo to configure it?

nohwnd added 2 commits August 11, 2026 21:01
yarn.lock was deleted here and bumped by dependabot on main. Keeping it
deleted, pnpm-lock.yaml already resolves brace-expansion 1.1.18 and
js-yaml 4.3.1.
Netlify was still running 'npm run build' from the UI settings. Move the
build command and publish dir into the repo so they are versioned.
@nohwnd

nohwnd commented Aug 11, 2026

Copy link
Copy Markdown
Member

Went with netlify.toml, pushed it to your branch along with a merge of main. yarn.lock conflicted, kept it deleted, pnpm-lock already has the versions dependabot bumped.

Build command is pnpm build, publish is build, node stays in .nvmrc. Preview is green so pnpm and node 26 are both fine on their image.

The UI settings are overridden by the file now, so leave them or clear them, does not matter. One thing I cannot check: if there is a NODE_VERSION variable set in the UI it wins over .nvmrc and your node 26 bump never applied. Can you look?

🤖

@nohwnd
nohwnd merged commit 1c880e9 into pester:main Aug 11, 2026
4 checks passed
nohwnd added a commit that referenced this pull request Aug 11, 2026
…444)

Main does not build since #435. The tutorial components and the swizzled
theme files from #421 import @docusaurus/plugin-content-docs/client and
@docusaurus/theme-common, but neither package is in package.json. They only
ever came in transitively through @docusaurus/preset-classic, and yarn
hoisted them into a flat node_modules so the imports resolved. pnpm uses a
strict layout where a package that is not declared is not resolvable, so the
client bundle now fails with 8 "Module not found" errors.

Both PRs are green on their own, the combination is what breaks, so neither
deploy preview caught it.

Verified: pnpm build fails on 1c880e9 and passes with this change.

🤖
@fflaten
fflaten deleted the pnpm branch August 11, 2026 20:59
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.

Upgrade package manager?

2 participants