Skip to content

docs(github-runner-arc): say how pnpm 10 uses the node cache - #147

Draft
Mearman wants to merge 1 commit into
mainfrom
docs/node-cache-pnpm-10
Draft

Mearman wants to merge 1 commit into
mainfrom
docs/node-cache-pnpm-10

Conversation

@Mearman

@Mearman Mearman commented Oct 28, 2026

Copy link
Copy Markdown
Member

The node-cache pnpm example in the role README only works on pnpm 11. I tried it against pnpm 10.29.3: pnpm_config_store_dir is ignored, the store lands in the default location, and enableGlobalVirtualStore is forced to false whenever CI is set, which it always is in Actions. pnpm 11.19.0 only does that when the setting is not given explicitly. Read from the installed pnpm.cjs and pnpm.mjs, and confirmed with a real install under CI=true (virtualStoreDir stays .pnpm).

So on pnpm 10 the store has to be named with --store-dir, and since it sits on another mount from the workspace pnpm copies instead of linking. This adds that as a paragraph and a one-line step beside the existing example. Docs only; the example the unit test reads is untouched and DocumentedExampleTest passes.

The node-cache example names the store with `pnpm_config_store_dir` and turns
on the global virtual store through the environment, which is pnpm 11.
pnpm 10 does not read `pnpm_config_*` variables, and it switches the global
virtual store off whenever `CI` is set, so an Actions job on pnpm 10 gets the
store only through `--store-dir` and imports from it by copying, because the
store sits on another mount than the workspace.
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