Skip to content

Commit

Permalink
Bump undici to 5.11.0. closes #351
Browse files Browse the repository at this point in the history
`5.11.0` includes nodejs/undici#1643.

There are some non-trivial changes required to upgrade to `5.14.0`:

- Since `undici@5.12.0` (nodejs/undici#1697),
  `structuredClone` is used on bodies, which may be byte streams.
  Due to a Node bug (nodejs/node#45955),
  readable byte streams cannot be transferred, breaking `fetch`.
- Since `undici@5.14.0` (nodejs/undici#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.
  • Loading branch information
mrbbot committed Dec 23, 2022
1 parent c2bcc74 commit f3f1ae9
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 27 deletions.
47 changes: 28 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/durable-objects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/html-rewriter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/http-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/miniflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/r2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/web-sockets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit f3f1ae9

Please sign in to comment.