@whatwg-node/fetch 0.7.1 → 0.8.0-alpha-20230210093840-06aaaf0

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,19 @@
1
1
  # @whatwg-node/fetch
2
2
 
3
+ ## 0.8.0-alpha-20230210093840-06aaaf0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#330](https://github.com/ardatan/whatwg-node/pull/330)
8
+ [`1dffc76`](https://github.com/ardatan/whatwg-node/commit/1dffc76475f7005c36d42c94c54cef8c69f05c4e)
9
+ Thanks [@ardatan](https://github.com/ardatan)! - New URL and URLSearchParams ponyfills
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+ [[`1dffc76`](https://github.com/ardatan/whatwg-node/commit/1dffc76475f7005c36d42c94c54cef8c69f05c4e)]:
15
+ - @whatwg-node/node-fetch@0.2.0-alpha-20230210093840-06aaaf0
16
+
3
17
  ## 0.7.1
4
18
 
5
19
  ### Patch Changes
@@ -21,6 +21,10 @@ module.exports = function createNodePonyfill(opts = {}) {
21
21
  ponyfills.FormData = newNodeFetch.FormData;
22
22
  ponyfills.AbortController = newNodeFetch.AbortController;
23
23
  ponyfills.ReadableStream = newNodeFetch.ReadableStream;
24
+
25
+ ponyfills.URL = newNodeFetch.URL;
26
+ ponyfills.URLSearchParams = newNodeFetch.URLSearchParams;
27
+
24
28
  ponyfills.WritableStream = globalThis.WritableStream;
25
29
  ponyfills.TransformStream = globalThis.TransformStream;
26
30
 
@@ -15,6 +15,8 @@ const btoa = globalThis.btoa;
15
15
  const TextDecoder = globalThis.TextDecoder;
16
16
  const TextEncoder = globalThis.TextEncoder;
17
17
  const URLPattern = (globalThis as any).URLPattern;
18
+ const URL = globalThis.URL;
19
+ const URLSearchParams = globalThis.URLSearchParams;
18
20
 
19
21
  export const createFetch = () => globalThis;
20
22
  export {
@@ -35,4 +37,6 @@ export {
35
37
  TextDecoder,
36
38
  TextEncoder,
37
39
  URLPattern,
40
+ URL,
41
+ URLSearchParams,
38
42
  };
@@ -15,4 +15,6 @@ module.exports.btoa = globalThis.btoa;
15
15
  module.exports.TextEncoder = globalThis.TextEncoder;
16
16
  module.exports.TextDecoder = globalThis.TextDecoder;
17
17
  module.exports.URLPattern = globalThis.URLPattern;
18
+ module.exports.URL = globalThis.URL;
19
+ module.exports.URLSearchParams = globalThis.URLSearchParams;
18
20
  module.exports.createFetch = () => globalThis;
package/dist/index.d.ts CHANGED
@@ -27,6 +27,8 @@ declare const _btoa: typeof btoa;
27
27
  declare const _TextEncoder: typeof TextEncoder;
28
28
  declare const _TextDecoder: typeof TextDecoder;
29
29
  declare const _URLPattern: typeof URLPattern;
30
+ declare const _URL: typeof URL;
31
+ declare const _URLSearchParams: typeof URLSearchParams;
30
32
 
31
33
  declare module "@whatwg-node/fetch" {
32
34
  export const fetch: typeof _fetch;
@@ -45,6 +47,8 @@ declare module "@whatwg-node/fetch" {
45
47
  export const btoa: typeof _btoa;
46
48
  export const TextDecoder: typeof _TextDecoder;
47
49
  export const TextEncoder: typeof _TextEncoder;
50
+ export const URL: typeof _URL;
51
+ export const URLSearchParams: typeof _URLSearchParams;
48
52
  export const URLPattern: typeof _URLPattern;
49
53
  export interface FormDataLimits {
50
54
  /* Max field name size (in bytes). Default: 100. */
@@ -80,6 +84,8 @@ declare module "@whatwg-node/fetch" {
80
84
  TextEncoder: typeof _TextEncoder,
81
85
  TextDecoder: typeof _TextDecoder,
82
86
  URLPattern: typeof _URLPattern,
87
+ URL: typeof _URL,
88
+ URLSearchParams: typeof _URLSearchParams,
83
89
  });
84
90
  }
85
91
 
@@ -19,5 +19,7 @@ module.exports.btoa = ponyfills.btoa;
19
19
  module.exports.TextEncoder = ponyfills.TextEncoder;
20
20
  module.exports.TextDecoder = ponyfills.TextDecoder;
21
21
  module.exports.URLPattern = ponyfills.URLPattern;
22
+ module.exports.URL = ponyfills.URL;
23
+ module.exports.URLSearchParams = ponyfills.URLSearchParams;
22
24
 
23
25
  exports.createFetch = createNodePonyfill;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whatwg-node/fetch",
3
- "version": "0.7.1",
3
+ "version": "0.8.0-alpha-20230210093840-06aaaf0",
4
4
  "description": "Cross Platform Smart Fetch Ponyfill",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,7 +14,7 @@
14
14
  "types": "dist/index.d.ts",
15
15
  "dependencies": {
16
16
  "@peculiar/webcrypto": "^1.4.0",
17
- "@whatwg-node/node-fetch": "^0.1.0",
17
+ "@whatwg-node/node-fetch": "0.2.0-alpha-20230210093840-06aaaf0",
18
18
  "busboy": "^1.6.0",
19
19
  "urlpattern-polyfill": "^6.0.2",
20
20
  "web-streams-polyfill": "^3.2.1"