[RRFC] Support multiple registries per scope in .npmrc
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 777
- Forks
- 267
- PR merge metrics
- No merged PRs in 30d
Description
Motivation ("The Why")
The current .npmrc configuration model allows specifying only one registry per scope, which is too limiting for more complex setups.
Example
We use a self-hosted GitLab instance as our internal NPM registry provider. GitLab supports publishing packages at different levels:
- Project-level registry — each project has its own NPM registry.
- Group-level registry — a registry that aggregates all packages from child projects in the group.
- Instance-level (global) registry — exposes packages using the group name as the scope, and the project name as the package name.
Suppose we have the following structure:
project-apublished to:https://gitlab.example.com/api/v4/projects/1/packages/npm/libraries/*packages published to:https://gitlab.example.com/api/v4/groups/6/-/packages/npm/
This setup introduces limitations for consumers:
- We want to use a single shared scope, such as
@our-org/*, across all packages in our organization. - Some packages are published to project-level registries, while others use group-level registries.
References
- Related/Reference to #427
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 by reading the .npmrc configuration model described in this issue and the related proposal in #427. Define how multiple project- and group-level registries should coexist under one scope, then document the expected configuration and resolution behavior as the completed RFC.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100