@sveltejs/kit@3.0.0-next.14
Breaking Changes📦 sveltekitView on GitHub →
⚠ 5 breaking✨ 3 features🐛 13 fixes🔧 29 symbols
Summary
This release introduces breaking changes related to route loading and Node.js version requirements, alongside several new features and bug fixes for improved routing and prerendering capabilities.
⚠️ Breaking Changes
- All load functions/queries are now refreshed when clicking a link to the current URL. This may affect applications that rely on cached data for the current page.
- The `RouteId` type now only includes routes with a `+page` or `+server` file. Routes without these files will be excluded.
- Node.js version 22.17 is now required. Update your Node.js environment to at least this version.
- `preloadCode` now expects a route ID (e.g., `/blog/[slug]`) instead of a pathname. Route IDs are not prefixed with `paths.base`.
- The deprecated `.run()` method has been removed from live queries. Use the alternative methods provided by the library.
Migration Steps
- Update your Node.js environment to version 22.17 or later.
- If you were using the `.run()` method on live queries, update your code to use the alternative methods.
- When using `preloadCode`, change from providing a pathname to providing a route ID (e.g., `/blog/[slug]`).
✨ New Features
- `builder.compress` now returns the list of compressed files.
- The `$app/manifest`'s `routes` now include `page` and `endpoint` booleans, and a `ManifestRoute` type is exported.
- Added `PageRouteId` and `EndpointRouteId` to `$app/types`.
🐛 Bug Fixes
- Generated valid `Path` types for routes with optional or rest parameters, multiple parameters in a single segment, or escape sequences.
- Numeric character references, including those above `ffff`, are now decoded when crawling prerendered pages.
- Object.prototype members are no longer treated as parameter matchers during validation.
- Routes without a page or endpoint are now excluded from `routes` in `$app/manifest`, and directories with no route files are removed from `LayoutParams`.
- Base64 and text decoding helpers have been reused.
- Mime types of prerendered paths are now recorded in the server manifest.
- Each route's resolution module is now generated only once when prerendering.
- Expanded `[x+nn]` and `[u+nnnn]` escape sequences when resolving a route ID to a pathname.
- Routes can now contain `[` and `]` via the `[x+5b]` and `[x+5d]` escapes.
- Generated tsconfig is now written to `node_modules/$app/tsconfig.json` to improve compatibility with tools that have simplified tsconfig resolution.
- Prerendered and crawled pages with a `charset` parameter in their `content-type` header are now handled correctly.
- Promised `read` results are now streamed lazily instead of being eagerly buffered.
- Correctly decoded `[u+nnnn]` escape sequences above `ffff`.
Affected Symbols
load functions/queries`RouteId``preloadCode`live queries`builder.compress``$app/manifest``ManifestRoute``$app/types``PageRouteId``EndpointRouteId``Path` typesprerendered pagesObject.prototypeparameter matchers`LayoutParams`base64 decodingtext decodingserver manifestroute resolution module`[x+nn]` escape sequences`[u+nnnn]` escape sequences`[x+5b]` escape sequences`[x+5d]` escape sequences`SSRState.fallback`file URLsgenerated tsconfig`content-type` header`charset` parameter`read` results