Repository: sveltejs/kit
Pull request #8216 (2022-12-18 16:06:31)

chore(deps): update dependency @rollup/plugin-commonjs to v24
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@rollup/plugin-commonjs](https://togithub.com/rollup/plugins/tree/master/packages/commonjs/#readme) ([source](https://togithub.com/rollup/plugins)) | [`^23.0.2` -> `^24.0.0`](https://renovatebot.com/diffs/npm/@rollup%2fplugin-commonjs/23.0.7/24.0.0) | [![age](https://badges.renovateapi.com/packages/npm/@rollup%2fplugin-commonjs/24.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@rollup%2fplugin-commonjs/24.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@rollup%2fplugin-commonjs/24.0.0/compatibility-slim/23.0.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@rollup%2fplugin-commonjs/24.0.0/confidence-slim/23.0.7)](https://docs.renovatebot.com/merge-confidence/) |
| [@rollup/plugin-commonjs](https://togithub.com/rollup/plugins/tree/master/packages/commonjs/#readme) ([source](https://togithub.com/rollup/plugins)) | [`^23.0.3` -> `^24.0.0`](https://renovatebot.com/diffs/npm/@rollup%2fplugin-commonjs/23.0.7/24.0.0) | [![age](https://badges.renovateapi.com/packages/npm/@rollup%2fplugin-commonjs/24.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@rollup%2fplugin-commonjs/24.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@rollup%2fplugin-commonjs/24.0.0/compatibility-slim/23.0.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@rollup%2fplugin-commonjs/24.0.0/confidence-slim/23.0.7)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>rollup/plugins</summary>

### [`v24.0.0`](https://togithub.com/rollup/plugins/blob/HEAD/packages/commonjs/CHANGELOG.md#v2400)

[Compare Source](https://togithub.com/rollup/plugins/compare/62d68273ac2a28e09117c78deef925d424e6fef7...c4c26a55f07a434d6d9c276709526d18bf736c72)

*2022-12-18*

##### Breaking Changes

-   fix: check if defaultIsModuleExports is auto for getDefaultExportFromCjs [#&#8203;1358](https://togithub.com/rollup/plugins/pull/1358)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/sveltejs/kit).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC42Mi4xIiwidXBkYXRlZEluVmVyIjoiMzQuNjIuMSJ9-->


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

Latest commit: 0faa566e0c262f15bcfd1815e7af4aa37cac41c5

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/renovate/rollup-plugin-commonjs-24.x?filename=.changeset/sour-comics-dress.md&value=---%0A%22%40sveltejs%2Fadapter-netlify%22%3A%20patch%0A%22%40sveltejs%2Fadapter-node%22%3A%20patch%0A---%0A%0Afix(deps)%3A%20update%20dependency%20%40rollup%2Fplugin-commonjs%20to%20v24%0A)


vercel[bot]: **The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more)

| Name | Status | Preview | Updated |
| :--- | :----- | :------ | :------ |
| **kit-svelte-dev** | 🔄 Building ([Inspect](https://vercel.com/svelte/kit-svelte-dev/9Sqn3zViy45pMpyfCxS2gCb5bJ4J)) |  | Dec 18, 2022 at 4:06PM (UTC) |


benmccann: We don't set `defaultIsModuleExports`, so I don't think this should be breaking https://github.com/rollup/plugins/blob/master/packages/commonjs/CHANGELOG.md#v2400
renovate[bot]: ### Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.
You can manually request rebase by checking the rebase/retry box above.

 ⚠ **Warning**: custom changes will be lost.

Patch:
diff --git a/.changeset/rare-frogs-crash.md b/.changeset/rare-frogs-crash.md
new file mode 100644
index 000000000..cf0bec2f5
--- /dev/null
+++ b/.changeset/rare-frogs-crash.md
@@ -0,0 +1,5 @@
+---
+"create-svelte": patch
+---
+
+[fix] address flakiness in playwright test
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/documentation/docs/20-core-concepts/20-load.md b/documentation/docs/20-core-concepts/20-load.md
index 91d244c16..0e7b5ede3 100644
--- a/documentation/docs/20-core-concepts/20-load.md
+++ b/documentation/docs/20-core-concepts/20-load.md
@@ -421,7 +421,7 @@ export function load({ locals }) {
 Top-level promises will be awaited, which makes it easy to return multiple promises without creating a waterfall:
 
 ```js
-/// file: src/routes/+page.server.js
+/// file: src/routes/+page.js
 /** @type {import('./$types').PageServerLoad} */
 export function load() {
 	return {
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..c061fa795 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
@@ -1255,8 +1255,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 +1269,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==}
@@ -3021,12 +3002,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 +3997,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/src/routes/home/Svelte.svelte b/sites/kit.svelte.dev/src/routes/home/Svelte.svelte
index fa07bcb5e..7f0b44d4c 100644
--- a/sites/kit.svelte.dev/src/routes/home/Svelte.svelte
+++ b/sites/kit.svelte.dev/src/routes/home/Svelte.svelte
@@ -28,9 +28,7 @@
 			<p>
 				SvelteKit is built on Svelte, a UI framework that uses a compiler to let you write
 				breathtakingly concise components that do minimal work in the browser, using languages you
-				already know — HTML, CSS and JavaScript. <strong style="color: var(--sk-theme-2)"
-					>It's a love letter to web development.</strong
-				>
+				already know — HTML, CSS and JavaScript. <strong>It's a love letter to web development.</strong>
 			</p>
 
 			<p>


Test patch:
diff --git a/packages/create-svelte/shared/+playwright+default/tests/test.ts b/packages/create-svelte/shared/+playwright+default/tests/test.ts
index c104fe8eb..38b7f95bd 100644
--- a/packages/create-svelte/shared/+playwright+default/tests/test.ts
+++ b/packages/create-svelte/shared/+playwright+default/tests/test.ts
@@ -2,5 +2,5 @@ import { expect, test } from '@playwright/test';
 
 test('about page has expected h1', async ({ page }) => {
 	await page.goto('/about');
-	expect(await page.textContent('h1')).toBe('About this app');
+	await expect(page.locator('h1')).toHaveText('About this app');
 });
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');
 	});