We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e6c2e0 commit af96445Copy full SHA for af96445
src/utils/lockfile/package-lock-json.ts
@@ -127,7 +127,10 @@ function getDetailsFromDiff(
127
128
function getUrlOrigin(input: string): string {
129
try {
130
- return URL.parse(input)?.origin ?? ''
+ // TODO: URL.parse is available in Node 22.1.0. We can use it when we drop Node 18.
131
+ // https://nodejs.org/docs/latest-v22.x/api/url.html#urlparseinput-base
132
+ // return URL.parse(input)?.origin ?? ''
133
+ return new URL(input).origin ?? ''
134
} catch {}
135
return ''
136
}
0 commit comments