Repository: sveltejs/kit
Pull request #5961 (2022-08-17 03:09:00)

[fix] allow additional keys in svelte.config.js
closes https://github.com/sveltejs/kit/issues/5888

changeset-bot[bot]: ###  🦋  Changeset detected

Latest commit: 5f92c301df6d2c801c8bc3ca5a83d9eeaae90bf4

**The changes in this PR will be included in the next version bump.**

<details><summary>This PR includes changesets to release 1 package</summary>

  | Name          | Type  |
| ------------- | ----- |
| @sveltejs/kit | Patch |

</details>

Not sure what this means? [Click here  to learn what changesets are](https://github.com/changesets/changesets/blob/master/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add another changeset to this PR](https://github.com/benmccann/kit/new/config-type?filename=.changeset/tiny-hotels-compare.md&value=---%0A%22%40sveltejs%2Fkit%22%3A%20patch%0A---%0A%0A%5Bfix%5D%20allow%20additional%20keys%20in%20svelte.config.js%0A)



Patch:
diff --git a/.changeset/blue-jobs-laugh.md b/.changeset/blue-jobs-laugh.md
new file mode 100644
index 000000000..8c919b3ca
--- /dev/null
+++ b/.changeset/blue-jobs-laugh.md
@@ -0,0 +1,5 @@
+---
+'create-svelte': patch
+---
+
+remove session remnants
diff --git a/.changeset/loud-moose-tap.md b/.changeset/loud-moose-tap.md
new file mode 100644
index 000000000..4389ffb06
--- /dev/null
+++ b/.changeset/loud-moose-tap.md
@@ -0,0 +1,5 @@
+---
+'@sveltejs/kit': patch
+---
+
+[fix] allow additional keys in svelte.config.js
diff --git a/packages/create-svelte/templates/default/src/app.d.ts b/packages/create-svelte/templates/default/src/app.d.ts
index f7e052ada..d22f2a7de 100644
--- a/packages/create-svelte/templates/default/src/app.d.ts
+++ b/packages/create-svelte/templates/default/src/app.d.ts
@@ -11,6 +11,4 @@ declare namespace App {
 	// interface PrivateEnv {}
 
 	// interface PublicEnv {}
-
-	// interface Session {}
 }
diff --git a/packages/create-svelte/templates/skeleton/src/app.d.ts b/packages/create-svelte/templates/skeleton/src/app.d.ts
index f2845e42d..4eac1d5c9 100644
--- a/packages/create-svelte/templates/skeleton/src/app.d.ts
+++ b/packages/create-svelte/templates/skeleton/src/app.d.ts
@@ -6,5 +6,4 @@ declare namespace App {
 	// interface Platform {}
 	// interface PrivateEnv {}
 	// interface PublicEnv {}
-	// interface Session {}
 }
diff --git a/packages/kit/types/index.d.ts b/packages/kit/types/index.d.ts
index 8b5883beb..8070cd969 100644
--- a/packages/kit/types/index.d.ts
+++ b/packages/kit/types/index.d.ts
@@ -109,6 +109,7 @@ export interface Config {
 	extensions?: string[];
 	kit?: KitConfig;
 	preprocess?: any;
+	[key: string]: any;
 }
 
 export interface KitConfig {


Test patch:
diff --git a/packages/adapter-static/test/apps/spa/src/app.d.ts b/packages/adapter-static/test/apps/spa/src/app.d.ts
index 00adec5e3..779a3d4e5 100644
--- a/packages/adapter-static/test/apps/spa/src/app.d.ts
+++ b/packages/adapter-static/test/apps/spa/src/app.d.ts
@@ -1,7 +1,3 @@
 /// <reference types="@sveltejs/kit" />
 
-declare namespace App {
-	interface Session {
-		count: number;
-	}
-}
+declare namespace App {}
diff --git a/packages/adapter-static/test/apps/spa/src/global.d.ts b/packages/adapter-static/test/apps/spa/src/global.d.ts
deleted file mode 100644
index 63908c66c..000000000
--- a/packages/adapter-static/test/apps/spa/src/global.d.ts
+++ /dev/null
@@ -1,1 +0,0 @@
-/// <reference types="@sveltejs/kit" />
diff --git a/packages/adapter-static/test/apps/spa/src/hooks.js b/packages/adapter-static/test/apps/spa/src/hooks.js
deleted file mode 100644
index 5252a32e9..000000000
--- a/packages/adapter-static/test/apps/spa/src/hooks.js
+++ /dev/null
@@ -1,5 +0,0 @@
-export function getSession() {
-	return {
-		count: 0
-	};
-}