Repository: sveltejs/kit
Pull request #8162 (2022-12-14 18:00:40)

chore(create-svelte): address flakiness in playwright test
Congrats to the version release! Before no web-first assertion was used for the assertion, which means that it did not retry and just failed when the text was not matching. Now its using [toHaveText](https://playwright.dev/docs/test-assertions#locator-assertions-to-have-text) which is recommended and not flaky.

There were more such places inside the sveltekit codebase, seems not related, since its not customer facing, but might still be worth updating.

### Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

- [ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
- [x] This message body should clearly illustrate what problems it solves.
- [ ] Ideally, include a test that fails without this PR but passes with it.

### Tests

- [x] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check`

### Changesets

- [ ] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. All changesets should be `patch` until SvelteKit 1.0



vercel[bot]: @mxschmitt is attempting to deploy a commit to the **Svelte** Team on [Vercel](https://vercel.com).

A member of the Team first needs to [authorize it](https://vercel.com/git/authorize?team=Svelte&type=github&job=%7B%22headInfo%22%3A%7B%22sha%22%3A%227969e6dcdaad2350492a8ca4fb06494066ffa996%22%7D%2C%22id%22%3A%22QmREnqhxDTtRfD3CuJvbaKeC5QbR3n8WjepyRWmajX2tMu%22%2C%22org%22%3A%22sveltejs%22%2C%22prId%22%3A8162%2C%22repo%22%3A%22kit%22%7D).



Patch:
diff --git a/.changeset/config.json b/.changeset/config.json
index cc0d41521..9f121d529 100644
--- a/.changeset/config.json
+++ b/.changeset/config.json
@@ -5,5 +5,6 @@
 	"linked": [],
 	"access": "public",
 	"baseBranch": "master",
-	"bumpVersionsWithWorkspaceProtocolOnly": true
+	"bumpVersionsWithWorkspaceProtocolOnly": true,
+	"ignore": ["!(@sveltejs/*|create-svelte|svelte-migrate)"]
 }
diff --git a/.changeset/large-ravens-attack.md b/.changeset/large-ravens-attack.md
new file mode 100644
index 000000000..60cd95f58
--- /dev/null
+++ b/.changeset/large-ravens-attack.md
@@ -0,0 +1,7 @@
+---
+"@sveltejs/adapter-node": patch
+---
+
+Update dependency @rollup/plugin-json to v6
+
+Note: plugin-json v6 fails your build for parse errors that only logged a warning with v5. We consider this a bugfix as only healthy input should result in a successful build.
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/documentation/docs/10-getting-started/20-creating-a-project.md b/documentation/docs/10-getting-started/20-creating-a-project.md
index 5446b3998..ada1e0910 100644
--- a/documentation/docs/10-getting-started/20-creating-a-project.md
+++ b/documentation/docs/10-getting-started/20-creating-a-project.md
@@ -18,7 +18,7 @@ There are two basic concepts:
 - Each page of your app is a [Svelte](https://svelte.dev) component
 - You create pages by adding files to the `src/routes` directory of your project. These will be server-rendered so that a user's first visit to your app is as fast as possible, then a client-side app takes over
 
-Try editing the files to get a feel for how everything works – you may not need to bother reading the rest of this guide!
+Try editing the files to get a feel for how everything works.
 
 ## Editor setup
 
diff --git a/documentation/docs/20-core-concepts/20-load.md b/documentation/docs/20-core-concepts/20-load.md
index 3d9fcf980..0e7b5ede3 100644
--- a/documentation/docs/20-core-concepts/20-load.md
+++ b/documentation/docs/20-core-concepts/20-load.md
@@ -90,8 +90,9 @@ export async function load() {
 </script>
 
 <main>
-	<!-- +page.svelte is rendered here -->
-	<slot />
+	<slot>
+		<!-- +page.svelte is rendered here -->
+	</slot>
 </main>
 
 <aside>
@@ -420,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/documentation/docs/20-core-concepts/50-adapters.md b/documentation/docs/20-core-concepts/50-adapters.md
index 255abc296..9315e47cb 100644
--- a/documentation/docs/20-core-concepts/50-adapters.md
+++ b/documentation/docs/20-core-concepts/50-adapters.md
@@ -112,5 +112,3 @@ Within the `adapt` method, there are a number of things that an adapter should d
 - Put the user's static files and the generated JS/CSS in the correct location for the target platform
 
 Where possible, we recommend putting the adapter output under the `build/` directory with any intermediate output placed under `.svelte-kit/[adapter-name]`.
-
-> The adapter API may change before 1.0.
diff --git a/documentation/faq/40-adapters.md b/documentation/faq/40-adapters.md
deleted file mode 100644
index 3a0fdc24f..000000000
--- a/documentation/faq/40-adapters.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: I'm having trouble using an adapter.
----
-
-Please make sure the version of the adapter specified in your `package.json` is `"next"`.
diff --git a/documentation/faq/70-packages.md b/documentation/faq/70-packages.md
index f41a2d310..6c7a1fd9c 100644
--- a/documentation/faq/70-packages.md
+++ b/documentation/faq/70-packages.md
@@ -11,6 +11,6 @@ Libraries work best with Vite when they distribute an ESM version and you may wi
 - `main` should be defined if `exports` is not. It should be either a CommonJS or ESM file and adhere to the previous bullet. If a `module` field is defined, it should refer to an ESM file.
 - Svelte components should be distributed entirely as ESM and have a `svelte` field defining the entry point.
 
-It is encouraged to make sure the dependencies of external Svelte components provide an ESM version. However, in order to handle CommonJS dependencies [`vite-plugin-svelte` will look for any CJS dependencies of external Svelte components](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#what-is-going-on-with-vite-and-pre-bundling-dependencies) and ask Vite to pre-bundle them by automatically adding them to Vite's `optimizeDeps.include` which will use `esbuild` to convert them to ESM. A side effect of this approach is that it takes longer to load the initial page. If this becomes noticable, try setting [experimental.prebundleSvelteLibraries: true](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#prebundlesveltelibraries) in `svelte.config.js`. Note that this option is experimental.
+It is encouraged to make sure the dependencies of external Svelte components provide an ESM version. However, in order to handle CommonJS dependencies [`vite-plugin-svelte` will look for any CJS dependencies of external Svelte components](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#what-is-going-on-with-vite-and-pre-bundling-dependencies) and ask Vite to pre-bundle them by automatically adding them to Vite's `optimizeDeps.include` which will use `esbuild` to convert them to ESM. A side effect of this approach is that it takes longer to load the initial page. If this becomes noticeable, try setting [experimental.prebundleSvelteLibraries: true](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#prebundlesveltelibraries) in `svelte.config.js`. Note that this option is experimental.
 
 If you are still encountering issues we recommend checking [the list of known Vite issues most commonly affecting SvelteKit users](https://github.com/sveltejs/kit/issues/2086) and searching both [the Vite issue tracker](https://github.com/vitejs/vite/issues) and the issue tracker of the library in question. Sometimes issues can be worked around by fiddling with the [`optimizeDeps`](https://vitejs.dev/config/#dep-optimization-options) or [`ssr`](https://vitejs.dev/config/#ssr-options) config values.
diff --git a/package.json b/package.json
index 02a774658..53ee7539c 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,7 @@
 	"devDependencies": {
 		"@changesets/cli": "^2.25.2",
 		"@rollup/plugin-commonjs": "^23.0.3",
-		"@rollup/plugin-json": "^5.0.2",
+		"@rollup/plugin-json": "^6.0.0",
 		"@rollup/plugin-node-resolve": "^15.0.1",
 		"@svitejs/changesets-changelog-github-compact": "^1.0.0",
 		"playwright": "^1.28.1",
diff --git a/packages/adapter-netlify/package.json b/packages/adapter-netlify/package.json
index ecdff5d46..87a572e6e 100644
--- a/packages/adapter-netlify/package.json
+++ b/packages/adapter-netlify/package.json
@@ -39,7 +39,7 @@
 	"devDependencies": {
 		"@netlify/functions": "^1.3.0",
 		"@rollup/plugin-commonjs": "^23.0.3",
-		"@rollup/plugin-json": "^5.0.2",
+		"@rollup/plugin-json": "^6.0.0",
 		"@rollup/plugin-node-resolve": "^15.0.1",
 		"@sveltejs/kit": "workspace:^",
 		"@types/node": "^16.18.6",
diff --git a/packages/adapter-node/package.json b/packages/adapter-node/package.json
index 009b727dc..ba672e2ce 100644
--- a/packages/adapter-node/package.json
+++ b/packages/adapter-node/package.json
@@ -43,7 +43,7 @@
 	},
 	"dependencies": {
 		"@rollup/plugin-commonjs": "^23.0.2",
-		"@rollup/plugin-json": "^5.0.1",
+		"@rollup/plugin-json": "^6.0.0",
 		"@rollup/plugin-node-resolve": "^15.0.1",
 		"rollup": "^3.7.0"
 	},
diff --git a/packages/create-svelte/CHANGELOG.md b/packages/create-svelte/CHANGELOG.md
index 1fc390f4a..3f74ac1d2 100644
--- a/packages/create-svelte/CHANGELOG.md
+++ b/packages/create-svelte/CHANGELOG.md
@@ -1,5 +1,11 @@
 # create-svelte
 
+## 2.0.1
+
+### Patch Changes
+
+- no code change, rerelease as 2.0.1 for technical reasons ([#8161](https://github.com/sveltejs/kit/pull/8161))
+
 ## 2.0.0
 
 ### Major Changes
diff --git a/packages/create-svelte/package.json b/packages/create-svelte/package.json
index 4a6274037..68151f7bf 100644
--- a/packages/create-svelte/package.json
+++ b/packages/create-svelte/package.json
@@ -1,6 +1,6 @@
 {
 	"name": "create-svelte",
-	"version": "2.0.0",
+	"version": "2.0.1",
 	"repository": {
 		"type": "git",
 		"url": "https://github.com/sveltejs/kit",
diff --git a/packages/kit/CHANGELOG.md b/packages/kit/CHANGELOG.md
index fd946a717..e1a361713 100644
--- a/packages/kit/CHANGELOG.md
+++ b/packages/kit/CHANGELOG.md
@@ -1,5 +1,11 @@
 # @sveltejs/kit
 
+## 1.0.1
+
+### Patch Changes
+
+- Explicitly mark Node 17.x as not supported ([#8174](https://github.com/sveltejs/kit/pull/8174))
+
 ## 1.0.0
 
 ### Major Changes
diff --git a/packages/kit/package.json b/packages/kit/package.json
index ee03850c1..e9c821120 100644
--- a/packages/kit/package.json
+++ b/packages/kit/package.json
@@ -1,6 +1,6 @@
 {
 	"name": "@sveltejs/kit",
-	"version": "1.0.0",
+	"version": "1.0.1",
 	"repository": {
 		"type": "git",
 		"url": "https://github.com/sveltejs/kit",
@@ -87,6 +87,6 @@
 	},
 	"types": "types/index.d.ts",
 	"engines": {
-		"node": ">=16.14"
+		"node": "^16.14 || >=18"
 	}
 }
diff --git a/packages/package/CHANGELOG.md b/packages/package/CHANGELOG.md
index 0cadd9f62..20101aaed 100644
--- a/packages/package/CHANGELOG.md
+++ b/packages/package/CHANGELOG.md
@@ -1,5 +1,11 @@
 # @sveltejs/package
 
+## 1.0.1
+
+### Patch Changes
+
+- Explicitly mark Node 17.x as not supported ([#8174](https://github.com/sveltejs/kit/pull/8174))
+
 ## 1.0.0
 
 ### Major Changes
diff --git a/packages/package/package.json b/packages/package/package.json
index 6d71dc31b..919b10f46 100644
--- a/packages/package/package.json
+++ b/packages/package/package.json
@@ -1,6 +1,6 @@
 {
 	"name": "@sveltejs/package",
-	"version": "1.0.0",
+	"version": "1.0.1",
 	"repository": {
 		"type": "git",
 		"url": "https://github.com/sveltejs/kit",
@@ -47,6 +47,6 @@
 	},
 	"types": "types/index.d.ts",
 	"engines": {
-		"node": ">=16.14"
+		"node": "^16.14 || >=18"
 	}
 }
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index c86f1bf06..bdc6177f6 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -6,7 +6,7 @@ importers:
     specifiers:
       '@changesets/cli': ^2.25.2
       '@rollup/plugin-commonjs': ^23.0.3
-      '@rollup/plugin-json': ^5.0.2
+      '@rollup/plugin-json': ^6.0.0
       '@rollup/plugin-node-resolve': ^15.0.1
       '@svitejs/changesets-changelog-github-compact': ^1.0.0
       playwright: ^1.28.1
@@ -19,7 +19,7 @@ importers:
     devDependencies:
       '@changesets/cli': 2.25.2
       '@rollup/plugin-commonjs': 23.0.3_rollup@3.7.0
-      '@rollup/plugin-json': 5.0.2_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
       playwright: 1.28.1
@@ -82,7 +82,7 @@ importers:
       '@iarna/toml': ^2.2.5
       '@netlify/functions': ^1.3.0
       '@rollup/plugin-commonjs': ^23.0.3
-      '@rollup/plugin-json': ^5.0.2
+      '@rollup/plugin-json': ^6.0.0
       '@rollup/plugin-node-resolve': ^15.0.1
       '@sveltejs/kit': workspace:^
       '@types/node': ^16.18.6
@@ -100,7 +100,7 @@ importers:
     devDependencies:
       '@netlify/functions': 1.3.0
       '@rollup/plugin-commonjs': 23.0.3_rollup@3.7.0
-      '@rollup/plugin-json': 5.0.2_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
       '@types/node': 16.18.6
@@ -113,7 +113,7 @@ importers:
   packages/adapter-node:
     specifiers:
       '@rollup/plugin-commonjs': ^23.0.2
-      '@rollup/plugin-json': ^5.0.1
+      '@rollup/plugin-json': ^6.0.0
       '@rollup/plugin-node-resolve': ^15.0.1
       '@sveltejs/kit': workspace:^
       '@types/node': ^16.18.6
@@ -126,7 +126,7 @@ importers:
       uvu: ^0.5.6
     dependencies:
       '@rollup/plugin-commonjs': 23.0.2_rollup@3.7.0
-      '@rollup/plugin-json': 5.0.1_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
     devDependencies:
@@ -1291,8 +1291,8 @@ packages:
       rollup: 3.7.0
     dev: true
 
-  /@rollup/plugin-json/5.0.1_rollup@3.7.0:
-    resolution: {integrity: sha512-QCwhZZLvM8nRcTHyR1vOgyTMiAnjiNj1ebD/BMRvbO1oc/z14lZH6PfxXeegee2B6mky/u9fia4fxRM4TqrUaw==}
+  /@rollup/plugin-json/6.0.0_rollup@3.7.0:
+    resolution: {integrity: sha512-i/4C5Jrdr1XUarRhVu27EEwjt4GObltD7c+MkCIpO2QIbojw8MUs+CCTqOphQi3Qtg1FLmYt+l+6YeoIf51J7w==}
     engines: {node: '>=14.0.0'}
     peerDependencies:
       rollup: ^1.20.0||^2.0.0||^3.0.0
@@ -1302,20 +1302,6 @@ packages:
     dependencies:
       '@rollup/pluginutils': 5.0.2_rollup@3.7.0
       rollup: 3.7.0
-    dev: false
-
-  /@rollup/plugin-json/5.0.2_rollup@3.7.0:
-    resolution: {integrity: sha512-D1CoOT2wPvadWLhVcmpkDnesTzjhNIQRWLsc3fA49IFOP2Y84cFOOJ+nKGYedvXHKUsPeq07HR4hXpBBr+CHlA==}
-    engines: {node: '>=14.0.0'}
-    peerDependencies:
-      rollup: ^1.20.0||^2.0.0||^3.0.0
-    peerDependenciesMeta:
-      rollup:
-        optional: true
-    dependencies:
-      '@rollup/pluginutils': 5.0.2_rollup@3.7.0
-      rollup: 3.7.0
-    dev: true
 
   /@rollup/plugin-node-resolve/15.0.1_rollup@3.7.0:
     resolution: {integrity: sha512-ReY88T7JhJjeRVbfCyNj+NXAG3IIsVMsX9b5/9jC98dRP8/yxlZdz7mHZbHk5zHr24wZZICS5AcXsFZAXYUQEg==}
diff --git a/sites/kit.svelte.dev/src/routes/Banner.svelte b/sites/kit.svelte.dev/src/routes/Banner.svelte
index e3f8d57cd..66ddc5422 100644
--- a/sites/kit.svelte.dev/src/routes/Banner.svelte
+++ b/sites/kit.svelte.dev/src/routes/Banner.svelte
@@ -15,8 +15,10 @@
 
 <header class="banner" class:visible>
 	<p>
-		<a href="https://www.youtube.com/watch?v=N4BRVkQVoMc">
-			<strong>LIVE NOW:</strong> announcing SvelteKit 1.0!
+		<a href="https://svelte.dev/blog/announcing-sveltekit-1.0">
+			<strong>SvelteKit 1.0 is here!</strong>
+			<span class="small">Learn more</span>
+			<span class="large">Read the blog post to learn more</span>
 		</a>
 	</p>
 </header>
@@ -45,6 +47,20 @@
 		color: inherit;
 	}
 
+	.large {
+		display: none;
+	}
+
+	@media (min-width: 440px) {
+		.small {
+			display: none;
+		}
+
+		.large {
+			display: initial;
+		}
+	}
+
 	@media (max-width: 800px) {
 		.banner:not(.visible) {
 			transform: translate(0, calc(-100% - 1rem));
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>
diff --git a/sites/kit.svelte.dev/src/routes/search/+page.server.js b/sites/kit.svelte.dev/src/routes/search/+page.server.js
index a7bd258c6..8c703deec 100644
--- a/sites/kit.svelte.dev/src/routes/search/+page.server.js
+++ b/sites/kit.svelte.dev/src/routes/search/+page.server.js
@@ -1,10 +1,13 @@
-import { content } from '$lib/search/content.server.js';
 import { init, inited, search } from '$lib/search/search.js';
 
 /** @type {import('./$types').PageServerLoad} */
-export async function load({ url }) {
+export async function load({ url, fetch }) {
 	if (!inited) {
-		init(content());
+		const res = await fetch('/content.json');
+		if (!res.ok) throw new Error("Couldn't fetch content");
+
+		const blocks = (await res.json()).blocks;
+		init(blocks);
 	}
 
 	const query = url.searchParams.get('q');


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');
 });