From 617d179cf0c79c2de0f9f389aa55555a94537254 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 28 Dec 2024 10:18:06 +0000 Subject: [PATCH] fix(deps): update dependency @whatwg-node/server to v0.9.65 (#11819) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@whatwg-node/server](https://redirect.github.com/ardatan/whatwg-node) ([source](https://redirect.github.com/ardatan/whatwg-node/tree/HEAD/packages/server)) | [`0.9.49` -> `0.9.65`](https://renovatebot.com/diffs/npm/@whatwg-node%2fserver/0.9.49/0.9.65) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@whatwg-node%2fserver/0.9.65?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@whatwg-node%2fserver/0.9.65?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@whatwg-node%2fserver/0.9.49/0.9.65?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@whatwg-node%2fserver/0.9.49/0.9.65?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
ardatan/whatwg-node (@​whatwg-node/server) ### [`v0.9.65`](https://redirect.github.com/ardatan/whatwg-node/blob/HEAD/packages/server/CHANGELOG.md#0965) [Compare Source](https://redirect.github.com/ardatan/whatwg-node/compare/@whatwg-node/server@0.9.64...@whatwg-node/server@0.9.65) ##### Patch Changes - [#​1926](https://redirect.github.com/ardatan/whatwg-node/pull/1926) [`bae5de1`](https://redirect.github.com/ardatan/whatwg-node/commit/bae5de158dd2fa3472d69ca7486ea68940d43c74) Thanks [@​ardatan](https://redirect.github.com/ardatan)! - While calling `handleNodeRequest` or `handleNodeRequestAndResponse`, `waitUntil` is not added automatically as in `requestListener` for Node.js integration. This change adds `waitUntil` into the `serverContext` if not present. Fixes the issue with Fastify integration that uses the mentioned methods ### [`v0.9.64`](https://redirect.github.com/ardatan/whatwg-node/blob/HEAD/packages/server/CHANGELOG.md#0964) [Compare Source](https://redirect.github.com/ardatan/whatwg-node/compare/@whatwg-node/server@0.9.63...@whatwg-node/server@0.9.64) ##### Patch Changes - [#​1899](https://redirect.github.com/ardatan/whatwg-node/pull/1899) [`a84e84a`](https://redirect.github.com/ardatan/whatwg-node/commit/a84e84aa5c14f23c30637ccd290a099a39c445a1) Thanks [@​ardatan](https://redirect.github.com/ardatan)! - - New `onDispose` hook which is alias of `Symbol.asyncDispose` for Explicit Resource Management - Registration of the server adapter's disposal to the global process termination listener is now opt-in and configurable. ```ts const plugin: ServerAdapterPlugin = { onDispose() { console.log('Server adapter is disposed') } } const serverAdapter = createServerAdapter(() => new Response('Hello world!'), { plugins: [plugin], // Register the server adapter's disposal to the global process termination listener // Then the server adapter will be disposed when the process exit signals only in Node.js! disposeOnProcessTerminate: true }) await serverAdapter.dispose() // Prints 'Server adapter is disposed' ``` ### [`v0.9.63`](https://redirect.github.com/ardatan/whatwg-node/blob/HEAD/packages/server/CHANGELOG.md#0963) [Compare Source](https://redirect.github.com/ardatan/whatwg-node/compare/@whatwg-node/server@0.9.62...@whatwg-node/server@0.9.63) ##### Patch Changes - [`c75e6e3`](https://redirect.github.com/ardatan/whatwg-node/commit/c75e6e39207664c7a33fcb1ba0f211774e0c7c97) Thanks [@​ardatan](https://redirect.github.com/ardatan)! - Export \`DisposableSymbols\` for disposable plugins ### [`v0.9.62`](https://redirect.github.com/ardatan/whatwg-node/blob/HEAD/packages/server/CHANGELOG.md#0962) [Compare Source](https://redirect.github.com/ardatan/whatwg-node/compare/@whatwg-node/server@0.9.61...@whatwg-node/server@0.9.62) ##### Patch Changes - [#​1880](https://redirect.github.com/ardatan/whatwg-node/pull/1880) [`95e5ce4`](https://redirect.github.com/ardatan/whatwg-node/commit/95e5ce4a32e51b8727b31ea711903e7924c8e47e) Thanks [@​EmrysMyrddin](https://redirect.github.com/EmrysMyrddin)! - Docs for hooks ### [`v0.9.61`](https://redirect.github.com/ardatan/whatwg-node/blob/HEAD/packages/server/CHANGELOG.md#0961) [Compare Source](https://redirect.github.com/ardatan/whatwg-node/compare/@whatwg-node/server@0.9.60...@whatwg-node/server@0.9.61) ##### Patch Changes - [#​1872](https://redirect.github.com/ardatan/whatwg-node/pull/1872) [`7fb47d8`](https://redirect.github.com/ardatan/whatwg-node/commit/7fb47d8e6a988658089315970d5662f5bf6bcb1f) Thanks [@​ardatan](https://redirect.github.com/ardatan)! - Wait for remaining promises during `asyncDispose` correctly The `asyncDispose` function should wait for all remaining promises to resolve before returning. This ensures that the server is fully disposed of before the function returns. ```ts import { createServerAdapter } from '@​whatwg-node/server' const deferred = Promise.withResolvers() const adapter = createServerAdapter((req, ctx) => { ctx.waitUntil(deferred.promise) return new Response('Hello, world!') }) const res = await adapter.fetch('http://example.com') console.assert(res.status === 200) console.assert((await res.text()) === 'Hello, world!') let disposed = false adapter[Symbol.asyncDispose]().then(() => { disposed = true }) console.assert(!disposed) deferred.resolve() console.assert(disposed) ``` ### [`v0.9.60`](https://redirect.github.com/ardatan/whatwg-node/blob/HEAD/packages/server/CHANGELOG.md#0960) [Compare Source](https://redirect.github.com/ardatan/whatwg-node/compare/@whatwg-node/server@0.9.59...@whatwg-node/server@0.9.60) ##### Patch Changes - [#​1838](https://redirect.github.com/ardatan/whatwg-node/pull/1838) [`8947888`](https://redirect.github.com/ardatan/whatwg-node/commit/894788854a212932fffde7a52e88c21cd696c6db) Thanks [@​ardatan](https://redirect.github.com/ardatan)! - Respect SIGTERM as termination event ### [`v0.9.59`](https://redirect.github.com/ardatan/whatwg-node/blob/HEAD/packages/server/CHANGELOG.md#0959) [Compare Source](https://redirect.github.com/ardatan/whatwg-node/compare/@whatwg-node/server@0.9.58...@whatwg-node/server@0.9.59) ##### Patch Changes - [`b4ab548`](https://redirect.github.com/ardatan/whatwg-node/commit/b4ab548cf11a0ec641e1800690684176eecad74b) Thanks [@​ardatan](https://redirect.github.com/ardatan)! - Remove SIGTERM from termination events to prevent hangs, and always add disposable stack to the termination events ### [`v0.9.58`](https://redirect.github.com/ardatan/whatwg-node/blob/HEAD/packages/server/CHANGELOG.md#0958) [Compare Source](https://redirect.github.com/ardatan/whatwg-node/compare/@whatwg-node/server@0.9.57...@whatwg-node/server@0.9.58) ##### Patch Changes - [`5a9098c`](https://redirect.github.com/ardatan/whatwg-node/commit/5a9098cdc2984c4ad80e136fc93250a97145852e) Thanks [@​ardatan](https://redirect.github.com/ardatan)! - Fix on plugin types ### [`v0.9.57`](https://redirect.github.com/ardatan/whatwg-node/blob/HEAD/packages/server/CHANGELOG.md#0957) [Compare Source](https://redirect.github.com/ardatan/whatwg-node/compare/@whatwg-node/server@0.9.56...@whatwg-node/server@0.9.57) ##### Patch Changes - [`e88ab4a`](https://redirect.github.com/ardatan/whatwg-node/commit/e88ab4a826184c05d006620bbd3ef20942ea83d9) Thanks [@​ardatan](https://redirect.github.com/ardatan)! - dependencies updates: - Added dependency [`@whatwg-node/disposablestack@^0.0.5` ↗︎](https://www.npmjs.com/package/@​whatwg-node/disposablestack/v/0.0.5) (to `dependencies`) - [`e88ab4a`](https://redirect.github.com/ardatan/whatwg-node/commit/e88ab4a826184c05d006620bbd3ef20942ea83d9) Thanks [@​ardatan](https://redirect.github.com/ardatan)! - New Explicit Resource Management feature for the server adapters; [Learn more](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-2.html) - `Symbol.dispose` and `Symbol.asyncDispose` hooks When the server adapter plugin has these hooks, it is added to the disposable stack of the server adapter. When the server adapter is disposed, those hooks are triggered - `disposableStack` in the server adapter The shared disposable stack that will be triggered when `Symbol.asyncDispose` is called. - Automatic disposal on Node and Node-compatible environments Even if the server adapter is not disposed explicitly, the disposal logic will be triggered on the process termination (SIGINT, SIGTERM etc) - ctx.waitUntil relation If it is an environment does not natively provide `waitUntil`, the unresolved passed promises will be resolved by the disposable stack. ### [`v0.9.56`](https://redirect.github.com/ardatan/whatwg-node/blob/HEAD/packages/server/CHANGELOG.md#0956) [Compare Source](https://redirect.github.com/ardatan/whatwg-node/compare/@whatwg-node/server@0.9.55...@whatwg-node/server@0.9.56) ##### Patch Changes - [#​1814](https://redirect.github.com/ardatan/whatwg-node/pull/1814) [`54c244d`](https://redirect.github.com/ardatan/whatwg-node/commit/54c244d99757c1469ee226e54baffe7b5b0924c7) Thanks [@​ardatan](https://redirect.github.com/ardatan)! - Small improvements for Bun support ### [`v0.9.55`](https://redirect.github.com/ardatan/whatwg-node/blob/HEAD/packages/server/CHANGELOG.md#0955) [Compare Source](https://redirect.github.com/ardatan/whatwg-node/compare/@whatwg-node/server@0.9.54...@whatwg-node/server@0.9.55) ##### Patch Changes - [#​1799](https://redirect.github.com/ardatan/whatwg-node/pull/1799) [`7d1f0ff`](https://redirect.github.com/ardatan/whatwg-node/commit/7d1f0ff4675911ecb249d609d200fd69f77e8d94) Thanks [@​ardatan](https://redirect.github.com/ardatan)! - Avoid polluting the original object in case of \`Object.create\` ### [`v0.9.54`](https://redirect.github.com/ardatan/whatwg-node/blob/HEAD/packages/server/CHANGELOG.md#0954) [Compare Source](https://redirect.github.com/ardatan/whatwg-node/compare/@whatwg-node/server@0.9.53...@whatwg-node/server@0.9.54) ##### Patch Changes - [#​1790](https://redirect.github.com/ardatan/whatwg-node/pull/1790) [`c7d49b1`](https://redirect.github.com/ardatan/whatwg-node/commit/c7d49b1dad95412b99126c289a44b1fbf3473a65) Thanks [@​ardatan](https://redirect.github.com/ardatan)! - Handle request abort correctly with AbortSignal ### [`v0.9.53`](https://redirect.github.com/ardatan/whatwg-node/blob/HEAD/packages/server/CHANGELOG.md#0953) [Compare Source](https://redirect.github.com/ardatan/whatwg-node/compare/@whatwg-node/server@0.9.52...@whatwg-node/server@0.9.53) ##### Patch Changes - Updated dependencies \[[`6c006e1`](https://redirect.github.com/ardatan/whatwg-node/commit/6c006e12eaa6705cdf20b7b43cccc44a1f7ea185)]: - [@​whatwg-node/fetch](https://redirect.github.com/whatwg-node/fetch)[@​0](https://redirect.github.com/0).10.0 ### [`v0.9.52`](https://redirect.github.com/ardatan/whatwg-node/blob/HEAD/packages/server/CHANGELOG.md#0952) [Compare Source](https://redirect.github.com/ardatan/whatwg-node/compare/@whatwg-node/server@0.9.51...@whatwg-node/server@0.9.52) ##### Patch Changes - [`323a519`](https://redirect.github.com/ardatan/whatwg-node/commit/323a5191a93c8a0a614077f89a2197b9c087a969) Thanks [@​ardatan](https://redirect.github.com/ardatan)! - Allow other libs to redefine `Request`'s properties ### [`v0.9.51`](https://redirect.github.com/ardatan/whatwg-node/blob/HEAD/packages/server/CHANGELOG.md#0951) [Compare Source](https://redirect.github.com/ardatan/whatwg-node/compare/@whatwg-node/server@0.9.50...@whatwg-node/server@0.9.51) ##### Patch Changes - [#​1644](https://redirect.github.com/ardatan/whatwg-node/pull/1644) [`637185f`](https://redirect.github.com/ardatan/whatwg-node/commit/637185f5c992ccabff13b185d4e14f09680228da) Thanks [@​renovate](https://redirect.github.com/apps/renovate)! - Respect given fetchAPI - Updated dependencies \[]: - [@​whatwg-node/fetch](https://redirect.github.com/whatwg-node/fetch)[@​0](https://redirect.github.com/0).9.23 ### [`v0.9.50`](https://redirect.github.com/ardatan/whatwg-node/blob/HEAD/packages/server/CHANGELOG.md#0950) [Compare Source](https://redirect.github.com/ardatan/whatwg-node/compare/@whatwg-node/server@0.9.49...@whatwg-node/server@0.9.50) ##### Patch Changes - [`9281e02`](https://redirect.github.com/ardatan/whatwg-node/commit/9281e021282a43a3dda8c8a5c9647d340b28698e) Thanks [@​ardatan](https://redirect.github.com/ardatan)! - Improvements with uWS Body handling - Updated dependencies \[[`77dd1c3`](https://redirect.github.com/ardatan/whatwg-node/commit/77dd1c3acde29aeb828b6eb37b6fbdbb47a16c57)]: - [@​whatwg-node/fetch](https://redirect.github.com/whatwg-node/fetch)[@​0](https://redirect.github.com/0).9.22
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/redwoodjs/redwood). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Tobbe Lundberg --- packages/vite/package.json | 2 +- packages/vite/src/rsc/rscRequestHandler.ts | 2 +- yarn.lock | 47 ++++++++++++++++++---- 3 files changed, 42 insertions(+), 9 deletions(-) diff --git a/packages/vite/package.json b/packages/vite/package.json index cb02ac34983f..beef525ced60 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -69,7 +69,7 @@ "@swc/core": "1.7.28", "@vitejs/plugin-react": "4.3.4", "@whatwg-node/fetch": "0.9.21", - "@whatwg-node/server": "0.9.49", + "@whatwg-node/server": "0.9.65", "acorn-loose": "8.4.0", "buffer": "6.0.3", "busboy": "^1.6.0", diff --git a/packages/vite/src/rsc/rscRequestHandler.ts b/packages/vite/src/rsc/rscRequestHandler.ts index f1a2925a48f4..aee1f8da76fc 100644 --- a/packages/vite/src/rsc/rscRequestHandler.ts +++ b/packages/vite/src/rsc/rscRequestHandler.ts @@ -51,7 +51,7 @@ export async function createRscRequestHandler( if (mwRouter) { // @MARK: Temporarily create Fetch Request here. // Ideally we'll have converted this whole handler to be Fetch Req and Response - const webReq = normalizeNodeRequest(req, DefaultFetchAPI.Request) + const webReq = normalizeNodeRequest(req, DefaultFetchAPI) const matchedMw = mwRouter.find(webReq.method as HTTPMethod, webReq.url) const [mwResponse] = await invoke( diff --git a/yarn.lock b/yarn.lock index 2c831c250346..15dce99d79b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9005,7 +9005,7 @@ __metadata: "@types/yargs-parser": "npm:21.0.3" "@vitejs/plugin-react": "npm:4.3.4" "@whatwg-node/fetch": "npm:0.9.21" - "@whatwg-node/server": "npm:0.9.49" + "@whatwg-node/server": "npm:0.9.65" acorn-loose: "npm:8.4.0" buffer: "npm:6.0.3" busboy: "npm:^1.6.0" @@ -11870,6 +11870,15 @@ __metadata: languageName: node linkType: hard +"@whatwg-node/disposablestack@npm:^0.0.5": + version: 0.0.5 + resolution: "@whatwg-node/disposablestack@npm:0.0.5" + dependencies: + tslib: "npm:^2.6.3" + checksum: 10c0/dfa949223f348a51acdeca2e3f08393ec8816a2ac2cee754a129e9b2ee4ada3afc1b3dcfbec7bdfe5abe14b30627ef0cef89d01a00062a031c82d555c43ab7f9 + languageName: node + linkType: hard + "@whatwg-node/events@npm:^0.0.3": version: 0.0.3 resolution: "@whatwg-node/events@npm:0.0.3" @@ -11884,7 +11893,7 @@ __metadata: languageName: node linkType: hard -"@whatwg-node/fetch@npm:0.9.21, @whatwg-node/fetch@npm:^0.9.18, @whatwg-node/fetch@npm:^0.9.21": +"@whatwg-node/fetch@npm:0.9.21, @whatwg-node/fetch@npm:^0.9.18": version: 0.9.21 resolution: "@whatwg-node/fetch@npm:0.9.21" dependencies: @@ -11894,6 +11903,16 @@ __metadata: languageName: node linkType: hard +"@whatwg-node/fetch@npm:^0.10.0": + version: 0.10.1 + resolution: "@whatwg-node/fetch@npm:0.10.1" + dependencies: + "@whatwg-node/node-fetch": "npm:^0.7.1" + urlpattern-polyfill: "npm:^10.0.0" + checksum: 10c0/8db24a980181683676a503d63ff22e7ac9ce70bb842f3a1a83d260ffd0682cc0fdcab24d825cb742364bf075fedaa404d08508703ecf7302e3332612bdb35d61 + languageName: node + linkType: hard + "@whatwg-node/fetch@npm:^0.8.0, @whatwg-node/fetch@npm:^0.8.1, @whatwg-node/fetch@npm:^0.8.2": version: 0.8.8 resolution: "@whatwg-node/fetch@npm:0.8.8" @@ -11932,13 +11951,27 @@ __metadata: languageName: node linkType: hard -"@whatwg-node/server@npm:0.9.49, @whatwg-node/server@npm:^0.9.44": - version: 0.9.49 - resolution: "@whatwg-node/server@npm:0.9.49" +"@whatwg-node/node-fetch@npm:^0.7.1": + version: 0.7.5 + resolution: "@whatwg-node/node-fetch@npm:0.7.5" + dependencies: + "@kamilkisiela/fast-url-parser": "npm:^1.1.4" + "@whatwg-node/disposablestack": "npm:^0.0.5" + busboy: "npm:^1.6.0" + fast-querystring: "npm:^1.1.1" + tslib: "npm:^2.6.3" + checksum: 10c0/d0693ff047f0e51e94a36e77d3d39f323f74a4205c2116add44e2fc0991e4d6044bde55a867d1cf78d7c4a406d73d75df5975876a32831c0cc5829811172335e + languageName: node + linkType: hard + +"@whatwg-node/server@npm:0.9.65, @whatwg-node/server@npm:^0.9.44": + version: 0.9.65 + resolution: "@whatwg-node/server@npm:0.9.65" dependencies: - "@whatwg-node/fetch": "npm:^0.9.21" + "@whatwg-node/disposablestack": "npm:^0.0.5" + "@whatwg-node/fetch": "npm:^0.10.0" tslib: "npm:^2.6.3" - checksum: 10c0/e8d99eceeb309a03061e0860ccf6ac11bf28534d2cd22d9d1b19e972dba7d673bf73fa915715948c59e12c5b86b56da5a9885bd96e740159adc4fa621b07e739 + checksum: 10c0/f6fde2995c28223278484432b6107908d3bb917e76efb401b132df44ec45f140d3ef97db6ad03d0d197133036f85fbdb9274f4ed75363594b0469391c178bbfb languageName: node linkType: hard