fix(pnpm-store): support pnpm 11's config.yaml for store-dir#37
Merged
Conversation
- add support for pnpm 11 in config files - write storeDir to both .npmrc and config.yaml - ensure ownership of config directory
✅ PR Validation Passed
📋 Pipeline Status
🤖 Generated by @helpers4 CI • 2026-06-16 |
- grep-and-replace storeDir in ~/.config/pnpm/config.yaml instead of overwriting the whole file, matching the .npmrc handling - make the config.yaml write atomic (tmp + mv) and non-fatal on mkdir failure, so it can't abort the rest of install.sh or the guard - chown only the pnpm config subdir recursively, not all of ~/.config - add a test.sh assertion for the new config.yaml mechanism Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
store-dir) from~/.npmrc— they must now live inpnpm-workspace.yamlor the global~/.config/pnpm/config.yaml.~/.npmrcset,store-dirsilently resolved toundefinedunder pnpm 11, so pnpm fell back to creating a.pnpm-storefolder relative to cwd — the exact stray folder this feature exists to prevent (observed in thetypescriptrepo when pnpm switched itself to thepackageManager-pinned version).install.sh(build time) and thedevcontainer-pnpm-storeguard (postCreate) now also writestoreDir: /workspaces/.pnpm-storeto~/.config/pnpm/config.yaml, alongside the existing~/.npmrcwrite, so the feature works for pnpm <11 and >=11.Test plan
test/pnpm-store/test.sh)/workspaces/typescript/.pnpm-store, wrote~/.config/pnpm/config.yaml, confirmedpnpm config get store-dirnow resolves to/workspaces/.pnpm-store(wasundefined), andpnpm installno longer recreates a local store folder🤖 Generated with Claude Code