Conversation
🦋 Changeset detectedLatest commit: 699b9f6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This was referenced Mar 19, 2026
Member
teemingc
commented
Jun 4, 2026
teemingc
commented
Jun 4, 2026
Member
|
Finally it looks like we have a clean run and can go back to opening PRs against this branch. Will see how much work is involved in fixing the conflicts on #15574 |
regression test + fix. Pretty easy, just make sure to clone dates appropriately closes #16165 --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>
Module service workers are baseline now, so we can stop registering classic workers in production. This also lets us delete the `env.script.js` workaround entirely and just import `env.js` directly. closes #16158
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to version-3, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `version-3` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `version-3`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @sveltejs/adapter-netlify@7.0.0-next.1 ### Major Changes - breaking: require `vite@^8.0.12`, the first Vite 8 release bundling stable `rolldown` 1.0.0 ([#16134](#16134)) ### Patch Changes - Updated dependencies [[`a9629f1`](a9629f1), [`53d37f9`](53d37f9), [`dba6239`](dba6239), [`ab12cb6`](ab12cb6), [`f0eab52`](f0eab52), [`cd884c1`](cd884c1), [`9ed38a8`](9ed38a8), [`53aa049`](53aa049), [`984e57a`](984e57a), [`51785be`](51785be), [`4f6bcbb`](4f6bcbb), [`78e7137`](78e7137)]: - @sveltejs/kit@3.0.0-next.5 ## @sveltejs/adapter-node@6.0.0-next.1 ### Major Changes - breaking: require `vite@^8.0.12`, the first Vite 8 release bundling stable `rolldown` 1.0.0 ([#16134](#16134)) ### Patch Changes - Updated dependencies [[`a9629f1`](a9629f1), [`53d37f9`](53d37f9), [`dba6239`](dba6239), [`ab12cb6`](ab12cb6), [`f0eab52`](f0eab52), [`cd884c1`](cd884c1), [`9ed38a8`](9ed38a8), [`53aa049`](53aa049), [`984e57a`](984e57a), [`51785be`](51785be), [`4f6bcbb`](4f6bcbb), [`78e7137`](78e7137)]: - @sveltejs/kit@3.0.0-next.5 ## @sveltejs/adapter-vercel@7.0.0-next.1 ### Major Changes - breaking: require `vite@^8.0.12`, the first Vite 8 release bundling stable `rolldown` 1.0.0 ([#16134](#16134)) ### Patch Changes - Updated dependencies [[`a9629f1`](a9629f1), [`53d37f9`](53d37f9), [`dba6239`](dba6239), [`ab12cb6`](ab12cb6), [`f0eab52`](f0eab52), [`cd884c1`](cd884c1), [`9ed38a8`](9ed38a8), [`53aa049`](53aa049), [`984e57a`](984e57a), [`51785be`](51785be), [`4f6bcbb`](4f6bcbb), [`78e7137`](78e7137)]: - @sveltejs/kit@3.0.0-next.5 ## @sveltejs/enhanced-img@1.0.0-next.1 ### Major Changes - breaking: require `vite@^8.0.12`, the first Vite 8 release bundling stable `rolldown` 1.0.0 ([#16134](#16134)) ## @sveltejs/kit@3.0.0-next.5 ### Major Changes - breaking: remove `base`, `assets`, and `resolveRoute` from `$app/paths` ([#15507](#15507)) - breaking: require Svelte config options to be passed through the Vite plugin ([#16007](#16007)) - 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](#16164)) - breaking: add 'error' result type to `preloadData` ([#12579](#12579)) - breaking: require `vite@^8.0.12`, the first Vite 8 release bundling stable `rolldown` 1.0.0 ([#16134](#16134)) ### Minor Changes - feat: expose `submitted` property of remote forms ([#14811](#14811)) ### Patch Changes - fix: clear issues and touched states on form reset ([#16163](#16163)) - fix: return 404 for form actions and remote functions whose name is an `Object.prototype` member ([#16072](#16072)) - feat: send periodic `keep-alive` SSE comments from `query.live` to prevent idle-timeout errors ([#16063](#16063)) - fix: render pages over sibling endpoints without GET or HEAD handlers ([#16125](#16125)) - fix: sort directory entries when building the route manifest so node indices are deterministic across runtimes (e.g. Bun and Node) ([#16074](#16074)) - fix: include hoisted packages in Vite's `server.fs.allow` list ([#15998](#15998)) ## @sveltejs/package@3.0.0-next.1 ### Patch Changes - fix: declare typescript as an optional peer dependency so svelte-package works under strict node-linkers ([#16073](#16073)) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
closes #15862 A lighter alternative to #16171 , where we just add the rules under the URL if the URL already exists. According to the Cloudflare docs, multiple headers will just be joined with a comma https://developers.cloudflare.com/workers/static-assets/headers/#attach-a-header and we _shouldn't_ worry about someone also declaring new cache header values for those URLs since they're framework related. The original issue is mostly concerned about adding __new__ headers for CORS --- ### Please don't delete this checklist! Before submitting the PR, please make sure you do the following: - [ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs - [x] This message body should clearly illustrate what problems it solves. - [x] Ideally, include a test that fails without this PR but passes with it. ### Tests - [ ] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check` ### Changesets - [x] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. Changesets that add features should be `minor` and those that fix bugs should be `patch`. Please prefix changeset messages with `feat:`, `fix:`, or `chore:`. ### Edits - [x] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.
closes #16172 Bumps `cookie` from v1 to v2 which is ESM-only and changes its method names and signature for serialising a set-cookie value https://github.com/jshttp/cookie/releases/tag/v2.0.0 but our lockfile still has cookie v1 because of some Netlify deps but we will get rid of that when we move to platform tests We should make a decision if we want to change our methods to match the new `cookie` API or leave it as is EDIT: we decided to stick to our current API in the June monthly meeting --- ### Please don't delete this checklist! Before submitting the PR, please make sure you do the following: - [x] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs - [x] This message body should clearly illustrate what problems it solves. - [ ] Ideally, include a test that fails without this PR but passes with it. ### Tests - [ ] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check` ### Changesets - [ ] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. Changesets that add features should be `minor` and those that fix bugs should be `patch`. Please prefix changeset messages with `feat:`, `fix:`, or `chore:`. ### Edits - [x] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.
hopefully switching to non-deprecated version + delaying (mimicking typing more closely) helps
You now have to pass `{ external: string[] | boolean }` to `redirect` if
you want to redirect to an external URL (or a `javascript:` URL).
Closes #15131
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
…g navigation (#16188) When a navigation starts, `invalidate(All)` will no longer abort that navigation - previously it indirectly did that because both invalidation and navigation shared the same navigation token; then navigation thought "oh I'm outdated I abort". Now there's a separate invalidation token so we can handle each case sensibly: - when invalidation finishes after goto finishes, it will not apply its stale data. It _will_ apply redirects though since technically it's the last navigation that happened and so it should take precedence - when invalidation finishes before goto finishes, it will apply, but it will not abort the navigation Closes #9354 --------- Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
<!-- Your PR description here --> #14665 Remote form fields expose field.touched() so apps can see whether a field or its children were interacted with, and client/server runtimes surface the existing touched map. --- ### Please don't delete this checklist! Before submitting the PR, please make sure you do the following: - [x] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs - [x] This message body should clearly illustrate what problems it solves. - [x] Ideally, include a test that fails without this PR but passes with it. ### Tests - [x] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check` ### Changesets - [x] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. Changesets that add features should be `minor` and those that fix bugs should be `patch`. Please prefix changeset messages with `feat:`, `fix:`, or `chore:`. ### Edits - [x] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed. --------- Co-authored-by: Rich Harris <rich.harris@vercel.com> Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
closes #13680 closes #13681 closes #8564 Adds a `cookies.parse` method for dealing with cookie headers from external sources: ```js const response = await fetch('...'); for (const str of response.headers.getSetCookie()) { const { name, value, ...options } = cookies.parse(str); cookies.set(name, value, { ...options, path: '/' }); } ``` Design decisions that might warrant discussion: - invalid values are ignored. If you do `SameSite=Nope` instead of SameSite=None`, nothing will happen. Maybe it should throw instead? Or maybe it should just apply the value even if it's gibberish, to make it future-proof? - same for invalid properties — it only recognises `Expires`, `Max-Age`, `Secure`, `HttpOnly`, `Partitioned`, `Priority`, `SameSite`, `Domain` and `Path` --- ### Please don't delete this checklist! Before submitting the PR, please make sure you do the following: - [x] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs - [x] This message body should clearly illustrate what problems it solves. - [x] Ideally, include a test that fails without this PR but passes with it. ### Tests - [x] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check` ### Changesets - [x] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. Changesets that add features should be `minor` and those that fix bugs should be `patch`. Please prefix changeset messages with `feat:`, `fix:`, or `chore:`. ### Edits - [x] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed. --------- Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/699b9f615bc0fe5a16fe1f941eb54a22aefc5f11Open in |
...by returning `{ status: ..., ... }` from `handleError`.
Breaking change because theoretically someone could've used this as part
of `App.Error` before, and now it's kind of outside that, a reserved
property on `handleError`'s return object.
Closes [#14442](#14442)
---------
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tee Ming <chewteeming01@gmail.com>
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Rich-Harris <hello@rich-harris.dev>
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to version-3, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `version-3` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `version-3`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @sveltejs/adapter-vercel@7.0.0-next.4 ### Major Changes - breaking: remove support for edge and Node 20 runtimes ([#16520](#16520)) ### Patch Changes - chore: bump `@vercel/nft` dependency ([#16522](#16522)) - Updated dependencies [[`6942ddb`](6942ddb), [`68137d4`](68137d4), [`15dc603`](15dc603), [`a4f1521`](a4f1521), [`629b45d`](629b45d), [`7a7833a`](7a7833a), [`e6591a0`](e6591a0), [`7a7833a`](7a7833a), [`b196a39`](b196a39), [`66bf343`](66bf343), [`4bde76b`](4bde76b), [`d9f05cb`](d9f05cb), [`40efca1`](40efca1), [`8ef5548`](8ef5548), [`9efb8f2`](9efb8f2), [`6a670dc`](6a670dc), [`3416dcc`](3416dcc), [`6850fa5`](6850fa5), [`e6591a0`](e6591a0), [`688bead`](688bead), [`b596610`](b596610), [`0f26c13`](0f26c13), [`110a3db`](110a3db), [`665d467`](665d467), [`9c8c60c`](9c8c60c)]: - @sveltejs/kit@3.0.0-next.13 ## @sveltejs/kit@3.0.0-next.13 ### Major Changes - 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](#16558)) - breaking: deprecate `error(status, {...})` in favour of `error(status, message, {...})` ([#16540](#16540)) ### Minor Changes - feat: add shallow routing to `goto` and deprecate `pushState` and `replaceState` ([#16449](#16449)) - feat: preserve page state set through `goto(..., { state, persistState: true })` across reloads ([#16449](#16449)) ### Patch Changes - chore: deduplicate repeated CSP directive handling ([#16498](#16498)) - fix: avoid Vite dev server reload on initial page request ([#16553](#16553)) - fix: don't set a `null` `accept-language` header on internal `fetch` sub-requests when the incoming request has none ([#16527](#16527)) - fix: correctly detect prerendered paths in server `fetch` when `paths.base` is set ([#16525](#16525)) - fix: don't duplicate remote modules in the generated manifest ([#16532](#16532)) - fix: exclude inlined files from the page's `$app/manifest` immutable list ([#16531](#16531)) - perf: avoid quadratic remote form issue merging ([#16493](#16493)) - fix: don't attempt to serialize fetch responses when the request body is not a string or TypedArray ([#16501](#16501)) - fix: read the error status of `App.Error` in the `prerender` and `query.live` remote functions ([#16529](#16529)) - fix: propagate errors from prerendered remote responses instead of re-running the function ([#16535](#16535)) - fix: respect the status returned from `handleError` on the fallback error page served to error-page sub-requests ([#16528](#16528)) - fix: skip unnecessary `version.json` checks if `updated.current` is already `true` ([#16518](#16518)) - fix: allow generation of $app/tsconfig without TypeScript installed ([#16534](#16534)) - perf: use a `Set` to check element ids when validating fragment links during prerendering ([#16494](#16494)) - fix: only include `_app/immutable` files in `$app/manifest`'s `immutable` in the service worker ([#16531](#16531)) - fix: log errors caught by the Vite dev server handler ([#16550](#16550)) - fix: resolve `root` per instance of the SvelteKit Vite plugin ([#16513](#16513)) - fix: ignore path casing differences when warning about overridden Vite config on Windows ([#16545](#16545)) - fix: preserve the current URL search parameters when submitting a remote form without JavaScript ([#16373](#16373)) - fix: treeshake prerendered remote functions in the right chunks ([#16533](#16533)) - fix: error during development if the adapter does not support instrumentation and it exists ([#16548](#16548)) ## @sveltejs/adapter-netlify@7.0.0-next.5 ### Patch Changes - chore: replace @netlify/functions with @netlify/types for the Context type ([#16542](#16542)) - Updated dependencies [[`6942ddb`](6942ddb), [`68137d4`](68137d4), [`15dc603`](15dc603), [`a4f1521`](a4f1521), [`629b45d`](629b45d), [`7a7833a`](7a7833a), [`e6591a0`](e6591a0), [`7a7833a`](7a7833a), [`b196a39`](b196a39), [`66bf343`](66bf343), [`4bde76b`](4bde76b), [`d9f05cb`](d9f05cb), [`40efca1`](40efca1), [`8ef5548`](8ef5548), [`9efb8f2`](9efb8f2), [`6a670dc`](6a670dc), [`3416dcc`](3416dcc), [`6850fa5`](6850fa5), [`e6591a0`](e6591a0), [`688bead`](688bead), [`b596610`](b596610), [`0f26c13`](0f26c13), [`110a3db`](110a3db), [`665d467`](665d467), [`9c8c60c`](9c8c60c)]: - @sveltejs/kit@3.0.0-next.13 ## @sveltejs/adapter-static@4.0.0-next.2 ### Patch Changes - fix: match adapter-vercel's prerendered redirect handling when deploying to Vercel ([#16497](#16497)) - Updated dependencies [[`6942ddb`](6942ddb), [`68137d4`](68137d4), [`15dc603`](15dc603), [`a4f1521`](a4f1521), [`629b45d`](629b45d), [`7a7833a`](7a7833a), [`e6591a0`](e6591a0), [`7a7833a`](7a7833a), [`b196a39`](b196a39), [`66bf343`](66bf343), [`4bde76b`](4bde76b), [`d9f05cb`](d9f05cb), [`40efca1`](40efca1), [`8ef5548`](8ef5548), [`9efb8f2`](9efb8f2), [`6a670dc`](6a670dc), [`3416dcc`](3416dcc), [`6850fa5`](6850fa5), [`e6591a0`](e6591a0), [`688bead`](688bead), [`b596610`](b596610), [`0f26c13`](0f26c13), [`110a3db`](110a3db), [`665d467`](665d467), [`9c8c60c`](9c8c60c)]: - @sveltejs/kit@3.0.0-next.13 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
split off from #15574 EDIT: This PR adds a `customHandler` property which adapters can resolve to a module that runs `server.init` and `server.respond` with additional logic. The handler runs during dev, build, prerender, and preview. It's main purpose is to set us up to unify the `dev` and `preview` experiences. --- ### Please don't delete this checklist! Before submitting the PR, please make sure you do the following: - [ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs - [x] This message body should clearly illustrate what problems it solves. - [ ] Ideally, include a test that fails without this PR but passes with it. ### Tests - [ ] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check` ### Changesets - [ ] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. Changesets that add features should be `minor` and those that fix bugs should be `patch`. Please prefix changeset messages with `feat:`, `fix:`, or `chore:`. ### Edits - [x] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed. --------- Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com> Co-authored-by: Nic Polumeyv <nicolas.polum@outlook.com> Co-authored-by: Rich Harris <rich.harris@vercel.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Rich Harris <richard.a.harris@gmail.com> Co-authored-by: Rich-Harris <hello@rich-harris.dev>
Corrected the dead link for Partytown's SvelteKit integration to the correct URL. --- ### Please don't delete this checklist! Before submitting the PR, please make sure you do the following: - [ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs - [ ] This message body should clearly illustrate what problems it solves. - [ ] Ideally, include a test that fails without this PR but passes with it. ### Tests - [ ] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check` ### Changesets - [ ] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. Changesets that add features should be `minor` and those that fix bugs should be `patch`. Please prefix changeset messages with `feat:`, `fix:`, or `chore:`. ### Edits - [ ] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed. --------- Co-authored-by: Elliott Johnson <hello+git@ell.iott.dev> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Tee Ming <chewteeming01@gmail.com>
This is the last TODO comment or deprecation I could find that needs to be addressed before 3.0 — as such, this closes #1247
…the current URL (#16572) In many SPAs, clicking on a link to the current page causes a refresh of all the data, matching what would happen in an MPA. You can see this on sites like https://bsky.app (or https://x.com if you're a person of questionable taste) among many others. This creates a user expectation that they can force a refresh, bypassing whatever client-side caches might be in operation. In SvelteKit, clicking on a link to the current page is effectively a noop. This PR changes that. It might seem like a weird special case, but such links are _already_ a special case in that they default to `history.replaceState` instead of `history.pushState` (mirroring MPA behaviour); this feels like a mildly-opinionated-but-defensible extension of that logic. --- ### Please don't delete this checklist! Before submitting the PR, please make sure you do the following: - [ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs - [x] This message body should clearly illustrate what problems it solves. - [x] Ideally, include a test that fails without this PR but passes with it. ### Tests - [x] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check` ### Changesets - [x] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. Changesets that add features should be `minor` and those that fix bugs should be `patch`. Please prefix changeset messages with `feat:`, `fix:`, or `chore:`. ### Edits - [x] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed. --------- Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com> Co-authored-by: Tee Ming <chewteeming01@gmail.com>
#16569) The `[` and `]` escapes prescribed in `documentation/docs/30-advanced/10-advanced-routing.md` have never worked: a route directory named `[x+5b]` fails the build with `Invalid regular expression: /^/\\[/?$/: Unterminated character class`, and `[x+5d]` compiles to a pattern that cannot match `/]`. Introduced with the escape syntax itself in #7644. `escape()` escapes `[` and `]` first to protect the `%2[Ff]` and `%3[Ff]` classes the URL substitutions emit, then its final pass re-escapes those backslashes because `\\` is in its character class. Regex escaping now runs before the substitutions rather than around them. `parse_route_id` output is byte-identical to `version-3` for every printable ASCII character and 23 mixed route ids; only `[x+5b]` and `[x+5d]` change. Co-authored-by: Nic Polumeyv <nicolas.polum@gmail.com>
…16570) `resolve('/[x+2e]well-known')` returns the route id verbatim instead of `/.well-known`, so a pathname built from an escaped route id does not match the route it came from. `parse_route_id` has expanded `[x+nn]` and `[u+nnnn]` since #7644, but `resolve_route` never has, because `basic_param_pattern` cannot match `x+2e`. The expansion happens in the same pass as the params rather than a second pass over the result, so a param value that itself contains `[x+2f]` is left alone. `parse_route_id` output is unchanged. Its `x+` and `u+` branches were already equivalent, since splitting a two character code on `-` is a no-op.
alternative to #16580 closes #5793 We already implemented the feature but it has the bug mentioned in that issue. This PR removes route data for directories with no route files and items in `routes` that would likely return a 404 (no page, no endpoint, etc.). Some additional fixes are that `LayoutParams` only includes paths with layout files. Also, the route data gets considerably smaller for larger projects. --- ### Please don't delete this checklist! Before submitting the PR, please make sure you do the following: - [x] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs - [x] This message body should clearly illustrate what problems it solves. - [x] Ideally, include a test that fails without this PR but passes with it. ### Tests - [ ] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check` ### Changesets - [ ] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. Changesets that add features should be `minor` and those that fix bugs should be `patch`. Please prefix changeset messages with `feat:`, `fix:`, or `chore:`. ### Edits - [ ] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.
…#16568) When a package's only tsconfig or jsconfig lives above the package root, no `.d.ts` reaches `dist` at all. `emitDts` resolves a relative `declarationDir` against the tsconfig's directory rather than the cwd, so the declarations were written outside `__package_types_tmp__` and the copy step never saw them. Absolute paths only started working in svelte2tsx 0.7.56 (sveltejs/language-tools#2965), so the bump and the fix are both needed. Reported from the svelte2tsx side in sveltejs/language-tools#2182, where the kit half was spotted but never filed.
…arset parameter (#16567) The prerenderer compares `content-type` with `===`, so `text/html; charset=utf-8` is not treated as HTML: the page is written without a `.html` extension and its links are never crawled. `is_content_type` already normalizes the header for this reason, from #7195 (strip parameters) and GHSA-gv7g-x59x-wf8f (case-insensitive compare); the two prerender checks predate both. Reproduces #13612, closed as unreproducible, using the charset workaround from #3184. The root `+server.js` error added in #15994 is gated on the same value, so it can fire for an app that has none. Co-authored-by: Nic Polumeyv <nicolas.polum@gmail.com> Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
#16564) Picks up the `adapter-node` half of #13753. #16234 fixed `.ico` by adding `mimes['ico']` to the shared `mrmime` module. That works in dev and preview, which share one instance with `sirv`. `adapter-node` bundles its own copy of `mrmime` through `sirv`, so the patch never reaches it and `.ico` still goes out with an empty `Content-Type` in production. The manifest already records the right type at build time, resolved through the patched lookup, so this reads it back rather than relying on `sirv`'s copy.
…16563) Going back or forward to a shallow entry restores the state and renders the page you were on when you called `goto`, while the address bar keeps the pushed URL. The page documents that split for the live case and for reloads, but not for back/forward, which is where #11465, #11503 and #11671 all landed. ### Please don't delete this checklist! Before submitting the PR, please make sure you do the following: - [x] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs * #11465 - [x] This message body should clearly illustrate what problems it solves. - [ ] Ideally, include a test that fails without this PR but passes with it. * docs only ### Tests - [ ] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check` * docs only ### Changesets - [ ] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. Changesets that add features should be `minor` and those that fix bugs should be `patch`. Please prefix changeset messages with `feat:`, `fix:`, or `chore:`. * docs only ### Edits - [x] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed. --------- Co-authored-by: Nic Polumeyv <nicolas.polum@gmail.com>
#16591) Part of #15529. The node call uses no secrets, and only `report-status` needs `contents: write`. Vercel and netlify keep `secrets: inherit` for now: explicit `secrets:` blocks only work if those are repo or org secrets rather than environment secrets (actions/runner#4453), and that's only visible in the repo settings. Happy to open a PR once someone confirms.
#16589) Neat little find The cause of [the playwright pin](#16538 (comment)) is that [its tsconfig loader](https://github.com/microsoft/playwright/blob/v1.62.0/packages/playwright/src/transform/tsconfig-loader.ts#L54) only ever looks up `node_modules/$app/tsconfig.json`, while [tsc also resolves](https://www.typescriptlang.org/tsconfig/#extends) the directory form we currently generate. Writing the file where both look removes the pin's cause and lets `paths` reach Playwright test files again. Verified against 1.61.1, 1.62.0 and 1.62.1.
…ecompressed (#16566) The remaining half of #10343, and the first concrete piece of #16565. #15182 stopped the header when `precompress` is `false`. It still goes out on every asset when `precompress` is `true`, because `sirv` sets `Vary` from its options rather than from the file, while `builder.compress` only compresses a fixed extension list. So a `.ico` or a `.png` advertises a variant that was never produced. Only extensions that were written but never compressed lose the header, since `setHeaders` sees the request pathname, not the file `sirv` resolved, and `/` or `/v1.0` may be serving `index.html.gz`. Commits are separated by layer so the kit-side and adapter-side changes can be reviewed apart. This rewrites the same `setHeaders` block as #16564, so whichever lands first, the other needs a rebase. --------- Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
…uteId` (#16580) Closes #14847. #15027 fixed the `Path` half of that issue; the `RouteId` union still lists every directory, so `resolve('/a')` type-checks when `/a` only holds child routes. `LayoutParams` now keys off the generated layout map instead of `RouteId`, and a layout sitting in a directory that isn't a route stops claiming its own id in `LayoutRouteId`. `resolve('/')` stops type-checking in an app whose root page lives in a group, since `/(app)` is the route that serves `/`. Write `resolve('')` instead. #16588 covers the `$app/manifest` side. Also points #16588's `routes` filter at `is_app_route` so the two stay in sync, and rewords its changeset to cover the #5793 fix. --------- Co-authored-by: Elliott Johnson <hello@ell.iott.dev>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…6499) These two copies have to stay in sync, so build the hash in one place. Co-authored-by: Rich Harris <rich.harris@vercel.com>
Based on #16580. Adds a few goodies: - `PageRouteId` and `EndpointRouteId`, which combine to make up `RouteId` — these make the internal types a bit cleaner and allow you to discriminate between which routes do what if needed - `page` and `endpoint` booleans on each entry in `$app/manifest.routes`, allowing routes to be filtered by capability; routes containing both `+page` and `+server` have both set to `true` - A `ManifestRoute` discriminated union that narrows `id` to the corresponding page-only, endpoint-only, or combined route IDs - A private `LayoutParamsId` alias for the IDs accepted by `LayoutParams`, which now correspond specifically to directories containing layouts - More accurate layout load types: a colocated endpoint-only route is no longer included in a layout’s possible `event.route.id` values, since endpoint requests do not execute layouts Layouts only run for page routes, not endpoints. Previously, a directory with both `+layout` and `+server` incorrectly included its endpoint-only ID in the layout’s possible `event.route.id` type, even though that value can never occur at runtime. The change restricts it to page IDs that can actually execute the layout. --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>
closes #16616 Not sure if the changeset should be a major. Decided on patch since it doesn't actually break anything user-facing for `@sveltejs/enhanced-img`
leftover from #15430 --- ### Please don't delete this checklist! Before submitting the PR, please make sure you do the following: - [x] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs - [x] This message body should clearly illustrate what problems it solves. - [ ] Ideally, include a test that fails without this PR but passes with it. ### Tests - [x] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check` ### Changesets - [x] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. Changesets that add features should be `minor` and those that fix bugs should be `patch`. Please prefix changeset messages with `feat:`, `fix:`, or `chore:`. ### Edits - [x] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed. --------- Co-authored-by: Rich Harris <rich.harris@vercel.com> Co-authored-by: Tee Ming <chewteeming01@gmail.com>
Now that Cloudflare has [updated the versions of Node in their build images](cloudflare/cloudflare-docs#32430), we can bump Kit's requirement which allows us to make a small tidy-up. Don't know if there's any benefit to bumping it further — if there is, now would be a good time to do so
Promised `read()` results held the whole file in memory instead of streaming it. `ReadableStream.from` exists everywhere the server runtime ships (Node 20.6+, workerd, Deno, Vercel edge). Partial reads of a 100MB file drop from 82MB of memory to basically nothing, huge win. Co-authored-by: Tee Ming <chewteeming01@gmail.com>
closes #16615 This only fixes it for Cloudflare Workers since the 404 falls back to running the worker; Cloudflare Pages does not run the worker on static asset 404s. I don’t think there’s a way to do this without running the worker. Also, Cloudflare probably won’t try to fix this in Cloudflare Pages since they’re fully set on Cloudflare Workers now EDIT: fun facts: - Chrome automatically applies `no-store` if it's a 404 - Netlify overrides the header with `max-age: 0` to avoid the bad cache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opened just so that I could easily see CI checks
You can try SvelteKit 3 by installing any of the packages following #15497 (comment) or the ones published with the
nexttag https://npmx.dev/package/@sveltejs/kitPlease don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits