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

docs: document special meaning of registry.npmjs.com #3784

Merged
merged 1 commit into from Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/content/configuring-npm/package-lock-json.md
Expand Up @@ -138,7 +138,8 @@ Package descriptors have the following fields:
the case of packages fetched from the registry, this will be a url to a
tarball. In the case of git dependencies, this will be the full git url
with commit sha. In the case of link dependencies, this will be the
location of the link target.
location of the link target. `registry.npmjs.org` is a magic value meaning
"the currently configured registry".

* integrity: A `sha512` or `sha1` [Standard Subresource
Integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/)
Expand Down Expand Up @@ -201,7 +202,8 @@ Dependency objects have the following fields:

* resolved: For registry sources this is path of the tarball relative to
the registry URL. If the tarball URL isn't on the same server as the
registry URL then this is a complete URL.
registry URL then this is a complete URL. `registry.npmjs.org` is a magic
value meaning "the currently configured registry".

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😱😱😱


* bundled: If true, this is the bundled dependency and will be installed
by the parent module. When installing, this module will be extracted
Expand Down
7 changes: 7 additions & 0 deletions docs/content/using-npm/registry.md
Expand Up @@ -30,6 +30,13 @@ The registry URL used is determined by the scope of the package (see
supplied by the `registry` config parameter. See [`npm config`](/commands/npm-config),
[`npmrc`](/configuring-npm/npmrc), and [`config`](/using-npm/config) for more on managing npm's configuration.

When the default registry is used in a package-lock or shrinkwrap is has the
special meaning of "the currently configured registry". If you create a lock
file while using the default registry you can switch to another registry and
npm will install packages from the new registry, but if you create a lock
file while using a custom registry packages will be installed from that
registry even after you change to another registry.

### Does npm send any information about me back to the registry?

Yes.
Expand Down