From 1a03e048d54f772b50466f9672fbdb61a74e2c5c Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 23 Feb 2022 16:09:54 +0200 Subject: [PATCH] fix(arborist): fix unescaped periods --- workspaces/arborist/lib/arborist/reify.js | 2 +- workspaces/arborist/lib/shrinkwrap.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/workspaces/arborist/lib/arborist/reify.js b/workspaces/arborist/lib/arborist/reify.js index 91507fd791871..92e2b69606c81 100644 --- a/workspaces/arborist/lib/arborist/reify.js +++ b/workspaces/arborist/lib/arborist/reify.js @@ -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 diff --git a/workspaces/arborist/lib/shrinkwrap.js b/workspaces/arborist/lib/shrinkwrap.js index bb6971f7ad57a..f4af71f478d5a 100644 --- a/workspaces/arborist/lib/shrinkwrap.js +++ b/workspaces/arborist/lib/shrinkwrap.js @@ -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 => {