From a489b1888ccd6bdc371ce281010bd4a16fe2d5c7 Mon Sep 17 00:00:00 2001 From: Tee Ming Date: Wed, 4 Mar 2026 16:23:03 +0800 Subject: [PATCH 01/11] undeprecate --- packages/kit/src/exports/public.d.ts | 28 ++++++++-------------------- packages/kit/types/index.d.ts | 28 ++++++++-------------------- 2 files changed, 16 insertions(+), 40 deletions(-) diff --git a/packages/kit/src/exports/public.d.ts b/packages/kit/src/exports/public.d.ts index b620044814d5..7107125ff760 100644 --- a/packages/kit/src/exports/public.d.ts +++ b/packages/kit/src/exports/public.d.ts @@ -516,76 +516,64 @@ export interface KitConfig { }; /** * Where to find various files within your project. - * @deprecated */ files?: { /** - * the location of your source code - * @deprecated + * The location of your source code. * @default "src" * @since 2.28 */ src?: string; /** - * a place to put static files that should have stable URLs and undergo no processing, such as `favicon.ico` or `manifest.json` - * @deprecated + * A place to put static files that should have stable URLs and undergo no processing, such as `favicon.ico` or `manifest.json`. * @default "static" */ assets?: string; hooks?: { /** * The location of your client [hooks](https://svelte.dev/docs/kit/hooks). - * @deprecated * @default "src/hooks.client" */ client?: string; /** * The location of your server [hooks](https://svelte.dev/docs/kit/hooks). - * @deprecated * @default "src/hooks.server" */ server?: string; /** * The location of your universal [hooks](https://svelte.dev/docs/kit/hooks). - * @deprecated * @default "src/hooks" * @since 2.3.0 */ universal?: string; }; /** - * your app's internal library, accessible throughout the codebase as `$lib` - * @deprecated + * Your app's internal library, accessible throughout the codebase as `$lib`. * @default "src/lib" */ lib?: string; /** - * a directory containing [parameter matchers](https://svelte.dev/docs/kit/advanced-routing#Matching) - * @deprecated + * A directory containing [parameter matchers](https://svelte.dev/docs/kit/advanced-routing#Matching). * @default "src/params" */ params?: string; /** - * the files that define the structure of your app (see [Routing](https://svelte.dev/docs/kit/routing)) - * @deprecated + * The files that define the structure of your app (see [Routing](https://svelte.dev/docs/kit/routing)). * @default "src/routes" */ routes?: string; /** - * the location of your service worker's entry point (see [Service workers](https://svelte.dev/docs/kit/service-workers)) - * @deprecated + * The location of your service worker's entry point (see [Service workers](https://svelte.dev/docs/kit/service-workers)). * @default "src/service-worker" */ serviceWorker?: string; /** - * the location of the template for HTML responses - * @deprecated + * The location of the template for HTML responses. * @default "src/app.html" */ appTemplate?: string; /** - * the location of the template for fallback error responses - * @deprecated + * The location of the template for fallback error responses. * @default "src/error.html" */ errorTemplate?: string; diff --git a/packages/kit/types/index.d.ts b/packages/kit/types/index.d.ts index 670145f460f3..da9c5096af3d 100644 --- a/packages/kit/types/index.d.ts +++ b/packages/kit/types/index.d.ts @@ -490,76 +490,64 @@ declare module '@sveltejs/kit' { }; /** * Where to find various files within your project. - * @deprecated */ files?: { /** - * the location of your source code - * @deprecated + * The location of your source code. * @default "src" * @since 2.28 */ src?: string; /** - * a place to put static files that should have stable URLs and undergo no processing, such as `favicon.ico` or `manifest.json` - * @deprecated + * A place to put static files that should have stable URLs and undergo no processing, such as `favicon.ico` or `manifest.json`. * @default "static" */ assets?: string; hooks?: { /** * The location of your client [hooks](https://svelte.dev/docs/kit/hooks). - * @deprecated * @default "src/hooks.client" */ client?: string; /** * The location of your server [hooks](https://svelte.dev/docs/kit/hooks). - * @deprecated * @default "src/hooks.server" */ server?: string; /** * The location of your universal [hooks](https://svelte.dev/docs/kit/hooks). - * @deprecated * @default "src/hooks" * @since 2.3.0 */ universal?: string; }; /** - * your app's internal library, accessible throughout the codebase as `$lib` - * @deprecated + * Your app's internal library, accessible throughout the codebase as `$lib`. * @default "src/lib" */ lib?: string; /** - * a directory containing [parameter matchers](https://svelte.dev/docs/kit/advanced-routing#Matching) - * @deprecated + * A directory containing [parameter matchers](https://svelte.dev/docs/kit/advanced-routing#Matching). * @default "src/params" */ params?: string; /** - * the files that define the structure of your app (see [Routing](https://svelte.dev/docs/kit/routing)) - * @deprecated + * The files that define the structure of your app (see [Routing](https://svelte.dev/docs/kit/routing)). * @default "src/routes" */ routes?: string; /** - * the location of your service worker's entry point (see [Service workers](https://svelte.dev/docs/kit/service-workers)) - * @deprecated + * The location of your service worker's entry point (see [Service workers](https://svelte.dev/docs/kit/service-workers)). * @default "src/service-worker" */ serviceWorker?: string; /** - * the location of the template for HTML responses - * @deprecated + * The location of the template for HTML responses. * @default "src/app.html" */ appTemplate?: string; /** - * the location of the template for fallback error responses - * @deprecated + * The location of the template for fallback error responses. * @default "src/error.html" */ errorTemplate?: string; From 1bd98e35e418b950a6b3bfc072b7ad40d11db04e Mon Sep 17 00:00:00 2001 From: Tee Ming Date: Wed, 4 Mar 2026 16:23:50 +0800 Subject: [PATCH 02/11] changeset --- .changeset/shaky-pillows-sell.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/shaky-pillows-sell.md diff --git a/.changeset/shaky-pillows-sell.md b/.changeset/shaky-pillows-sell.md new file mode 100644 index 000000000000..708b64ab6292 --- /dev/null +++ b/.changeset/shaky-pillows-sell.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/kit': patch +--- + +chore: undeprecate `config.kit.files.*` options From 95ea76ddc53415cffa89b29e7363ace38234131c Mon Sep 17 00:00:00 2001 From: Tee Ming Date: Wed, 4 Mar 2026 16:28:21 +0800 Subject: [PATCH 03/11] revert docs changes --- documentation/docs/30-advanced/10-advanced-routing.md | 2 +- documentation/docs/30-advanced/20-hooks.md | 2 ++ documentation/docs/30-advanced/40-service-workers.md | 2 +- documentation/docs/98-reference/54-types.md | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/documentation/docs/30-advanced/10-advanced-routing.md b/documentation/docs/30-advanced/10-advanced-routing.md index 7462ed73e692..dd1f5b7b5420 100644 --- a/documentation/docs/30-advanced/10-advanced-routing.md +++ b/documentation/docs/30-advanced/10-advanced-routing.md @@ -71,7 +71,7 @@ Note that an optional route parameter cannot follow a rest parameter (`[...rest] ## Matching -A route like `src/routes/fruits/[page]` would match `/fruits/apple`, but it would also match `/fruits/rocketship`. We don't want that. You can ensure that route parameters are well-formed by adding a _matcher_ — which takes the parameter string (`"apple"` or `"rocketship"`) and returns `true` if it is valid — to your `src/params` directory... +A route like `src/routes/fruits/[page]` would match `/fruits/apple`, but it would also match `/fruits/rocketship`. We don't want that. You can ensure that route parameters are well-formed by adding a _matcher_ — which takes the parameter string (`"apple"` or `"rocketship"`) and returns `true` if it is valid — to your [`params`](configuration#files) directory... ```js /// file: src/params/fruit.js diff --git a/documentation/docs/30-advanced/20-hooks.md b/documentation/docs/30-advanced/20-hooks.md index c7908c2ba552..b469ac807d4d 100644 --- a/documentation/docs/30-advanced/20-hooks.md +++ b/documentation/docs/30-advanced/20-hooks.md @@ -12,6 +12,8 @@ There are three hooks files, all optional: Code in these modules will run when the application starts up, making them useful for initializing database clients and so on. +> [!NOTE] You can configure the location of these files with [`config.kit.files.hooks`](configuration#files). + ## Server hooks The following hooks can be added to `src/hooks.server.js`: diff --git a/documentation/docs/30-advanced/40-service-workers.md b/documentation/docs/30-advanced/40-service-workers.md index 579d09136470..45cf6da08aa7 100644 --- a/documentation/docs/30-advanced/40-service-workers.md +++ b/documentation/docs/30-advanced/40-service-workers.md @@ -4,7 +4,7 @@ title: Service workers Service workers act as proxy servers that handle network requests inside your app. This makes it possible to make your app work offline, but even if you don't need offline support (or can't realistically implement it because of the type of app you're building), it's often worth using service workers to speed up navigation by precaching your built JS and CSS. -In SvelteKit, if you have a `src/service-worker.js` file (or `src/service-worker/index.js`) it will be bundled and automatically registered. +In SvelteKit, if you have a `src/service-worker.js` file (or `src/service-worker/index.js`) it will be bundled and automatically registered. You can change the [location of your service worker](configuration#files) if you need to. You can [disable automatic registration](configuration#serviceWorker) if you need to register the service worker with your own logic or use another solution. The default registration looks something like this: diff --git a/documentation/docs/98-reference/54-types.md b/documentation/docs/98-reference/54-types.md index 4ccd716f4a5d..b8877b9beb8b 100644 --- a/documentation/docs/98-reference/54-types.md +++ b/documentation/docs/98-reference/54-types.md @@ -194,7 +194,7 @@ Use the [`typescript.config` setting](configuration#typescript) in `svelte.confi ## $lib -This is a simple alias to `src/lib`. It allows you to access common components and utility modules without `../../../../` nonsense. +This is a simple alias to `src/lib`, or whatever directory is specified as [`config.kit.files.lib`](configuration#files). It allows you to access common components and utility modules without `../../../../` nonsense. ### $lib/server From 93518fd1442672cad95f8ac04b71e10e4140918e Mon Sep 17 00:00:00 2001 From: Tee Ming Date: Wed, 4 Mar 2026 19:15:20 +0800 Subject: [PATCH 04/11] Revert "revert docs changes" This reverts commit 95ea76ddc53415cffa89b29e7363ace38234131c. --- documentation/docs/30-advanced/10-advanced-routing.md | 2 +- documentation/docs/30-advanced/20-hooks.md | 2 -- documentation/docs/30-advanced/40-service-workers.md | 2 +- documentation/docs/98-reference/54-types.md | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/documentation/docs/30-advanced/10-advanced-routing.md b/documentation/docs/30-advanced/10-advanced-routing.md index dd1f5b7b5420..7462ed73e692 100644 --- a/documentation/docs/30-advanced/10-advanced-routing.md +++ b/documentation/docs/30-advanced/10-advanced-routing.md @@ -71,7 +71,7 @@ Note that an optional route parameter cannot follow a rest parameter (`[...rest] ## Matching -A route like `src/routes/fruits/[page]` would match `/fruits/apple`, but it would also match `/fruits/rocketship`. We don't want that. You can ensure that route parameters are well-formed by adding a _matcher_ — which takes the parameter string (`"apple"` or `"rocketship"`) and returns `true` if it is valid — to your [`params`](configuration#files) directory... +A route like `src/routes/fruits/[page]` would match `/fruits/apple`, but it would also match `/fruits/rocketship`. We don't want that. You can ensure that route parameters are well-formed by adding a _matcher_ — which takes the parameter string (`"apple"` or `"rocketship"`) and returns `true` if it is valid — to your `src/params` directory... ```js /// file: src/params/fruit.js diff --git a/documentation/docs/30-advanced/20-hooks.md b/documentation/docs/30-advanced/20-hooks.md index b469ac807d4d..c7908c2ba552 100644 --- a/documentation/docs/30-advanced/20-hooks.md +++ b/documentation/docs/30-advanced/20-hooks.md @@ -12,8 +12,6 @@ There are three hooks files, all optional: Code in these modules will run when the application starts up, making them useful for initializing database clients and so on. -> [!NOTE] You can configure the location of these files with [`config.kit.files.hooks`](configuration#files). - ## Server hooks The following hooks can be added to `src/hooks.server.js`: diff --git a/documentation/docs/30-advanced/40-service-workers.md b/documentation/docs/30-advanced/40-service-workers.md index 45cf6da08aa7..579d09136470 100644 --- a/documentation/docs/30-advanced/40-service-workers.md +++ b/documentation/docs/30-advanced/40-service-workers.md @@ -4,7 +4,7 @@ title: Service workers Service workers act as proxy servers that handle network requests inside your app. This makes it possible to make your app work offline, but even if you don't need offline support (or can't realistically implement it because of the type of app you're building), it's often worth using service workers to speed up navigation by precaching your built JS and CSS. -In SvelteKit, if you have a `src/service-worker.js` file (or `src/service-worker/index.js`) it will be bundled and automatically registered. You can change the [location of your service worker](configuration#files) if you need to. +In SvelteKit, if you have a `src/service-worker.js` file (or `src/service-worker/index.js`) it will be bundled and automatically registered. You can [disable automatic registration](configuration#serviceWorker) if you need to register the service worker with your own logic or use another solution. The default registration looks something like this: diff --git a/documentation/docs/98-reference/54-types.md b/documentation/docs/98-reference/54-types.md index b8877b9beb8b..4ccd716f4a5d 100644 --- a/documentation/docs/98-reference/54-types.md +++ b/documentation/docs/98-reference/54-types.md @@ -194,7 +194,7 @@ Use the [`typescript.config` setting](configuration#typescript) in `svelte.confi ## $lib -This is a simple alias to `src/lib`, or whatever directory is specified as [`config.kit.files.lib`](configuration#files). It allows you to access common components and utility modules without `../../../../` nonsense. +This is a simple alias to `src/lib`. It allows you to access common components and utility modules without `../../../../` nonsense. ### $lib/server From 5321c62ab15ffa4f1080b96711effe9b27ae05f4 Mon Sep 17 00:00:00 2001 From: Tee Ming Date: Wed, 4 Mar 2026 19:15:43 +0800 Subject: [PATCH 05/11] Revert "undeprecate" This reverts commit a489b1888ccd6bdc371ce281010bd4a16fe2d5c7. --- packages/kit/src/exports/public.d.ts | 28 ++++++++++++++++++++-------- packages/kit/types/index.d.ts | 28 ++++++++++++++++++++-------- 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/packages/kit/src/exports/public.d.ts b/packages/kit/src/exports/public.d.ts index 7107125ff760..b620044814d5 100644 --- a/packages/kit/src/exports/public.d.ts +++ b/packages/kit/src/exports/public.d.ts @@ -516,64 +516,76 @@ export interface KitConfig { }; /** * Where to find various files within your project. + * @deprecated */ files?: { /** - * The location of your source code. + * the location of your source code + * @deprecated * @default "src" * @since 2.28 */ src?: string; /** - * A place to put static files that should have stable URLs and undergo no processing, such as `favicon.ico` or `manifest.json`. + * a place to put static files that should have stable URLs and undergo no processing, such as `favicon.ico` or `manifest.json` + * @deprecated * @default "static" */ assets?: string; hooks?: { /** * The location of your client [hooks](https://svelte.dev/docs/kit/hooks). + * @deprecated * @default "src/hooks.client" */ client?: string; /** * The location of your server [hooks](https://svelte.dev/docs/kit/hooks). + * @deprecated * @default "src/hooks.server" */ server?: string; /** * The location of your universal [hooks](https://svelte.dev/docs/kit/hooks). + * @deprecated * @default "src/hooks" * @since 2.3.0 */ universal?: string; }; /** - * Your app's internal library, accessible throughout the codebase as `$lib`. + * your app's internal library, accessible throughout the codebase as `$lib` + * @deprecated * @default "src/lib" */ lib?: string; /** - * A directory containing [parameter matchers](https://svelte.dev/docs/kit/advanced-routing#Matching). + * a directory containing [parameter matchers](https://svelte.dev/docs/kit/advanced-routing#Matching) + * @deprecated * @default "src/params" */ params?: string; /** - * The files that define the structure of your app (see [Routing](https://svelte.dev/docs/kit/routing)). + * the files that define the structure of your app (see [Routing](https://svelte.dev/docs/kit/routing)) + * @deprecated * @default "src/routes" */ routes?: string; /** - * The location of your service worker's entry point (see [Service workers](https://svelte.dev/docs/kit/service-workers)). + * the location of your service worker's entry point (see [Service workers](https://svelte.dev/docs/kit/service-workers)) + * @deprecated * @default "src/service-worker" */ serviceWorker?: string; /** - * The location of the template for HTML responses. + * the location of the template for HTML responses + * @deprecated * @default "src/app.html" */ appTemplate?: string; /** - * The location of the template for fallback error responses. + * the location of the template for fallback error responses + * @deprecated * @default "src/error.html" */ errorTemplate?: string; diff --git a/packages/kit/types/index.d.ts b/packages/kit/types/index.d.ts index da9c5096af3d..670145f460f3 100644 --- a/packages/kit/types/index.d.ts +++ b/packages/kit/types/index.d.ts @@ -490,64 +490,76 @@ declare module '@sveltejs/kit' { }; /** * Where to find various files within your project. + * @deprecated */ files?: { /** - * The location of your source code. + * the location of your source code + * @deprecated * @default "src" * @since 2.28 */ src?: string; /** - * A place to put static files that should have stable URLs and undergo no processing, such as `favicon.ico` or `manifest.json`. + * a place to put static files that should have stable URLs and undergo no processing, such as `favicon.ico` or `manifest.json` + * @deprecated * @default "static" */ assets?: string; hooks?: { /** * The location of your client [hooks](https://svelte.dev/docs/kit/hooks). + * @deprecated * @default "src/hooks.client" */ client?: string; /** * The location of your server [hooks](https://svelte.dev/docs/kit/hooks). + * @deprecated * @default "src/hooks.server" */ server?: string; /** * The location of your universal [hooks](https://svelte.dev/docs/kit/hooks). + * @deprecated * @default "src/hooks" * @since 2.3.0 */ universal?: string; }; /** - * Your app's internal library, accessible throughout the codebase as `$lib`. + * your app's internal library, accessible throughout the codebase as `$lib` + * @deprecated * @default "src/lib" */ lib?: string; /** - * A directory containing [parameter matchers](https://svelte.dev/docs/kit/advanced-routing#Matching). + * a directory containing [parameter matchers](https://svelte.dev/docs/kit/advanced-routing#Matching) + * @deprecated * @default "src/params" */ params?: string; /** - * The files that define the structure of your app (see [Routing](https://svelte.dev/docs/kit/routing)). + * the files that define the structure of your app (see [Routing](https://svelte.dev/docs/kit/routing)) + * @deprecated * @default "src/routes" */ routes?: string; /** - * The location of your service worker's entry point (see [Service workers](https://svelte.dev/docs/kit/service-workers)). + * the location of your service worker's entry point (see [Service workers](https://svelte.dev/docs/kit/service-workers)) + * @deprecated * @default "src/service-worker" */ serviceWorker?: string; /** - * The location of the template for HTML responses. + * the location of the template for HTML responses + * @deprecated * @default "src/app.html" */ appTemplate?: string; /** - * The location of the template for fallback error responses. + * the location of the template for fallback error responses + * @deprecated * @default "src/error.html" */ errorTemplate?: string; From 5289fd3903952c863edd775f0b859bb8a662d196 Mon Sep 17 00:00:00 2001 From: Tee Ming Date: Wed, 4 Mar 2026 19:17:03 +0800 Subject: [PATCH 06/11] remove deprecation from options validation --- packages/kit/src/core/config/options.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/kit/src/core/config/options.js b/packages/kit/src/core/config/options.js index d16ba4253582..97ded87f0fc7 100644 --- a/packages/kit/src/core/config/options.js +++ b/packages/kit/src/core/config/options.js @@ -137,19 +137,19 @@ const options = object( }), files: object({ - src: deprecate(string('src')), - assets: deprecate(string('static')), + src: string('src'), + assets: string('static'), hooks: object({ - client: deprecate(string(null)), - server: deprecate(string(null)), - universal: deprecate(string(null)) + client: string(null), + server: string(null), + universal: string(null) }), - lib: deprecate(string(null)), - params: deprecate(string(null)), - routes: deprecate(string(null)), - serviceWorker: deprecate(string(null)), - appTemplate: deprecate(string(null)), - errorTemplate: deprecate(string(null)) + lib: string(null), + params: string(null), + routes: string(null), + serviceWorker: string(null), + appTemplate: string(null), + errorTemplate: string(null) }), inlineStyleThreshold: number(0), From e47513007f0b761db8489288a7caceeccf353188 Mon Sep 17 00:00:00 2001 From: Tee Ming Date: Wed, 4 Mar 2026 21:17:11 +0800 Subject: [PATCH 07/11] add deprecation explanation --- packages/kit/src/exports/public.d.ts | 40 ++++++++++++++-------------- packages/kit/types/index.d.ts | 40 ++++++++++++++-------------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/packages/kit/src/exports/public.d.ts b/packages/kit/src/exports/public.d.ts index b620044814d5..2b6fee0e7e5d 100644 --- a/packages/kit/src/exports/public.d.ts +++ b/packages/kit/src/exports/public.d.ts @@ -516,76 +516,76 @@ export interface KitConfig { }; /** * Where to find various files within your project. - * @deprecated + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead */ files?: { /** - * the location of your source code - * @deprecated + * The location of your source code. + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src" * @since 2.28 */ src?: string; /** - * a place to put static files that should have stable URLs and undergo no processing, such as `favicon.ico` or `manifest.json` - * @deprecated + * A place to put static files that should have stable URLs and undergo no processing, such as `favicon.ico` or `manifest.json`. + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "static" */ assets?: string; hooks?: { /** * The location of your client [hooks](https://svelte.dev/docs/kit/hooks). - * @deprecated + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/hooks.client" */ client?: string; /** * The location of your server [hooks](https://svelte.dev/docs/kit/hooks). - * @deprecated + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/hooks.server" */ server?: string; /** * The location of your universal [hooks](https://svelte.dev/docs/kit/hooks). - * @deprecated + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/hooks" * @since 2.3.0 */ universal?: string; }; /** - * your app's internal library, accessible throughout the codebase as `$lib` - * @deprecated + * Your app's internal library, accessible throughout the codebase as `$lib`. + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/lib" */ lib?: string; /** - * a directory containing [parameter matchers](https://svelte.dev/docs/kit/advanced-routing#Matching) - * @deprecated + * A directory containing [parameter matchers](https://svelte.dev/docs/kit/advanced-routing#Matching). + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/params" */ params?: string; /** - * the files that define the structure of your app (see [Routing](https://svelte.dev/docs/kit/routing)) - * @deprecated + * The files that define the structure of your app (see [Routing](https://svelte.dev/docs/kit/routing)). + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/routes" */ routes?: string; /** - * the location of your service worker's entry point (see [Service workers](https://svelte.dev/docs/kit/service-workers)) - * @deprecated + * The location of your service worker's entry point (see [Service workers](https://svelte.dev/docs/kit/service-workers)). + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/service-worker" */ serviceWorker?: string; /** - * the location of the template for HTML responses - * @deprecated + * The location of the template for HTML responses. + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/app.html" */ appTemplate?: string; /** - * the location of the template for fallback error responses - * @deprecated + * The location of the template for fallback error responses. + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/error.html" */ errorTemplate?: string; diff --git a/packages/kit/types/index.d.ts b/packages/kit/types/index.d.ts index 670145f460f3..122de8f57ed6 100644 --- a/packages/kit/types/index.d.ts +++ b/packages/kit/types/index.d.ts @@ -490,76 +490,76 @@ declare module '@sveltejs/kit' { }; /** * Where to find various files within your project. - * @deprecated + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead */ files?: { /** - * the location of your source code - * @deprecated + * The location of your source code. + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src" * @since 2.28 */ src?: string; /** - * a place to put static files that should have stable URLs and undergo no processing, such as `favicon.ico` or `manifest.json` - * @deprecated + * A place to put static files that should have stable URLs and undergo no processing, such as `favicon.ico` or `manifest.json`. + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "static" */ assets?: string; hooks?: { /** * The location of your client [hooks](https://svelte.dev/docs/kit/hooks). - * @deprecated + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/hooks.client" */ client?: string; /** * The location of your server [hooks](https://svelte.dev/docs/kit/hooks). - * @deprecated + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/hooks.server" */ server?: string; /** * The location of your universal [hooks](https://svelte.dev/docs/kit/hooks). - * @deprecated + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/hooks" * @since 2.3.0 */ universal?: string; }; /** - * your app's internal library, accessible throughout the codebase as `$lib` - * @deprecated + * Your app's internal library, accessible throughout the codebase as `$lib`. + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/lib" */ lib?: string; /** - * a directory containing [parameter matchers](https://svelte.dev/docs/kit/advanced-routing#Matching) - * @deprecated + * A directory containing [parameter matchers](https://svelte.dev/docs/kit/advanced-routing#Matching). + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/params" */ params?: string; /** - * the files that define the structure of your app (see [Routing](https://svelte.dev/docs/kit/routing)) - * @deprecated + * The files that define the structure of your app (see [Routing](https://svelte.dev/docs/kit/routing)). + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/routes" */ routes?: string; /** - * the location of your service worker's entry point (see [Service workers](https://svelte.dev/docs/kit/service-workers)) - * @deprecated + * The location of your service worker's entry point (see [Service workers](https://svelte.dev/docs/kit/service-workers)). + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/service-worker" */ serviceWorker?: string; /** - * the location of the template for HTML responses - * @deprecated + * The location of the template for HTML responses. + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/app.html" */ appTemplate?: string; /** - * the location of the template for fallback error responses - * @deprecated + * The location of the template for fallback error responses. + * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/error.html" */ errorTemplate?: string; From a9bfa7148d402387f832de79f54662bda671b923 Mon Sep 17 00:00:00 2001 From: Tee Ming Date: Wed, 4 Mar 2026 21:18:04 +0800 Subject: [PATCH 08/11] changeset --- .changeset/shaky-pillows-sell.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/shaky-pillows-sell.md b/.changeset/shaky-pillows-sell.md index 708b64ab6292..c51b082eed90 100644 --- a/.changeset/shaky-pillows-sell.md +++ b/.changeset/shaky-pillows-sell.md @@ -2,4 +2,4 @@ '@sveltejs/kit': patch --- -chore: undeprecate `config.kit.files.*` options +chore: remove deprecation warnings for `config.kit.files.*` options when validating the Svelte config file From d80a05afda6338ceacdd92f4632b93ae7930b770 Mon Sep 17 00:00:00 2001 From: Tee Ming Date: Fri, 6 Mar 2026 03:30:59 +0800 Subject: [PATCH 09/11] Update packages/kit/src/exports/public.d.ts Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> --- packages/kit/src/exports/public.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kit/src/exports/public.d.ts b/packages/kit/src/exports/public.d.ts index 2b6fee0e7e5d..a4285ebb645e 100644 --- a/packages/kit/src/exports/public.d.ts +++ b/packages/kit/src/exports/public.d.ts @@ -516,7 +516,7 @@ export interface KitConfig { }; /** * Where to find various files within your project. - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead */ files?: { /** From e726ce4c3bd3aebed01e5e0c55996c1f794feb97 Mon Sep 17 00:00:00 2001 From: Tee Ming Date: Fri, 6 Mar 2026 03:31:52 +0800 Subject: [PATCH 10/11] update deprecation description --- packages/kit/src/exports/public.d.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/kit/src/exports/public.d.ts b/packages/kit/src/exports/public.d.ts index a4285ebb645e..8adc5bb67191 100644 --- a/packages/kit/src/exports/public.d.ts +++ b/packages/kit/src/exports/public.d.ts @@ -521,33 +521,33 @@ export interface KitConfig { files?: { /** * The location of your source code. - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src" * @since 2.28 */ src?: string; /** * A place to put static files that should have stable URLs and undergo no processing, such as `favicon.ico` or `manifest.json`. - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "static" */ assets?: string; hooks?: { /** * The location of your client [hooks](https://svelte.dev/docs/kit/hooks). - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/hooks.client" */ client?: string; /** * The location of your server [hooks](https://svelte.dev/docs/kit/hooks). - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/hooks.server" */ server?: string; /** * The location of your universal [hooks](https://svelte.dev/docs/kit/hooks). - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/hooks" * @since 2.3.0 */ @@ -555,37 +555,37 @@ export interface KitConfig { }; /** * Your app's internal library, accessible throughout the codebase as `$lib`. - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/lib" */ lib?: string; /** * A directory containing [parameter matchers](https://svelte.dev/docs/kit/advanced-routing#Matching). - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/params" */ params?: string; /** * The files that define the structure of your app (see [Routing](https://svelte.dev/docs/kit/routing)). - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/routes" */ routes?: string; /** * The location of your service worker's entry point (see [Service workers](https://svelte.dev/docs/kit/service-workers)). - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/service-worker" */ serviceWorker?: string; /** * The location of the template for HTML responses. - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/app.html" */ appTemplate?: string; /** * The location of the template for fallback error responses. - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/error.html" */ errorTemplate?: string; From d19915763f72a0743f97039f67343cfc0a591374 Mon Sep 17 00:00:00 2001 From: Tee Ming Date: Fri, 6 Mar 2026 03:32:28 +0800 Subject: [PATCH 11/11] generate types --- packages/kit/types/index.d.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/kit/types/index.d.ts b/packages/kit/types/index.d.ts index 122de8f57ed6..e00a3339e7d0 100644 --- a/packages/kit/types/index.d.ts +++ b/packages/kit/types/index.d.ts @@ -490,38 +490,38 @@ declare module '@sveltejs/kit' { }; /** * Where to find various files within your project. - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead */ files?: { /** * The location of your source code. - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src" * @since 2.28 */ src?: string; /** * A place to put static files that should have stable URLs and undergo no processing, such as `favicon.ico` or `manifest.json`. - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "static" */ assets?: string; hooks?: { /** * The location of your client [hooks](https://svelte.dev/docs/kit/hooks). - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/hooks.client" */ client?: string; /** * The location of your server [hooks](https://svelte.dev/docs/kit/hooks). - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/hooks.server" */ server?: string; /** * The location of your universal [hooks](https://svelte.dev/docs/kit/hooks). - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/hooks" * @since 2.3.0 */ @@ -529,37 +529,37 @@ declare module '@sveltejs/kit' { }; /** * Your app's internal library, accessible throughout the codebase as `$lib`. - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/lib" */ lib?: string; /** * A directory containing [parameter matchers](https://svelte.dev/docs/kit/advanced-routing#Matching). - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/params" */ params?: string; /** * The files that define the structure of your app (see [Routing](https://svelte.dev/docs/kit/routing)). - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/routes" */ routes?: string; /** * The location of your service worker's entry point (see [Service workers](https://svelte.dev/docs/kit/service-workers)). - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/service-worker" */ serviceWorker?: string; /** * The location of the template for HTML responses. - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/app.html" */ appTemplate?: string; /** * The location of the template for fallback error responses. - * @deprecated This feature is still supported but no longer recommended. Use [monorepositories](https://levelup.video/tutorials/monorepos-with-pnpm) instead + * @deprecated this feature is still supported, but it's generally recommended to use [monorepos](https://levelup.video/tutorials/monorepos-with-pnpm) instead * @default "src/error.html" */ errorTemplate?: string;