# @sveltejs/kit ## 2.49.4 ### Patch Changes - fix: support instrumentation for `vite preview` ([#15105](https://github.com/sveltejs/kit/pull/15105)) - fix: support for `URLSearchParams.has(name, value)` overload ([#15076](https://github.com/sveltejs/kit/pull/15076)) - fix: put forking behind `experimental.forkPreloads` ([#15135](https://github.com/sveltejs/kit/pull/15135)) ## 2.49.3 ### Patch Changes - fix: avoid false-positive Vite config overridden warning when using Vitest 4 ([#15121](https://github.com/sveltejs/kit/pull/15121)) - fix: add `typescript` as an optional peer dependency ([#15074](https://github.com/sveltejs/kit/pull/15074)) - fix: use hasOwn check when deep-setting object properties ([#15127](https://github.com/sveltejs/kit/pull/15127)) ## 2.49.2 ### Patch Changes - fix: Stop re-loading already-loaded CSS during server-side route resolution ([#15014](https://github.com/sveltejs/kit/pull/15014)) - fix: posixify the instrumentation file import on Windows ([#14993](https://github.com/sveltejs/kit/pull/14993)) - fix: Correctly handle shared memory when decoding binary form data ([#15028](https://github.com/sveltejs/kit/pull/15028)) ## 2.49.1 ### Patch Changes - fix: suppress `state_referenced_locally` warnings in `.svelte-kit/generated/root.svelte` ([#15013](https://github.com/sveltejs/kit/pull/15013)) - fix: TypeError when doing response.clone() in page load ([#15005](https://github.com/sveltejs/kit/pull/15005)) ## 2.49.0 ### Minor Changes - feat: stream file uploads inside `form` remote functions allowing form data to be accessed before large files finish uploading ([#14775](https://github.com/sveltejs/kit/pull/14775)) ## 2.48.8 ### Patch Changes - breaking: `invalid` now must be imported from `@sveltejs/kit` ([#14768](https://github.com/sveltejs/kit/pull/14768)) - breaking: remove `submitter` option from experimental form `validate()` method, always provide default submitter ([#14762](https://github.com/sveltejs/kit/pull/14762)) ## 2.48.7 ### Patch Changes - fix: allow multiple `server-timing` headers ([#14700](https://github.com/sveltejs/kit/pull/14700)) - fix: allow access to root-level issues in schema-less forms ([#14893](https://github.com/sveltejs/kit/pull/14893)) - fix: allow hosting hash-based apps from non-index.html files ([#14825](https://github.com/sveltejs/kit/pull/14825)) ## 2.48.6 ### Patch Changes - fix: clear issues upon passing validation ([#14683](https://github.com/sveltejs/kit/pull/14683)) - fix: don't use fork of unrelated route ([#14947](https://github.com/sveltejs/kit/pull/14947)) - fix: prevent type errors when optional `@opentelemetry/api` dependency isn't installed ([#14949](https://github.com/sveltejs/kit/pull/14949)) - fix: preserve `this` when invoking standard validator ([#14943](https://github.com/sveltejs/kit/pull/14943)) - fix: treat client/universal hooks as entrypoints for illegal server import detection ([#14876](https://github.com/sveltejs/kit/pull/14876)) - fix: correct query `.set` and `.refresh` behavior in commands ([#14877](https://github.com/sveltejs/kit/pull/14877)) - fix: improved the accuracy of the types of the output of `field.as('...')` ([#14908](https://github.com/sveltejs/kit/pull/14908)) ## 2.48.5 ### Patch Changes - fix: wait an extra microtask in dev before calling `$_init_$` ([#14799](https://github.com/sveltejs/kit/pull/14799)) - fix: discard preload fork before creating a new one ([#14865](https://github.com/sveltejs/kit/pull/14865)) - fix: delete `RemoteFormAllIssue`, add `path` to `RemoteFormIssue` ([#14864](https://github.com/sveltejs/kit/pull/14864)) ## 2.48.4 ### Patch Changes - fix: adjust query's promise implementation to properly allow chaining ([#14859](https://github.com/sveltejs/kit/pull/14859)) - fix: make prerender cache work, including in development ([#14860](https://github.com/sveltejs/kit/pull/14860)) ## 2.48.3 ### Patch Changes - fix: include hash when using `resolve` with hash routing enabled ([#14786](https://github.com/sveltejs/kit/pull/14786)) - fix: `afterNavigate` callback not running after hydration when experimental async is enabled ([#14644](https://github.com/sveltejs/kit/pull/14644)) fix: Snapshot `restore` method not called after reload when experimental async is enabled - fix: expose `issue.path` in `.allIssues()` ([#14784](https://github.com/sveltejs/kit/pull/14784)) ## 2.48.2 ### Patch Changes - fix: update DOM before running navigate callbacks ([#14829](https://github.com/sveltejs/kit/pull/14829)) ## 2.48.1 ### Patch Changes - fix: wait for commit promise instead of `settled` ([#14818](https://github.com/sveltejs/kit/pull/14818)) ## 2.48.0 ### Minor Changes - feat: use experimental `fork` API when available ([#14793](https://github.com/sveltejs/kit/pull/14793)) ### Patch Changes - fix: await for `settled` instead of `tick` in navigate ([#14800](https://github.com/sveltejs/kit/pull/14800)) ## 2.47.3 ### Patch Changes - fix: avoid hanging when `error()` is used while streaming promises from a server `load` function ([#14722](https://github.com/sveltejs/kit/pull/14722)) - chore: treeshake load function code if we know it's unused ([#14764](https://github.com/sveltejs/kit/pull/14764)) - fix: `RecursiveFormFields` type for recursive or unknown schemas ([#14734](https://github.com/sveltejs/kit/pull/14734)) - fix: rework internal representation of form value to be `$state` ([#14771](https://github.com/sveltejs/kit/pull/14771)) ## 2.47.2 ### Patch Changes - fix: streamed promise not resolving when another load function returns a fast resolving promise ([#14753](https://github.com/sveltejs/kit/pull/14753)) - chore: allow to run preflight validation only ([#14744](https://github.com/sveltejs/kit/pull/14744)) - fix: update overload to set `invalid` type to schema input ([#14748](https://github.com/sveltejs/kit/pull/14748)) ## 2.47.1 ### Patch Changes - fix: allow `read` to be used at the top-level of remote function files ([#14672](https://github.com/sveltejs/kit/pull/14672)) - fix: more robust remote files generation ([#14682](https://github.com/sveltejs/kit/pull/14682)) ## 2.47.0 ### Minor Changes - feat: add [`signal`](https://developer.mozilla.org/en-US/docs/Web/API/Request/signal) property to request ([#14715](https://github.com/sveltejs/kit/pull/14715)) ### Patch Changes - fix: resolve remote module syntax errors with trailing expressions ([#14728](https://github.com/sveltejs/kit/pull/14728)) ## 2.46.5 ### Patch Changes - fix: ensure `form` remote functions' `fields.set` triggers reactivity ([#14661](https://github.com/sveltejs/kit/pull/14661)) ## 2.46.4 ### Patch Changes - fix: prevent access of Svelte 5-only `untrack` function ([#14658](https://github.com/sveltejs/kit/pull/14658)) ## 2.46.3 ### Patch Changes - fix: merge `field.set(...)` calls ([#14651](https://github.com/sveltejs/kit/pull/14651)) - fix: don't automatically reset form after an enhanced submission ([#14626](https://github.com/sveltejs/kit/pull/14626)) - fix: normalize path strings when updating field values ([#14649](https://github.com/sveltejs/kit/pull/14649)) ## 2.46.2 ### Patch Changes - fix: prevent code execution order issues around SvelteKit's `env` modules ([#14637](https://github.com/sveltejs/kit/pull/14637)) ## 2.46.1 ### Patch Changes - fix: use `$derived` for form fields ([#14621](https://github.com/sveltejs/kit/pull/14621)) - docs: remove `@example` blocks to allow docs to deploy ([#14636](https://github.com/sveltejs/kit/pull/14636)) - fix: require a value with `submit` and `hidden` fields ([#14635](https://github.com/sveltejs/kit/pull/14635)) - fix: delete hydration cache on effect teardown ([#14611](https://github.com/sveltejs/kit/pull/14611)) ## 2.46.0 ### Minor Changes - feat: imperative form validation ([#14624](https://github.com/sveltejs/kit/pull/14624)) ### Patch Changes - fix: wait a tick before collecting form data for validation ([#14631](https://github.com/sveltejs/kit/pull/14631)) - fix: prevent code execution order issues around SvelteKit's `env` modules ([#14632](https://github.com/sveltejs/kit/pull/14632)) ## 2.45.0 ### Minor Changes - feat: `form.for(id)` now implicitly sets id on form object ([#14623](https://github.com/sveltejs/kit/pull/14623)) ### Patch Changes - fix: allow `fetch` in remote function without emitting a warning ([#14610](https://github.com/sveltejs/kit/pull/14610)) ## 2.44.0 ### Minor Changes - feat: expose `event.route` and `event.url` to remote functions ([#14606](https://github.com/sveltejs/kit/pull/14606)) - breaking: update experimental `form` API ([#14481](https://github.com/sveltejs/kit/pull/14481)) ### Patch Changes - fix: don't crawl error responses during prerendering ([#14596](https://github.com/sveltejs/kit/pull/14596)) ## 2.43.8 ### Patch Changes - fix: HMR for `query` ([#14587](https://github.com/sveltejs/kit/pull/14587)) - fix: avoid client modules while traversing dependencies to prevent FOUC during dev ([#14577](https://github.com/sveltejs/kit/pull/14577)) - fix: skip prebundling of .remote.js files ([#14583](https://github.com/sveltejs/kit/pull/14583)) - fix: more robust remote file pattern matching ([#14578](https://github.com/sveltejs/kit/pull/14578)) ## 2.43.7 ### Patch Changes - fix: correctly type the `result` of `form` remote functions that do not accept data ([#14573](https://github.com/sveltejs/kit/pull/14573)) - fix: force remote module chunks to isolate themselves ([#14571](https://github.com/sveltejs/kit/pull/14571)) ## 2.43.6 ### Patch Changes - fix: ensure cache key is consistent between client/server ([#14563](https://github.com/sveltejs/kit/pull/14563)) - fix: keep resolve relative to initial base during prerender ([#14533](https://github.com/sveltejs/kit/pull/14533)) - fix: avoid including `HEAD` twice when an unhandled HTTP method is used in a request to a `+server` handler that has both a `GET` handler and a `HEAD` handler ([#14564](https://github.com/sveltejs/kit/pull/14564)) - fix: smoothscroll to deep link ([#14569](https://github.com/sveltejs/kit/pull/14569)) ## 2.43.5 ### Patch Changes - fix: fall back to non-relative resolution when calling `resolve(...)` outside an event context ([#14532](https://github.com/sveltejs/kit/pull/14532)) ## 2.43.4 ### Patch Changes - fix: Webcontainer AsyncLocalStorage workaround ([#14526](https://github.com/sveltejs/kit/pull/14526)) ## 2.43.3 ### Patch Changes - fix: Webcontainer AsyncLocalStorage workaround ([#14521](https://github.com/sveltejs/kit/pull/14521)) - fix: include the value of form submitters on `form` remote functions ([#14475](https://github.com/sveltejs/kit/pull/14475)) ## 2.43.2 ### Patch Changes - fix: ensure rendering starts off synchronously ([#14517](https://github.com/sveltejs/kit/pull/14517)) - fix: keep serialized remote data alive until navigation ([#14508](https://github.com/sveltejs/kit/pull/14508)) ## 2.43.1 ### Patch Changes - fix: consistently use bare import for internals ([#14506](https://github.com/sveltejs/kit/pull/14506)) ## 2.43.0 ### Minor Changes - feat: experimental async SSR ([#14447](https://github.com/sveltejs/kit/pull/14447)) ### Patch Changes - fix: ensure `__SVELTEKIT_PAYLOAD__.data` is accessed safely ([#14491](https://github.com/sveltejs/kit/pull/14491)) - fix: create separate cache entries for non-exported remote function queries ([#14499](https://github.com/sveltejs/kit/pull/14499)) ## 2.42.2 ### Patch Changes - fix: prevent loops in postbuild analysis phase ([#14450](https://github.com/sveltejs/kit/pull/14450)) - fix: handle nested object fields in form data ([#14469](https://github.com/sveltejs/kit/pull/14469)) - fix: robustify form helper types ([#14463](https://github.com/sveltejs/kit/pull/14463)) - fix: avoid running the `init` hook during builds if there's nothing to prerender ([#14464](https://github.com/sveltejs/kit/pull/14464)) - fix: ensure SSR rendering gets request store context ([#14476](https://github.com/sveltejs/kit/pull/14476)) ## 2.42.1 ### Patch Changes - fix: ensure environment setup is in its own chunk ([#14441](https://github.com/sveltejs/kit/pull/14441)) ## 2.42.0 ### Minor Changes - feat: enhance remote form functions with schema support, `input` and `issues` properties ([#14383](https://github.com/sveltejs/kit/pull/14383)) - breaking: remote form functions get passed a parsed POJO instead of a `FormData` object now ([#14383](https://github.com/sveltejs/kit/pull/14383)) ## 2.41.0 ### Minor Changes - feat: add `%sveltekit.version%` to `app.html` ([#12132](https://github.com/sveltejs/kit/pull/12132)) ### Patch Changes - fix: allow remote functions to return custom types serialized with `transport` hooks ([#14435](https://github.com/sveltejs/kit/pull/14435)) - fix: fulfil `beforeNavigate` `complete` when redirected ([#12896](https://github.com/sveltejs/kit/pull/12896)) ## 2.40.0 ### Minor Changes - feat: include `event` property on popstate/link/form navigation ([#14307](https://github.com/sveltejs/kit/pull/14307)) ### Patch Changes - fix: respect `replaceState`/`keepFocus`/`noScroll` when a navigation results in a redirect ([#14424](https://github.com/sveltejs/kit/pull/14424)) - fix: invalidate preload cache when invalidateAll is true ([#14420](https://github.com/sveltejs/kit/pull/14420)) ## 2.39.1 ### Patch Changes - fix: more robust remote function code transformation ([#14418](https://github.com/sveltejs/kit/pull/14418)) ## 2.39.0 ### Minor Changes - feat: lazy discovery of remote functions ([#14293](https://github.com/sveltejs/kit/pull/14293)) ### Patch Changes - fix: layout load data not serialized on error page ([#14395](https://github.com/sveltejs/kit/pull/14395)) - fix: fail prerendering when remote function fails ([#14365](https://github.com/sveltejs/kit/pull/14365)) - fix: treat handle hook redirect as part of remote function call as json redirect ([#14362](https://github.com/sveltejs/kit/pull/14362)) ## 2.38.1 ### Patch Changes - fix: enable redirects from queries ([#14400](https://github.com/sveltejs/kit/pull/14400)) - fix: remove empty nodes from serialized server load data ([#14404](https://github.com/sveltejs/kit/pull/14404)) - fix: allow commands from within endpoints ([#14343](https://github.com/sveltejs/kit/pull/14343)) ## 2.38.0 ### Minor Changes - feat: add new remote function `query.batch` ([#14272](https://github.com/sveltejs/kit/pull/14272)) ## 2.37.1 ### Patch Changes - fix: serialize server `load` data before passing to universal `load`, to handle mutations and promises ([#14298](https://github.com/sveltejs/kit/pull/14298)) - fix: resolve_route prevent dropping a trailing slash of id ([#14294](https://github.com/sveltejs/kit/pull/14294)) - fix: assign correct status code to form submission error on the client ([#14345](https://github.com/sveltejs/kit/pull/14345)) - fix: un-proxy `form.result` ([#14346](https://github.com/sveltejs/kit/pull/14346)) ## 2.37.0 ### Minor Changes - feat: automatically resolve `query.refresh()` promises on the server ([#14332](https://github.com/sveltejs/kit/pull/14332)) - feat: allow query.set() to be called on the server ([#14304](https://github.com/sveltejs/kit/pull/14304)) ### Patch Changes - fix: disable CSRF checks in dev ([#14335](https://github.com/sveltejs/kit/pull/14335)) - fix: allow redirects to external URLs from within form functions ([#14329](https://github.com/sveltejs/kit/pull/14329)) - fix: add type definitions for `query.set()` method to override the value of a remote query function ([#14303](https://github.com/sveltejs/kit/pull/14303)) - fix: ensure uniqueness of `form.for(...)` across form functions ([#14327](https://github.com/sveltejs/kit/pull/14327)) ## 2.36.3 ### Patch Changes - fix: bump devalue ([#14323](https://github.com/sveltejs/kit/pull/14323)) - chore: consolidate dev checks to use `esm-env` instead of a `__SVELTEKIT_DEV__` global ([#14308](https://github.com/sveltejs/kit/pull/14308)) - fix: reset form inputs by default when using remote form functions ([#14322](https://github.com/sveltejs/kit/pull/14322)) ## 2.36.2 ### Patch Changes - chore: make config deprecation warnings more visible ([#14281](https://github.com/sveltejs/kit/pull/14281)) - chore: remove redundant Not Found error message ([#14289](https://github.com/sveltejs/kit/pull/14289)) - chore: deprecate `csrf.checkOrigin` in favour of `csrf.trustedOrigins: ['*']` ([#14281](https://github.com/sveltejs/kit/pull/14281)) ## 2.36.1 ### Patch Changes - fix: ensure importing from `$app/navigation` works in test files ([#14195](https://github.com/sveltejs/kit/pull/14195)) ## 2.36.0 ### Minor Changes - feat: add `csrf.trustedOrigins` configuration ([#14021](https://github.com/sveltejs/kit/pull/14021)) ### Patch Changes - fix: correctly decode custom types streamed from a server load function ([#14261](https://github.com/sveltejs/kit/pull/14261)) - fix: add trailing slash pathname when generating typed routes ([#14065](https://github.com/sveltejs/kit/pull/14065)) ## 2.35.0 ### Minor Changes - feat: better server-side error logging ([#13990](https://github.com/sveltejs/kit/pull/13990)) ### Patch Changes - fix: ensure static error page is loaded correctly for custom user errors ([#13952](https://github.com/sveltejs/kit/pull/13952)) ## 2.34.1 ### Patch Changes - fix: support multiple cookies with the same name across different paths and domains ([`b2c5d02`](https://github.com/sveltejs/kit/commit/b2c5d02994a6d83275d6fb3645e6f9a2518c8d20)) - fix: add link header when preloading font ([#14200](https://github.com/sveltejs/kit/pull/14200)) - fix: `cookies.get(...)` returns `undefined` for a just-deleted cookie ([`b2c5d02`](https://github.com/sveltejs/kit/commit/b2c5d02994a6d83275d6fb3645e6f9a2518c8d20)) - fix: load env before prerender ([`c5f7139`](https://github.com/sveltejs/kit/commit/c5f713951e41af2000f21929d42eb9d30c9d3a5c)) ## 2.34.0 ### Minor Changes - feat: allow dynamic `env` access during prerender ([#14243](https://github.com/sveltejs/kit/pull/14243)) ### Patch Changes - fix: clone `fetch` responses so that headers are mutable ([#13942](https://github.com/sveltejs/kit/pull/13942)) - fix: serialize server `load` data before passing to universal `load`, to handle mutations ([#14268](https://github.com/sveltejs/kit/pull/14268)) - fix: allow `asset(...)` to be used with imported assets ([#14270](https://github.com/sveltejs/kit/pull/14270)) ## 2.33.1 ### Patch Changes - fix: make paths in .css assets relative ([#14262](https://github.com/sveltejs/kit/pull/14262)) - fix: avoid copying SSR stylesheets to client assets ([#13069](https://github.com/sveltejs/kit/pull/13069)) ## 2.33.0 ### Minor Changes - feat: configure error reporting when routes marked as prerendable were not prerendered ([#11702](https://github.com/sveltejs/kit/pull/11702)) ### Patch Changes - fix: use correct flag for server tracing ([#14250](https://github.com/sveltejs/kit/pull/14250)) - fix: correct type names for new `handleUnseenRoutes` option ([#14254](https://github.com/sveltejs/kit/pull/14254)) - chore: Better docs and error message for missing `@opentelemetry/api` dependency ([#14250](https://github.com/sveltejs/kit/pull/14250)) ## 2.32.0 ### Minor Changes - feat: inline load fetch `response.body` stream data as base64 in page ([#11473](https://github.com/sveltejs/kit/pull/11473)) ### Patch Changes - fix: better error when `.remote.ts` files are used without the `experimental.remoteFunctions` flag ([#14225](https://github.com/sveltejs/kit/pull/14225)) ## 2.31.1 ### Patch Changes - fix: pass options to resolve in resolveId hook ([#14223](https://github.com/sveltejs/kit/pull/14223)) ## 2.31.0 ### Minor Changes - feat: OpenTelemetry tracing for `handle`, `sequence`, form actions, remote functions, and `load` functions running on the server ([#13899](https://github.com/sveltejs/kit/pull/13899)) - feat: add `instrumentation.server.ts` for tracing and observability setup ([#13899](https://github.com/sveltejs/kit/pull/13899)) ## 2.30.1 ### Patch Changes - chore: generate `$app/types` in a more Typescript-friendly way ([#14207](https://github.com/sveltejs/kit/pull/14207)) ## 2.30.0 ### Minor Changes - feat: allow to specify options for the service worker in `svelte.config.js` ([#13578](https://github.com/sveltejs/kit/pull/13578)) ### Patch Changes - fix: ensure buttonProps.enhance works on buttons with nested text ([#14199](https://github.com/sveltejs/kit/pull/14199)) - fix: pass validation issues specifically to avoid non-enumerable spreading error ([#14197](https://github.com/sveltejs/kit/pull/14197)) ## 2.29.1 ### Patch Changes - chore: allow remote functions in all of the src directory ([#14198](https://github.com/sveltejs/kit/pull/14198)) ## 2.29.0 ### Minor Changes - feat: add a `kit.files.src` option ([#14152](https://github.com/sveltejs/kit/pull/14152)) ### Patch Changes - fix: don't treat `$lib/server.ts` or `$lib/server_whatever.ts` as server-only modules, only `$lib/server/**` ([#14191](https://github.com/sveltejs/kit/pull/14191)) - fix: make illegal server-only import errors actually useful ([#14155](https://github.com/sveltejs/kit/pull/14155)) - chore: deprecate `config.kit.files` options ([#14152](https://github.com/sveltejs/kit/pull/14152)) - fix: avoid warning if page options in a Svelte file belongs to a comment ([#14180](https://github.com/sveltejs/kit/pull/14180)) ## 2.28.0 ### Minor Changes - feat: add `RouteId` and `RouteParams` to NavigationTarget interface ([#14167](https://github.com/sveltejs/kit/pull/14167)) - feat: add `pending` property to forms and commands ([#14137](https://github.com/sveltejs/kit/pull/14137)) ### Patch Changes - fix: `fetch` imported assets during prerender ([#12201](https://github.com/sveltejs/kit/pull/12201)) - chore: refactor redundant base64 encoding/decoding functions ([#14160](https://github.com/sveltejs/kit/pull/14160)) - fix: use correct cache result when fetching same url multiple times ([#12355](https://github.com/sveltejs/kit/pull/12355)) - fix: don't refresh queries automatically when running commands ([#14170](https://github.com/sveltejs/kit/pull/14170)) - fix: avoid writing remote function bundle to disk when treeshaking prerendered queries ([#14161](https://github.com/sveltejs/kit/pull/14161)) ## 2.27.3 ### Patch Changes - chore: add `.git` to the end of `package.json` repository url ([#14134](https://github.com/sveltejs/kit/pull/14134)) ## 2.27.2 ### Patch Changes - fix: ensure `form()` remote functions work when the app is configured to a single output ([#14127](https://github.com/sveltejs/kit/pull/14127)) - fix: use the configured base path when calling remote functions from the client ([#14106](https://github.com/sveltejs/kit/pull/14106)) ## 2.27.1 ### Patch Changes - fix: correctly type remote function input parameters from a schema ([#14098](https://github.com/sveltejs/kit/pull/14098)) - fix: match URL-encoded newlines in rest route params ([#14102](https://github.com/sveltejs/kit/pull/14102)) - fix: correctly spell server-side in error messages ([#14101](https://github.com/sveltejs/kit/pull/14101)) ## 2.27.0 ### Minor Changes - feat: remote functions ([#13986](https://github.com/sveltejs/kit/pull/13986)) ## 2.26.1 ### Patch Changes - fix: posixify internal app server path ([#14049](https://github.com/sveltejs/kit/pull/14049)) - fix: ignore route groups when generating typed routes ([#14050](https://github.com/sveltejs/kit/pull/14050)) ## 2.26.0 ### Minor Changes - feat: better type-safety for `page.route.id`, `page.params`, `page.url.pathname` and various other places ([#13864](https://github.com/sveltejs/kit/pull/13864)) - feat: `resolve(...)` and `asset(...)` helpers for resolving paths ([#13864](https://github.com/sveltejs/kit/pull/13864)) - feat: Add `$app/types` module with `Asset`, `RouteId`, `Pathname`, `ResolvedPathname` `RouteParams` and `LayoutParams` ([#13864](https://github.com/sveltejs/kit/pull/13864)) ## 2.25.2 ### Patch Changes - fix: correctly set URL when navigating during an ongoing navigation ([#14004](https://github.com/sveltejs/kit/pull/14004)) ## 2.25.1 ### Patch Changes - fix: add missing params property ([#14012](https://github.com/sveltejs/kit/pull/14012)) ## 2.25.0 ### Minor Changes - feat: support asynchronous `read` implementations from adapters ([#13859](https://github.com/sveltejs/kit/pull/13859)) ### Patch Changes - fix: log when no Svelte config file has been found to avoid confusion ([#14001](https://github.com/sveltejs/kit/pull/14001)) ## 2.24.0 ### Minor Changes - feat: typed `params` prop for page/layout components ([#13999](https://github.com/sveltejs/kit/pull/13999)) ### Patch Changes - fix: treeshake internal `storage.get` helper ([#13998](https://github.com/sveltejs/kit/pull/13998)) ## 2.23.0 ### Minor Changes - feat: support svelte.config.ts ([#13935](https://github.com/sveltejs/kit/pull/13935)) > **NOTE** > > Your runtime has to support importing TypeScript files for `svelte.config.ts` to work. > In Node.js, the feature is supported with the `--experimental-strip-types` flag starting in Node 22.6.0 and supported without a flag starting in Node 23.6.0. ### Patch Changes - fix: extend `vite-plugin-svelte`'s `Config` type instead of duplicating it ([#13982](https://github.com/sveltejs/kit/pull/13982)) - fix: regression with `rolldown-vite` not bundling a single JS file for single and inline apps ([#13941](https://github.com/sveltejs/kit/pull/13941)) ## 2.22.5 ### Patch Changes - fix: re-add `@sveltejs/kit` to `optimizeDeps.exclude` ([#13983](https://github.com/sveltejs/kit/pull/13983)) ## 2.22.4 ### Patch Changes - fix: force `$app/*` modules to be bundled ([#13977](https://github.com/sveltejs/kit/pull/13977)) ## 2.22.3 ### Patch Changes - fix: don't bundle `@sveltejs/kit` ([#13971](https://github.com/sveltejs/kit/pull/13971)) ## 2.22.2 ### Patch Changes - fix: use fallback if `untrack` doesn't exist in svelte package ([#13933](https://github.com/sveltejs/kit/pull/13933)) - fix: warning for chrome devtools requests now suggests sv instead of vite plugin ([#13905](https://github.com/sveltejs/kit/pull/13905)) ## 2.22.1 ### Patch Changes - fix: prevent infinite loop when calling `pushState`/`replaceState` in `$effect` ([#13914](https://github.com/sveltejs/kit/pull/13914)) - chore: use `manualChunks` to bundle single and inline apps with Rolldown ([#13915](https://github.com/sveltejs/kit/pull/13915)) ## 2.22.0 ### Minor Changes - feat: add support for Vite 7 and Rolldown. See https://vite.dev/guide/rolldown.html#how-to-try-rolldown for details about how to try experimental Rolldown support. You will also need `vite-plugin-svelte@^6.0.0-next.0` and `vite@^7.0.0-beta.0`. Compilation should be faster using Rolldown, but with larger bundle sizes until additional tree-shaking is implemented in Rolldown. See [#13738](https://github.com/sveltejs/kit/issues/13738) for ongoing work. ([#13747](https://github.com/sveltejs/kit/pull/13747)) ## 2.21.5 ### Patch Changes - fix: correctly set the sequential focus navigation point when using hash routing ([#13884](https://github.com/sveltejs/kit/pull/13884)) - fix: regression when resetting focus and the URL hash contains selector combinators or separators ([#13884](https://github.com/sveltejs/kit/pull/13884)) ## 2.21.4 ### Patch Changes - fix: correctly access transport decoders on the client when building for a single or inline output app ([#13871](https://github.com/sveltejs/kit/pull/13871)) ## 2.21.3 ### Patch Changes - fix: correctly invalidate static analysis cache of child nodes when modifying a universal `+layout` file during dev ([#13793](https://github.com/sveltejs/kit/pull/13793)) - fix: correctly set sequential focus navigation starting point after navigation ([#10856](https://github.com/sveltejs/kit/pull/10856)) - fix: suppress console spam for chrome devtools requests ([#13830](https://github.com/sveltejs/kit/pull/13830)) - fix: avoid externalising packages that depend on `@sveltejs/kit` so that libraries can also use `redirect` and `error` helpers ([#13843](https://github.com/sveltejs/kit/pull/13843)) - fix: correctly run `deserialize` on the server ([#13686](https://github.com/sveltejs/kit/pull/13686)) - fix: correctly inline stylesheets of components dynamically imported in a universal load function if they are below the configured inlineStyleThreshold ([#13723](https://github.com/sveltejs/kit/pull/13723)) ## 2.21.2 ### Patch Changes - fix: omit stack when logging 404 errors ([#13848](https://github.com/sveltejs/kit/pull/13848)) ## 2.21.1 ### Patch Changes - chore: clarify which functions `handleFetch` affects ([#13788](https://github.com/sveltejs/kit/pull/13788)) - fix: ensure `$env` and `$app/environment` are correctly set while analysing server nodes ([#13790](https://github.com/sveltejs/kit/pull/13790)) ## 2.21.0 ### Minor Changes - feat: allow running client-side code at the top-level of universal pages/layouts when SSR is disabled and page options are only boolean or string literals ([#13684](https://github.com/sveltejs/kit/pull/13684)) ### Patch Changes - chore: remove `import-meta-resolve` dependency ([#13629](https://github.com/sveltejs/kit/pull/13629)) - fix: remove component code from server nodes that are never used for SSR ([#13684](https://github.com/sveltejs/kit/pull/13684)) ## 2.20.8 ### Patch Changes - fix: ensure that `ssr` and `csr` page options apply to error pages rendered as a result of a load function error on the server ([#13695](https://github.com/sveltejs/kit/pull/13695)) ## 2.20.7 ### Patch Changes - fix: regression when serializing server data ([#13709](https://github.com/sveltejs/kit/pull/13709)) ## 2.20.6 ### Patch Changes - fix: escape names of tracked search parameters ([`d3300c6a67908590266c363dba7b0835d9a194cf`](https://github.com/sveltejs/kit/commit/d3300c6a67908590266c363dba7b0835d9a194cf)) ## 2.20.5 ### Patch Changes - allow `HandleServerError` hook to access `getRequestEvent` ([#13666](https://github.com/sveltejs/kit/pull/13666)) - fix: prevent Rollup warnings for undefined hooks ([#13687](https://github.com/sveltejs/kit/pull/13687)) ## 2.20.4 ### Patch Changes - chore: remove internal class-replacement hack that isn't needed anymore ([#13664](https://github.com/sveltejs/kit/pull/13664)) ## 2.20.3 ### Patch Changes - fix: only call `afterNavigate` once on app start when SSR is disabled ([#13593](https://github.com/sveltejs/kit/pull/13593)) ## 2.20.2 ### Patch Changes - fix: allow non-prerendered API endpoint calls during reroute when prerendering ([#13616](https://github.com/sveltejs/kit/pull/13616)) ## 2.20.1 ### Patch Changes - fix: avoid using top-level await ([#13607](https://github.com/sveltejs/kit/pull/13607)) ## 2.20.0 ### Minor Changes - feat: add `getRequestEvent` to `$app/server` ([#13582](https://github.com/sveltejs/kit/pull/13582)) ## 2.19.2 ### Patch Changes - fix: lazily load CSS for dynamically imported components ([#13564](https://github.com/sveltejs/kit/pull/13564)) ## 2.19.1 ### Patch Changes - fix: allow reroute to point to prerendered route ([#13575](https://github.com/sveltejs/kit/pull/13575)) ## 2.19.0 ### Minor Changes - feat: provide `fetch` to `reroute` ([#13549](https://github.com/sveltejs/kit/pull/13549)) ### Patch Changes - chore: cache reroute results ([#13548](https://github.com/sveltejs/kit/pull/13548)) ## 2.18.0 ### Minor Changes - feat: allow async `reroute` ([#13520](https://github.com/sveltejs/kit/pull/13520)) - feat: provide `normalizeUrl` helper ([#13539](https://github.com/sveltejs/kit/pull/13539)) ### Patch Changes - fix: correct navigation history with hash router and ensure load functions are rerun on user changes to URL hash ([#13492](https://github.com/sveltejs/kit/pull/13492)) - fix: include universal load assets as server assets ([#13531](https://github.com/sveltejs/kit/pull/13531)) - fix: Include root layout and error nodes even when apps have only prerendered pages ([#13522](https://github.com/sveltejs/kit/pull/13522)) - fix: correctly preload data on `mousedown`/`touchstart` if code was preloaded on hover ([#13530](https://github.com/sveltejs/kit/pull/13530)) ## 2.17.3 ### Patch Changes - fix: avoid simulated CORS errors with non-HTTP URLs ([#13493](https://github.com/sveltejs/kit/pull/13493)) - fix: correctly preload links on `mousedown`/`touchstart` ([#13486](https://github.com/sveltejs/kit/pull/13486)) - fix: load CSS when using server-side route resolution ([#13498](https://github.com/sveltejs/kit/pull/13498)) - fix: correctly find shared entry-point CSS files during inlining ([#13431](https://github.com/sveltejs/kit/pull/13431)) ## 2.17.2 ### Patch Changes - fix: add promise return type to the `enhance` action callback ([#13420](https://github.com/sveltejs/kit/pull/13420)) - fix: change server-side route resolution endpoint ([#13461](https://github.com/sveltejs/kit/pull/13461)) ## 2.17.1 ### Patch Changes - fix: make route resolution imports root-relative if `paths.relative` option is `false` ([#13412](https://github.com/sveltejs/kit/pull/13412)) ## 2.17.0 ### Minor Changes - feat: validate values for `cache-control` and `content-type` headers in dev mode ([#13114](https://github.com/sveltejs/kit/pull/13114)) - feat: support server-side route resolution ([#13379](https://github.com/sveltejs/kit/pull/13379)) ### Patch Changes - chore: don't error during development when using `use:enhance` with `+server` as some third party libraries make it possible to POST forms to it ([#13397](https://github.com/sveltejs/kit/pull/13397)) - fix: skip hooks for server fetch to prerendered routes ([#13377](https://github.com/sveltejs/kit/pull/13377)) - fix: ignore non-entry-point CSS files during inlining ([#13395](https://github.com/sveltejs/kit/pull/13395)) - fix: default server fetch to use prerendered paths ([#13377](https://github.com/sveltejs/kit/pull/13377)) ## 2.16.1 ### Patch Changes - fix: avoid overwriting headers for sub-requests made while loading the error page ([#13341](https://github.com/sveltejs/kit/pull/13341)) - fix: correctly resolve index file entrypoints such as `src/service-worker/index.js` ([#13354](https://github.com/sveltejs/kit/pull/13354)) - fix: correctly handle relative anchors when using the hash router ([#13356](https://github.com/sveltejs/kit/pull/13356)) ## 2.16.0 ### Minor Changes - feat: add ability to invalidate a custom identifier on `goto()` ([#13256](https://github.com/sveltejs/kit/pull/13256)) - feat: remove the `postinstall` script to support pnpm 10 ([#13304](https://github.com/sveltejs/kit/pull/13304)) NOTE: users should add `"prepare": "svelte-kit sync`" to their `package.json` in order to avoid the following warning upon first running Vite: ``` ▲ [WARNING] Cannot find base config file "./.svelte-kit/tsconfig.json" [tsconfig.json] tsconfig.json:2:12: 2 │ "extends": "./.svelte-kit/tsconfig.json", ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` - feat: provide `PageProps` and `LayoutProps` types ([#13308](https://github.com/sveltejs/kit/pull/13308)) ### Patch Changes - perf: shorten chunk file names ([#13003](https://github.com/sveltejs/kit/pull/13003)) - fix: strip internal data before passing URL to `reroute` ([#13092](https://github.com/sveltejs/kit/pull/13092)) - fix: support absolute URLs and reroutes with `data-sveltekit-preload-code="viewport"` ([#12217](https://github.com/sveltejs/kit/pull/12217)) - fix: use current `window.fetch` for server load fetch requests ([#13315](https://github.com/sveltejs/kit/pull/13315)) - fix: resolve symlinks when handling routes ([#12740](https://github.com/sveltejs/kit/pull/12740)) - fix: prevent infinite reload when using the hash router and previewing `/index.html` ([#13296](https://github.com/sveltejs/kit/pull/13296)) - fix: service worker base path in dev mode ([#12577](https://github.com/sveltejs/kit/pull/12577)) - chore: error during development when using `use:enhance` with `+server` ([#13197](https://github.com/sveltejs/kit/pull/13197)) - chore: add most common status codes to `redirect()` JS documentation ([#13301](https://github.com/sveltejs/kit/pull/13301)) - fix: correctly link to assets inlined by the `inlineStyleThreshold` option ([#13068](https://github.com/sveltejs/kit/pull/13068)) - fix: fall back to importing dynamic dependencies relative to SvelteKit package ([#12532](https://github.com/sveltejs/kit/pull/12532)) - fix: use arrow function types over bound funcs ([#12955](https://github.com/sveltejs/kit/pull/12955)) - fix: correctly navigate when hash router is enabled and the browser encodes extra hashes ([#13321](https://github.com/sveltejs/kit/pull/13321)) ## 2.15.3 ### Patch Changes - fix: fix race-condition when not using SSR when pressing back before initial load ([#12925](https://github.com/sveltejs/kit/pull/12925)) - fix: remove ":$" from virtual module ids to allow dev server to work with proxies ([#12157](https://github.com/sveltejs/kit/pull/12157)) - fix: upgrade esm-env to remove warning when NODE_ENV is not set ([#13291](https://github.com/sveltejs/kit/pull/13291)) - fix: handle `Redirect` thrown from root layout load function when client-side navigating to a non-existent page ([#12005](https://github.com/sveltejs/kit/pull/12005)) - fix: make param matchers generated type import end with `.js` ([#13286](https://github.com/sveltejs/kit/pull/13286)) ## 2.15.2 ### Patch Changes - fix: correctly notify page store subscribers ([#13205](https://github.com/sveltejs/kit/pull/13205)) - fix: prerender data when there is no server load but the `trailingSlash` option is set from the server ([#13262](https://github.com/sveltejs/kit/pull/13262)) - fix: correctly remove navigation callbacks when returning function in onNavigate ([#13241](https://github.com/sveltejs/kit/pull/13241)) ## 2.15.1 ### Patch Changes - fix: add CSP hashes/nonces to inline styles when using `bundleStrategy: 'inline'` ([#13232](https://github.com/sveltejs/kit/pull/13232)) - fix: silence dev/prod warning during sync ([#13244](https://github.com/sveltejs/kit/pull/13244)) ## 2.15.0 ### Minor Changes - feat: add `bundleStrategy: 'inline'` option ([#13193](https://github.com/sveltejs/kit/pull/13193)) ## 2.14.1 ### Patch Changes - fix: do not mutate URL during reroute logic ([#13222](https://github.com/sveltejs/kit/pull/13222)) ## 2.14.0 ### Minor Changes - feat: add hash-based routing option ([#13191](https://github.com/sveltejs/kit/pull/13191)) ### Patch Changes - fix: create new URL when calling `goto(...)`, to handle case where URL is mutated ([#13196](https://github.com/sveltejs/kit/pull/13196)) ## 2.13.0 ### Minor Changes - feat: add `bundleStrategy: 'split' | 'single'` option ([#13173](https://github.com/sveltejs/kit/pull/13173)) ## 2.12.2 ### Patch Changes - fix: correctly resolve no hooks file when a similarly named directory exists ([#13188](https://github.com/sveltejs/kit/pull/13188)) - fix: correctly resolve `$app/state` on the server with Vite 5 ([#13192](https://github.com/sveltejs/kit/pull/13192)) ## 2.12.1 ### Patch Changes - fix: replace `navigating.current.` with `navigating.` ([#13174](https://github.com/sveltejs/kit/pull/13174)) ## 2.12.0 ### Minor Changes - feat: add `$app/state` module ([#13140](https://github.com/sveltejs/kit/pull/13140)) ### Patch Changes - chore: specify the route ID in the error message during development when making a form action request to a route without form actions ([#13167](https://github.com/sveltejs/kit/pull/13167)) ## 2.11.1 ### Patch Changes - fix: adhere to Vite `build.minify` setting when building the service worker ([#13143](https://github.com/sveltejs/kit/pull/13143)) ## 2.11.0 ### Minor Changes - feat: transport custom types across the server/client boundary ([#13149](https://github.com/sveltejs/kit/pull/13149)) ### Patch Changes - fix: correctly resolve hooks file when a similarly named directory exists ([#13144](https://github.com/sveltejs/kit/pull/13144)) ## 2.10.1 ### Patch Changes - fix: export `init` hook from `get_hooks` ([#13136](https://github.com/sveltejs/kit/pull/13136)) ## 2.10.0 ### Minor Changes - feat: server and client `init` hook ([#13103](https://github.com/sveltejs/kit/pull/13103)) ### Patch Changes - fix: prevent hooks exported from `hooks.js` from overwriting hooks from `hooks.server.js` ([#13104](https://github.com/sveltejs/kit/pull/13104)) ## 2.9.1 ### Patch Changes - fix: correctly match route groups preceding optional parameters ([#13099](https://github.com/sveltejs/kit/pull/13099)) ## 2.9.0 ### Minor Changes - feat: Vite 6 support ([#12270](https://github.com/sveltejs/kit/pull/12270)) ### Patch Changes - fix: transform link[rel='shortcut icon'] and link[rel='apple-touch-icon'] to be absolute to avoid console error when navigating ([#13077](https://github.com/sveltejs/kit/pull/13077)) ## 2.8.5 ### Patch Changes - fix: don't hydrate when falling back to error page ([#13056](https://github.com/sveltejs/kit/pull/13056)) ## 2.8.4 ### Patch Changes - fix: update inline css url generation for FOUC prevention in dev ([#13007](https://github.com/sveltejs/kit/pull/13007)) ## 2.8.3 ### Patch Changes - fix: ensure error messages are escaped ([#13050](https://github.com/sveltejs/kit/pull/13050)) - fix: escape values included in dev 404 page ([#13039](https://github.com/sveltejs/kit/pull/13039)) ## 2.8.2 ### Patch Changes - fix: prevent duplicate fetch request when using Request with load function's fetch ([#13023](https://github.com/sveltejs/kit/pull/13023)) - fix: do not override default cookie decoder to allow users to override the `cookie` library version ([#13037](https://github.com/sveltejs/kit/pull/13037)) ## 2.8.1 ### Patch Changes - fix: only add nonce to `script-src-elem`, `style-src-attr` and `style-src-elem` CSP directives when `unsafe-inline` is not present ([#11613](https://github.com/sveltejs/kit/pull/11613)) - fix: support HTTP/2 in dev and production. Revert the changes from [#12907](https://github.com/sveltejs/kit/pull/12907) to downgrade HTTP/2 to TLS as now being unnecessary ([#12989](https://github.com/sveltejs/kit/pull/12989)) ## 2.8.0 ### Minor Changes - feat: add helper to identify `ActionFailure` objects ([#12878](https://github.com/sveltejs/kit/pull/12878)) ## 2.7.7 ### Patch Changes - fix: update link in JSDoc ([#12963](https://github.com/sveltejs/kit/pull/12963)) ## 2.7.6 ### Patch Changes - fix: update broken links in JSDoc ([#12960](https://github.com/sveltejs/kit/pull/12960)) ## 2.7.5 ### Patch Changes - fix: warn on invalid cookie name characters ([#12806](https://github.com/sveltejs/kit/pull/12806)) - fix: when using `@vitejs/plugin-basic-ssl`, set a no-op proxy config to downgrade from HTTP/2 to TLS since `undici` does not yet enable HTTP/2 by default ([#12907](https://github.com/sveltejs/kit/pull/12907)) ## 2.7.4 ### Patch Changes - fix: ensure element is focused after subsequent clicks of the same hash link ([#12866](https://github.com/sveltejs/kit/pull/12866)) - fix: avoid preload if event default was prevented for `touchstart` and `mousedown` events ([#12887](https://github.com/sveltejs/kit/pull/12887)) - fix: avoid reloading behaviour for hash links with data-sveltekit-reload if the hash is on the same page ([#12866](https://github.com/sveltejs/kit/pull/12866)) ## 2.7.3 ### Patch Changes - fix: include importer in illegal import error message ([#12820](https://github.com/sveltejs/kit/pull/12820)) - fix: don't try reading assets directly that aren't present ([#12876](https://github.com/sveltejs/kit/pull/12876)) - fix: decode non-latin characters when previewing prerendered pages ([#12874](https://github.com/sveltejs/kit/pull/12874)) - fix: better error message when a `Result` is returned from a form action ([#12829](https://github.com/sveltejs/kit/pull/12829)) - docs: update URLs for new svelte.dev site ([#12857](https://github.com/sveltejs/kit/pull/12857)) ## 2.7.2 ### Patch Changes - fix: use absolute links in JSDoc comments ([#12718](https://github.com/sveltejs/kit/pull/12718)) ## 2.7.1 ### Patch Changes - chore: upgrade to sirv 3.0 ([#12796](https://github.com/sveltejs/kit/pull/12796)) - fix: warn when form action responses are lost because SSR is off ([#12063](https://github.com/sveltejs/kit/pull/12063)) ## 2.7.0 ### Minor Changes - feat: update service worker when new version is detected ([#12448](https://github.com/sveltejs/kit/pull/12448)) ### Patch Changes - fix: correctly handle relative paths when fetching assets on the server ([#12113](https://github.com/sveltejs/kit/pull/12113)) - fix: decode non ASCII anchor hashes when scrolling into view ([#12699](https://github.com/sveltejs/kit/pull/12699)) - fix: page response missing CSP and Link headers when return promise in `load` ([#12418](https://github.com/sveltejs/kit/pull/12418)) ## 2.6.4 ### Patch Changes - fix: only preload links that have a different URL than the current page ([#12773](https://github.com/sveltejs/kit/pull/12773)) - fix: revert change to replace version in generateBundle ([#12779](https://github.com/sveltejs/kit/pull/12779)) - fix: catch stack trace fixing errors thrown in web containers ([#12775](https://github.com/sveltejs/kit/pull/12775)) - fix: use absolute links in JSDoc comments ([#12772](https://github.com/sveltejs/kit/pull/12772)) ## 2.6.3 ### Patch Changes - fix: ensure a changing `version` doesn't affect the hashes for chunks without any actual code changes ([#12700](https://github.com/sveltejs/kit/pull/12700)) - fix: prevent crash when logging URL search params in a server load function ([#12763](https://github.com/sveltejs/kit/pull/12763)) - chore: revert update dependency cookie to ^0.7.0 ([#12767](https://github.com/sveltejs/kit/pull/12767)) ## 2.6.2 ### Patch Changes - chore(deps): update dependency cookie to ^0.7.0 ([#12746](https://github.com/sveltejs/kit/pull/12746)) ## 2.6.1 ### Patch Changes - fix: better error message when calling push/replaceState before router is initialized ([#11968](https://github.com/sveltejs/kit/pull/11968)) ## 2.6.0 ### Minor Changes - feat: support typed arrays in `load` functions ([#12716](https://github.com/sveltejs/kit/pull/12716)) ### Patch Changes - fix: open a new tab for `
` and `