@whatwg-node/node-fetch 0.7.4-alpha-20241125130302-670fd9851060fb8e736194f703f4026f9566bf40 → 0.7.4-alpha-20241125130609-2d42652904068bfd5c22714b7277b8c77917aeba

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/Request.js CHANGED
@@ -107,7 +107,7 @@ class PonyfillRequest extends Body_js_1.PonyfillBody {
107
107
  get parsedUrl() {
108
108
  if (this._parsedUrl == null) {
109
109
  if (this._url != null) {
110
- this._parsedUrl = new URL_js_1.PonyfillURL(this._url);
110
+ this._parsedUrl = new URL_js_1.PonyfillURL(this._url, 'http://localhost');
111
111
  }
112
112
  else {
113
113
  throw new TypeError('Invalid URL');
package/cjs/URL.js CHANGED
@@ -19,10 +19,10 @@ class PonyfillURL extends fast_url_parser_1.default {
19
19
  this.parse(url, false);
20
20
  if (base) {
21
21
  const baseParsed = typeof base === 'string' ? new PonyfillURL(base) : base;
22
- this.protocol = this.protocol || baseParsed.protocol;
23
- this.host = this.host || baseParsed.host;
24
- this.pathname = this.pathname || baseParsed.pathname;
25
- this.port = this.port || baseParsed.port;
22
+ this.protocol ||= baseParsed.protocol;
23
+ this.host ||= baseParsed.host;
24
+ this.pathname ||= baseParsed.pathname;
25
+ this.port ||= baseParsed.port;
26
26
  }
27
27
  }
28
28
  get origin() {
package/esm/Request.js CHANGED
@@ -104,7 +104,7 @@ export class PonyfillRequest extends PonyfillBody {
104
104
  get parsedUrl() {
105
105
  if (this._parsedUrl == null) {
106
106
  if (this._url != null) {
107
- this._parsedUrl = new PonyfillURL(this._url);
107
+ this._parsedUrl = new PonyfillURL(this._url, 'http://localhost');
108
108
  }
109
109
  else {
110
110
  throw new TypeError('Invalid URL');
package/esm/URL.js CHANGED
@@ -15,10 +15,10 @@ export class PonyfillURL extends FastUrl {
15
15
  this.parse(url, false);
16
16
  if (base) {
17
17
  const baseParsed = typeof base === 'string' ? new PonyfillURL(base) : base;
18
- this.protocol = this.protocol || baseParsed.protocol;
19
- this.host = this.host || baseParsed.host;
20
- this.pathname = this.pathname || baseParsed.pathname;
21
- this.port = this.port || baseParsed.port;
18
+ this.protocol ||= baseParsed.protocol;
19
+ this.host ||= baseParsed.host;
20
+ this.pathname ||= baseParsed.pathname;
21
+ this.port ||= baseParsed.port;
22
22
  }
23
23
  }
24
24
  get origin() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whatwg-node/node-fetch",
3
- "version": "0.7.4-alpha-20241125130302-670fd9851060fb8e736194f703f4026f9566bf40",
3
+ "version": "0.7.4-alpha-20241125130609-2d42652904068bfd5c22714b7277b8c77917aeba",
4
4
  "description": "Fetch API implementation for Node",
5
5
  "sideEffects": false,
6
6
  "dependencies": {