diff --git a/package-lock.json b/package-lock.json index 7779309ef..503a12468 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4604,11 +4604,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/set-cookie-parser": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz", - "integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==" - }, "node_modules/shebang-command": { "version": "2.0.0", "dev": true, @@ -5083,13 +5078,14 @@ } }, "node_modules/undici": { - "version": "5.13.0", - "license": "MIT", + "version": "5.22.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.22.1.tgz", + "integrity": "sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==", "dependencies": { "busboy": "^1.6.0" }, "engines": { - "node": ">=12.18" + "node": ">=14.0" } }, "node_modules/universalify": { @@ -5454,10 +5450,9 @@ "glob-to-regexp": "^0.4.1", "http-cache-semantics": "^4.1.0", "kleur": "^4.1.5", - "set-cookie-parser": "^2.6.0", "source-map-support": "0.5.21", "stoppable": "^1.1.0", - "undici": "^5.13.0", + "undici": "^5.22.1", "workerd": "1.20230724.0", "ws": "^8.11.0", "youch": "^3.2.2", @@ -7705,10 +7700,9 @@ "http-cache-semantics": "^4.1.0", "kleur": "^4.1.5", "semiver": "^1.1.0", - "set-cookie-parser": "^2.6.0", "source-map-support": "0.5.21", "stoppable": "^1.1.0", - "undici": "^5.13.0", + "undici": "^5.22.1", "workerd": "1.20230724.0", "ws": "^8.11.0", "youch": "^3.2.2", @@ -8261,11 +8255,6 @@ } } }, - "set-cookie-parser": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz", - "integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==" - }, "shebang-command": { "version": "2.0.0", "dev": true, @@ -8549,7 +8538,9 @@ } }, "undici": { - "version": "5.13.0", + "version": "5.22.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.22.1.tgz", + "integrity": "sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==", "requires": { "busboy": "^1.6.0" } diff --git a/packages/miniflare/package.json b/packages/miniflare/package.json index 0206a4c37..aca7fd111 100644 --- a/packages/miniflare/package.json +++ b/packages/miniflare/package.json @@ -35,10 +35,9 @@ "glob-to-regexp": "^0.4.1", "http-cache-semantics": "^4.1.0", "kleur": "^4.1.5", - "set-cookie-parser": "^2.6.0", "source-map-support": "0.5.21", "stoppable": "^1.1.0", - "undici": "^5.13.0", + "undici": "^5.22.1", "workerd": "1.20230724.0", "ws": "^8.11.0", "youch": "^3.2.2", diff --git a/packages/miniflare/src/index.ts b/packages/miniflare/src/index.ts index 5dfe2df0b..1f7a4d930 100644 --- a/packages/miniflare/src/index.ts +++ b/packages/miniflare/src/index.ts @@ -14,7 +14,6 @@ import type { RequestInitCfProperties, } from "@cloudflare/workers-types/experimental"; import exitHook from "exit-hook"; -import { splitCookiesString } from "set-cookie-parser"; import stoppable from "stoppable"; import { Client } from "undici"; import { WebSocketServer } from "ws"; @@ -372,7 +371,7 @@ async function writeResponse(response: Response, res: http.ServerResponse) { const key = entry[0].toLowerCase(); const value = entry[1]; if (key === "set-cookie") { - headers[key] = splitCookiesString(value); + headers[key] = response.headers.getSetCookie(); } else { headers[key] = value; }