Skip to content

Commit

Permalink
fix(arborist): fix unescaped periods (#4462)
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR authored and lukekarrys committed Feb 23, 2022
1 parent 5b29666 commit f4c5f0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion workspaces/arborist/lib/arborist/reify.js
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ module.exports = cls => class Reifier extends cls {
// Shrinkwrap and Node classes carefully, so for now, just treat
// the default reg as the magical animal that it has been.
return resolved && resolved
.replace(/^https?:\/\/registry.npmjs.org\//, this.registry)
.replace(/^https?:\/\/registry\.npmjs\.org\//, this.registry)
}

// bundles are *sort of* like shrinkwraps, in that the branch is defined
Expand Down
4 changes: 2 additions & 2 deletions workspaces/arborist/lib/shrinkwrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ const swKeyOrder = [
]

// used to rewrite from yarn registry to npm registry
const yarnRegRe = /^https?:\/\/registry.yarnpkg.com\//
const npmRegRe = /^https?:\/\/registry.npmjs.org\//
const yarnRegRe = /^https?:\/\/registry\.yarnpkg\.com\//
const npmRegRe = /^https?:\/\/registry\.npmjs\.org\//

// sometimes resolved: is weird or broken, or something npa can't handle
const specFromResolved = resolved => {
Expand Down

0 comments on commit f4c5f0e

Please sign in to comment.