Skip to content

🐋🔧:install pnpm without corepack - #1823

Merged
openinf-commit-queue[bot] merged 1 commit into
livefrom
chore/replace-corepack
Aug 15, 2026
Merged

🐋🔧:install pnpm without corepack#1823
openinf-commit-queue[bot] merged 1 commit into
livefrom
chore/replace-corepack

Conversation

@DerekNonGeneric

Copy link
Copy Markdown
Member

Node is unbundling corepack, and pnpm no longer needs it.

Why this is mostly deletion

Corepack appeared in three places and did one job in each: switch pnpm to the version in packageManager. Since pnpm 11, pnpm does that itself — from its changelog:

Breaking: removed the managePackageManagerVersions, packageManagerStrict, and packageManagerStrictVersion settings…

Removed setting Replace with
managePackageManagerVersions: true pmOnFail: download (default)

Verified in the container rather than taken on faith:

installed by the devcontainer feature:  11.17.0
run inside this repo:                   11.20.0
packageManager says:                    pnpm@11.20.0

The container

Two lines removed, nothing added. The pnpm feature already installs a real pnpm — and into /usr/local/share/npm-global/bin, which is not tied to a node version. The corepack shim was the one living inside a node version's directory, so this makes pnpm less vulnerable to nvm use in fish, not more.

The workflows

npm install --global "pnpm@$(node -p "require('./package.json').packageManager.replace('pnpm@','').split('+')[0]")"
pnpm --version
pnpm install

npm ships with node, so nothing new is introduced, and the version still comes from packageManager — no third place to keep in step. Installing the named version rather than the newest saves fetching pnpm twice. pnpm --version is there so the log shows the handoff actually happened.

I skipped pnpm/action-setup: these workflows do not use pnpm caching, so its main advantage does not apply, and it would add a third-party action to pin and audit.

The consequence worth knowing about

Corepack kept its copy of pnpm in ~/.cache/node/corepack. Self-management writes one into .pnpm-store/, which is inside the project because hard links cannot cross a filesystem — so four checks started reading pnpm's own changelog and reporting 764 markdown problems in it.

Excluded in four places, because our checks find files two different ways:

  • build/utils.mts — the glob helper, alongside .git/, so every task that asks it for files is covered
  • .markdownlint-cli2.jsonc, cspell.json, .remarkignore — the three tools that discover files themselves rather than being handed a list

Markdown files linted: 28 → 26, both of the two removed being pnpm's.

Verification

  • The run: block extracted from the YAML and executed with npm stubbed: resolves to npm install --global pnpm@11.20.0, and pnpm --version prints 11.20.0
  • bash -n on post-create.sh; both workflows parse as YAML
  • nps test — 16/16 tasks, 72/72 tests
  • No corepack reference remains except the comments explaining its absence

Note

The devcontainer build itself is unverified, as always from inside it. Existing containers keep their corepack shims until rebuilt; they will carry on working, since the shim still resolves packageManager.

One thing genuinely lost: corepack verified the package manager against a hash it shipped with. pnpm's self-download does not.

Node is unbundling corepack, and pnpm no longer needs it: since pnpm 11
the `pmOnFail` setting defaults to `download`, which reads
`packageManager` and fetches that version itself. Verified in the
container -- the feature installs 11.17.0, and running it here reports
11.20.0.

The container loses two lines and gains nothing: the pnpm feature
already installs a real pnpm, into a directory not tied to a node
version, so `nvm use` cannot lose it the way it could lose a corepack
shim. The workflows install the version `packageManager` names rather
than the newest, which saves fetching pnpm twice.

One consequence had to be dealt with: corepack kept its copy of pnpm
outside the project, and self-management writes one into `.pnpm-store/`,
where four checks then read someone else's changelog. The store is
excluded now -- in the glob helper, and in the three tools that find
their own files rather than being handed a list.

Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is>
Assisted-by: Claude-Code:claude-opus-5
@netlify

netlify Bot commented Aug 15, 2026

Copy link
Copy Markdown

Deploy Preview for gh-pages-openinf ready!

Name Link
🔨 Latest commit a2a3837
🔍 Latest deploy log https://app.netlify.com/projects/gh-pages-openinf/deploys/6a80b9e95bde7a00088eba4e
😎 Deploy Preview https://deploy-preview-1823--gh-pages-openinf.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@DerekNonGeneric DerekNonGeneric added the commit-queue Land this pull request when its checks pass label Aug 15, 2026
@openinf-commit-queue
openinf-commit-queue Bot merged commit 93d83f1 into live Aug 15, 2026
15 checks passed
@openinf-commit-queue openinf-commit-queue Bot removed the commit-queue Land this pull request when its checks pass label Aug 15, 2026
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