@whatwg-node/fetch 0.1.1 → 0.2.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @whatwg-node/fetch
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 486c35d: Export Event API
8
+
3
9
  ## 0.1.1
4
10
 
5
11
  ### Patch Changes
@@ -18,6 +18,8 @@ module.exports = function createNodePonyfill(opts = {}) {
18
18
  ponyfills.TransformStream = globalThis.TransformStream;
19
19
  ponyfills.Blob = globalThis.Blob;
20
20
  ponyfills.crypto = globalThis.crypto;
21
+ ponyfills.Event = globalThis.Event;
22
+ ponyfills.EventTarget = globalThis.EventTarget;
21
23
 
22
24
  if (!ponyfills.AbortController) {
23
25
  const abortControllerModule = require("abort-controller");
@@ -12,6 +12,8 @@ const File = globalThis.File;
12
12
  const crypto = globalThis.crypto;
13
13
  const TextDecoder = globalThis.TextDecoder;
14
14
  const TextEncoder = globalThis.TextEncoder;
15
+ const Event = globalThis.Event;
16
+ const EventTarget = globalThis.EventTarget;
15
17
 
16
18
  export const create = () => globalThis;
17
19
  export {
@@ -29,4 +31,6 @@ export {
29
31
  crypto,
30
32
  TextDecoder,
31
33
  TextEncoder,
34
+ Event,
35
+ EventTarget,
32
36
  };
@@ -12,4 +12,6 @@ module.exports.File = globalThis.File;
12
12
  module.exports.crypto = globalThis.crypto;
13
13
  module.exports.TextEncoder = globalThis.TextEncoder;
14
14
  module.exports.TextDecoder = globalThis.TextDecoder;
15
+ module.exports.Event = globalThis.Event;
16
+ module.exports.EventTarget = globalThis.EventTarget;
15
17
  module.exports.createFetch = () => globalThis;
package/dist/index.d.ts CHANGED
@@ -14,6 +14,8 @@ declare const _File: typeof File;
14
14
  declare const _crypto: typeof crypto;
15
15
  declare const _TextEncoder: typeof TextEncoder;
16
16
  declare const _TextDecoder: typeof TextDecoder;
17
+ declare const _Event: typeof Event;
18
+ declare const _EventTarget: typeof EventTarget;
17
19
 
18
20
  declare module "@whatwg-node/fetch" {
19
21
  export const fetch: typeof _fetch;
@@ -30,6 +32,8 @@ declare module "@whatwg-node/fetch" {
30
32
  export const crypto: typeof _crypto;
31
33
  export const TextDecoder: typeof _TextDecoder;
32
34
  export const TextEncoder: typeof _TextEncoder;
35
+ export const Event: typeof _Event;
36
+ export const EventTarget: typeof EventTarget;
33
37
  export interface FormDataLimits {
34
38
  /* Max field name size (in bytes). Default: 100. */
35
39
  fieldNameSize?: number;
@@ -60,7 +64,9 @@ declare module "@whatwg-node/fetch" {
60
64
  File: typeof _File,
61
65
  crypto: typeof _crypto
62
66
  TextEncoder: typeof _TextEncoder,
63
- TextDecoder: typeof _TextDecoder
67
+ TextDecoder: typeof _TextDecoder,
68
+ Event: typeof _Event,
69
+ EventTarget: typeof EventTarget
64
70
  });
65
71
  }
66
72
 
@@ -16,6 +16,9 @@ module.exports.File = ponyfills.File;
16
16
  module.exports.crypto = ponyfills.crypto;
17
17
  module.exports.TextEncoder = ponyfills.TextEncoder;
18
18
  module.exports.TextDecoder = ponyfills.TextDecoder;
19
- exports.createFetch = createNodePonyfill;
20
19
 
21
20
  require('event-target-polyfill');
21
+ module.exports.Event = ponyfills.Event;
22
+ module.exports.EventTarget = ponyfills.EventTarget;
23
+
24
+ exports.createFetch = createNodePonyfill;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whatwg-node/fetch",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Cross Platform Smart Fetch Ponyfill",
5
5
  "author": "Arda TANRIKULU <ardatanrikulu@gmail.com>",
6
6
  "repository": {