Conversation
🦋 Changeset detectedLatest commit: 0544d5f The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 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 |
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/0544d5f13686bd5e6f6daa5f074b064990134833Open in |
should prevent PRs like #16536 until we can take advantage of them
just trying to silence those `pnpm audit` warnings --------- Co-authored-by: Tee Ming <chewteeming01@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
closes #16363 Remote form actions were generated as `?/remote=...`, so a native form submission replaced the page's existing query string. Generate the action from the current search parameters instead, then set the internal `/remote` parameter. This keeps user-visible parameters such as pagination when JavaScript is disabled, and keeps the client-generated action aligned with the server-generated one. --- ### 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` Additional validation: - `pnpm --dir packages/kit/test/apps/async exec playwright test test.js --grep 'form works'` (Chromium with and without JavaScript) - `pnpm -F @sveltejs/kit prepublishOnly` ### Changesets - [x] Added a patch changeset for `@sveltejs/kit`. ### Edits - [x] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed. --------- Co-authored-by: tianrking <tianrking@users.noreply.github.com> Co-authored-by: Tee Ming <chewteeming01@gmail.com>
…lready `true` (#16518) If we already know that there's a new deployment, `updated.check()` should be a no-op. Otherwise we'll request `version.json` when navigation fails even if we already know the answer
… type (#16542) ## Summary This PR replaces `@netlify/functions` with `@netlify/types` as a runtime dependency of `adapter-netlify`. The adapter only used `@netlify/functions` for its `Context` type — there are no runtime imports — so the full package (and its transitive dependencies) was being pulled in solely for a type that actually lives in `@netlify/types`. ## Why - **`@netlify/types` is lighter than `@netlify/functions`** — the latter depends on the former, so referencing the types package directly avoids pulling in `@netlify/functions` for a single type. - **It makes the shared origin of the `Context` type clearer** — Netlify Functions and Netlify Edge Functions share the same `Context` from `@netlify/types`. Referencing that package directly documents why the same type is used in both contexts, rather than obscuring it behind the higher-level `@netlify/functions` entry point. ## Changes - ambient.d.ts: import `Context` from `@netlify/types` instead of `@netlify/functions`. - serverless.js: update the JSDoc `@returns` type to reference `@netlify/types`. - package.json: replace `@netlify/functions` with `@netlify/types` (`^2.8.0`) in `dependencies`. - pnpm-lock.yaml: updated accordingly. --- ### 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 - [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.
…, message, {...})` (#16540)
The TODO from
#16162 (comment) —
`error(status, {...})` is now deprecated in favour of passing any
additional properties as the third argument
---
### 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: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
…ry.live` remote functions (#16529) #16162 removed `ServerErrorNode.status` (the status now lives on `App.Error`) and updated the readers in `shared.svelte.js`, leaving two behind in `query.live`'s iterator and the prerendered-response reader. This ports them to the same shape and makes the type assertion on the prerendered response actually apply (it was unparenthesized, so the stale read never failed `pnpm check`). The prerendered-error branch still falls into the surrounding catch and re-runs the function, which is a separate issue. --------- Co-authored-by: Tee Ming <chewteeming01@gmail.com>
closes #16530 v2 was unaffected because the secondary client build re-read the Vite config and created fresh plugin instances, so the extra client-side pushes landed in an array nobody read. #15532 made one instance serve both environments. --- ### 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.
Change split out from #16464 It's pretty common to pass `process.env` into `server.init({ env: process.env })` but it's typed as `Record<string, string | undefined>`. So this PR loosens the type so we don't need to cast it everytime. It also adds Deno globals to the netlify edge handler so we can get the type safety there. --- ### 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: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Some playground chores: - gets rid of the eslint error on the vite config file - adds autocomplete for vite config settings - adds the same `#lib` settings from the sveltekit 3 docs
…he server runtime (#16871) `options` is already a single module-level object: `runtime/server/index.js` imports it from `<sveltekit:generated>/server.js` and `Server.init` writes `hooks` onto it, so every `Server` in a process shares it. It was also passed through 17 parameter positions, from `internal_respond` down to `static_error_page`, plus the `RemoteInternals.run` callback. It now sits in `runtime/server/internal.js` next to `manifest` and `read_implementation`, and `hooks` gets its own `set_hooks()` there, so `options` is immutable build data once `set_options` has run. `set_options` is called at module scope rather than in the constructor, so it lands before prerendering evaluates the user's remote modules, which happens before any `Server` is constructed. `fetch.js` renames its destructured set-cookie `options` to `cookie_options`, which would otherwise shadow the import. Follow-up to #16605 (comment). Part of #16519.
#16863 gave the guard plugin its own `manifest_data`, created on the first server-only import and never updated. Before, it read the one in `index.js`, which the dev server reassigns on route changes (`index.js:1090`), so a route added mid-session could now import server code without an error. In build it also repeated the `create_manifest_data` walk `index.js:507` already did. This passes a thunk over the shared variable instead, with the lazy create moved alongside it.
) Several `SSROptions` fields are build-time constants that already exist as defines for the client, `__SVELTEKIT_EMBEDDED__` and `__SVELTEKIT_HASH_ROUTING__`. The server took a second route to the same values through `options`, though `app/paths/internal/server.js` already reads `__SVELTEKIT_APP_DIR__`. This moves the server onto those two and adds defines for `csrf_check_origin`, `link_header_preload`, `paths_origin` and `service_worker`. The app's global name was derived in five places: `exports/vite/index.js` twice, `core/env.js` twice, and `runtime/server/utils.js` in `get_global_name`, which read it back out of `SSROptions.version_hash`. Two of them called `hash(config.version.name)` separately. `get_global_name(version_name, dev)` in `core/utils.js` is now the only derivation, and the server reads the result through `__SVELTEKIT_GLOBAL_NAME__`. `SSROptions.version` had no readers at all. `csp`, `csrf_trusted_origins`, `service_worker_options` and `templates` stay put: a define is a textual substitution, so a structured value gets re-inlined at every read. Stacked on #16871.
In the live query handler in `runtime/server/remote-functions.js`,
`pull` checks `event.request.signal.aborted` once, before awaiting
`generator.next()`. After that it uses the readable stream controller,
which may be closed by then (adapters cancel the response body when the
client disconnects, and that can happen while `pull` is suspended on the
generator). Enqueueing the value throws "Invalid state: Controller is
already closed", and the `catch` path then calls `send()` on the same
closed controller. Separately, the generator has no way to notice the
teardown: its `event.request.signal` belongs to the incoming request and
doesn't abort when the response stream is cancelled, so a generator
parked on an `await` keeps running and its `finally` never executes
(`generator.return()` queues behind the pending `next()`).
The fix separates producing values from writing them to the stream.
Everything the response sends now comes from a `frames` async generator
that yields SSE strings and never sees the controller; keep-alives come
from racing `generator.next()` against a timer instead of a
controller-holding callback. The new `stream_from_iterator` helper in
`runtime/server/utils.js` is the only code that touches the controller,
and it re-checks that the stream is still open after each `await`,
dropping late chunks instead of enqueueing into a closed controller.
Teardown from either side (request abort or stream cancellation) aborts
a single internal `cancellation` controller, and the user's generator
runs with `new Request(event.request, { signal: cancellation.signal })`,
so code awaiting inside it can observe the disconnect and clean up.
Fixes #16778
---------
Co-authored-by: Elliott Johnson <hello@ell.iott.dev>
closes #16070 ## Summary This PR adds an official `@sveltejs/adapter-bun` package that builds SvelteKit applications into standalone Bun-native servers using `Bun.serve`, Web API requests/responses, native routes, and `Bun.file`. ## What changed - Adds SSR, hydration, static assets, prerendered pages/endpoints, redirects, base paths, immutable caching, and non-GET fallthrough to SvelteKit. - Supports `$app/server` reads, `instrumentation.server.js`, server-sent events, graceful shutdown, request-origin normalization, and trusted proxy headers. - Exposes the original `Request` and Bun `Server` through `event.platform`, including Bun metrics and `requestIP`. - Supports regular JavaScript builds and self-contained executables with asset embedding, cross-compilation, minification, bytecode, and source maps. ## Key differences from `adapter-node` | Area | `adapter-bun` | `adapter-node` | | --- | --- | --- | | Runtime | Native `Bun.serve` and Web APIs | Node HTTP, Polka, and request conversion | | Static files | Native Bun routes and file responses | `sirv` with Brotli/gzip precompression | | Build output | JavaScript server or compiled executable | JavaScript server only | | Customization | Bun server context through `event.platform` | Reusable `handler.js` and Node request context | | Lifecycle | Bun timeouts and second-signal forced exit | Systemd activation and Node-specific timeout controls | Application imports follow Bun's bundler behavior rather than `adapter-node`'s `dependencies`/`devDependencies` externalization policy. ## Decisions and tradeoffs - Native routes preserve Bun's optimized file serving, conditional requests, ranges, streaming, and automatic `HEAD` behavior. - Filesystem assets remain unbuffered in regular builds; compiled builds embed them into the executable. - The generated server owns `fetch` and `routes` to preserve SvelteKit behavior. - SvelteKit receives a normalized public URL while `event.platform.request` retains the original Bun request required by native APIs. - Node-specific behavior is not emulated where Bun provides a different native model. ## Known limitations and future work - Bun treats `*` as a route wildcard, so filenames containing a literal `*` are currently rejected at build time. - WebSockets, TLS, custom error handlers, HTTP/3, and explicit HTTP/1 configuration require a custom Bun integration. - This PR does not provide a reusable custom-server handler or built-in gzip/Brotli precompression. - Systemd socket activation and Node-specific shutdown, keep-alive, and header timeouts are out of scope. - Follow-ups may expand `buildOptions`, dependency externalization controls, MIME handling, and literal-wildcard support. --- ### 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: Tee Ming <chewteeming01@gmail.com> Co-authored-by: Nic Polumeyv <162764842+Nic-Polumeyv@users.noreply.github.com> Co-authored-by: Nic Polumeyv <nicolas.polum@outlook.com> Co-authored-by: Rich Harris <hello@rich-harris.dev> Co-authored-by: Rich Harris <rich.harris@vercel.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-bun@1.0.0-next.1 ### Minor Changes - feat: add a Bun-native adapter with static file serving and single-executable support ([#16695](#16695)) ### Patch Changes - Updated dependencies [[`9b3d195`](9b3d195), [`385d378`](385d378), [`3782448`](3782448), [`d0d3a33`](d0d3a33), [`4b7a483`](4b7a483), [`e325d7d`](e325d7d), [`4f63c79`](4f63c79)]: - @sveltejs/kit@3.0.0-next.25 ## @sveltejs/kit@3.0.0-next.25 ### Minor Changes - feat: add an `applyReroute` helper for adapters that support split serverless function deployments ([#16665](#16665)) ### Patch Changes - chore: build streamed responses from async generators ([#16847](#16847)) - fix: tweak response logging for remote requests ([#16865](#16865)) - fix: discard invalidation results when a navigation completes while they load ([#16852](#16852)) - fix: route dev-server response logging through Vite's logger so it respects `logLevel` and `customLogger` ([#16858](#16858)) - chore: read build-time config from defines on the server instead of carrying it in `options` ([#16873](#16873)) - chore: read `options` from a single module instead of passing it through the server runtime ([#16871](#16871)) ## @sveltejs/adapter-netlify@7.0.0-next.10 ### Patch Changes - fix: correctly apply `reroute` results for apps configured with split serverless functions ([#16665](#16665)) - Updated dependencies [[`9b3d195`](9b3d195), [`385d378`](385d378), [`3782448`](3782448), [`d0d3a33`](d0d3a33), [`4b7a483`](4b7a483), [`e325d7d`](e325d7d), [`4f63c79`](4f63c79)]: - @sveltejs/kit@3.0.0-next.25 ## @sveltejs/adapter-vercel@7.0.0-next.8 ### Patch Changes - fix: omit ISR data endpoints for server-only routes ([#16731](#16731)) - fix: correctly apply `reroute` results for apps configured with split serverless functions ([#16665](#16665)) - Updated dependencies [[`9b3d195`](9b3d195), [`385d378`](385d378), [`3782448`](3782448), [`d0d3a33`](d0d3a33), [`4b7a483`](4b7a483), [`e325d7d`](e325d7d), [`4f63c79`](4f63c79)]: - @sveltejs/kit@3.0.0-next.25 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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: Rich-Harris <hello@rich-harris.dev> Co-authored-by: Rich Harris <richard.a.harris@gmail.com> Co-authored-by: Rich Harris <rich.harris@vercel.com>
defaults to prettier for me and this is getting annoying (also testing something out for the bot)
let's see if it jumps in
lets see if it jumps in -> it did! reverting the flaky-on-purpose-test
Change from Cloudflare Pages to Cloudflare Workers closes #16888 --------- Co-authored-by: Tee Ming <chewteeming01@gmail.com>
`packages/kit/test/apps/basics/test/setup.js` changes directory to `src/routes/routing` to create the route symlink, then deletes `test/errors.jsonl` with a path relative to the app root. On non-Windows the `chdir` happens first, so the delete resolves under `src/routes/routing/` and the log written by `hooks.server.js` is never cleared between runs on Linux and macOS. `read_errors` in `test/utils.js` picks the last record matching a path, so a stale record from an earlier run can satisfy an assertion. The `rmSync` came in with #16664; the `chdir` block predates it. Node resolves a symlink's target relative to the link's own directory, so the symlink can be created from the app root. Dropping the `chdir` keeps every path in the script relative to the same place, so line order can't matter again.
This is a big one. Moves all our build logic from `vite/index.js` into the `vite/build/index.js` file (which feels very at home since it uses all the files in that directory). Most notably, any shared dev/build settings have been correctly moved to the sveltekit setup plugin, allowing us to apply the compile plugin only at build time. --------- Co-authored-by: Nic Polumeyv <162764842+Nic-Polumeyv@users.noreply.github.com>
…lving with a value for the first time (#16890) Closes #16848 ### Failure Sequence 1. Query request A starts before the query has ever loaded successfully. `#ready` is `false`. 2. A refresh starts request B while A is still pending. 3. B fails. 4. The query marks B’s error, but resolves A’s internal promise because B superseded it. 5. A’s public promise waits for `tick()`, then returns `#current`. 6. Because no request has succeeded, `#current` is `undefined`. 7. The component receives `undefined` rather than a rejected promise, so `<svelte:boundary>` does not render its failure snippet. Accessing something like `result.map(...)` instead throws later. The same problem occurs when `fail()` clears pending requests. ### Fix If we see that the internal promise has resolved but `#ready` has not yet been set, reject with `#error` (or a fallback, which shouldn't ever be reached).
…ter-static (#16895) Adds a patch changeset that was missing so that we can release the changes made to those adapters (accessing builder.config instead of builder.config.kit) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: teemingc <54401897+teemingc@users.noreply.github.com>
teemingc
had a problem deploying
to
@sveltejs/adapter-vercel platform tests
August 22, 2026 16:24 — with
GitHub Actions
Failure
teemingc
had a problem deploying
to
@sveltejs/adapter-vercel platform tests
August 22, 2026 16:24 — with
GitHub Actions
Failure
teemingc
deployed
to
@sveltejs/adapter-vercel platform tests
August 22, 2026 16:27 — with
GitHub Actions
Active
teemingc
had a problem deploying
to
@sveltejs/adapter-vercel platform tests
August 22, 2026 16:27 — with
GitHub Actions
Failure
teemingc
had a problem deploying
to
@sveltejs/adapter-vercel platform tests
August 22, 2026 16:33 — with
GitHub Actions
Failure
teemingc
deployed
to
@sveltejs/adapter-vercel platform tests
August 22, 2026 16:33 — with
GitHub Actions
Active
teemingc
deployed
to
@sveltejs/adapter-vercel platform tests
August 22, 2026 16:43 — with
GitHub Actions
Active
teemingc
had a problem deploying
to
@sveltejs/adapter-vercel platform tests
August 22, 2026 16:43 — with
GitHub Actions
Failure
teemingc
deployed
to
@sveltejs/adapter-vercel platform tests
August 22, 2026 17:01 — with
GitHub Actions
Active
teemingc
had a problem deploying
to
@sveltejs/adapter-vercel platform tests
August 22, 2026 17:01 — with
GitHub Actions
Failure
teemingc
had a problem deploying
to
@sveltejs/adapter-vercel platform tests
August 22, 2026 17:05 — with
GitHub Actions
Failure
teemingc
had a problem deploying
to
@sveltejs/adapter-vercel platform tests
August 22, 2026 17:05 — with
GitHub Actions
Failure
teemingc
deployed
to
@sveltejs/adapter-vercel platform tests
August 22, 2026 17:06 — with
GitHub Actions
Active
teemingc
had a problem deploying
to
@sveltejs/adapter-vercel platform tests
August 22, 2026 17:06 — with
GitHub Actions
Failure
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