@sveltejs/kit 1.0.0-next.507 → 1.0.0-next.508
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltejs/kit",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.508",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/sveltejs/kit",
|
|
@@ -17,12 +17,11 @@
|
|
|
17
17
|
"kleur": "^4.1.4",
|
|
18
18
|
"magic-string": "^0.26.2",
|
|
19
19
|
"mime": "^3.0.0",
|
|
20
|
-
"node-fetch": "^3.2.4",
|
|
21
20
|
"sade": "^1.8.1",
|
|
22
21
|
"set-cookie-parser": "^2.4.8",
|
|
23
22
|
"sirv": "^2.0.2",
|
|
24
23
|
"tiny-glob": "^0.2.9",
|
|
25
|
-
"undici": "^5.
|
|
24
|
+
"undici": "^5.11.0"
|
|
26
25
|
},
|
|
27
26
|
"devDependencies": {
|
|
28
27
|
"@playwright/test": "^1.25.0",
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { fetch, Response, Request, Headers, FormData } from 'undici';
|
|
2
2
|
import { ReadableStream, TransformStream, WritableStream } from 'stream/web';
|
|
3
|
-
import { Readable } from 'stream';
|
|
4
|
-
import { Request as NodeFetchRequest } from 'node-fetch';
|
|
5
3
|
import { webcrypto as crypto } from 'crypto';
|
|
6
4
|
|
|
7
5
|
/** @type {Record<string, any>} */
|
|
@@ -9,24 +7,7 @@ const globals = {
|
|
|
9
7
|
crypto,
|
|
10
8
|
fetch,
|
|
11
9
|
Response,
|
|
12
|
-
|
|
13
|
-
// https://github.com/nodejs/undici/issues/974
|
|
14
|
-
Request: class extends Request {
|
|
15
|
-
// @ts-expect-error
|
|
16
|
-
async formData() {
|
|
17
|
-
const nodeFetchFormData = await new NodeFetchRequest(this.url, {
|
|
18
|
-
method: this.method,
|
|
19
|
-
headers: this.headers,
|
|
20
|
-
body: this.body && Readable.from(this.body)
|
|
21
|
-
}).formData();
|
|
22
|
-
|
|
23
|
-
const formData = new FormData();
|
|
24
|
-
for (const [name, value] of nodeFetchFormData.entries()) {
|
|
25
|
-
formData.append(name, value);
|
|
26
|
-
}
|
|
27
|
-
return formData;
|
|
28
|
-
}
|
|
29
|
-
},
|
|
10
|
+
Request,
|
|
30
11
|
Headers,
|
|
31
12
|
ReadableStream,
|
|
32
13
|
TransformStream,
|