@whatwg-node/node-fetch 0.0.1-alpha-20221230075257-cc3a93b → 0.0.1-alpha-20221230080146-72104f6

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/index.js CHANGED
@@ -33,7 +33,9 @@ class PonyfillAbortSignal extends events.EventTarget {
33
33
  this._onabort = null;
34
34
  }
35
35
  throwIfAborted() {
36
- throw new PonyfillAbortError();
36
+ if (this.aborted) {
37
+ throw new PonyfillAbortError();
38
+ }
37
39
  }
38
40
  get onabort() {
39
41
  return this._onabort;
package/index.mjs CHANGED
@@ -27,7 +27,9 @@ class PonyfillAbortSignal extends EventTarget {
27
27
  this._onabort = null;
28
28
  }
29
29
  throwIfAborted() {
30
- throw new PonyfillAbortError();
30
+ if (this.aborted) {
31
+ throw new PonyfillAbortError();
32
+ }
31
33
  }
32
34
  get onabort() {
33
35
  return this._onabort;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whatwg-node/node-fetch",
3
- "version": "0.0.1-alpha-20221230075257-cc3a93b",
3
+ "version": "0.0.1-alpha-20221230080146-72104f6",
4
4
  "description": "Fetch API implementation for Node",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
package/utils.d.ts CHANGED
@@ -1,2 +1 @@
1
- export declare function headersToJSON(headers: Headers): Record<string, string>;
2
1
  export declare function getHeadersObj(headers: Headers): Record<string, string>;