Repository: sveltejs/kit (js)

Issue:
Support tsconfig extending multiple tsconfigs, typescript 5.0
### Describe the bug

If your tsconfig extends multiple other tsconfigs, the build / dev server crashes with the error: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Array.

This is useful when your in a monorepo with shared compiler options while also extending ./.svelte-kit/tsconfig.json in on of the apps

This feature is introduced in Typescript 5.0

I'll try to fix this in a PR, If I fail I'll comment

### Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-zk7trz?file=tsconfig.json

The dev server should error out by itself, if it doesn't try `npm run build`

### Logs

```Shell
> vite build

error during build:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Array
    at new NodeError (node:internal/errors:399:5)
    at validateString (node:internal/validators:163:11)
    at Object.resolve (node:path:1102:7)
    at validate_user_config (file:///home/jeremy/dev/Web/Tagaro-Web/node_modules/.pnpm/@sveltejs+kit@1.11.0_svelte@3.56.0+vite@4.1.4/node_modules/@sveltejs/kit/src/core/sync/write_tsconfig.js:179:50)
    at write_tsconfig (file:///home/jeremy/dev/Web/Tagaro-Web/node_modules/.pnpm/@sveltejs+kit@1.11.0_svelte@3.56.0+vite@4.1.4/node_modules/@sveltejs/kit/src/core/sync/write_tsconfig.js:45:19)
    at init (file:///home/jeremy/dev/Web/Tagaro-Web/node_modules/.pnpm/@sveltejs+kit@1.11.0_svelte@3.56.0+vite@4.1.4/node_modules/@sveltejs/kit/src/core/sync/sync.js:16:2)
    at Module.all (file:///home/jeremy/dev/Web/Tagaro-Web/node_modules/.pnpm/@sveltejs+kit@1.11.0_svelte@3.56.0+vite@4.1.4/node_modules/@sveltejs/kit/src/core/sync/sync.js:57:2)
    at config (file:///home/jeremy/dev/Web/Tagaro-Web/node_modules/.pnpm/@sveltejs+kit@1.11.0_svelte@3.56.0+vite@4.1.4/node_modules/@sveltejs/kit/src/exports/vite/index.js:291:34)
    at runConfigHook (file:///home/jeremy/dev/Web/Tagaro-Web/node_modules/.pnpm/vite@4.1.4/node_modules/vite/dist/node/chunks/dep-ca21228b.js:62375:31)
    at async resolveConfig (file:///home/jeremy/dev/Web/Tagaro-Web/node_modules/.pnpm/vite@4.1.4/node_modules/vite/dist/node/chunks/dep-ca21228b.js:61876:14)
 ELIFECYCLE  Command failed with exit code 1.
```


### System Info

```Shell
System:
    OS: Linux 6.2 Arch Linux
    CPU: (16) x64 AMD Ryzen 7 5700X 8-Core Processor
    Memory: 15.49 GB / 31.27 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 19.7.0 - /usr/bin/node
    npm: 9.2.0 - /usr/bin/npm
  Browsers:
    Firefox: 110.0.1
```


### Severity

serious, but I can work around it

### Additional Information

The source of this error seems to be
```ts
function validate_user_config(kit, cwd, out, config) {
	// we need to check that the user's tsconfig extends the framework config
	const extend = config.options.extends;
	const extends_framework_config = extend && path.resolve(cwd, extend) === out;
        // ...
```
located in https://github.com/sveltejs/kit/blob/master/packages/kit/src/core/sync/write_tsconfig.js

Pull request description:
Allow extending multiple other tsconfig in tsconfigs, typescript 5.0
closes #9412  

Extending multiple tsconfigs in a tsconfig would previously result in a crash, now that works here, vite also needs changes though https://github.com/vitejs/vite/issues/12380 

### Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
- [x] 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
- [x] 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. Changesets that add features should be `minor` and those that fix bugs should be `patch`. Please prefix changeset messages with `feat:`, `fix:`, or `chore:`.


Patch:
diff --git a/.changeset/metal-pugs-wink.md b/.changeset/metal-pugs-wink.md
new file mode 100644
index 000000000..06f9b27d2
--- /dev/null
+++ b/.changeset/metal-pugs-wink.md
@@ -0,0 +1,5 @@
+---
+'@sveltejs/kit': patch
+---
+
+fix: allow tsconfig to extend multiple other tsconfigs
diff --git a/.changeset/odd-suits-lick.md b/.changeset/odd-suits-lick.md
new file mode 100644
index 000000000..0873d279c
--- /dev/null
+++ b/.changeset/odd-suits-lick.md
@@ -0,0 +1,5 @@
+---
+'@sveltejs/kit': minor
+---
+
+feat: add data-sveltekit-keepfocus and data-sveltekit-replacestate options to links (requires Svelte version 3.56 for type-checking with `svelte-check`)
diff --git a/documentation/docs/20-core-concepts/30-form-actions.md b/documentation/docs/20-core-concepts/30-form-actions.md
index b8c2ba57c..e2587a923 100644
--- a/documentation/docs/20-core-concepts/30-form-actions.md
+++ b/documentation/docs/20-core-concepts/30-form-actions.md
@@ -496,8 +496,8 @@ Some forms don't need to `POST` data to the server — search inputs, for exampl
 </form>
 ```
 
-Submitting this form will navigate to `/search?q=...` and invoke your load function but will not invoke an action. As with `<a>` elements, you can set the [`data-sveltekit-reload`](link-options#data-sveltekit-reload) and [`data-sveltekit-noscroll`](link-options#data-sveltekit-noscroll) attributes on the `<form>` to control the router's behaviour.
+Submitting this form will navigate to `/search?q=...` and invoke your load function but will not invoke an action. As with `<a>` elements, you can set the [`data-sveltekit-reload`](link-options#data-sveltekit-reload), [`data-sveltekit-replacestate`](link-options#data-sveltekit-replacestate), [`data-sveltekit-keepfocus`](link-options#data-sveltekit-keepfocus) and [`data-sveltekit-noscroll`](link-options#data-sveltekit-noscroll) attributes on the `<form>` to control the router's behaviour.
 
 ## Further reading
 
-- [Tutorial: Forms](https://learn.svelte.dev/tutorial/the-form-element)
\ No newline at end of file
+- [Tutorial: Forms](https://learn.svelte.dev/tutorial/the-form-element)
diff --git a/documentation/docs/30-advanced/30-link-options.md b/documentation/docs/30-advanced/30-link-options.md
index eb0db5ab0..08d35e581 100644
--- a/documentation/docs/30-advanced/30-link-options.md
+++ b/documentation/docs/30-advanced/30-link-options.md
@@ -66,6 +66,30 @@ Occasionally, we need to tell SvelteKit not to handle a link, but allow the brow
 
 Links with a `rel="external"` attribute will receive the same treatment. In addition, they will be ignored during [prerendering](page-options#prerender).
 
+## data-sveltekit-replacestate
+
+Sometimes you don't want navigation to create a new entry in the browser's session history. Adding a `data-sveltekit-replacestate` attribute to a link...
+
+```html
+<a data-sveltekit-replacestate href="/path">Path</a>
+```
+
+...will replace the current `history` entry rather than creating a new one with `pushState` when the link is clicked.
+
+## data-sveltekit-keepfocus
+
+When creating a search input using a `<form>` which reflects its input value in the URL, you might not want it to lose focus after navigation. Adding a `data-sveltekit-keepfocus` attribute to it...
+
+```html
+<form data-sveltekit-keepfocus>
+	<input type="text" name="query">
+</form>
+```
+
+...will cause the currently focused element to retain focus after navigation. Note that this only really makes sense for `<form>` elements. If you would add this to a link, the focused element would be the `<a>` tag, which is probably not what you want. You should also only use this on elements that still exist after navigation.
+
+By default, focus will be reset to the body.
+
 ## data-sveltekit-noscroll
 
 When navigating to internal links, SvelteKit mirrors the browser's default navigation behaviour: it will change the scroll position to 0,0 so that the user is at the very top left of the page (unless the link includes a `#hash`, in which case it will scroll to the element with a matching ID).
diff --git a/package.json b/package.json
index 2df865941..05b20f6a8 100644
--- a/package.json
+++ b/package.json
@@ -37,7 +37,7 @@
 		"playwright": "^1.29.2",
 		"prettier": "^2.8.0",
 		"rollup": "^3.7.0",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"tiny-glob": "^0.2.9",
 		"typescript": "^4.9.4"
 	},
diff --git a/packages/adapter-static/package.json b/packages/adapter-static/package.json
index 71cc78ff1..455f0f561 100644
--- a/packages/adapter-static/package.json
+++ b/packages/adapter-static/package.json
@@ -32,7 +32,7 @@
 		"@sveltejs/kit": "workspace:^",
 		"@types/node": "^16.18.6",
 		"sirv": "^2.0.2",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"typescript": "^4.9.4",
 		"uvu": "^0.5.6",
 		"vite": "^4.1.1"
diff --git a/packages/create-svelte/package.json b/packages/create-svelte/package.json
index a15c14973..2f92732c7 100644
--- a/packages/create-svelte/package.json
+++ b/packages/create-svelte/package.json
@@ -23,7 +23,7 @@
 		"prettier": "^2.8.0",
 		"prettier-plugin-svelte": "^2.8.1",
 		"sucrase": "^3.29.0",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"tiny-glob": "^0.2.9",
 		"uvu": "^0.5.6"
 	},
diff --git a/packages/create-svelte/templates/default/package.json b/packages/create-svelte/templates/default/package.json
index 4b2342f63..7fc85ced9 100644
--- a/packages/create-svelte/templates/default/package.json
+++ b/packages/create-svelte/templates/default/package.json
@@ -11,7 +11,7 @@
 		"@neoconfetti/svelte": "^1.0.0",
 		"@sveltejs/adapter-auto": "workspace:*",
 		"@sveltejs/kit": "workspace:*",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"typescript": "^4.9.4",
 		"vite": "^4.1.1"
 	},
diff --git a/packages/kit/package.json b/packages/kit/package.json
index 439d34177..88bacabb6 100644
--- a/packages/kit/package.json
+++ b/packages/kit/package.json
@@ -34,7 +34,7 @@
 		"@types/set-cookie-parser": "^2.4.2",
 		"marked": "^4.2.3",
 		"rollup": "^3.7.0",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-preprocess": "^5.0.0",
 		"typescript": "^4.9.4",
 		"uvu": "^0.5.6",
diff --git a/packages/kit/src/core/sync/write_tsconfig.js b/packages/kit/src/core/sync/write_tsconfig.js
index 6f3b41398..9f3a08364 100644
--- a/packages/kit/src/core/sync/write_tsconfig.js
+++ b/packages/kit/src/core/sync/write_tsconfig.js
@@ -176,7 +176,12 @@ function load_user_tsconfig(cwd) {
 function validate_user_config(kit, cwd, out, config) {
 	// we need to check that the user's tsconfig extends the framework config
 	const extend = config.options.extends;
-	const extends_framework_config = extend && path.resolve(cwd, extend) === out;
+	const extends_framework_config =
+		typeof extend === 'string'
+			? path.resolve(cwd, extend) === out
+			: Array.isArray(extend)
+			? extend.some((e) => path.resolve(cwd, e) === out)
+			: false;
 
 	const options = config.options.compilerOptions || {};
 
diff --git a/packages/kit/src/runtime/client/client.js b/packages/kit/src/runtime/client/client.js
index 667844713..c4c4a559f 100644
--- a/packages/kit/src/runtime/client/client.js
+++ b/packages/kit/src/runtime/client/client.js
@@ -1569,11 +1569,11 @@ export function create_client(app, target) {
 				navigate({
 					url,
 					scroll: options.noscroll ? scroll_state() : null,
-					keepfocus: false,
+					keepfocus: options.keep_focus ?? false,
 					redirect_chain: [],
 					details: {
 						state: {},
-						replaceState: url.href === location.href
+						replaceState: options.replace_state ?? url.href === location.href
 					},
 					accepted: () => event.preventDefault(),
 					blocked: () => event.preventDefault(),
@@ -1604,7 +1604,7 @@ export function create_client(app, target) {
 
 				const event_form = /** @type {HTMLFormElement} */ (event.target);
 
-				const { noscroll, reload } = get_router_options(event_form);
+				const { keep_focus, noscroll, reload, replace_state } = get_router_options(event_form);
 				if (reload) return;
 
 				event.preventDefault();
@@ -1623,11 +1623,11 @@ export function create_client(app, target) {
 				navigate({
 					url,
 					scroll: noscroll ? scroll_state() : null,
-					keepfocus: false,
+					keepfocus: keep_focus ?? false,
 					redirect_chain: [],
 					details: {
 						state: {},
-						replaceState: false
+						replaceState: replace_state ?? url.href === location.href
 					},
 					nav_token: {},
 					accepted: () => {},
diff --git a/packages/kit/src/runtime/client/utils.js b/packages/kit/src/runtime/client/utils.js
index 1e9ba017a..50e9f34c6 100644
--- a/packages/kit/src/runtime/client/utils.js
+++ b/packages/kit/src/runtime/client/utils.js
@@ -32,8 +32,10 @@ const warned = new WeakSet();
 const valid_link_options = /** @type {const} */ ({
 	'preload-code': ['', 'off', 'tap', 'hover', 'viewport', 'eager'],
 	'preload-data': ['', 'off', 'tap', 'hover'],
+	keepfocus: ['', 'off'],
 	noscroll: ['', 'off'],
-	reload: ['', 'off']
+	reload: ['', 'off'],
+	replacestate: ['', 'off']
 });
 
 /**
@@ -141,6 +143,9 @@ export function get_link_info(a, base) {
  * @param {HTMLFormElement | HTMLAnchorElement | SVGAElement} element
  */
 export function get_router_options(element) {
+	/** @type {ValidLinkOptions<'keepfocus'> | null} */
+	let keep_focus = null;
+
 	/** @type {ValidLinkOptions<'noscroll'> | null} */
 	let noscroll = null;
 
@@ -153,14 +158,19 @@ export function get_router_options(element) {
 	/** @type {ValidLinkOptions<'reload'> | null} */
 	let reload = null;
 
+	/** @type {ValidLinkOptions<'replacestate'> | null} */
+	let replace_state = null;
+
 	/** @type {Element} */
 	let el = element;
 
 	while (el && el !== document.documentElement) {
 		if (preload_code === null) preload_code = link_option(el, 'preload-code');
 		if (preload_data === null) preload_data = link_option(el, 'preload-data');
+		if (keep_focus === null) keep_focus = link_option(el, 'keepfocus');
 		if (noscroll === null) noscroll = link_option(el, 'noscroll');
 		if (reload === null) reload = link_option(el, 'reload');
+		if (replace_state === null) replace_state = link_option(el, 'replacestate');
 
 		el = /** @type {Element} */ (parent_element(el));
 	}
@@ -168,8 +178,10 @@ export function get_router_options(element) {
 	return {
 		preload_code: levels[preload_code ?? 'off'],
 		preload_data: levels[preload_data ?? 'off'],
+		keep_focus: keep_focus === 'off' ? false : keep_focus === '' ? true : null,
 		noscroll: noscroll === 'off' ? false : noscroll === '' ? true : null,
-		reload: reload === 'off' ? false : reload === '' ? true : null
+		reload: reload === 'off' ? false : reload === '' ? true : null,
+		replace_state: replace_state === 'off' ? false : replace_state === '' ? true : null
 	};
 }
 
diff --git a/packages/package/package.json b/packages/package/package.json
index 7b70adf8b..a54bd8c7b 100644
--- a/packages/package/package.json
+++ b/packages/package/package.json
@@ -17,7 +17,7 @@
 	},
 	"devDependencies": {
 		"@types/node": "^16.18.6",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-preprocess": "^5.0.0",
 		"typescript": "^4.9.4",
 		"uvu": "^0.5.6"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 8ca9b38d2..3482d10ad 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -15,7 +15,7 @@ importers:
       playwright: ^1.29.2
       prettier: ^2.8.0
       rollup: ^3.7.0
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       tiny-glob: ^0.2.9
       typescript: ^4.9.4
     devDependencies:
@@ -30,7 +30,7 @@ importers:
       playwright: 1.29.2
       prettier: 2.8.0
       rollup: 3.7.0
-      svelte: 3.55.1
+      svelte: 3.56.0
       tiny-glob: 0.2.9
       typescript: 4.9.4
 
@@ -150,7 +150,7 @@ importers:
       '@sveltejs/kit': workspace:^
       '@types/node': ^16.18.6
       sirv: ^2.0.2
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       typescript: ^4.9.4
       uvu: ^0.5.6
       vite: ^4.1.1
@@ -158,7 +158,7 @@ importers:
       '@sveltejs/kit': link:../kit
       '@types/node': 16.18.6
       sirv: 2.0.2
-      svelte: 3.55.1
+      svelte: 3.56.0
       typescript: 4.9.4
       uvu: 0.5.6
       vite: 4.1.1_@types+node@16.18.6
@@ -166,11 +166,11 @@ importers:
   packages/adapter-static/test/apps/prerendered:
     specifiers:
       '@sveltejs/kit': workspace:^
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       vite: ^4.1.1
     devDependencies:
       '@sveltejs/kit': link:../../../../kit
-      svelte: 3.55.1
+      svelte: 3.56.0
       vite: 4.1.1
 
   packages/adapter-static/test/apps/spa:
@@ -178,13 +178,13 @@ importers:
       '@sveltejs/adapter-node': workspace:^
       '@sveltejs/kit': workspace:^
       sirv-cli: ^2.0.2
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       vite: ^4.1.1
     devDependencies:
       '@sveltejs/adapter-node': link:../../../../adapter-node
       '@sveltejs/kit': link:../../../../kit
       sirv-cli: 2.0.2
-      svelte: 3.55.1
+      svelte: 3.56.0
       vite: 4.1.1
 
   packages/adapter-vercel:
@@ -217,7 +217,7 @@ importers:
       prettier: ^2.8.0
       prettier-plugin-svelte: ^2.8.1
       sucrase: ^3.29.0
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       tiny-glob: ^0.2.9
       uvu: ^0.5.6
     dependencies:
@@ -230,9 +230,9 @@ importers:
       '@types/prompts': 2.4.1
       gitignore-parser: 0.0.2
       prettier: 2.8.0
-      prettier-plugin-svelte: 2.8.1_cqvcdlirt2zplyfporvsoarw6m
+      prettier-plugin-svelte: 2.8.1_ut7qioamojvh7i5msfgqwwrnie
       sucrase: 3.29.0
-      svelte: 3.55.1
+      svelte: 3.56.0
       tiny-glob: 0.2.9
       uvu: 0.5.6
 
@@ -242,7 +242,7 @@ importers:
       '@neoconfetti/svelte': ^1.0.0
       '@sveltejs/adapter-auto': workspace:*
       '@sveltejs/kit': workspace:*
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       typescript: ^4.9.4
       vite: ^4.1.1
     dependencies:
@@ -251,7 +251,7 @@ importers:
       '@neoconfetti/svelte': 1.0.0
       '@sveltejs/adapter-auto': link:../../../adapter-auto
       '@sveltejs/kit': link:../../../kit
-      svelte: 3.55.1
+      svelte: 3.56.0
       typescript: 4.9.4
       vite: 4.1.1
 
@@ -283,7 +283,7 @@ importers:
       sade: ^1.8.1
       set-cookie-parser: ^2.5.1
       sirv: ^2.0.2
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-preprocess: ^5.0.0
       tiny-glob: ^0.2.9
       typescript: ^4.9.4
@@ -291,7 +291,7 @@ importers:
       uvu: ^0.5.6
       vite: ^4.1.1
     dependencies:
-      '@sveltejs/vite-plugin-svelte': 2.0.0_svelte@3.55.1+vite@4.1.1
+      '@sveltejs/vite-plugin-svelte': 2.0.0_svelte@3.56.0+vite@4.1.1
       '@types/cookie': 0.5.1
       cookie: 0.5.0
       devalue: 4.3.0
@@ -314,8 +314,8 @@ importers:
       '@types/set-cookie-parser': 2.4.2
       marked: 4.2.3
       rollup: 3.7.0
-      svelte: 3.55.1
-      svelte-preprocess: 5.0.0_atrrhq7vg4ekua4nnyrpuardle
+      svelte: 3.56.0
+      svelte-preprocess: 5.0.0_llpdtttxqmim2s7ymcc5fxs7oi
       typescript: 4.9.4
       uvu: 0.5.6
       vite: 4.1.1_@types+node@16.18.6
@@ -326,7 +326,7 @@ importers:
       '@sveltejs/kit': workspace:^
       cross-env: ^7.0.3
       purify-css: ^1.2.5
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       vite: ^4.1.1
@@ -335,8 +335,8 @@ importers:
       '@sveltejs/kit': link:../../..
       cross-env: 7.0.3
       purify-css: 1.2.5
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       vite: 4.1.1
 
@@ -345,7 +345,7 @@ importers:
       '@sveltejs/kit': workspace:^
       cross-env: ^7.0.3
       rimraf: ^4.0.0
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       vite: ^4.1.1
@@ -353,8 +353,8 @@ importers:
       '@sveltejs/kit': link:../../..
       cross-env: 7.0.3
       rimraf: 4.0.1
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       vite: 4.1.1
 
@@ -362,15 +362,15 @@ importers:
     specifiers:
       '@sveltejs/kit': workspace:^
       cross-env: ^7.0.3
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       vite: ^4.1.1
     devDependencies:
       '@sveltejs/kit': link:../../..
       cross-env: 7.0.3
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       vite: 4.1.1
 
@@ -378,15 +378,15 @@ importers:
     specifiers:
       '@sveltejs/kit': workspace:^
       cross-env: ^7.0.3
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       vite: ^4.1.1
     devDependencies:
       '@sveltejs/kit': link:../../..
       cross-env: 7.0.3
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       vite: 4.1.1
 
@@ -395,7 +395,7 @@ importers:
       '@sveltejs/adapter-node': workspace:^
       '@sveltejs/kit': workspace:^
       cross-env: ^7.0.3
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       vite: ^4.1.1
@@ -403,8 +403,8 @@ importers:
       '@sveltejs/adapter-node': link:../../../../adapter-node
       '@sveltejs/kit': link:../../..
       cross-env: 7.0.3
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       vite: 4.1.1
 
@@ -413,7 +413,7 @@ importers:
       '@sveltejs/kit': workspace:^
       cross-env: ^7.0.3
       rimraf: ^4.0.0
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       vite: ^4.1.1
@@ -421,8 +421,8 @@ importers:
       '@sveltejs/kit': link:../../..
       cross-env: 7.0.3
       rimraf: 4.0.1
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       vite: 4.1.1
 
@@ -436,15 +436,15 @@ importers:
     specifiers:
       '@sveltejs/adapter-auto': workspace:^
       '@sveltejs/kit': workspace:^
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       vite: ^4.1.1
     devDependencies:
       '@sveltejs/adapter-auto': link:../../../../../adapter-auto
       '@sveltejs/kit': link:../../../..
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       vite: 4.1.1
 
@@ -452,43 +452,43 @@ importers:
     specifiers:
       '@sveltejs/adapter-auto': workspace:^
       '@sveltejs/kit': workspace:^
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       vite: ^4.1.1
     devDependencies:
       '@sveltejs/adapter-auto': link:../../../../../adapter-auto
       '@sveltejs/kit': link:../../../..
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       vite: 4.1.1
 
   packages/kit/test/build-errors/apps/private-dynamic-env:
     specifiers:
       '@sveltejs/kit': workspace:^
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       vite: ^4.1.1
     devDependencies:
       '@sveltejs/kit': link:../../../..
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       vite: 4.1.1
 
   packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import:
     specifiers:
       '@sveltejs/kit': workspace:^
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       vite: ^4.1.1
     devDependencies:
       '@sveltejs/kit': link:../../../..
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       vite: 4.1.1
 
@@ -496,114 +496,114 @@ importers:
     specifiers:
       '@sveltejs/kit': workspace:^
       cross-env: ^7.0.3
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       vite: ^4.1.1
     devDependencies:
       '@sveltejs/kit': link:../../../..
       cross-env: 7.0.3
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       vite: 4.1.1
 
   packages/kit/test/build-errors/apps/private-static-env-dynamic-import:
     specifiers:
       '@sveltejs/kit': workspace:^
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       vite: ^4.1.1
     devDependencies:
       '@sveltejs/kit': link:../../../..
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       vite: 4.1.1
 
   packages/kit/test/build-errors/apps/server-only-folder:
     specifiers:
       '@sveltejs/kit': workspace:^
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       vite: ^4.1.1
     devDependencies:
       '@sveltejs/kit': link:../../../..
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       vite: 4.1.1
 
   packages/kit/test/build-errors/apps/server-only-folder-dynamic-import:
     specifiers:
       '@sveltejs/kit': workspace:^
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       vite: ^4.1.1
     devDependencies:
       '@sveltejs/kit': link:../../../..
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       vite: 4.1.1
 
   packages/kit/test/build-errors/apps/server-only-module:
     specifiers:
       '@sveltejs/kit': workspace:^
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       vite: ^4.1.1
     devDependencies:
       '@sveltejs/kit': link:../../../..
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       vite: 4.1.1
 
   packages/kit/test/build-errors/apps/server-only-module-dynamic-import:
     specifiers:
       '@sveltejs/kit': workspace:^
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       vite: ^4.1.1
     devDependencies:
       '@sveltejs/kit': link:../../../..
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       vite: 4.1.1
 
   packages/kit/test/build-errors/apps/syntax-error:
     specifiers:
       '@sveltejs/kit': workspace:^
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       vite: ^4.1.1
     devDependencies:
       '@sveltejs/kit': link:../../../..
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       vite: 4.1.1
 
   packages/kit/test/prerendering/basics:
     specifiers:
       '@sveltejs/kit': workspace:^
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       uvu: ^0.5.6
       vite: ^4.1.1
     devDependencies:
       '@sveltejs/kit': link:../../..
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       uvu: 0.5.6
       vite: 4.1.1
@@ -611,15 +611,15 @@ importers:
   packages/kit/test/prerendering/options:
     specifiers:
       '@sveltejs/kit': workspace:^
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       uvu: ^0.5.6
       vite: ^4.1.1
     devDependencies:
       '@sveltejs/kit': link:../../..
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       uvu: 0.5.6
       vite: 4.1.1
@@ -627,15 +627,15 @@ importers:
   packages/kit/test/prerendering/paths-base:
     specifiers:
       '@sveltejs/kit': workspace:^
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-check: ^3.0.2
       typescript: ^4.9.4
       uvu: ^0.5.6
       vite: ^4.1.1
     devDependencies:
       '@sveltejs/kit': link:../../..
-      svelte: 3.55.1
-      svelte-check: 3.0.2_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-check: 3.0.2_svelte@3.56.0
       typescript: 4.9.4
       uvu: 0.5.6
       vite: 4.1.1
@@ -667,7 +667,7 @@ importers:
       chokidar: ^3.5.3
       kleur: ^4.1.5
       sade: ^1.8.1
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       svelte-preprocess: ^5.0.0
       svelte2tsx: ~0.6.0
       typescript: ^4.9.4
@@ -676,11 +676,11 @@ importers:
       chokidar: 3.5.3
       kleur: 4.1.5
       sade: 1.8.1
-      svelte2tsx: 0.6.0_atrrhq7vg4ekua4nnyrpuardle
+      svelte2tsx: 0.6.0_llpdtttxqmim2s7ymcc5fxs7oi
     devDependencies:
       '@types/node': 16.18.6
-      svelte: 3.55.1
-      svelte-preprocess: 5.0.0_atrrhq7vg4ekua4nnyrpuardle
+      svelte: 3.56.0
+      svelte-preprocess: 5.0.0_llpdtttxqmim2s7ymcc5fxs7oi
       typescript: 4.9.4
       uvu: 0.5.6
 
@@ -700,7 +700,7 @@ importers:
       prism-svelte: ^0.5.0
       prismjs: ^1.29.0
       shiki-twoslash: ^3.1.0
-      svelte: ^3.55.1
+      svelte: ^3.56.0
       tiny-glob: ^0.2.9
       topojson-client: ^3.1.0
       typescript: ^4.9.4
@@ -724,7 +724,7 @@ importers:
       prism-svelte: 0.5.0
       prismjs: 1.29.0
       shiki-twoslash: 3.1.0
-      svelte: 3.55.1
+      svelte: 3.56.0
       tiny-glob: 0.2.9
       typescript: 4.9.4
       uvu: 0.5.6
@@ -1594,7 +1594,7 @@ packages:
     resolution: {integrity: sha512-Vv9Efzax+NMRZUfZ9TdUqQYicj2Z3kynLkUUdGPfahjlFEwQ3EGyj1vVCg5jxyqvNUgOsVVUb35nXI5CPsmCfA==}
     dev: true
 
-  /@sveltejs/vite-plugin-svelte/2.0.0_svelte@3.55.1+vite@4.1.1:
+  /@sveltejs/vite-plugin-svelte/2.0.0_svelte@3.56.0+vite@4.1.1:
     resolution: {integrity: sha512-oUFrYQarRv4fppmxdrv00qw3wX8Ycdj0uv33MfpRZyR8K67dyxiOcHnqkB0zSy5sDJA8RC/2aNtYhXJ8NINVHQ==}
     engines: {node: ^14.18.0 || >= 16}
     peerDependencies:
@@ -1605,8 +1605,8 @@ packages:
       deepmerge: 4.2.2
       kleur: 4.1.5
       magic-string: 0.27.0
-      svelte: 3.55.1
-      svelte-hmr: 0.15.1_svelte@3.55.1
+      svelte: 3.56.0
+      svelte-hmr: 0.15.1_svelte@3.56.0
       vite: 4.1.1_@types+node@16.18.6
       vitefu: 0.2.3_vite@4.1.1
     transitivePeerDependencies:
@@ -4250,14 +4250,14 @@ packages:
     engines: {node: '>= 0.8.0'}
     dev: true
 
-  /prettier-plugin-svelte/2.8.1_cqvcdlirt2zplyfporvsoarw6m:
+  /prettier-plugin-svelte/2.8.1_ut7qioamojvh7i5msfgqwwrnie:
     resolution: {integrity: sha512-KA3K1J3/wKDnCxW7ZDRA/QL2Q67N7Xs3gOERqJ5X1qFjq1DdnN3K1R29scSKwh+kA8FF67pXbYytUpvN/i3iQw==}
     peerDependencies:
       prettier: ^1.16.4 || ^2.0.0
       svelte: ^3.2.0
     dependencies:
       prettier: 2.8.0
-      svelte: 3.55.1
+      svelte: 3.56.0
     dev: true
 
   /prettier/2.8.0:
@@ -4933,7 +4933,7 @@ packages:
     resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
     engines: {node: '>= 0.4'}
 
-  /svelte-check/3.0.2_svelte@3.55.1:
+  /svelte-check/3.0.2_svelte@3.56.0:
     resolution: {integrity: sha512-DkhKhV0Jt0gh7q9DBB26+J2Vfb9y4/4JWxnbkXBZha7542LOhwvj3edJFjyJ+xjdaXyInZ+YRRYc3V6wytP2ew==}
     hasBin: true
     peerDependencies:
@@ -4945,8 +4945,8 @@ packages:
       import-fresh: 3.3.0
       picocolors: 1.0.0
       sade: 1.8.1
-      svelte: 3.55.1
-      svelte-preprocess: 5.0.0_atrrhq7vg4ekua4nnyrpuardle
+      svelte: 3.56.0
+      svelte-preprocess: 5.0.0_llpdtttxqmim2s7ymcc5fxs7oi
       typescript: 4.9.4
     transitivePeerDependencies:
       - '@babel/core'
@@ -4960,16 +4960,16 @@ packages:
       - sugarss
     dev: true
 
-  /svelte-hmr/0.15.1_svelte@3.55.1:
+  /svelte-hmr/0.15.1_svelte@3.56.0:
     resolution: {integrity: sha512-BiKB4RZ8YSwRKCNVdNxK/GfY+r4Kjgp9jCLEy0DuqAKfmQtpL38cQK3afdpjw4sqSs4PLi3jIPJIFp259NkZtA==}
     engines: {node: ^12.20 || ^14.13.1 || >= 16}
     peerDependencies:
       svelte: '>=3.19.0'
     dependencies:
-      svelte: 3.55.1
+      svelte: 3.56.0
     dev: false
 
-  /svelte-preprocess/5.0.0_atrrhq7vg4ekua4nnyrpuardle:
+  /svelte-preprocess/5.0.0_llpdtttxqmim2s7ymcc5fxs7oi:
     resolution: {integrity: sha512-q7lpa7i2FBu8Pa+G0MmuQQWETBwCKgsGmuq1Sf6n8q4uaG9ZLcLP0Y+etC6bF4sE6EbLxfiI38zV6RfPe3RSfg==}
     engines: {node: '>= 14.10.0'}
     requiresBuild: true
@@ -5013,15 +5013,15 @@ packages:
       magic-string: 0.27.0
       sorcery: 0.10.0
       strip-indent: 3.0.0
-      svelte: 3.55.1
+      svelte: 3.56.0
       typescript: 4.9.4
     dev: true
 
-  /svelte/3.55.1:
-    resolution: {integrity: sha512-S+87/P0Ve67HxKkEV23iCdAh/SX1xiSfjF1HOglno/YTbSTW7RniICMCofWGdJJbdjw3S+0PfFb1JtGfTXE0oQ==}
+  /svelte/3.56.0:
+    resolution: {integrity: sha512-LvXiJbjdvJKwB/0CQyYpDX0q+hFqCyWmybzC2G6eK1tJJA/RSRCytTfNmjHv+RHlLuA70vWG7nXp6gbeErYvRA==}
     engines: {node: '>= 8'}
 
-  /svelte2tsx/0.6.0_atrrhq7vg4ekua4nnyrpuardle:
+  /svelte2tsx/0.6.0_llpdtttxqmim2s7ymcc5fxs7oi:
     resolution: {integrity: sha512-TrxfQkO7CKi8Pu2eC/FyteDCdk3OOeQV5u6z7OjYAsOhsd0ClzAKqxJdvp6xxNQLrbFzf/XvCi9Fy8MQ1MleFA==}
     peerDependencies:
       svelte: ^3.55
@@ -5029,7 +5029,7 @@ packages:
     dependencies:
       dedent-js: 1.0.1
       pascal-case: 3.1.2
-      svelte: 3.55.1
+      svelte: 3.56.0
       typescript: 4.9.4
     dev: false
 
diff --git a/sites/kit.svelte.dev/package.json b/sites/kit.svelte.dev/package.json
index 68bab4a46..a478714b1 100644
--- a/sites/kit.svelte.dev/package.json
+++ b/sites/kit.svelte.dev/package.json
@@ -23,7 +23,7 @@
 		"prism-svelte": "^0.5.0",
 		"prismjs": "^1.29.0",
 		"shiki-twoslash": "^3.1.0",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"tiny-glob": "^0.2.9",
 		"typescript": "^4.9.4",
 		"uvu": "^0.5.6",


Test patch:
diff --git a/packages/adapter-static/test/apps/prerendered/package.json b/packages/adapter-static/test/apps/prerendered/package.json
index f95d90c20..116f8e3da 100644
--- a/packages/adapter-static/test/apps/prerendered/package.json
+++ b/packages/adapter-static/test/apps/prerendered/package.json
@@ -9,7 +9,7 @@
 	},
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:^",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"vite": "^4.1.1"
 	},
 	"type": "module"
diff --git a/packages/adapter-static/test/apps/spa/package.json b/packages/adapter-static/test/apps/spa/package.json
index dbbe02ad6..7cc886b59 100644
--- a/packages/adapter-static/test/apps/spa/package.json
+++ b/packages/adapter-static/test/apps/spa/package.json
@@ -11,7 +11,7 @@
 		"@sveltejs/adapter-node": "workspace:^",
 		"@sveltejs/kit": "workspace:^",
 		"sirv-cli": "^2.0.2",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"vite": "^4.1.1"
 	},
 	"type": "module"
diff --git a/packages/kit/test/apps/amp/package.json b/packages/kit/test/apps/amp/package.json
index 2b0ad36ff..4756e8d53 100644
--- a/packages/kit/test/apps/amp/package.json
+++ b/packages/kit/test/apps/amp/package.json
@@ -16,7 +16,7 @@
 		"@sveltejs/kit": "workspace:^",
 		"cross-env": "^7.0.3",
 		"purify-css": "^1.2.5",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"vite": "^4.1.1"
diff --git a/packages/kit/test/apps/basics/package.json b/packages/kit/test/apps/basics/package.json
index 8bccf89b2..aa698368a 100644
--- a/packages/kit/test/apps/basics/package.json
+++ b/packages/kit/test/apps/basics/package.json
@@ -17,7 +17,7 @@
 		"@sveltejs/kit": "workspace:^",
 		"cross-env": "^7.0.3",
 		"rimraf": "^4.0.0",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"vite": "^4.1.1"
diff --git a/packages/kit/test/apps/basics/src/routes/data-sveltekit/replacestate/+page.svelte b/packages/kit/test/apps/basics/src/routes/data-sveltekit/replacestate/+page.svelte
new file mode 100644
index 000000000..db8f6a25c
--- /dev/null
+++ b/packages/kit/test/apps/basics/src/routes/data-sveltekit/replacestate/+page.svelte
@@ -0,0 +1,8 @@
+<a id="one" href="/data-sveltekit/replacestate/target" data-sveltekit-replacestate>one</a>
+
+<div data-sveltekit-replacestate>
+	<a id="two" href="/data-sveltekit/replacestate/target">two</a>
+	<a id="three" href="/data-sveltekit/replacestate/target" data-sveltekit-replacestate="off">
+		three
+	</a>
+</div>
diff --git a/packages/kit/test/apps/basics/src/routes/data-sveltekit/replacestate/target/+page.svelte b/packages/kit/test/apps/basics/src/routes/data-sveltekit/replacestate/target/+page.svelte
new file mode 100644
index 000000000..9c40e105a
--- /dev/null
+++ b/packages/kit/test/apps/basics/src/routes/data-sveltekit/replacestate/target/+page.svelte
@@ -0,0 +1,1 @@
+<h1>target</h1>
diff --git a/packages/kit/test/apps/basics/test/client.test.js b/packages/kit/test/apps/basics/test/client.test.js
index d8e590425..127f85dbe 100644
--- a/packages/kit/test/apps/basics/test/client.test.js
+++ b/packages/kit/test/apps/basics/test/client.test.js
@@ -608,6 +608,26 @@ test.describe('data-sveltekit attributes', () => {
 		await clicknav('#three');
 		expect(await page.evaluate(() => window.scrollY)).toBe(0);
 	});
+
+	test('data-sveltekit-replacestate', async ({ page, clicknav }) => {
+		await page.goto('/');
+		await page.goto('/data-sveltekit/replacestate');
+		await clicknav('#one');
+		await page.goBack();
+		await expect(page).not.toHaveURL(/replacestate/);
+
+		await page.goto('/');
+		await page.goto('/data-sveltekit/replacestate');
+		await clicknav('#two');
+		await page.goBack();
+		await expect(page).not.toHaveURL(/replacestate/);
+
+		await page.goto('/');
+		await page.goto('/data-sveltekit/replacestate');
+		await clicknav('#three');
+		await page.goBack();
+		await expect(page).toHaveURL(/replacestate$/);
+	});
 });
 
 test.describe('Content negotiation', () => {
diff --git a/packages/kit/test/apps/dev-only/package.json b/packages/kit/test/apps/dev-only/package.json
index 450cb5ae7..c361c41fc 100644
--- a/packages/kit/test/apps/dev-only/package.json
+++ b/packages/kit/test/apps/dev-only/package.json
@@ -12,7 +12,7 @@
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:^",
 		"cross-env": "^7.0.3",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"vite": "^4.1.1"
diff --git a/packages/kit/test/apps/options-2/package.json b/packages/kit/test/apps/options-2/package.json
index b6022e8d0..627ea615c 100644
--- a/packages/kit/test/apps/options-2/package.json
+++ b/packages/kit/test/apps/options-2/package.json
@@ -15,7 +15,7 @@
 		"@sveltejs/adapter-node": "workspace:^",
 		"@sveltejs/kit": "workspace:^",
 		"cross-env": "^7.0.3",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"vite": "^4.1.1"
diff --git a/packages/kit/test/apps/options/package.json b/packages/kit/test/apps/options/package.json
index 574812858..4a005ced9 100644
--- a/packages/kit/test/apps/options/package.json
+++ b/packages/kit/test/apps/options/package.json
@@ -14,7 +14,7 @@
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:^",
 		"cross-env": "^7.0.3",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"vite": "^4.1.1"
diff --git a/packages/kit/test/apps/writes/package.json b/packages/kit/test/apps/writes/package.json
index 9f2ee0e1d..b7c5079a6 100644
--- a/packages/kit/test/apps/writes/package.json
+++ b/packages/kit/test/apps/writes/package.json
@@ -15,7 +15,7 @@
 		"@sveltejs/kit": "workspace:^",
 		"cross-env": "^7.0.3",
 		"rimraf": "^4.0.0",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"vite": "^4.1.1"
diff --git a/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/package.json b/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/package.json
index 0cf8d4f6c..848b67cbc 100644
--- a/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/package.json
+++ b/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/package.json
@@ -11,7 +11,7 @@
 	"devDependencies": {
 		"@sveltejs/adapter-auto": "workspace:^",
 		"@sveltejs/kit": "workspace:^",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"vite": "^4.1.1"
diff --git a/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/package.json b/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/package.json
index 7a76362b1..f42287fcd 100644
--- a/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/package.json
+++ b/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/package.json
@@ -11,7 +11,7 @@
 	"devDependencies": {
 		"@sveltejs/adapter-auto": "workspace:^",
 		"@sveltejs/kit": "workspace:^",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"vite": "^4.1.1"
diff --git a/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/package.json b/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/package.json
index 614f1d39f..f8ab53a65 100644
--- a/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/package.json
+++ b/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/package.json
@@ -11,7 +11,7 @@
 	},
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:^",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"vite": "^4.1.1"
diff --git a/packages/kit/test/build-errors/apps/private-dynamic-env/package.json b/packages/kit/test/build-errors/apps/private-dynamic-env/package.json
index 3b8a9bb1c..6075d6942 100644
--- a/packages/kit/test/build-errors/apps/private-dynamic-env/package.json
+++ b/packages/kit/test/build-errors/apps/private-dynamic-env/package.json
@@ -11,7 +11,7 @@
 	},
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:^",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"vite": "^4.1.1"
diff --git a/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/package.json b/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/package.json
index 5b576909a..77f07aae1 100644
--- a/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/package.json
+++ b/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/package.json
@@ -11,7 +11,7 @@
 	},
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:^",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"vite": "^4.1.1"
diff --git a/packages/kit/test/build-errors/apps/private-static-env/package.json b/packages/kit/test/build-errors/apps/private-static-env/package.json
index 8b57a78f1..ef2e980f3 100644
--- a/packages/kit/test/build-errors/apps/private-static-env/package.json
+++ b/packages/kit/test/build-errors/apps/private-static-env/package.json
@@ -12,7 +12,7 @@
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:^",
 		"cross-env": "^7.0.3",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"vite": "^4.1.1"
diff --git a/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/package.json b/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/package.json
index 0718f79b0..745f9563c 100644
--- a/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/package.json
+++ b/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/package.json
@@ -11,7 +11,7 @@
 	},
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:^",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"vite": "^4.1.1"
diff --git a/packages/kit/test/build-errors/apps/server-only-folder/package.json b/packages/kit/test/build-errors/apps/server-only-folder/package.json
index 11dd1af87..4b13d1655 100644
--- a/packages/kit/test/build-errors/apps/server-only-folder/package.json
+++ b/packages/kit/test/build-errors/apps/server-only-folder/package.json
@@ -11,7 +11,7 @@
 	},
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:^",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"vite": "^4.1.1"
diff --git a/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/package.json b/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/package.json
index e14ac0210..e8bdf8747 100644
--- a/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/package.json
+++ b/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/package.json
@@ -11,7 +11,7 @@
 	},
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:^",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"vite": "^4.1.1"
diff --git a/packages/kit/test/build-errors/apps/server-only-module/package.json b/packages/kit/test/build-errors/apps/server-only-module/package.json
index 408e601fb..b005c3de5 100644
--- a/packages/kit/test/build-errors/apps/server-only-module/package.json
+++ b/packages/kit/test/build-errors/apps/server-only-module/package.json
@@ -11,7 +11,7 @@
 	},
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:^",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"vite": "^4.1.1"
diff --git a/packages/kit/test/build-errors/apps/syntax-error/package.json b/packages/kit/test/build-errors/apps/syntax-error/package.json
index 2740222b8..abf51a663 100644
--- a/packages/kit/test/build-errors/apps/syntax-error/package.json
+++ b/packages/kit/test/build-errors/apps/syntax-error/package.json
@@ -9,7 +9,7 @@
 	},
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:^",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"vite": "^4.1.1"
diff --git a/packages/kit/test/prerendering/basics/package.json b/packages/kit/test/prerendering/basics/package.json
index 62cf5bd2e..25fd6e98f 100644
--- a/packages/kit/test/prerendering/basics/package.json
+++ b/packages/kit/test/prerendering/basics/package.json
@@ -12,7 +12,7 @@
 	},
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:^",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"uvu": "^0.5.6",
diff --git a/packages/kit/test/prerendering/options/package.json b/packages/kit/test/prerendering/options/package.json
index ced280561..fd69aea94 100644
--- a/packages/kit/test/prerendering/options/package.json
+++ b/packages/kit/test/prerendering/options/package.json
@@ -11,7 +11,7 @@
 	},
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:^",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"uvu": "^0.5.6",
diff --git a/packages/kit/test/prerendering/paths-base/package.json b/packages/kit/test/prerendering/paths-base/package.json
index 99c2a1b0d..48746aede 100644
--- a/packages/kit/test/prerendering/paths-base/package.json
+++ b/packages/kit/test/prerendering/paths-base/package.json
@@ -11,7 +11,7 @@
 	},
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:^",
-		"svelte": "^3.55.1",
+		"svelte": "^3.56.0",
 		"svelte-check": "^3.0.2",
 		"typescript": "^4.9.4",
 		"uvu": "^0.5.6",