Skip to content

Commit f0627fa

Browse files
committed
test: disable test for IPv6 with zone identifier
The built-in URL class dropped support for zone identifiers in IPv6 address literals in Node.js 20. Calling the URL constructor with a URL containing a zone identifier causes ERR_INVALID_URL to be thrown. This is likely a result of switching to version 2.0 of the Ada URL parser in <nodejs/node#47339>. The behavior aligns with how [IPv6 address is defined in the WHATWG URL Standard](https://url.spec.whatwg.org/#concept-ipv6), which notes that > Support for <zone_id> is intentionally omitted. As explained in the issue tracker: https://www.w3.org/Bugs/Public/show_bug.cgi?id=27234#c2 whatwg/url#392 Skip this test, since this URL format is not supported. If it's necessary to support SCP-like git URLs with zone identifiers, we'll need to roll our own support. Signed-off-by: Kevin Locke <[email protected]>
1 parent d6d0cb8 commit f0627fa

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/lib/git-utils.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,14 @@ describe('gitUtils', () => {
344344
);
345345
});
346346

347-
it('parses SCP-like URL with IPv6 zone index like ssh: URL', () => {
347+
// Support for zone index in IPv6 address was dropped in Node.js 20,
348+
// probably by Ada 2.0 <https://github.com/nodejs/node/pull/47339>
349+
// to align with how IPv6 address is defined in the WHATWG URL Standard:
350+
// https://url.spec.whatwg.org/#concept-ipv6
351+
// See:
352+
// https://www.w3.org/Bugs/Public/show_bug.cgi?id=27234#c2
353+
// https://github.com/whatwg/url/issues/392
354+
xit('parses SCP-like URL with IPv6 zone index like ssh: URL', () => {
348355
const testUrl = 'user@[fe80::1ff:fe23:4567:890a%eth2]:foo/bar.git';
349356
assert.deepStrictEqual(
350357
gitUtils.parseGitUrl(testUrl),

0 commit comments

Comments
 (0)