npm / npm/rfcs

[RRFC] The `.npmrc` file should be valid for any dependency, whether direct or indirect

Open
#569 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.