Skip to content
verdict:

SvelteKit 3.0.0

featured

warning: action required

8 breaking changes4 key points

SvelteKit 3.0 drops many old APIs and requires Node 22, TypeScript 6 and Vite 8, so plan a careful upgrade.

summary · from the release notes only · claude-haiku-5-5 · prompt v7

breaking changesall cited, each with a fix

breaking[1]: Node 22.17 or newer is required.

breaking: require Node 22.17 (#16597)

help: Upgrade Node to version 22.17 or newer before upgrading SvelteKit.

breaking[2]: TypeScript 6 is now the minimum supported version.

breaking: TypeScript 6 is now the minimum required version (#15930)

help: Upgrade TypeScript to version 6 or newer.

breaking[3]: Vite 8 is now required.

breaking: require Vite 8. Provides new functionality even for existing Vite 8 users such as faster builds with Vite hook filters and more powerful SvelteKit adapters with the Vite environment API (#15371)

help: Upgrade Vite to version 8 or newer, and check that Vite plugins still work with it.

breaking[4]: Cookie names must now contain only ASCII characters.

breaking: upgrade to cookie v2. Cookie names must now contain only ASCII characters (#13386)

help: Check that every cookie name uses only ASCII characters, since the notes give no other migration.

breaking[5]: The cookie path option now defaults to '/'.

breaking: default the cookie path option to '/' (#15398)

help: The notes give no migration; check cookies that relied on the old default path and set path explicitly where needed.

breaking[6]: The $app/stores module is removed.

breaking: remove $app/stores (#15499)

help: Remove imports from $app/stores; the notes move Page to $app/state.

breaking[7]: Form action responses now use the HTTP status code returned from fail.

breaking: form action responses now use the HTTP status code returned from fail (#16200)

help: Check form actions that call fail and any code that depends on the response status.

breaking[8]: goto now rejects when called with a URL that does not resolve to a route within the app.

breaking: goto now rejects when called with a URL that does not resolve to a route within the app, matching the existing behaviour for external URLs (#16164)

help: Handle rejections from goto calls that target URLs which are not app routes.

key points

release-notesgithub.com/sveltejs/kit · 681 lines
  1. ### Major Changes
  2. - breaking: move remote function types to `$app/server` ([#16740](https://github.com/sveltejs/kit/pull/16740))
  3. - breaking: remove `experimental.handleRenderingErrors` flag ([#16265](https://github.com/sveltejs/kit/pull/16265))
  4. - breaking: make `getRequest` and `setResponse` synchronous ([#16280](https://github.com/sveltejs/kit/pull/16280))
  5. - breaking: TypeScript 6 is now the minimum required version ([#15930](https://github.com/sveltejs/kit/pull/15930))
  6. - breaking: refresh all load functions/queries when clicking a link to the current URL ([#16572](https://github.com/sveltejs/kit/pull/16572))
  7. - breaking: move remote function types to `$app/server` ([#16764](https://github.com/sveltejs/kit/pull/16764))
  8. - breaking: upgrade to `cookie` v2. Cookie names must now contain only ASCII characters ([#13386](https://github.com/sveltejs/kit/pull/13386))
  9. - breaking: require Node 22 or newer ([#12548](https://github.com/sveltejs/kit/pull/12548))
  10. - major: error when a client-requested single-flight mutation isn't respected by the server, allow the server to explicitly ignore refreshes ([#16892](https://github.com/sveltejs/kit/pull/16892))
  11. - breaking: remove the `preloadStrategy` option. `modulepreload` will always be used ([#15256](https://github.com/sveltejs/kit/pull/15256))
  12. - breaking: default the cookie `path` option to `'/'` ([#15398](https://github.com/sveltejs/kit/pull/15398))
  13. - breaking: remove `@sveltejs/kit/node/polyfills` ([#15430](https://github.com/sveltejs/kit/pull/15430))
  14. - breaking: add `config.kit.output.linkHeaderPreload` to preload using the `Link` header ([#15939](https://github.com/sveltejs/kit/pull/15939))
  15. - breaking: require `@sveltejs/vite-plugin-svelte` v7 ([#15371](https://github.com/sveltejs/kit/pull/15371))
  16. - breaking: make `page.url` immutable on a type level ([#16256](https://github.com/sveltejs/kit/pull/16256))
  17. - breaking: remove `base`, `assets`, and `resolveRoute` from `$app/paths` ([#15507](https://github.com/sveltejs/kit/pull/15507))
  18. - breaking: remove `createEntries` from the `Builder` object passed to adapter functions ([#15509](https://github.com/sveltejs/kit/pull/15509))
  19. - breaking: return no content for 204 responses ([#16200](https://github.com/sveltejs/kit/pull/16200))
  20. - breaking: rename `Pathname` type to `Path` and `Asset` to `AssetPath` ([#16430](https://github.com/sveltejs/kit/pull/16430))
  21. breaking: remove leading `/` from `Path` and `AssetPath`
  22. - breaking: `handle`'s `resolve` is now typed to always return a `Promise` ([#16352](https://github.com/sveltejs/kit/pull/16352))
  23. - breaking: remove `Server` constructor and `SSRManifest` from public types ([#16876](https://github.com/sveltejs/kit/pull/16876))
  24. - breaking: require Svelte config options to be passed through the Vite plugin ([#16007](https://github.com/sveltejs/kit/pull/16007))
  25. - breaking: form action responses now use the HTTP status code returned from `fail` ([#16200](https://github.com/sveltejs/kit/pull/16200))
  26. - breaking: write tsconfig to `node_modules/$app/tsconfig` ([#16458](https://github.com/sveltejs/kit/pull/16458))
  27. - breaking: move `defineParams` and associated types to `@sveltejs/kit/params` ([#16716](https://github.com/sveltejs/kit/pull/16716))
  28. - breaking: remove the deprecated CSRF `checkOrigin` option in favor of `trustedOrigins` ([#15437](https://github.com/sveltejs/kit/pull/15437))
  29. - breaking: the `delta` property now only exists for `popstate` navigation events ([#15522](https://github.com/sveltejs/kit/pull/15522))
  30. - breaking: change `form.error` type from `any` to `App.Error | undefined` ([#16245](https://github.com/sveltejs/kit/pull/16245))
  31. - breaking: remove deprecated `pragma` header in version polling for improved CORS support ([#15428](https://github.com/sveltejs/kit/pull/15428))
  32. - breaking: `goto` now rejects when called with a URL that does not resolve to a route within the app, matching the existing behaviour for external URLs ([#16164](https://github.com/sveltejs/kit/pull/16164))
  33. - breaking: run all errors through the `handleError` hook ([#16664](https://github.com/sveltejs/kit/pull/16664))
  34. - breaking: require Svelte 5.56.4 or newer ([#15371](https://github.com/sveltejs/kit/pull/15371))
  35. - breaking: error on `event.url`, `event.params` and `event.route` access inside queries ([#16452](https://github.com/sveltejs/kit/pull/16452))
  36. - breaking: enhanced cross-page form actions now navigate to the action page on success and failure, matching native form behavior ([#16684](https://github.com/sveltejs/kit/pull/16684))
  37. - breaking: delete `$service-worker` module ([#16450](https://github.com/sveltejs/kit/pull/16450))
  38. - breaking: move `defineEnvVars` to `@sveltejs/kit/env` ([#16375](https://github.com/sveltejs/kit/pull/16375))
  39. - breaking: nested server-only directories ([#15685](https://github.com/sveltejs/kit/pull/15685))
  40. - feat: allow adapters to provide additional Vite plugins ([#16206](https://github.com/sveltejs/kit/pull/16206))
  41. - breaking: replace the `$lib` alias with `#lib` and remove `files.lib` config. ([#16360](https://github.com/sveltejs/kit/pull/16360))
  42. - breaking: remove `#lib` definition from `paths`; requires explicit module extensions as a result ([#16736](https://github.com/sveltejs/kit/pull/16736))
  43. - chore: change `error`, `isHttpError`, `redirect`, and `isRedirect` to refer to public type instead of internal class ([#13036](https://github.com/sveltejs/kit/pull/13036))
  44. - breaking: move hooks-related types to `@sveltejs/kit/hooks` ([#16737](https://github.com/sveltejs/kit/pull/16737))
  45. - breaking: add 'error' result type to `preloadData` ([#12579](https://github.com/sveltejs/kit/pull/12579))
  46. - breaking: detect new deployments on data, remote, and form action responses, tab focus, and visibility change, and default `version.pollInterval` to 1 hour ([#16496](https://github.com/sveltejs/kit/pull/16496))
  47. - breaking: disallow cross-origin form submissions without a `Content-Type` header ([#16347](https://github.com/sveltejs/kit/pull/16347))
  48. - breaking: Server-only directories (`/server/` in the path) are now treated as server-only everywhere inside the project (except `src/routes` and the assets directory) ([#16360](https://github.com/sveltejs/kit/pull/16360))
  49. - breaking: `config` exported from a universal route file takes precedence over a server one ([#16400](https://github.com/sveltejs/kit/pull/16400))
  50. - breaking: require Vite 8. Provides new functionality even for existing Vite 8 users such as faster builds with Vite hook filters and more powerful SvelteKit adapters with the Vite environment API ([#15371](https://github.com/sveltejs/kit/pull/15371))
  51. - breaking: remove `data-sveltekit-*` option `'off'` in favour of `false` ([#15907](https://github.com/sveltejs/kit/pull/15907))
  52. - breaking: move tracing out of the experimental namespace and remove the instrumentation flag ([#16260](https://github.com/sveltejs/kit/pull/16260))
  53. - breaking: add `kit.paths.origin` config option, remove `kit.prerender.origin` and the `adapter-node` `ORIGIN` environment variable ([#16161](https://github.com/sveltejs/kit/pull/16161))
  54. - breaking: move `Page`, `ReadonlyURL` and `ReadonlyURLSearchParams` from `@sveltejs/kit` to `$app/state` ([#16694](https://github.com/sveltejs/kit/pull/16694))
  55. - breaking: remove `$app/stores` ([#15499](https://github.com/sveltejs/kit/pull/15499))
  56. - breaking: add `refreshAll` and deprecate `invalidateAll` ([#16289](https://github.com/sveltejs/kit/pull/16289))
  57. - breaking: reject query parameters beginning with `x-sveltekit-` ([#17125](https://github.com/sveltejs/kit/pull/17125))
  58. - breaking: disallow `*.remote.ts/js` files unless `experimental.remoteFunctions` is enabled ([#16247](https://github.com/sveltejs/kit/pull/16247))
  59. - breaking: replace the `noScroll` and `keepFocus` options of `goto` with a single `reset` option, and the `data-sveltekit-noscroll` and `data-sveltekit-keepfocus` attributes with `data-sveltekit-reset` ([#16558](https://github.com/sveltejs/kit/pull/16558))
  60. - breaking: don't abort navigation when calling `invalidate(All)` during navigation ([#16188](https://github.com/sveltejs/kit/pull/16188))
  61. - breaking: consistent special filename patterns ([#16382](https://github.com/sveltejs/kit/pull/16382))
  62. - breaking: allow `handleError` to influence status code ([#16162](https://github.com/sveltejs/kit/pull/16162))
  63. - breaking: delegate CORS handling to Vite for static directory requests during development ([#16357](https://github.com/sveltejs/kit/pull/16357))
  64. - breaking: require `vite@^8.0.12`, the first Vite 8 release bundling stable `rolldown` 1.0.0 ([#16134](https://github.com/sveltejs/kit/pull/16134))
  65. - breaking: only include routes with a `+page` or `+server` in `RouteId` ([#16580](https://github.com/sveltejs/kit/pull/16580))
  66. - breaking: require Node 22.17 ([#16597](https://github.com/sveltejs/kit/pull/16597))
  67. - breaking: deprecate `error(status, {...})` in favour of `error(status, message, {...})` ([#16540](https://github.com/sveltejs/kit/pull/16540))
  68. - breaking: replace the `builder.generateManifest` with `builder.generateServerInstance` and `builder.manifest` ([#16875](https://github.com/sveltejs/kit/pull/16875))
  69. - breaking: forbid external redirects by default ([#16198](https://github.com/sveltejs/kit/pull/16198))
  70. - breaking: separate adapter Vite plugins into `pre` and `post` ([#16711](https://github.com/sveltejs/kit/pull/16711))
  71. - breaking: remove param files in folder in favor of `params.js/ts` file ([#16189](https://github.com/sveltejs/kit/pull/16189))
  72. - breaking: move env-related types to `@sveltejs/kit/env` ([#16739](https://github.com/sveltejs/kit/pull/16739))
  73. - breaking: `preloadCode` now takes a route ID (e.g. `/blog/[slug]`) instead of a pathname. Route IDs are not prefixed with `paths.base` ([#16576](https://github.com/sveltejs/kit/pull/16576))
  74. - breaking: move `BeforeNavigate`, `OnNavigate`, `AfterNavigate`, `Navigation`, `NavigationTarget`, `NavigationType`, `GotoOptions` and the `Navigation*` variant types from `@sveltejs/kit` to `$app/navigation` ([#16694](https://github.com/sveltejs/kit/pull/16694))
  75. - breaking: move `ActionResult` and `SubmitFunction` from `@sveltejs/kit` to `$app/forms` ([#16694](https://github.com/sveltejs/kit/pull/16694))
  76. - breaking: remove `handleValidationError` and pass remote function validation errors to `handleError` with `kind: 'validation'` ([#16672](https://github.com/sveltejs/kit/pull/16672))
  77. - breaking: remove deprecated `.run()` method from live queries ([#16573](https://github.com/sveltejs/kit/pull/16573))
  78. ### Minor Changes
  79. - feat: allow hyphens in param and matcher names ([#16284](https://github.com/sveltejs/kit/pull/16284))
  80. - feat: add `$app/manifest` module with `immutable`, `assets`, `prerendered`, and `routes` exports ([#16372](https://github.com/sveltejs/kit/pull/16372))
  81. - feat: ignore files with + prefix if they contain test/spec/stories ([#16715](https://github.com/sveltejs/kit/pull/16715))
  82. - feat: add `ErrorProps` to generated types ([#16272](https://github.com/sveltejs/kit/pull/16272))
  83. - feat: support sourcemaps in production ([#16412](https://github.com/sveltejs/kit/pull/16412))
  84. - feat: return the list of compressed files from `builder.compress` ([#16566](https://github.com/sveltejs/kit/pull/16566))
  85. - feat: better response logging ([#16744](https://github.com/sveltejs/kit/pull/16744))
  86. - feat: warn when tsconfig doesn't exclude service worker ([#16645](https://github.com/sveltejs/kit/pull/16645))
  87. - feat: validate that all remote form fields were created with form.fields.foo.as(...) ([#16331](https://github.com/sveltejs/kit/pull/16331))
  88. - feat: support function validators for environment variables ([#16402](https://github.com/sveltejs/kit/pull/16402))
  89. - feat: use `type: 'module'` for service worker registrations ([#16169](https://github.com/sveltejs/kit/pull/16169))
  90. - feat: allow adapters to receive the Svelte config as a function argument when adding Vite plugins ([#16986](https://github.com/sveltejs/kit/pull/16986))
  91. - feat: add shallow routing to `goto` and deprecate `pushState` and `replaceState` ([#16449](https://github.com/sveltejs/kit/pull/16449))
  92. - feat: abort `request.signal` when the response closes prematurely, via a new `response` option for `getRequest` ([#16793](https://github.com/sveltejs/kit/pull/16793))
  93. - feat: make `$app/paths` importable in service workers ([#16441](https://github.com/sveltejs/kit/pull/16441))
  94. - feat: pass the project-relative source `filename` to the `preload` filter for fonts ([#16443](https://github.com/sveltejs/kit/pull/16443))
  95. - feat: preserve page state set through `goto(..., { state, persistState: true })` across reloads ([#16449](https://github.com/sveltejs/kit/pull/16449))
  96. - feat: reinstate `$env/static/private`, `$env/dynamic/private`, `$env/static/public`, `$env/dynamic/public` and `$app/environment` as deprecated aliases for `$app/env/private` `$app/env/public` and `$app/env` ([#16334](https://github.com/sveltejs/kit/pull/16334))
  97. - feat: add `page` and `endpoint` booleans to `$app/manifest`'s `routes`, and export a `ManifestRoute` type ([#16594](https://github.com/sveltejs/kit/pull/16594))
  98. - feat: `$app/service-worker` module ([#16458](https://github.com/sveltejs/kit/pull/16458))
  99. - feat: resolve paths using the Vite config `root` option instead of `process.cwd()` to better support monorepo configurations such as Vitest workspaces ([#15469](https://github.com/sveltejs/kit/pull/15469))
  100. - feat: better error logging ([#16374](https://github.com/sveltejs/kit/pull/16374))
  101. - feat: add `PageRouteId` and `EndpointRouteId` to `$app/types` ([#16594](https://github.com/sveltejs/kit/pull/16594))
  102. - feat: better tsconfig validation ([#16458](https://github.com/sveltejs/kit/pull/16458))
  103. - feat: add `dirty()` property to form fields ([#16208](https://github.com/sveltejs/kit/pull/16208))
  104. - feat: support the `QUERY` HTTP method in `+server.js` ([#16782](https://github.com/sveltejs/kit/pull/16782))
  105. - feat: allow adapters to override `getRequest` and `setResponse` during `vite dev` and `vite preview` ([#16753](https://github.com/sveltejs/kit/pull/16753))
  106. - chore: deprecate `Response` helpers in favor of platform-provided alternatives ([#15448](https://github.com/sveltejs/kit/pull/15448))
  107. - feat: add `cookies.parse` method ([#16203](https://github.com/sveltejs/kit/pull/16203))
  108. - chore: deprecate `export const snapshot` in favour of the `snapshot` helper ([#16687](https://github.com/sveltejs/kit/pull/16687))
  109. - feat: add `snapshot` helper to `$app/navigation` ([#16685](https://github.com/sveltejs/kit/pull/16685))
  110. - feat: support custom values in `page.state` via `transport` hook ([#16662](https://github.com/sveltejs/kit/pull/16662))
  111. - fix: default cookies to `secure` to `false` during development ([#16462](https://github.com/sveltejs/kit/pull/16462))
  112. - feat: warn when naively proxying requests that result in responses with a `content-encoding` header ([#16633](https://github.com/sveltejs/kit/pull/16633))
  113. - feat: accept the checked state as a third argument to `.as('radio', ...)` and `.as('checkbox', ...)` so that these inputs reset to it after a submission ([#16926](https://github.com/sveltejs/kit/pull/16926))
  114. - feat: add an `applyReroute` helper for adapters that support split serverless function deployments ([#16665](https://github.com/sveltejs/kit/pull/16665))
  115. ### Patch Changes
  116. - fix: prevent scheme-like path segments from causing off-site trailing-slash redirects ([#17294](https://github.com/sveltejs/kit/pull/17294))
  117. - chore: share the action error result between form actions and remote forms ([#16835](https://github.com/sveltejs/kit/pull/16835))
  118. - fix: persist global app state across module graph reloads ([#16663](https://github.com/sveltejs/kit/pull/16663))
  119. - fix: generate valid `Path` types for routes with optional or rest params, several params in one segment, or escape sequences ([#16577](https://github.com/sveltejs/kit/pull/16577))
  120. - fix: coerce values typed into remote form fields, and only apply the default given to `.as()` until the field is edited ([#16939](https://github.com/sveltejs/kit/pull/16939))
  121. - fix: blur focused SVG elements before the DOM update on navigation ([#16983](https://github.com/sveltejs/kit/pull/16983))
  122. - fix: support bigint params in server-side route resolution ([#17130](https://github.com/sveltejs/kit/pull/17130))
  123. - chore: build streamed responses from async generators ([#16847](https://github.com/sveltejs/kit/pull/16847))
  124. - fix: generate types when dev server starts ([#17034](https://github.com/sveltejs/kit/pull/17034))
  125. - fix: allow `undefined` values to be passed to form field `.as(...)` where applicable ([#15681](https://github.com/sveltejs/kit/pull/15681))
  126. - fix: respect `paths.relative` during development for client files ([#17053](https://github.com/sveltejs/kit/pull/17053))
  127. - fix: validate prerender concurrency ([#17145](https://github.com/sveltejs/kit/pull/17145))
  128. - chore: deprecate `builder.rimraf` and `builder.mkdirp` in favour of `node:fs` methods ([#16610](https://github.com/sveltejs/kit/pull/16610))
  129. - fix: manipulate stack trace for errors that happen while generating prerender inputs ([#17113](https://github.com/sveltejs/kit/pull/17113))
  130. - fix: don't treat callable standard schemas as function param matchers ([#16403](https://github.com/sveltejs/kit/pull/16403))
  131. - fix: prevent non-redirect enhanced form results from navigating to another origin ([#17293](https://github.com/sveltejs/kit/pull/17293))
  132. - fix: clarify circular imports from `src/env` ([#17014](https://github.com/sveltejs/kit/pull/17014))
  133. - fix: keep memory flat when precompressing many files ([#16993](https://github.com/sveltejs/kit/pull/16993))
  134. - fix: render remote form actions while prerendering ([#17139](https://github.com/sveltejs/kit/pull/17139))
  135. - fix: ignore Vitest browser loader HTML transforms ([#17092](https://github.com/sveltejs/kit/pull/17092))
  136. - fix: prevent failed link preloads from causing unhandled promise rejections in production ([#17181](https://github.com/sveltejs/kit/pull/17181))
  137. - fix: resolve generated rootDirs from the project root ([#17242](https://github.com/sveltejs/kit/pull/17242))
  138. - fix: generate route resolution modules as siblings of `.html` pages ([#16674](https://github.com/sveltejs/kit/pull/16674))
  139. - perf: parse large streamed frames in linear time ([#16489](https://github.com/sveltejs/kit/pull/16489))
  140. - fix: keep at most one pending body read at a time when deserializing binary forms ([#16783](https://github.com/sveltejs/kit/pull/16783))
  141. - fix: escape cache-control headers in prerendered HTML ([#17293](https://github.com/sveltejs/kit/pull/17293))
  142. - fix: decode all numeric character references, including above `ffff`, when crawling prerendered pages ([#16611](https://github.com/sveltejs/kit/pull/16611))
  143. - fix: enforce request body size limits when Content-Type is absent ([#17127](https://github.com/sveltejs/kit/pull/17127))
  144. - fix: include queries refreshed from within another query in the serialized response ([#16461](https://github.com/sveltejs/kit/pull/16461))
  145. - fix: reject malformed streamed data encoding ([#16423](https://github.com/sveltejs/kit/pull/16423))
  146. - perf: cache the default cookie header parse and avoid allocations in `cookies.get` ([#16341](https://github.com/sveltejs/kit/pull/16341))
  147. - fix: exclude deleted cookies from `cookies.getAll()` so it stays consistent with `cookies.get()` ([#16297](https://github.com/sveltejs/kit/pull/16297))
  148. - fix: hide stack traces for internal errors like 404s ([#16411](https://github.com/sveltejs/kit/pull/16411))
  149. - chore: deduplicate repeated CSP directive handling ([#16498](https://github.com/sveltejs/kit/pull/16498))
  150. - fix: render the nearest error page when a form submission receives a non-ActionResult error response ([#16308](https://github.com/sveltejs/kit/pull/16308))
  151. - chore: bump `mrmime` to 2.0.1 ([#16745](https://github.com/sveltejs/kit/pull/16745))
  152. - fix: correctly implement Vite plugin hook filters ([#16760](https://github.com/sveltejs/kit/pull/16760))
  153. - fix: ignore nested outDir files outside generated ([#17150](https://github.com/sveltejs/kit/pull/17150))
  154. - fix: defer `query.refresh()` in server commands until after the command body completes ([#16225](https://github.com/sveltejs/kit/pull/16225))
  155. - fix: drain unconsumed request bodies so keep-alive connections don't hang ([#16170](https://github.com/sveltejs/kit/pull/16170))
  156. - fix: keep `history.scrollRestoration` set to `manual` when leaving the page, so a document restored from the back/forward cache does not fall back to browser scroll restoration ([#17244](https://github.com/sveltejs/kit/pull/17244))
  157. - fix: resolve service worker and `tsconfig.json` based on Vite `root` setting ([#16229](https://github.com/sveltejs/kit/pull/16229))
  158. - fix: rebuild the dev manifest when route files disappear during an incremental update ([#16643](https://github.com/sveltejs/kit/pull/16643))
  159. - breaking: populate env vars before `instrumentation.server.js` is evaluated and update the adapter instrumentation API ([#16303](https://github.com/sveltejs/kit/pull/16303))
  160. - fix: only print prerender progress newline when necessary ([#16766](https://github.com/sveltejs/kit/pull/16766))
  161. - perf: match only unpaired surrogates when escaping HTML ([#16407](https://github.com/sveltejs/kit/pull/16407))
  162. - fix: treat `data:` protocol URLs as external for redirect ([#16392](https://github.com/sveltejs/kit/pull/16392))
  163. - chore: deduplicate request hashing for serialized fetch responses ([#16499](https://github.com/sveltejs/kit/pull/16499))
  164. - fix: don't treat `Object.prototype` members as param matchers during validation ([#16612](https://github.com/sveltejs/kit/pull/16612))
  165. - fix: generate a `never` `Path` type when there are no routes ([#17228](https://github.com/sveltejs/kit/pull/17228))
  166. - fix: follow HTTP redirects from authentication proxies when enhancing form submissions ([#17106](https://github.com/sveltejs/kit/pull/17106))
  167. - fix: don't report empty environment variables as missing ([#16401](https://github.com/sveltejs/kit/pull/16401))
  168. - chore: generate the env modules in a single pass ([#16833](https://github.com/sveltejs/kit/pull/16833))
  169. - fix: externalize `@opentelemetry/api` to prevent bundler chunk colocation between `instrumentation.server.js` and application code ([#16302](https://github.com/sveltejs/kit/pull/16302))
  170. - fix: support form fields named after Object prototype properties ([#17136](https://github.com/sveltejs/kit/pull/17136))
  171. - fix: exclude routes without a page or endpoint from `routes` in `$app/manifest`, and remove directories with no route files from `LayoutParams` ([#16588](https://github.com/sveltejs/kit/pull/16588))
  172. - fix: record a history traversal before resolving its route ([#16959](https://github.com/sveltejs/kit/pull/16959))
  173. - fix: avoid Vite dev server reload on initial page request ([#16553](https://github.com/sveltejs/kit/pull/16553))
  174. - fix: don't set a `null` `accept-language` header on internal `fetch` sub-requests when the incoming request has none ([#16527](https://github.com/sveltejs/kit/pull/16527))
  175. - fix: reuse SSR-cached fetch responses during hydration when a cross-origin URL is not in canonical form ([#16339](https://github.com/sveltejs/kit/pull/16339))
  176. - fix: correctly detect prerendered paths in server `fetch` when `paths.base` is set ([#16525](https://github.com/sveltejs/kit/pull/16525))
  177. - chore: say what a valid remote form field name looks like when rejecting one ([#16938](https://github.com/sveltejs/kit/pull/16938))
  178. - chore: warn when remote form fields are enumerated in dev ([#16940](https://github.com/sveltejs/kit/pull/16940))
  179. - fix: populate `$app/env/*` dynamic variables in contexts that don't run the dev server, such as `vite-node` ([#16223](https://github.com/sveltejs/kit/pull/16223))
  180. - fix: resolve client manifest imports against the Vite root ([#16803](https://github.com/sveltejs/kit/pull/16803))
  181. - fix: properly handle Date objects in form.fields.set ([#16168](https://github.com/sveltejs/kit/pull/16168))
  182. - fix: return 404 for form actions and remote functions whose name is an `Object.prototype` member ([#16072](https://github.com/sveltejs/kit/pull/16072))
  183. - fix: no longer throw "An impossible situation occurred" when a server-only module is imported by both server and client code ([#16257](https://github.com/sveltejs/kit/pull/16257))
  184. - fix: respect Vite default log level ([#16767](https://github.com/sveltejs/kit/pull/16767))
  185. - fix: set the focus starting point without a fragment navigation, which leaked a `hashchange` to app listeners ([#16992](https://github.com/sveltejs/kit/pull/16992))
  186. - fix: keep a `form.for` instance registered when the derived that holds it disconnects and reconnects ([#17230](https://github.com/sveltejs/kit/pull/17230))
  187. - fix: make cookie options optional ([#17201](https://github.com/sveltejs/kit/pull/17201))
  188. - fix: don't duplicate remote modules in the generated manifest ([#16532](https://github.com/sveltejs/kit/pull/16532))
  189. - fix: evict hashed fetch cache entries after mutations ([#17146](https://github.com/sveltejs/kit/pull/17146))
  190. - chore: reuse base64 and text decoding helpers ([#16608](https://github.com/sveltejs/kit/pull/16608))
  191. - fix: explain the removal of `$lib` and `$service-worker` when their imports fail to resolve ([#16635](https://github.com/sveltejs/kit/pull/16635))
  192. - fix: tweak response logging for remote requests ([#16865](https://github.com/sveltejs/kit/pull/16865))
  193. - fix: correctly massage stack traces with async frames ([#16633](https://github.com/sveltejs/kit/pull/16633))
  194. - fix: mark `RequestEvent` properties as `readonly` ([#16661](https://github.com/sveltejs/kit/pull/16661))
  195. - fix: render the nearest `+error.svelte` at the depth it occupies when an error is thrown during rendering ([#16526](https://github.com/sveltejs/kit/pull/16526))
  196. - fix: support coordinate objects from image inputs in remote forms ([#16944](https://github.com/sveltejs/kit/pull/16944))
  197. - fix: revert route metadata caching to regenerate missing root-route types during sync ([#17281](https://github.com/sveltejs/kit/pull/17281))
  198. - chore: bump `@sveltejs/acorn-typescript` to 1.0.12 ([#16745](https://github.com/sveltejs/kit/pull/16745))
  199. - fix: update `match` parameter type ([#16636](https://github.com/sveltejs/kit/pull/16636))
  200. - fix: generate sourcemaps for remote modules ([#16440](https://github.com/sveltejs/kit/pull/16440))
  201. - fix: keep hash-router links on the current document when resolving paths ([#17107](https://github.com/sveltejs/kit/pull/17107))
  202. - fix: avoid empty getElementById() call on hash routing navigation ([#16448](https://github.com/sveltejs/kit/pull/16448))
  203. - fix: resolve every module entry point using `kit.moduleExtensions` ([#17043](https://github.com/sveltejs/kit/pull/17043))
  204. - fix: serve `.ico` files with `image/x-icon` Content-Type ([#16234](https://github.com/sveltejs/kit/pull/16234))
  205. - chore: bump `magic-string` to 1.1.0 ([#16745](https://github.com/sveltejs/kit/pull/16745))
  206. - fix: exclude inlined files from the page's `$app/manifest` immutable list ([#16531](https://github.com/sveltejs/kit/pull/16531))
  207. - fix: discard invalidation results when a navigation completes while they load ([#16852](https://github.com/sveltejs/kit/pull/16852))
  208. - fix: avoid client-side code being bundled by Cloudflare Wrangler ([#16364](https://github.com/sveltejs/kit/pull/16364))
  209. - fix: wait for the redirect navigation before remote form submissions resolve ([#16765](https://github.com/sveltejs/kit/pull/16765))
  210. - fix: record the mime types of prerendered paths in the server manifest ([#16564](https://github.com/sveltejs/kit/pull/16564))
  211. - fix: only require the `svelte-trusted-html` trusted-types policy when client-side code is shipped, allowing builds where all pages have `csr: false` ([#16928](https://github.com/sveltejs/kit/pull/16928))
  212. - chore: clarify which hooks run during server route resolution ([#16397](https://github.com/sveltejs/kit/pull/16397))
  213. - fix: yield to allow prerender updates to be visible ([#16748](https://github.com/sveltejs/kit/pull/16748))
  214. - fix: make `paths.origin` type looser ([#16215](https://github.com/sveltejs/kit/pull/16215))
  215. - chore: bump `devalue` to 5.9.0 ([#16745](https://github.com/sveltejs/kit/pull/16745))
  216. - feat: send periodic `keep-alive` SSE comments from `query.live` to prevent idle-timeout errors ([#16063](https://github.com/sveltejs/kit/pull/16063))
  217. - fix: send an explicit SSE Accept header for `query.live` requests to avoid buffering by proxies ([#17104](https://github.com/sveltejs/kit/pull/17104))
  218. - fix: don't touch the `query.live` stream controller after teardown, and make response cancellation observable via the generator's `request.signal` ([#16790](https://github.com/sveltejs/kit/pull/16790))
  219. - fix: print `builder.log.warn` messages to stderr, as documented ([#17253](https://github.com/sveltejs/kit/pull/17253))
  220. - fix: warn if hook files are spelled as "hook" instead of "hooks" ([#16483](https://github.com/sveltejs/kit/pull/16483))
  221. - fix: only suggest a `+` prefix for route filenames that are valid with the file's extension ([#16837](https://github.com/sveltejs/kit/pull/16837))
  222. - chore: only generate each route's resolution module once when prerendering ([#16576](https://github.com/sveltejs/kit/pull/16576))
  223. - fix: don't throw from remote form `validate()` if the form unmounts while it is waiting for a tick ([#16720](https://github.com/sveltejs/kit/pull/16720))
  224. - chore: share navigation completion between navigate and shallow routing ([#16838](https://github.com/sveltejs/kit/pull/16838))
  225. - fix: route dev-server response logging through Vite's logger so it respects `logLevel` and `customLogger` ([#16858](https://github.com/sveltejs/kit/pull/16858))
  226. - fix: skip clean fields when programmatically validating forms ([#16208](https://github.com/sveltejs/kit/pull/16208))
  227. - perf: skip import graph collection outside client environments ([#16383](https://github.com/sveltejs/kit/pull/16383))
  228. - breaking: experimental remote form `validate({ includeUntouched })` option is now `all` ([#16208](https://github.com/sveltejs/kit/pull/16208))
  229. - fix: rerun load functions when the number of values of a tracked search parameter changes ([#16495](https://github.com/sveltejs/kit/pull/16495))
  230. - chore: read build-time config from defines on the server instead of carrying it in `options` ([#16873](https://github.com/sveltejs/kit/pull/16873))
  231. - fix: avoid client build warning about externalising `node:async_hooks` ([#16244](https://github.com/sveltejs/kit/pull/16244))
  232. - chore: stop externalizing `cookie` dependency during build ([#16936](https://github.com/sveltejs/kit/pull/16936))
  233. - fix: reinstate `$app/environment` as an alias for `$app/env`, in case dependencies import it ([#15964](https://github.com/sveltejs/kit/pull/15964))
  234. - fix: preserve `paths.base` when `vite preview` redirects a prerendered page to the correct trailing slash ([#16836](https://github.com/sveltejs/kit/pull/16836))
  235. - fix: error when reading non-serialized `set-cookie` headers via `getSetCookie` in `load` ([#16614](https://github.com/sveltejs/kit/pull/16614))
  236. - fix: walk and copy directories without a stat per file ([#16995](https://github.com/sveltejs/kit/pull/16995))
  237. - perf: avoid quadratic remote form issue merging ([#16493](https://github.com/sveltejs/kit/pull/16493))
  238. - fix: widen remote form fields for union schemas and string enums ([#16937](https://github.com/sveltejs/kit/pull/16937))
  239. - chore: deprecate the `alias` option ([#16470](https://github.com/sveltejs/kit/pull/16470))
  240. - fix: don't attempt to serialize fetch responses when the request body is not a string or TypedArray ([#16501](https://github.com/sveltejs/kit/pull/16501))
  241. - fix: respond to `HEAD` requests without a body ([#17036](https://github.com/sveltejs/kit/pull/17036))
  242. - chore: replace deprecated Vite dev server APIs ([#16961](https://github.com/sveltejs/kit/pull/16961))
  243. - chore: iterate the query cache maps through a single generator ([#16846](https://github.com/sveltejs/kit/pull/16846))
  244. - fix: handle rejected streamed server data after delayed loads ([#16268](https://github.com/sveltejs/kit/pull/16268))
  245. - fix: don't crash on interactions inside a form whose controls shadow `nodeName` ([#16769](https://github.com/sveltejs/kit/pull/16769))
  246. - fix: don't replay a preloaded redirect when a later hop of the navigation returns to the route ([#16955](https://github.com/sveltejs/kit/pull/16955))
  247. - fix: prevent path traversal when previewing prerendered pages and data on Windows ([#17293](https://github.com/sveltejs/kit/pull/17293))
  248. - fix: settle a query's pending request in place when its value arrives through `set()` ([#16958](https://github.com/sveltejs/kit/pull/16958))
  249. - fix: render pages over sibling endpoints without GET or HEAD handlers ([#16125](https://github.com/sveltejs/kit/pull/16125))
  250. - fix: exit build workers after completing their tasks while allowing synchronous exit handlers to run ([#17135](https://github.com/sveltejs/kit/pull/17135))
  251. - fix: prevent infinite loops when server-side queries refresh each other in a cycle during the single-flight drain ([#16461](https://github.com/sveltejs/kit/pull/16461))
  252. - fix: populate `version` in service workers ([#16434](https://github.com/sveltejs/kit/pull/16434))
  253. - feat: add field.touched() helper to remote form fields ([#14692](https://github.com/sveltejs/kit/pull/14692))
  254. - fix: respect `paths.relative` for server-side route resolution imports ([#17056](https://github.com/sveltejs/kit/pull/17056))
  255. - fix: read the error status of `App.Error` in the `prerender` and `query.live` remote functions ([#16529](https://github.com/sveltejs/kit/pull/16529))
  256. - fix: resolve remote modules as external during dev prebundling so packages can re-export remote functions ([#16426](https://github.com/sveltejs/kit/pull/16426))
  257. - chore: standardize remote-function and shared form diagnostics ([#17277](https://github.com/sveltejs/kit/pull/17277))
  258. - fix: avoid `Promise.withResolvers` in client remote functions for older browser support ([#16777](https://github.com/sveltejs/kit/pull/16777))
  259. - fix: propagate errors from prerendered remote responses instead of re-running the function ([#16535](https://github.com/sveltejs/kit/pull/16535))
  260. - chore: remove unused helpers ([#16834](https://github.com/sveltejs/kit/pull/16834))
  261. - fix: allow reserved words (e.g. `delete`, `class`) as remote function export names ([#16264](https://github.com/sveltejs/kit/pull/16264))
  262. - fix: reset failed `<svelte:boundary>` on client navigation so a stale `+error.svelte` is torn down ([#16296](https://github.com/sveltejs/kit/pull/16296))
  263. - fix: clear `navigating` when a shallow popstate aborts an in-flight navigation ([#17118](https://github.com/sveltejs/kit/pull/17118))
  264. - fix: expand `[x+nn]` and `[u+nnnn]` escape sequences when resolving a route id to a pathname ([#16570](https://github.com/sveltejs/kit/pull/16570))
  265. - fix: respect user-set `server.cors` and `preview.cors` config instead of overriding them ([#16924](https://github.com/sveltejs/kit/pull/16924))
  266. - fix: respect the status returned from `handleError` on the fallback error page served to error-page sub-requests ([#16528](https://github.com/sveltejs/kit/pull/16528))
  267. - fix: restore scroll position after back-forward cache returns ([#17255](https://github.com/sveltejs/kit/pull/17255))
  268. - fix: warn if there are plugins using `transformIndexHtml` ([#16394](https://github.com/sveltejs/kit/pull/16394))
  269. - fix: refetch route-tracking server data when navigating away from an error page ([#16381](https://github.com/sveltejs/kit/pull/16381))
  270. - fix: allow routes to contain `[` and `]` via the `[x+5b]` and `[x+5d]` escapes ([#16569](https://github.com/sveltejs/kit/pull/16569))
  271. - chore: use `Response.json` instead of the deprecated `json` helper in runtime responses ([#16804](https://github.com/sveltejs/kit/pull/16804))
  272. - fix: recommend safe include and exclude patterns in tsconfig warning ([#17102](https://github.com/sveltejs/kit/pull/17102))
  273. - chore: remove dependency on kleur ([#12548](https://github.com/sveltejs/kit/pull/12548))
  274. - fix: prevent server-side self-fetch fallbacks from following redirects ([#17293](https://github.com/sveltejs/kit/pull/17293))
  275. - fix: serialize `query(...).set(...)`/`query(...).refresh()` values into the rendered HTML when called from within a query during SSR ([#16461](https://github.com/sveltejs/kit/pull/16461))
  276. - chore: configure the server runtime in one place, deprecate `Server` in favour of the `server` object written by `builder.generateServerInstance` ([#17000](https://github.com/sveltejs/kit/pull/17000))
  277. - chore: derive `content-length` from fixed response bodies in `setResponse` ([#16794](https://github.com/sveltejs/kit/pull/16794))
  278. - fix: correctly read zero-length files at the end of a binary form payload ([#16783](https://github.com/sveltejs/kit/pull/16783))
  279. - fix: reject fallback handlers on prerendered endpoints ([#17140](https://github.com/sveltejs/kit/pull/17140))
  280. - fix: don't destroy partial-line app output with the prerender progress line ([#16750](https://github.com/sveltejs/kit/pull/16750))
  281. - chore: remove virtual modules ([#16813](https://github.com/sveltejs/kit/pull/16813))
  282. - fix: surface prerender errors during development ([#16507](https://github.com/sveltejs/kit/pull/16507))
  283. - chore: bump `cookie` to 2.0.1 ([#16745](https://github.com/sveltejs/kit/pull/16745))
  284. - fix: detect `$app/server` and `$app/env/private` client imports when SvelteKit is installed inside the project root ([#16648](https://github.com/sveltejs/kit/pull/16648))
  285. - chore: read `options` from a single module instead of passing it through the server runtime ([#16871](https://github.com/sveltejs/kit/pull/16871))
  286. - fix: wait for the redirect navigation before prerendered remote functions resolve ([#16765](https://github.com/sveltejs/kit/pull/16765))
  287. - fix: sort directory entries when building the route manifest so node indices are deterministic across runtimes (e.g. Bun and Node) ([#16074](https://github.com/sveltejs/kit/pull/16074))
  288. - fix: skip unnecessary `version.json` checks if `updated.current` is already `true` ([#16518](https://github.com/sveltejs/kit/pull/16518))
  289. - fix: allow generation of $app/tsconfig without TypeScript installed ([#16534](https://github.com/sveltejs/kit/pull/16534))
  290. - chore: remove dependency on `set-cookie-parser` ([#15384](https://github.com/sveltejs/kit/pull/15384))
  291. - chore: share the nearest error page walk between client and server ([#16774](https://github.com/sveltejs/kit/pull/16774))
  292. - fix: fall back to the page's form actions when a sibling endpoint has no POST handler ([#16349](https://github.com/sveltejs/kit/pull/16349))
  293. - fix: record client output extensions in `builder.mimeTypes` ([#16908](https://github.com/sveltejs/kit/pull/16908))
  294. - perf: use a `Set` to check element ids when validating fragment links during prerendering ([#16494](https://github.com/sveltejs/kit/pull/16494))
  295. - fix: preserve shared client chunk hashes when the app version changes ([#16324](https://github.com/sveltejs/kit/pull/16324))
  296. - fix: include hoisted packages in Vite's `server.fs.allow` list ([#15998](https://github.com/sveltejs/kit/pull/15998))
  297. - chore: standardize app template diagnostics ([#17250](https://github.com/sveltejs/kit/pull/17250))
  298. - chore: standardize Vite plugin, build, prerender and adapter diagnostics ([#17253](https://github.com/sveltejs/kit/pull/17253))
  299. - chore: standardize client navigation, preload, snapshot and enhancement diagnostics ([#17276](https://github.com/sveltejs/kit/pull/17276))
  300. - chore: standardize configuration, environment and tsconfig diagnostics ([#17251](https://github.com/sveltejs/kit/pull/17251))
  301. - chore: standardize public API, `$app/*` and deprecated module diagnostics ([#17265](https://github.com/sveltejs/kit/pull/17265))
  302. - chore: standardize route discovery, parameter and route export diagnostics ([#17252](https://github.com/sveltejs/kit/pull/17252))
  303. - chore: standardize server request, hook and page diagnostics ([#17275](https://github.com/sveltejs/kit/pull/17275))
  304. - fix: preserve metadata on streamed page responses ([#16935](https://github.com/sveltejs/kit/pull/16935))
  305. - fix: only include `_app/immutable` files in `$app/manifest`'s `immutable` in the service worker ([#16531](https://github.com/sveltejs/kit/pull/16531))
  306. - chore: remove the dead `SSRState.fallback` field and name the server state fork semantics ([#16598](https://github.com/sveltejs/kit/pull/16598))
  307. - fix: atomically replace route metadata during sync ([#17096](https://github.com/sveltejs/kit/pull/17096))
  308. - fix: import resolved peer dependencies as file URLs so project-relative resolution works on Windows ([#16618](https://github.com/sveltejs/kit/pull/16618))
  309. - fix: preserve sourcemap source paths when adapters copy build output ([#17082](https://github.com/sveltejs/kit/pull/17082))
  310. - fix: log errors caught by the Vite dev server handler ([#16550](https://github.com/sveltejs/kit/pull/16550))
  311. - chore: bump `acorn` to 8.18.0 ([#16745](https://github.com/sveltejs/kit/pull/16745))
  312. - fix: resolve `root` per instance of the SvelteKit Vite plugin ([#16513](https://github.com/sveltejs/kit/pull/16513))
  313. - fix: report tsconfig parse errors on Windows ([#17251](https://github.com/sveltejs/kit/pull/17251))
  314. - fix: return root layout server data for error-page data requests to non-existent routes ([#16376](https://github.com/sveltejs/kit/pull/16376))
  315. - fix: prevent prerender crawler from hanging on unterminated unquoted attributes ([#17141](https://github.com/sveltejs/kit/pull/17141))
  316. - fix: prevent `await_reactivity_loss` warning and `state_unsafe_mutation` error when the new version detector runs after an `await` ([#16915](https://github.com/sveltejs/kit/pull/16915))
  317. - fix: redact nested and typed underscore-prefixed remote form fields after invalid submissions ([#17128](https://github.com/sveltejs/kit/pull/17128))
  318. - fix: ignore path casing differences when warning about overridden Vite config on Windows ([#16545](https://github.com/sveltejs/kit/pull/16545))
  319. - fix: return a lightweight 404 instead of rendering the error page for subresource requests ([#16463](https://github.com/sveltejs/kit/pull/16463))
  320. - fix: preserve stripped path prefixes by making trailing-slash redirects relative ([#16431](https://github.com/sveltejs/kit/pull/16431))
  321. - fix: preserve the current URL search parameters when submitting a remote form without JavaScript ([#16373](https://github.com/sveltejs/kit/pull/16373))
  322. - fix: only treat files in node_modules as remote modules when the package has a peer dependency on @sveltejs/kit ([#16492](https://github.com/sveltejs/kit/pull/16492))
  323. - fix: treeshake prerendered remote functions in the right chunks ([#16533](https://github.com/sveltejs/kit/pull/16533))
  324. - fix: correctly serialize Node.js buffers returned from remote functions during SSR ([#17158](https://github.com/sveltejs/kit/pull/17158))
  325. - fix: preserve errors with read-only stack properties ([#17180](https://github.com/sveltejs/kit/pull/17180))
  326. - chore: deduplicate type-stripping logic in `tweak_types` ([#16454](https://github.com/sveltejs/kit/pull/16454))
  327. - fix: avoid infinite loop when building with `--watch` flag ([#16632](https://github.com/sveltejs/kit/pull/16632))
  328. - chore: unify the `walk` and `list_files` filesystem helpers ([#16784](https://github.com/sveltejs/kit/pull/16784))
  329. - fix: error during development if the adapter does not support instrumentation and it exists ([#16548](https://github.com/sveltejs/kit/pull/16548))
  330. - fix: use mouseover+mousemove for preloading to reduce events ([#16325](https://github.com/sveltejs/kit/pull/16325))
  331. - fix: reject invalid binary form file metadata ([#17149](https://github.com/sveltejs/kit/pull/17149))
  332. - fix: error on server-only imports reachable from hooks or service worker files outside the project root ([#16912](https://github.com/sveltejs/kit/pull/16912))
  333. - fix: write generated tsconfig to `node_modules/$app/tsconfig.json` so that tools with simplified tsconfig resolution can find it ([#16589](https://github.com/sveltejs/kit/pull/16589))
  334. - chore: emit env modules to disk ([#16807](https://github.com/sveltejs/kit/pull/16807))
  335. - fix: more informative error message when running a command inside a query or prerender function ([#17293](https://github.com/sveltejs/kit/pull/17293))
  336. - fix: adjust error overload for optional `App.Error` parameters ([#16725](https://github.com/sveltejs/kit/pull/16725))
  337. - fix: prerender and crawl pages whose `content-type` header carries a `charset` parameter ([#16567](https://github.com/sveltejs/kit/pull/16567))
  338. - fix: stream promised `read` results lazily instead of eagerly buffering them ([#16622](https://github.com/sveltejs/kit/pull/16622))
  339. - fix: copy worker files emitted by the server build to the client output directory ([#16929](https://github.com/sveltejs/kit/pull/16929))
  340. - chore: parse page options and remote modules with Vite's `parseSync` instead of `acorn` ([#16947](https://github.com/sveltejs/kit/pull/16947))
  341. - fix: correctly decode `[u+nnnn]` escape sequences above `ffff` ([#16611](https://github.com/sveltejs/kit/pull/16611))
  342. - fix: Reject all pending query promises when a query fails before resolving with a value for the first time ([#16890](https://github.com/sveltejs/kit/pull/16890))

view on githubdetected 2026-10-02 via npm