@whatwg-node/node-fetch 0.7.6-alpha-20241227121605-8911b685bebd9f2198f82c42c90726a4d70a56d7 → 0.7.6-alpha-20241227121722-12cf66fa193e9b7d8a4f1b0456ec0c02d1bd0466
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/URL.js +3 -1
- package/esm/URL.js +3 -1
- package/package.json +1 -1
package/cjs/URL.js
CHANGED
@@ -18,7 +18,9 @@ class PonyfillURL extends fast_url_parser_1.default {
|
|
18
18
|
return;
|
19
19
|
}
|
20
20
|
this.parse(url, false);
|
21
|
-
// `fast-url-parser`
|
21
|
+
// `fast-url-parser` incorrectly removes `[IPV6]` in the hostname
|
22
|
+
// Then `hostname` doesn't include `[` and `]` for IPv6 URLs
|
23
|
+
// This breaks implementations that rely on `hostname` to include `[` and `]`
|
22
24
|
if ((url.startsWith('http://[') || url.startsWith('https://[')) &&
|
23
25
|
IPV6_REGEX.test(this.hostname)) {
|
24
26
|
this.hostname = `[${this.hostname}]`;
|
package/esm/URL.js
CHANGED
@@ -14,7 +14,9 @@ export class PonyfillURL extends FastUrl {
|
|
14
14
|
return;
|
15
15
|
}
|
16
16
|
this.parse(url, false);
|
17
|
-
// `fast-url-parser`
|
17
|
+
// `fast-url-parser` incorrectly removes `[IPV6]` in the hostname
|
18
|
+
// Then `hostname` doesn't include `[` and `]` for IPv6 URLs
|
19
|
+
// This breaks implementations that rely on `hostname` to include `[` and `]`
|
18
20
|
if ((url.startsWith('http://[') || url.startsWith('https://[')) &&
|
19
21
|
IPV6_REGEX.test(this.hostname)) {
|
20
22
|
this.hostname = `[${this.hostname}]`;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@whatwg-node/node-fetch",
|
3
|
-
"version": "0.7.6-alpha-
|
3
|
+
"version": "0.7.6-alpha-20241227121722-12cf66fa193e9b7d8a4f1b0456ec0c02d1bd0466",
|
4
4
|
"description": "Fetch API implementation for Node",
|
5
5
|
"sideEffects": false,
|
6
6
|
"dependencies": {
|