From f3f1ae920d01526decaf4cd3e5e42ec9d968e9f9 Mon Sep 17 00:00:00 2001 From: MrBBot Date: Fri, 23 Dec 2022 12:51:51 +0000 Subject: [PATCH] Bump `undici` to `5.11.0`. closes #351 `5.11.0` includes https://github.com/nodejs/undici/pull/1643. There are some non-trivial changes required to upgrade to `5.14.0`: - Since `undici@5.12.0` (https://github.com/nodejs/undici/pull/1697), `structuredClone` is used on bodies, which may be byte streams. Due to a Node bug (https://github.com/nodejs/node/pull/45955), readable byte streams cannot be transferred, breaking `fetch`. - Since `undici@5.14.0` (https://github.com/nodejs/undici/pull/1793), global `ReadableStream` and `TransformStream` are used if available. In the Vitest environment, (which modifies the global scope unlike Jest which runs tests in a VM context), if the `streams_enable_constructors` compatibility flag isn't enabled, `fetch` breaks as `ReadableStream`s can't be constructed. --- package-lock.json | 47 ++++++++++++++++----------- packages/cache/package.json | 2 +- packages/core/package.json | 2 +- packages/durable-objects/package.json | 2 +- packages/html-rewriter/package.json | 2 +- packages/http-server/package.json | 2 +- packages/miniflare/package.json | 2 +- packages/r2/package.json | 2 +- packages/web-sockets/package.json | 2 +- 9 files changed, 36 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index 69e243a12..0132aeda2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9381,8 +9381,12 @@ } }, "node_modules/undici": { - "version": "5.9.1", - "license": "MIT", + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.11.0.tgz", + "integrity": "sha512-oWjWJHzFet0Ow4YZBkyiJwiK5vWqEYoH7BINzJAJOLedZ++JpAlCbUktW2GQ2DS2FpKmxD/JMtWUUWl1BtghGw==", + "dependencies": { + "busboy": "^1.6.0" + }, "engines": { "node": ">=12.18" } @@ -9956,7 +9960,7 @@ "@miniflare/core": "2.11.0", "@miniflare/shared": "2.11.0", "http-cache-semantics": "^4.1.0", - "undici": "5.9.1" + "undici": "5.11.0" }, "devDependencies": { "@miniflare/shared-test": "2.11.0", @@ -9998,7 +10002,7 @@ "dotenv": "^10.0.0", "kleur": "^4.1.4", "set-cookie-parser": "^2.4.8", - "undici": "5.9.1", + "undici": "5.11.0", "urlpattern-polyfill": "^4.0.3" }, "devDependencies": { @@ -10037,7 +10041,7 @@ "@miniflare/core": "2.11.0", "@miniflare/shared": "2.11.0", "@miniflare/storage-memory": "2.11.0", - "undici": "5.9.1" + "undici": "5.11.0" }, "devDependencies": { "@miniflare/cache": "2.11.0", @@ -10056,7 +10060,7 @@ "@miniflare/core": "2.11.0", "@miniflare/shared": "2.11.0", "html-rewriter-wasm": "^0.4.1", - "undici": "5.9.1" + "undici": "5.11.0" }, "devDependencies": { "@miniflare/shared-test": "2.11.0" @@ -10075,7 +10079,7 @@ "@miniflare/web-sockets": "2.11.0", "kleur": "^4.1.4", "selfsigned": "^2.0.0", - "undici": "5.9.1", + "undici": "5.11.0", "ws": "^8.2.2", "youch": "^2.2.2" }, @@ -10157,7 +10161,7 @@ "kleur": "^4.1.4", "semiver": "^1.1.0", "source-map-support": "^0.5.20", - "undici": "5.9.1" + "undici": "5.11.0" }, "bin": { "miniflare": "bootstrap.js" @@ -10207,7 +10211,7 @@ "license": "MIT", "dependencies": { "@miniflare/shared": "2.11.0", - "undici": "5.9.1" + "undici": "5.11.0" }, "devDependencies": { "@miniflare/shared-test": "2.11.0" @@ -10410,7 +10414,7 @@ "dependencies": { "@miniflare/core": "2.11.0", "@miniflare/shared": "2.11.0", - "undici": "5.9.1", + "undici": "5.11.0", "ws": "^8.2.2" }, "devDependencies": { @@ -11691,7 +11695,7 @@ "@miniflare/web-sockets": "2.11.0", "@types/http-cache-semantics": "^4.0.1", "http-cache-semantics": "^4.1.0", - "undici": "5.9.1" + "undici": "5.11.0" } }, "@miniflare/cli-parser": { @@ -11722,7 +11726,7 @@ "dotenv": "^10.0.0", "kleur": "^4.1.4", "set-cookie-parser": "^2.4.8", - "undici": "5.9.1", + "undici": "5.11.0", "urlpattern-polyfill": "^4.0.3" } }, @@ -11743,7 +11747,7 @@ "@miniflare/shared": "2.11.0", "@miniflare/shared-test": "2.11.0", "@miniflare/storage-memory": "2.11.0", - "undici": "5.9.1" + "undici": "5.11.0" } }, "@miniflare/html-rewriter": { @@ -11753,7 +11757,7 @@ "@miniflare/shared": "2.11.0", "@miniflare/shared-test": "2.11.0", "html-rewriter-wasm": "^0.4.1", - "undici": "5.9.1" + "undici": "5.11.0" } }, "@miniflare/http-server": { @@ -11766,7 +11770,7 @@ "@types/node-forge": "^0.10.4", "kleur": "^4.1.4", "selfsigned": "^2.0.0", - "undici": "5.9.1", + "undici": "5.11.0", "ws": "^8.2.2", "youch": "^2.2.2" } @@ -11790,7 +11794,7 @@ "requires": { "@miniflare/shared": "2.11.0", "@miniflare/shared-test": "2.11.0", - "undici": "5.9.1" + "undici": "5.11.0" } }, "@miniflare/runner-vm": { @@ -11899,7 +11903,7 @@ "@miniflare/shared": "2.11.0", "@miniflare/shared-test": "2.11.0", "@types/ws": "^8.2.0", - "undici": "5.9.1", + "undici": "5.11.0", "ws": "^8.2.2" } }, @@ -15147,7 +15151,7 @@ "open": "^8.4.0", "semiver": "^1.1.0", "source-map-support": "^0.5.20", - "undici": "5.9.1" + "undici": "5.11.0" } }, "minimatch": { @@ -16660,7 +16664,12 @@ } }, "undici": { - "version": "5.9.1" + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.11.0.tgz", + "integrity": "sha512-oWjWJHzFet0Ow4YZBkyiJwiK5vWqEYoH7BINzJAJOLedZ++JpAlCbUktW2GQ2DS2FpKmxD/JMtWUUWl1BtghGw==", + "requires": { + "busboy": "^1.6.0" + } }, "unique-string": { "version": "2.0.0", diff --git a/packages/cache/package.json b/packages/cache/package.json index 03b51b9a0..495ba889f 100644 --- a/packages/cache/package.json +++ b/packages/cache/package.json @@ -38,7 +38,7 @@ "@miniflare/core": "2.11.0", "@miniflare/shared": "2.11.0", "http-cache-semantics": "^4.1.0", - "undici": "5.9.1" + "undici": "5.11.0" }, "devDependencies": { "@miniflare/shared-test": "2.11.0", diff --git a/packages/core/package.json b/packages/core/package.json index 45c99cf6c..aaf22ead8 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -46,7 +46,7 @@ "dotenv": "^10.0.0", "kleur": "^4.1.4", "set-cookie-parser": "^2.4.8", - "undici": "5.9.1", + "undici": "5.11.0", "urlpattern-polyfill": "^4.0.3" }, "devDependencies": { diff --git a/packages/durable-objects/package.json b/packages/durable-objects/package.json index 4ad5388f2..807bdabb4 100644 --- a/packages/durable-objects/package.json +++ b/packages/durable-objects/package.json @@ -38,7 +38,7 @@ "@miniflare/core": "2.11.0", "@miniflare/shared": "2.11.0", "@miniflare/storage-memory": "2.11.0", - "undici": "5.9.1" + "undici": "5.11.0" }, "devDependencies": { "@miniflare/cache": "2.11.0", diff --git a/packages/html-rewriter/package.json b/packages/html-rewriter/package.json index 8acb97059..2ba4357ea 100644 --- a/packages/html-rewriter/package.json +++ b/packages/html-rewriter/package.json @@ -38,7 +38,7 @@ "@miniflare/core": "2.11.0", "@miniflare/shared": "2.11.0", "html-rewriter-wasm": "^0.4.1", - "undici": "5.9.1" + "undici": "5.11.0" }, "devDependencies": { "@miniflare/shared-test": "2.11.0" diff --git a/packages/http-server/package.json b/packages/http-server/package.json index bb44c7c0e..16218fc0e 100644 --- a/packages/http-server/package.json +++ b/packages/http-server/package.json @@ -40,7 +40,7 @@ "@miniflare/web-sockets": "2.11.0", "kleur": "^4.1.4", "selfsigned": "^2.0.0", - "undici": "5.9.1", + "undici": "5.11.0", "ws": "^8.2.2", "youch": "^2.2.2" }, diff --git a/packages/miniflare/package.json b/packages/miniflare/package.json index 9eb798260..910c249af 100644 --- a/packages/miniflare/package.json +++ b/packages/miniflare/package.json @@ -66,7 +66,7 @@ "kleur": "^4.1.4", "semiver": "^1.1.0", "source-map-support": "^0.5.20", - "undici": "5.9.1" + "undici": "5.11.0" }, "devDependencies": { "@miniflare/shared-test": "2.11.0", diff --git a/packages/r2/package.json b/packages/r2/package.json index 0efc10de6..bc8dda3d7 100644 --- a/packages/r2/package.json +++ b/packages/r2/package.json @@ -36,7 +36,7 @@ }, "dependencies": { "@miniflare/shared": "2.11.0", - "undici": "5.9.1" + "undici": "5.11.0" }, "devDependencies": { "@miniflare/shared-test": "2.11.0" diff --git a/packages/web-sockets/package.json b/packages/web-sockets/package.json index f9cc6fb27..0a555453e 100644 --- a/packages/web-sockets/package.json +++ b/packages/web-sockets/package.json @@ -37,7 +37,7 @@ "dependencies": { "@miniflare/core": "2.11.0", "@miniflare/shared": "2.11.0", - "undici": "5.9.1", + "undici": "5.11.0", "ws": "^8.2.2" }, "devDependencies": {