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

feat: add flag --omit-lockfile-registry-resolved #4874

Merged
merged 2 commits into from
May 10, 2022

Conversation

fritzy
Copy link
Contributor

@fritzy fritzy commented May 9, 2022

  • feat(arborist): added flag to omit lockfile resolved
  • feat: add flag --omit-lockfile-registry-resolved

From @everett1992
Implement $disable-write-resolves described in npm/rfcs#486. I named
the option omitLockfileRegistryResolved but that can be changed later.

Put simply, this option causes npm to create lock files without a
resolved key for registry dependencies forcing npm to use the current
configured registry and resolve package tarball urls on install. This
fixes install errors when users change registries and the recorded
resolved url is incorrect.

This option causes slower installs because npm must fetch each packages
manifest to find the tarball url, but it's the most comprehensive
solution to this problem. Options like recording always the default
registry, or recording a special 'current registry' sigil will break if
registries host tarballs at different paths. For example
${REGISTRY}/npm/-/npm-8.3.0.tgz only works if all registries host
tarballs at npm/-/npm-8.3.0.tgz.

@fritzy fritzy requested a review from a team as a code owner May 9, 2022 21:31
@npm-robot
Copy link
Contributor

no statistically significant performance changes detected

timing results
app-large clean lock-only cache-only cache-only
peer-deps
modules-only no-lock no-cache no-modules no-clean no-clean
audit
npm@8 50.131 ±1.55 30.114 ±0.07 35.978 ±27.38 18.537 ±0.07 2.610 ±0.02 2.626 ±0.00 2.228 ±0.21 10.919 ±0.03 2.063 ±0.02 3.120 ±0.16
#4874 50.545 ±1.24 32.075 ±2.40 29.332 ±17.26 19.511 ±0.75 2.742 ±0.01 2.735 ±0.01 2.219 ±0.00 10.989 ±0.21 2.206 ±0.02 3.288 ±0.21
app-medium clean lock-only cache-only cache-only
peer-deps
modules-only no-lock no-cache no-modules no-clean no-clean
audit
npm@8 36.185 ±0.13 22.940 ±0.31 12.126 ±0.14 12.830 ±0.12 2.395 ±0.00 2.409 ±0.03 2.133 ±0.01 7.887 ±0.14 1.955 ±0.01 2.692 ±0.01
#4874 37.956 ±1.87 23.254 ±0.01 12.291 ±0.13 13.120 ±0.04 2.501 ±0.02 2.543 ±0.07 2.260 ±0.00 7.986 ±0.06 2.087 ±0.03 2.802 ±0.02

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.

4 participants