@whatwg-node/node-fetch 0.7.6-alpha-20241227121605-8911b685bebd9f2198f82c42c90726a4d70a56d7 → 0.7.6-alpha-20241227122457-838b214388a3c0a16ea938f318fd2e0ec81082d8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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-20241227122457-838b214388a3c0a16ea938f318fd2e0ec81082d8",
|
4
4
|
"description": "Fetch API implementation for Node",
|
5
5
|
"sideEffects": false,
|
6
6
|
"dependencies": {
|