@whatwg-node/fetch 0.8.5 → 0.8.6-rc-20230419123748-0bceaec
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 +12 -0
- package/dist/index.d.ts +46 -66
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @whatwg-node/fetch
|
|
2
2
|
|
|
3
|
+
## 0.8.6-rc-20230419123748-0bceaec
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#427](https://github.com/ardatan/whatwg-node/pull/427)
|
|
8
|
+
[`e8bda7c`](https://github.com/ardatan/whatwg-node/commit/e8bda7cdf440a7f4bb617ee1b5df8ee1becb4ad6)
|
|
9
|
+
Thanks [@Rugvip](https://github.com/Rugvip)! - Restructure type declarations to avoid polluting
|
|
10
|
+
global namespace.
|
|
11
|
+
|
|
12
|
+
- Updated dependencies []:
|
|
13
|
+
- @whatwg-node/node-fetch@0.3.6-rc-20230419123748-0bceaec
|
|
14
|
+
|
|
3
15
|
## 0.8.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -2,50 +2,28 @@
|
|
|
2
2
|
/// <reference lib="dom.iterable" />
|
|
3
3
|
/// <reference types="urlpattern-polyfill" />
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
declare const _URLSearchParams: typeof URLSearchParams;
|
|
28
|
-
|
|
29
|
-
declare module "@whatwg-node/fetch" {
|
|
30
|
-
export const fetch: typeof _fetch;
|
|
31
|
-
export const Request: typeof _Request;
|
|
32
|
-
export const Response: typeof _Response;
|
|
33
|
-
export const Headers: typeof _Headers;
|
|
34
|
-
export const FormData: typeof _FormData;
|
|
35
|
-
export const AbortSignal: typeof _AbortSignal;
|
|
36
|
-
export const AbortController: typeof _AbortController;
|
|
37
|
-
export const ReadableStream: typeof _ReadableStream;
|
|
38
|
-
export const WritableStream: typeof _WritableStream;
|
|
39
|
-
export const TransformStream: typeof _TransformStream;
|
|
40
|
-
export const Blob: typeof _Blob;
|
|
41
|
-
export const File: typeof _File;
|
|
42
|
-
export const crypto: typeof _crypto;
|
|
43
|
-
export const btoa: typeof _btoa;
|
|
44
|
-
export const TextDecoder: typeof _TextDecoder;
|
|
45
|
-
export const TextEncoder: typeof _TextEncoder;
|
|
46
|
-
export const URL: typeof _URL;
|
|
47
|
-
export const URLSearchParams: typeof _URLSearchParams;
|
|
48
|
-
export const URLPattern: typeof _URLPattern;
|
|
5
|
+
declare module '@whatwg-node/fetch' {
|
|
6
|
+
export const fetch: typeof globalThis.fetch;
|
|
7
|
+
export const Request: typeof globalThis.Request;
|
|
8
|
+
export const Response: typeof globalThis.Response & {
|
|
9
|
+
json(data: any, init?: ResponseInit): globalThis.Response;
|
|
10
|
+
};
|
|
11
|
+
export const Headers: typeof globalThis.Headers;
|
|
12
|
+
export const FormData: typeof globalThis.FormData;
|
|
13
|
+
export const AbortSignal: typeof globalThis.AbortSignal;
|
|
14
|
+
export const AbortController: typeof globalThis.AbortController;
|
|
15
|
+
export const ReadableStream: typeof globalThis.ReadableStream;
|
|
16
|
+
export const WritableStream: typeof globalThis.WritableStream;
|
|
17
|
+
export const TransformStream: typeof globalThis.TransformStream;
|
|
18
|
+
export const Blob: typeof globalThis.Blob;
|
|
19
|
+
export const File: typeof globalThis.File;
|
|
20
|
+
export const crypto: typeof globalThis.crypto;
|
|
21
|
+
export const btoa: typeof globalThis.btoa;
|
|
22
|
+
export const TextDecoder: typeof globalThis.TextDecoder;
|
|
23
|
+
export const TextEncoder: typeof globalThis.TextEncoder;
|
|
24
|
+
export const URL: typeof globalThis.URL;
|
|
25
|
+
export const URLSearchParams: typeof globalThis.URLSearchParams;
|
|
26
|
+
export const URLPattern: globalThis.URLPattern;
|
|
49
27
|
export interface FormDataLimits {
|
|
50
28
|
/* Max field name size (in bytes). Default: 100. */
|
|
51
29
|
fieldNameSize?: number;
|
|
@@ -62,26 +40,28 @@ declare module "@whatwg-node/fetch" {
|
|
|
62
40
|
/* For multipart forms, the max number of header key-value pairs to parse. Default: 2000. */
|
|
63
41
|
headerSize?: number;
|
|
64
42
|
}
|
|
65
|
-
export const createFetch: (opts?: {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
43
|
+
export const createFetch: (opts?: {
|
|
44
|
+
useNodeFetch?: boolean;
|
|
45
|
+
formDataLimits?: FormDataLimits;
|
|
46
|
+
}) => {
|
|
47
|
+
fetch: typeof globalThis.fetch;
|
|
48
|
+
Request: typeof globalThis.Request;
|
|
49
|
+
Response: typeof globalThis.Response;
|
|
50
|
+
Headers: typeof globalThis.Headers;
|
|
51
|
+
FormData: typeof globalThis.FormData;
|
|
52
|
+
AbortSignal: typeof globalThis.AbortSignal;
|
|
53
|
+
AbortController: typeof globalThis.AbortController;
|
|
54
|
+
ReadableStream: typeof globalThis.ReadableStream;
|
|
55
|
+
WritableStream: typeof globalThis.WritableStream;
|
|
56
|
+
TransformStream: typeof globalThis.TransformStream;
|
|
57
|
+
Blob: typeof globalThis.Blob;
|
|
58
|
+
File: typeof globalThis.File;
|
|
59
|
+
crypto: typeof globalThis.crypto;
|
|
60
|
+
btoa: typeof globalThis.btoa;
|
|
61
|
+
TextEncoder: typeof globalThis.TextEncoder;
|
|
62
|
+
TextDecoder: typeof globalThis.TextDecoder;
|
|
63
|
+
URLPattern: globalThis.URLPattern;
|
|
64
|
+
URL: typeof globalThis.URL;
|
|
65
|
+
URLSearchParams: typeof globalThis.URLSearchParams;
|
|
66
|
+
};
|
|
86
67
|
}
|
|
87
|
-
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whatwg-node/fetch",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6-rc-20230419123748-0bceaec",
|
|
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": "
|
|
17
|
+
"@whatwg-node/node-fetch": "0.3.6-rc-20230419123748-0bceaec",
|
|
18
18
|
"busboy": "^1.6.0",
|
|
19
19
|
"urlpattern-polyfill": "^7.0.0",
|
|
20
20
|
"web-streams-polyfill": "^3.2.1"
|