[RRFC] The `.npmrc` file should be valid for any dependency, whether direct or indirect
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 777
- Forks
- 267
- PR merge metrics
- No merged PRs in 30d
Description
Motivation
The background of this problem is that I have A project whose direct dependency on A is A ', and another direct dependency on B that depends on C is C '. After I set the corresponding cache to A and C in the.npmrc file, the indirect dependency on C will not take effect and its address will be the global address
Example
registry=https://registry.npm.taobao.org/
A:registry=A'
C:registry=C'
The directly dependent address of A is the correct A ', but the address of indirect C is the global registry
How
Current Behaviour
The setting of indirect dependencies is invalid in the '.npmrc' file
Desired Behaviour
Both direct and indirect dependencies should be downloaded correctly according to the configuration
References
- Related/Reference to #4762
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the issue's .npmrc example and compare the direct and indirect dependency resolution described there, then read the related discussion in #4762. A complete proposal should establish how configured registries apply to both dependency levels and define the expected resolution behavior for the example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100