-
-
Notifications
You must be signed in to change notification settings - Fork 205
fix: pnpm installs hang forever - close stdin, harden the pnpm backend #6139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
NathanWalker
wants to merge
2
commits into
main
Choose a base branch
from
fix/pnpm-in-workspaces
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+315
−24
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🌐 Web query:
For the pnpm versions supported by this repository, can.npmrcusehoist-pattern[]orpublic-hoist-pattern[]? Provide the applicable official documentation.💡 Result:
Yes, the
hoist-pattern[]andpublic-hoist-pattern[]configurations are supported in.npmrcfiles, although the official pnpm documentation primarily recommends configuring these settings inpnpm-workspace.yamlor a global configuration file (~/.config/pnpm/config.yaml) for better stability and clarity [1][2]. While these settings are technically supported via the.npmrcfile using the array syntax (e.g.,hoist-pattern[]=...) [3][4], they are often categorized under workspace-specific settings [2]. According to official pnpm documentation, most settings outside of authentication, registry, and proxy configuration should be placed inpnpm-workspace.yaml[1][2]. Important considerations when using these settings in.npmrc: 1. Usage Context: If you are using a pnpm workspace, the settings should ideally reside in yourpnpm-workspace.yaml[1][2]. 2. Compatibility Risks: Defining these settings in.npmrchas historically caused issues when pnpm is invoked through tools likenpxor certainnpmscripts, as the underlying environment may incorrectly parse or override the array-based settings [4]. 3. Syntax: When used in.npmrc, the syntax requires the[]suffix to denote an array, for example:public-hoist-pattern[]=*types*[3]. You can find further details in the official documentation regarding node-modules and hoisting settings at: https://pnpm.io/settings/node-modulesCitations:
🏁 Script executed:
Repository: NativeScript/nativescript-cli
Length of output: 27640
🏁 Script executed:
Repository: NativeScript/nativescript-cli
Length of output: 4219
Recognize array-valued layout settings.
When the pnpm version accepts
hoist-pattern[]orpublic-hoist-pattern[]in.npmrc,layoutKeyPatterndoes not match the[]suffix.projectManagesOwnHoistingthen returnsfalse, soinstalladds--shamefully-hoist. This can trigger the non-interactive layout conflict.Allow an optional
[]suffix and add tests for both keys.🤖 Prompt for AI Agents