docs(readme): add lockfile=true to recommended NPM_CONFIG_FILE for pnpm 10 compat#23
Merged
Conversation
…pm 10 compat Pnpm < 11.0.0 interprets `package-lock=false` as `lockfile=false`, disabling pnpm-lock.yaml reads and breaking the `pnpm install --frozen-lockfile` step in javascript/base. Adding an explicit `lockfile=true` on the next line re-enables the pnpm lockfile on pnpm 10.x and is harmless (already the default) on pnpm >= 11. Surfaced when a consumer pinned to pnpm@10.x hit ERR_PNPM_NO_LOCKFILE after the previous NPM_CONFIG_FILE recommendation rolled out today. Consumers updating NPM_CONFIG_FILE to this template should append the new line; existing consumers on pnpm 11 keep working either way.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
lockfile=trueto the recommendedNPM_CONFIG_FILEtemplate. Pnpm< 11.0.0interprets the precedingpackage-lock=falseline aslockfile=falseand disablespnpm-lock.yamlreads — colliding withpnpm install --frozen-lockfileinjavascript/base. The new line re-enables the pnpm lockfile explicitly. On pnpm>= 11the line is harmless (already the default;package-lockis scoped to npm's own lockfile).Surfaced today when a consumer pinned to
pnpm@10.xhitERR_PNPM_NO_LOCKFILEafter the newNPM_CONFIG_FILErecommendation rolled out (#22).Action required by consumers
Append
lockfile=trueafterpackage-lock=falsein yourNPM_CONFIG_FILEorg secret. New consumers should adopt the updated template as-is. No CI workflow change is needed.Test plan
lockfile=truerow and updated code block).javascript/base.