Skip to content

Commit adbdc01

Browse files
author
Milan Meva
committed
fix: use hosted-git-info to correctly parse resolved git urls
1 parent 7233cb3 commit adbdc01

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • workspaces/arborist/lib/arborist

workspaces/arborist/lib/arborist/reify.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const debug = require('../debug.js')
99
const { walkUp } = require('walk-up-path')
1010
const { log, time } = require('proc-log')
1111
const rpj = require('read-package-json-fast')
12+
const hgi = require('hosted-git-info')
1213

1314
const { dirname, resolve, relative, join } = require('node:path')
1415
const { depth: dfwalk } = require('treeverse')
@@ -886,7 +887,7 @@ module.exports = cls => class Reifier extends cls {
886887
// Shrinkwrap and Node classes carefully, so for now, just treat
887888
// the default reg as the magical animal that it has been.
888889
try {
889-
const resolvedURL = new URL(resolved)
890+
const resolvedURL = hgi.parseUrl(resolved)
890891

891892
if ((this.options.replaceRegistryHost === resolvedURL.hostname) ||
892893
this.options.replaceRegistryHost === 'always') {

0 commit comments

Comments
 (0)