Closed
Description
Version
v19.1.0
Platform
Darwin Jordans-MacBook-Pro-2.local 20.6.0 Darwin Kernel Version 20.6.0: Thu Sep 29 20:15:11 PDT 2022; root:xnu-7195.141.42~1/RELEASE_X86_64 x86_64
Subsystem
url
What steps will reproduce the bug?
url.parse('https://git@github.com:inspect-js/is-array-buffer.git')
How often does it reproduce? Is there a required condition?
node v19.1.0 always reproduces it; any earlier version does not.
What is the expected behavior?
Url {
protocol: 'https:',
slashes: true,
auth: 'git',
host: 'github.com',
port: null,
hostname: 'github.com',
hash: null,
search: null,
query: null,
pathname: '/:inspect-js/is-array-buffer.git',
path: '/:inspect-js/is-array-buffer.git',
href: 'https://git@github.com/:inspect-js/is-array-buffer.git'
}
What do you see instead?
Uncaught TypeError [ERR_INVALID_URL]: Invalid URL
at __node_internal_captureLargerStackTrace (node:internal/errors:484:5)
at new NodeError (node:internal/errors:393:5)
at getHostname (node:url:521:15)
at Url.parse (node:url:390:14)
at Object.urlParse [as parse] (node:url:147:13) {
input: 'https://git@github.com:inspect-js/is-array-buffer.git',
code: 'ERR_INVALID_URL'
}
Additional information
Specifically, this breaks https://npmjs.com/auto-changelog via https://npmjs.com/parse-github-url in node 19.1+.
Metadata
Metadata
Assignees
Labels
No labels