@whatwg-node/node-fetch 0.7.4-alpha-20241125130609-2d42652904068bfd5c22714b7277b8c77917aeba → 0.7.4-alpha-20241125131513-7ac7e92d53ef0d5a6ddab6fcb0b311d88708df6d

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 CHANGED
@@ -26,7 +26,7 @@ class PonyfillURL extends fast_url_parser_1.default {
26
26
  }
27
27
  }
28
28
  get origin() {
29
- return `${this.protocol}//${this.host}`;
29
+ return `${this.protocol}//${this.host}${this.port ? `:${this.port}` : ''}`;
30
30
  }
31
31
  _searchParams;
32
32
  get searchParams() {
@@ -35,6 +35,9 @@ function fetchNodeHttp(fetchRequest) {
35
35
  let nodeRequest;
36
36
  if (fetchRequest.parsedUrl) {
37
37
  nodeRequest = requestFn({
38
+ auth: fetchRequest.parsedUrl.username
39
+ ? `${fetchRequest.parsedUrl.username}:${fetchRequest.parsedUrl.password}`
40
+ : undefined,
38
41
  host: fetchRequest.parsedUrl.host,
39
42
  hostname: fetchRequest.parsedUrl.hostname,
40
43
  method: fetchRequest.method,
package/esm/URL.js CHANGED
@@ -22,7 +22,7 @@ export class PonyfillURL extends FastUrl {
22
22
  }
23
23
  }
24
24
  get origin() {
25
- return `${this.protocol}//${this.host}`;
25
+ return `${this.protocol}//${this.host}${this.port ? `:${this.port}` : ''}`;
26
26
  }
27
27
  _searchParams;
28
28
  get searchParams() {
@@ -32,6 +32,9 @@ export function fetchNodeHttp(fetchRequest) {
32
32
  let nodeRequest;
33
33
  if (fetchRequest.parsedUrl) {
34
34
  nodeRequest = requestFn({
35
+ auth: fetchRequest.parsedUrl.username
36
+ ? `${fetchRequest.parsedUrl.username}:${fetchRequest.parsedUrl.password}`
37
+ : undefined,
35
38
  host: fetchRequest.parsedUrl.host,
36
39
  hostname: fetchRequest.parsedUrl.hostname,
37
40
  method: fetchRequest.method,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whatwg-node/node-fetch",
3
- "version": "0.7.4-alpha-20241125130609-2d42652904068bfd5c22714b7277b8c77917aeba",
3
+ "version": "0.7.4-alpha-20241125131513-7ac7e92d53ef0d5a6ddab6fcb0b311d88708df6d",
4
4
  "description": "Fetch API implementation for Node",
5
5
  "sideEffects": false,
6
6
  "dependencies": {