Skip to content
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

Document special meaning of registry.npmjs.com #38

Closed
wants to merge 1 commit into from

Conversation

everett1992
Copy link

This behavior has been present in npm for a while, but I haven't found
where it's documented. This is my attempt at documenting the behavior
based on my understanding of it. I think a SME should contribute to this
so the documentation is correct. This behavior seems to have changed a little in v7

npm/feedback#544
aws/aws-cdk#16607

I'd really like to discus improving this behavior. Packages should have more control over the resolved url, at-least packages using a custom registry should be able to record a resolved value in the lockfile that means 'the currently configured registry'. An easy and compatible option may be a configuration for the registry to record. npm would replace NPM_CONFIG_REGISTRY with NPM_CONFIG_REGISTRY_TO_RECORD when writing the lock. The comment in arborist suggests a plan to remove the special behavior of registry.npmjs.org which I support but I think it would require a new lock file format.

This behavior has been present in npm for a while, but I haven't found
where it's documented. This is my attempt at documenting the behavior
based on my understanding of it. I think a SME should contribute to this
so the documentation is correct.

npm/feedback#544
https://github.com/npm/arborist/blob/478871bf0a44a8ec516b9057585b8707e60b0349/lib/arborist/reify.js#L687-L693
npm/cli#3783
@npm-docs-robot
Copy link

👋 I'm your friendly documentation robot, and I'm going to build your pull request on our staging site so that you can review it. If you push up subsequent commits, I'll rebuild your staging area (and when this pull request is closed, I'll clean that staging area up).

I'll let you know when I'm done! 🤖

@npm-docs-robot
Copy link

👋 I've finished building this pull request on our staging site. 🤖

To see how it looks, visit: https://docs-staging.npmjs.com/38/

@wraithgar
Copy link
Member

These files are source from the cli itself so changes will need to happen there.

@MylesBorins
Copy link
Contributor

Specifically the PR should be made against https://github.com/npm/cli, it will got updated in this repo when the change lands there

@everett1992
Copy link
Author

Pull request against npm/cli npm/cli#3784

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants