Skip to content

Commit

Permalink
fix: use registry.npmjs.com to fix shinkwrap resolves
Browse files Browse the repository at this point in the history
Use the npm registry instead of yarns mirror.
npm treats registry.npmjs.org as a special value that means 'the current
configured package' in package-lock and npm-shrinkwrap.  if we use
registry.yarnpkg.com in our shrinkwrap then users with a custom registry
will be forced to registry.yarnpkg.com.
npm/cli#3783

I updated yarn.lock with sed instead of running `yarn install` and
checking in the generated lockfile because there were other changes in
the file. `yarn install` in a clean package also showed a diff.

```
sed 's|https://registry.yarnpkg.com|https://registry.npmjs.org|' yarn.lock -i
```
  • Loading branch information
Caleb ツ Everett committed Sep 22, 2021
1 parent ab5a6bb commit b5f0ac2
Show file tree
Hide file tree
Showing 2 changed files with 1,557 additions and 1,549 deletions.
8 changes: 8 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
--install.check-files true # install will verify file tree of packages for consistency
--install.audit true # Run vulnerability audit on installed packages

# Use the npm registry instead of yarns mirror.
# npm treats registry.npmjs.org as a special value that means 'the current
# configured package' in package-lock and npm-shrinkwrap. if we use
# registry.yarnpkg.com in our shrinkwrap then users with a custom registry will
# be forced to registry.yarnpkg.com.
# https://github.com/npm/cli/issues/3783
registry "https://registry.npmjs.org"
Loading

0 comments on commit b5f0ac2

Please sign in to comment.