Repository: sveltejs/kit
Pull request #8226 (2022-12-19 21:47:59)

[chore] remove unused dependency
I don't see anywhere in the code where this is referenced

I don't notice any issues on the homepage from this being removed: https://kit-svelte-7ioul50vz-svelte.vercel.app/

changeset-bot[bot]: ###  ⚠️  No Changeset found

Latest commit: 9990f875d0d21d354dbcbe64a4ae2b7658088948

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. **If these changes should result in a version bump, you need to add a changeset.**

<details><summary>This PR includes no changesets</summary>

  When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

</details>

[Click here to learn what changesets are, and how to add one](https://github.com/changesets/changesets/blob/master/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add a changeset to this PR](https://github.com/sveltejs/kit/new/unused-vercel-edge?filename=.changeset/brave-horses-cheat.md&value=---%0A%22kit.svelte.dev%22%3A%20patch%0A---%0A%0A%5Bchore%5D%20remove%20unused%20dependency%0A)



Patch:
diff --git a/.changeset/sour-comics-dress.md b/.changeset/sour-comics-dress.md
new file mode 100644
index 000000000..58a76da84
--- /dev/null
+++ b/.changeset/sour-comics-dress.md
@@ -0,0 +1,5 @@
+---
+"@sveltejs/adapter-node": patch
+---
+
+chore(deps): update dependency @rollup/plugin-commonjs to v24
diff --git a/.changeset/tidy-pandas-report.md b/.changeset/tidy-pandas-report.md
new file mode 100644
index 000000000..d328468ff
--- /dev/null
+++ b/.changeset/tidy-pandas-report.md
@@ -0,0 +1,5 @@
+---
+'@sveltejs/kit': patch
+---
+
+Fix form action redirect status code
diff --git a/package.json b/package.json
index 53ee7539c..84c96008d 100644
--- a/package.json
+++ b/package.json
@@ -24,7 +24,7 @@
 	"homepage": "https://github.com/sveltejs/kit#readme",
 	"devDependencies": {
 		"@changesets/cli": "^2.25.2",
-		"@rollup/plugin-commonjs": "^23.0.3",
+		"@rollup/plugin-commonjs": "^24.0.0",
 		"@rollup/plugin-json": "^6.0.0",
 		"@rollup/plugin-node-resolve": "^15.0.1",
 		"@svitejs/changesets-changelog-github-compact": "^1.0.0",
diff --git a/packages/adapter-netlify/package.json b/packages/adapter-netlify/package.json
index 87a572e6e..d4e834e9e 100644
--- a/packages/adapter-netlify/package.json
+++ b/packages/adapter-netlify/package.json
@@ -38,7 +38,7 @@
 	},
 	"devDependencies": {
 		"@netlify/functions": "^1.3.0",
-		"@rollup/plugin-commonjs": "^23.0.3",
+		"@rollup/plugin-commonjs": "^24.0.0",
 		"@rollup/plugin-json": "^6.0.0",
 		"@rollup/plugin-node-resolve": "^15.0.1",
 		"@sveltejs/kit": "workspace:^",
diff --git a/packages/adapter-node/package.json b/packages/adapter-node/package.json
index ba672e2ce..adff58816 100644
--- a/packages/adapter-node/package.json
+++ b/packages/adapter-node/package.json
@@ -42,7 +42,7 @@
 		"uvu": "^0.5.6"
 	},
 	"dependencies": {
-		"@rollup/plugin-commonjs": "^23.0.2",
+		"@rollup/plugin-commonjs": "^24.0.0",
 		"@rollup/plugin-json": "^6.0.0",
 		"@rollup/plugin-node-resolve": "^15.0.1",
 		"rollup": "^3.7.0"
diff --git a/packages/kit/src/runtime/server/page/index.js b/packages/kit/src/runtime/server/page/index.js
index 84c712d4f..463e72d01 100644
--- a/packages/kit/src/runtime/server/page/index.js
+++ b/packages/kit/src/runtime/server/page/index.js
@@ -62,7 +62,7 @@ export async function render_page(event, route, page, options, state, resolve_op
 			// (this also determines status code)
 			action_result = await handle_action_request(event, leaf_node.server);
 			if (action_result?.type === 'redirect') {
-				return redirect_response(303, action_result.location);
+				return redirect_response(action_result.status, action_result.location);
 			}
 			if (action_result?.type === 'error') {
 				const error = action_result.error;
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index bdc6177f6..54589f108 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -5,7 +5,7 @@ importers:
   .:
     specifiers:
       '@changesets/cli': ^2.25.2
-      '@rollup/plugin-commonjs': ^23.0.3
+      '@rollup/plugin-commonjs': ^24.0.0
       '@rollup/plugin-json': ^6.0.0
       '@rollup/plugin-node-resolve': ^15.0.1
       '@svitejs/changesets-changelog-github-compact': ^1.0.0
@@ -18,7 +18,7 @@ importers:
       typescript: ^4.9.3
     devDependencies:
       '@changesets/cli': 2.25.2
-      '@rollup/plugin-commonjs': 23.0.3_rollup@3.7.0
+      '@rollup/plugin-commonjs': 24.0.0_rollup@3.7.0
       '@rollup/plugin-json': 6.0.0_rollup@3.7.0
       '@rollup/plugin-node-resolve': 15.0.1_rollup@3.7.0
       '@svitejs/changesets-changelog-github-compact': 1.0.0
@@ -81,7 +81,7 @@ importers:
     specifiers:
       '@iarna/toml': ^2.2.5
       '@netlify/functions': ^1.3.0
-      '@rollup/plugin-commonjs': ^23.0.3
+      '@rollup/plugin-commonjs': ^24.0.0
       '@rollup/plugin-json': ^6.0.0
       '@rollup/plugin-node-resolve': ^15.0.1
       '@sveltejs/kit': workspace:^
@@ -99,7 +99,7 @@ importers:
       set-cookie-parser: 2.5.1
     devDependencies:
       '@netlify/functions': 1.3.0
-      '@rollup/plugin-commonjs': 23.0.3_rollup@3.7.0
+      '@rollup/plugin-commonjs': 24.0.0_rollup@3.7.0
       '@rollup/plugin-json': 6.0.0_rollup@3.7.0
       '@rollup/plugin-node-resolve': 15.0.1_rollup@3.7.0
       '@sveltejs/kit': link:../kit
@@ -112,7 +112,7 @@ importers:
 
   packages/adapter-node:
     specifiers:
-      '@rollup/plugin-commonjs': ^23.0.2
+      '@rollup/plugin-commonjs': ^24.0.0
       '@rollup/plugin-json': ^6.0.0
       '@rollup/plugin-node-resolve': ^15.0.1
       '@sveltejs/kit': workspace:^
@@ -125,7 +125,7 @@ importers:
       typescript: ^4.9.3
       uvu: ^0.5.6
     dependencies:
-      '@rollup/plugin-commonjs': 23.0.2_rollup@3.7.0
+      '@rollup/plugin-commonjs': 24.0.0_rollup@3.7.0
       '@rollup/plugin-json': 6.0.0_rollup@3.7.0
       '@rollup/plugin-node-resolve': 15.0.1_rollup@3.7.0
       rollup: 3.7.0
@@ -691,7 +691,6 @@ importers:
       '@sveltejs/site-kit': ^3.0.3
       '@types/d3-geo': ^3.0.2
       '@types/node': ^16.18.6
-      '@vercel/edge': ^0.1.2
       d3-geo: ^3.0.1
       d3-geo-projection: ^4.0.0
       flexsearch: ^0.7.31
@@ -708,7 +707,6 @@ importers:
       vite: ^4.0.0
       vite-imagetools: ^4.0.11
     dependencies:
-      '@vercel/edge': 0.1.2
       d3-geo: 3.0.1
       d3-geo-projection: 4.0.0
       topojson-client: 3.1.0
@@ -1255,8 +1253,8 @@ packages:
   /@polka/url/1.0.0-next.21:
     resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==}
 
-  /@rollup/plugin-commonjs/23.0.2_rollup@3.7.0:
-    resolution: {integrity: sha512-e9ThuiRf93YlVxc4qNIurvv+Hp9dnD+4PjOqQs5vAYfcZ3+AXSrcdzXnVjWxcGQOa6KGJFcRZyUI3ktWLavFjg==}
+  /@rollup/plugin-commonjs/24.0.0_rollup@3.7.0:
+    resolution: {integrity: sha512-0w0wyykzdyRRPHOb0cQt14mIBLujfAv6GgP6g8nvg/iBxEm112t3YPPq+Buqe2+imvElTka+bjNlJ/gB56TD8g==}
     engines: {node: '>=14.0.0'}
     peerDependencies:
       rollup: ^2.68.0||^3.0.0
@@ -1269,27 +1267,8 @@ packages:
       estree-walker: 2.0.2
       glob: 8.0.3
       is-reference: 1.2.1
-      magic-string: 0.26.7
-      rollup: 3.7.0
-    dev: false
-
-  /@rollup/plugin-commonjs/23.0.3_rollup@3.7.0:
-    resolution: {integrity: sha512-31HxrT5emGfTyIfAs1lDQHj6EfYxTXcwtX5pIIhq+B/xZBNIqQ179d/CkYxlpYmFCxT78AeU4M8aL8Iv/IBxFA==}
-    engines: {node: '>=14.0.0'}
-    peerDependencies:
-      rollup: ^2.68.0||^3.0.0
-    peerDependenciesMeta:
-      rollup:
-        optional: true
-    dependencies:
-      '@rollup/pluginutils': 5.0.2_rollup@3.7.0
-      commondir: 1.0.1
-      estree-walker: 2.0.2
-      glob: 8.0.3
-      is-reference: 1.2.1
-      magic-string: 0.26.7
+      magic-string: 0.27.0
       rollup: 3.7.0
-    dev: true
 
   /@rollup/plugin-json/6.0.0_rollup@3.7.0:
     resolution: {integrity: sha512-i/4C5Jrdr1XUarRhVu27EEwjt4GObltD7c+MkCIpO2QIbojw8MUs+CCTqOphQi3Qtg1FLmYt+l+6YeoIf51J7w==}
@@ -1520,10 +1499,6 @@ packages:
       - supports-color
     dev: true
 
-  /@vercel/edge/0.1.2:
-    resolution: {integrity: sha512-NmoJ4JvF2/LxU8e8fRJcxaMrO9A8a2WmW6CO9GEomlDltlREyQTUWMk13BuCDDpXUPcSBDrZ2TJIoWiFQEI4sg==}
-    dev: false
-
   /@vercel/nft/0.22.1:
     resolution: {integrity: sha512-lYYZIoxRurqDOSoVIdBicGnpUIpfyaS5qVjdPq+EfI285WqtZK3NK/dyCkiyBul+X2U2OEhRyeMdXPCHGJbohw==}
     hasBin: true
@@ -3021,12 +2996,6 @@ packages:
       sourcemap-codec: 1.4.8
     dev: true
 
-  /magic-string/0.26.7:
-    resolution: {integrity: sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow==}
-    engines: {node: '>=12'}
-    dependencies:
-      sourcemap-codec: 1.4.8
-
   /magic-string/0.27.0:
     resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==}
     engines: {node: '>=12'}
@@ -4022,6 +3991,7 @@ packages:
   /sourcemap-codec/1.4.8:
     resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==}
     deprecated: Please use @jridgewell/sourcemap-codec instead
+    dev: true
 
   /spawndamnit/2.0.0:
     resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==}
diff --git a/sites/kit.svelte.dev/package.json b/sites/kit.svelte.dev/package.json
index 69aa30b8e..382cff8d5 100644
--- a/sites/kit.svelte.dev/package.json
+++ b/sites/kit.svelte.dev/package.json
@@ -32,7 +32,6 @@
 	},
 	"type": "module",
 	"dependencies": {
-		"@vercel/edge": "^0.1.2",
 		"d3-geo": "^3.0.1",
 		"d3-geo-projection": "^4.0.0",
 		"topojson-client": "^3.1.0"


Test patch:
diff --git a/packages/kit/test/apps/basics/test/test.js b/packages/kit/test/apps/basics/test/test.js
index 0193fbbad..0a8476d16 100644
--- a/packages/kit/test/apps/basics/test/test.js
+++ b/packages/kit/test/apps/basics/test/test.js
@@ -2010,12 +2010,25 @@ test.describe('Actions', () => {
 		);
 	});
 
-	test('redirect', async ({ page }) => {
+	test('redirect', async ({ page, javaScriptEnabled }) => {
 		await page.goto('/actions/redirect');
 
 		page.click('button');
 
-		await Promise.all([page.waitForResponse('/actions/redirect'), page.waitForNavigation()]);
+		const [redirect] = await Promise.all([
+			page.waitForResponse('/actions/redirect'),
+			page.waitForNavigation()
+		]);
+		if (javaScriptEnabled) {
+			expect(await redirect.json()).toEqual({
+				type: 'redirect',
+				location: '/actions/enhance',
+				status: 303
+			});
+		} else {
+			expect(redirect.status()).toBe(303);
+			expect(redirect.headers()['location']).toBe('/actions/enhance');
+		}
 
 		expect(page.url()).toContain('/actions/enhance');
 	});