Skip to content

feat: version 3 - #15497

Draft
teemingc wants to merge 659 commits into
mainfrom
version-3
Draft

feat: version 3#15497
teemingc wants to merge 659 commits into
mainfrom
version-3

Conversation

@teemingc

@teemingc teemingc commented Mar 5, 2026

Copy link
Copy Markdown
Member

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 next tag https://npmx.dev/package/@sveltejs/kit


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.

@changeset-bot

changeset-bot Bot commented Mar 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6539e6a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@sveltejs/kit Major
@sveltejs/adapter-netlify Patch
@sveltejs/adapter-node Patch
@sveltejs/adapter-cloudflare Major
@sveltejs/adapter-vercel Patch
@sveltejs/adapter-auto Patch
@sveltejs/adapter-static Patch
@sveltejs/package Patch

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

@svelte-docs-bot

Copy link
Copy Markdown

@teemingc teemingc added needs-platform-tests This PR needs to run platform tests in order to merge. needs-ecosystem-ci This PR needs to have an ecosystem CI run started prior to its last commit before merging. breaking change labels Mar 5, 2026
@Rich-Harris

Copy link
Copy Markdown
Member

ok, bringing this up to date with main after #15934 etc is proving to be a bit of a PITA but we're getting there. (Unfortunately it also creates conflicts on #15574 — gah.) Logging off now, will pick it up tomorrow. We are at least able to delete quite a bit of stuff now

Comment thread .changeset/shaggy-walls-wave.md Outdated
Comment thread .changeset/tidy-toes-sort.md Outdated
@Rich-Harris Rich-Harris removed the needs-ecosystem-ci This PR needs to have an ecosystem CI run started prior to its last commit before merging. label Jun 4, 2026
@Rich-Harris

Copy link
Copy Markdown
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

Comment thread packages/kit/src/utils/url.js Fixed
@pkg-svelte-dev

pkg-svelte-dev Bot commented Jul 1, 2026

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 6539e6a:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/6539e6aaa15904fa5bf4f943d674a64b49c90010

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/15497

Comment thread packages/kit/src/exports/url.js Fixed
@sveltejs sveltejs deleted a comment from netlify Bot Jul 6, 2026
@teemingc teemingc added needs-platform-tests This PR needs to run platform tests in order to merge. and removed needs-platform-tests This PR needs to run platform tests in order to merge. labels Jul 7, 2026
paoloricciuti and others added 10 commits July 20, 2026 11:20
The current types are a bit weird to work with...since it's expecting
something if you have a variable that can be `null` or `undefined` it
will yell at you (even tho it doesn't make sense since `undefined` is
technically an acceptable value).

Furthermore the `(string | {})` trick doesn't make sense here where the
value can be anything (a `number` for example).

There's still one issue that I wasn't fully able to solve yet: for
`checkbox` if you have a `boolean` value TS will complain because
`boolean` is not assignable to `true` and `false` which is what the type
is expecting (actual strict values, not just `boolean`).

Do you have any ideas on how to fix this?

---------

Co-authored-by: Tee Ming Chew <chewteeming01@gmail.com>
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/checkout](https://redirect.github.com/actions/checkout) |
action | patch | `v7.0.0` → `v7.0.1` |

---

### Release Notes

<details>
<summary>actions/checkout (actions/checkout)</summary>

###
[`v7.0.1`](https://redirect.github.com/actions/checkout/blob/HEAD/CHANGELOG.md#v701)

[Compare
Source](https://redirect.github.com/actions/checkout/compare/v7.0.0...v7.0.1)

- Bump github/codeql-action from 3 to 4 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;2475](https://redirect.github.com/actions/checkout/pull/2475)
- Bump actions/setup-node from 4 to 6 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;2477](https://redirect.github.com/actions/checkout/pull/2477)
- Bump docker/build-push-action from 6.5.0 to 7.2.0 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;2478](https://redirect.github.com/actions/checkout/pull/2478)
- Bump docker/login-action from 3.3.0 to 4.2.0 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;2479](https://redirect.github.com/actions/checkout/pull/2479)
- Bump actions/checkout from 6 to 7 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;2488](https://redirect.github.com/actions/checkout/pull/2488)
- Bump actions/upload-artifact from 4 to 7 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;2476](https://redirect.github.com/actions/checkout/pull/2476)
- eslint 9 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;2474](https://redirect.github.com/actions/checkout/pull/2474)
- Bump the minor-actions-dependencies group with 2 updates by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;2499](https://redirect.github.com/actions/checkout/pull/2499)
- skip running unsafe pr check if input is default by
[@&#8203;aiqiaoy](https://redirect.github.com/aiqiaoy) in
[#&#8203;2518](https://redirect.github.com/actions/checkout/pull/2518)
- trim only ascii whitespace for branch by
[@&#8203;aiqiaoy](https://redirect.github.com/aiqiaoy) in
[#&#8203;2521](https://redirect.github.com/actions/checkout/pull/2521)
- escape values passed to --unset by
[@&#8203;aiqiaoy](https://redirect.github.com/aiqiaoy) in
[#&#8203;2530](https://redirect.github.com/actions/checkout/pull/2530)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/sveltejs/kit).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNzIuNCIsInVwZGF0ZWRJblZlciI6IjQzLjI3Mi40IiwidGFyZ2V0QnJhbmNoIjoidmVyc2lvbi0zIiwibGFiZWxzIjpbXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Part of #16159. This adds an `$app/manifest` module containing
information about the app — it replaces the equivalents in
`$service-worker` (so that we can delete that module).

It exports four things:

- `immutable` is an array of `{ path: string }` objects representing the
contents of `_app/immutable` (empty in dev)
- `files` is an array of `{ path: string }` objects representing the
contents of `static`
- `prerendered` is an array of `{ path: string }` objects representing
all the prerendered pages/endpoints in your app (empty in dev, and
during prerendering)
- `routes` is an array of `{ id: string }` objects representing the
routes of your app

Paths are relative to `base`. In a service worker, you can do e.g.
`cache.add(path)` as part of an offline strategy.

---

### 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.
)

Fixes #13718. Supersedes #13719, credit to @HoldYourWaffle for the
diagnosis and approach.

The trailing slash redirects use absolute pathnames, so any prefix a
parent server strips before the request reaches kit (an Express mount,
#13702) is dropped and the browser lands outside the app. The prefix
never reaches Polka's parser, so it can't be reconstructed server side.
A relative Location resolves against the full browser URL and is
prefix-agnostic.

Per the review on #13719, the helper is implemented in kit rather than
adding `get-relative-path`, stays internal instead of being exported
from `@sveltejs/kit/node`, and adapter-node gets a local copy since its
handler is bundled standalone. Both call sites only produce pathnames
differing by a trailing slash, so it handles exactly that case. The
#2515 guard becomes unnecessary, a relative reference never starts with
`/`.

The options app trailingSlash tests now assert the Location values and
fail on the old code. The prerender crawler resolves locations with `new
URL()`, so it follows the relative form unchanged. Verified end to end
with an adapter-node build mounted under a stripped prefix, both the SSR
and the prerendered redirect.

No adapter-node test app here since #16305 is establishing that
infrastructure.

---

### 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: HoldYourWaffle <holdyourwaffle@gmail.com>
…kages can re-export remote functions (#16426)

Fixes #16353.

#14583 stops dependency tracing at `.remote.*` files by loading them as
empty modules during prebundling, so their server-only imports stay out
of the client bundle. An empty module also has no exports, so a package
entry that re-exports from a remote file kills the dev server during
dependency optimization

```
[MISSING_EXPORT] "lib_echo" is not exported by ".../data.remote.js"
   1 │ export { lib_echo } from './data.remote.js';
```

The docs say third party libraries can provide remote functions, so this
should work without per-package `optimizeDeps` config.

Externalizing the resolved id instead keeps tracing stopped and the
export surface intact, and the dev server serves the real module through
the normal transform. Build mode never ran the optimizer and stays
green.
…ndler (#16349)

closes #10863

`is_endpoint_request()` routes POST to a sibling `+server.js` whenever
the request isn't a native form submission (no `x-sveltekit-action`
header) and the `Accept` header doesn't clearly prefer `text/html`. If
that endpoint has no `POST` handler, `render_endpoint` returns a bare
405 instead of ever trying the page's `actions`, even when the page has
a matching action that could serve the request.

This adds one check after the endpoint is resolved: if it's a POST and
the endpoint has neither `POST` nor `fallback`, treat it as unusable and
fall through to the page instead. This mirrors the `endpoint_can_handle`
pattern already used for GET/HEAD in `version-3` (#16125), extended here
to POST for `main`.

New fixture at `endpoint-output/actions-with-endpoint`: a page with
`actions` next to a `+server.js` that only exports `GET`.

---

### 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.
Building an app with remote functions logs a big ugly warning about
broken source maps. This fixes it by using magic string to generate
them.

---------

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
Part of #16159. This makes `$app/paths` importable in service workers,
which removes the last import from `$service-worker` that might be
necessary.

It's a tiny bit hacky albeit a fairly non-invasive change: `match` now
needs to delegate to a per-environment `match_implementation` that gets
overridden in `client.js`.

Once this is merged I'll open a PR removing `$service-worker`
altogether.

---

### 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>
not sure why i didn't do this in the first place
extracts the drive-by improvements in #16443 to reduce the size of that
diff (am weighing a slightly different approach, but this change
unambiguously makes sense)

---------

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
github-actions Bot and others added 30 commits August 12, 2026 14:09
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/kit@3.0.0-next.21

### Major Changes

- breaking: move remote function types and `isValidationError` to
`@sveltejs/kit/remote`
([#16764](#16764))

- breaking: move `RequestEvent` and `Cookies` to `$app/server`
([#16751](#16751))

### Patch Changes

- fix: correctly implement Vite plugin hook filters
([#16760](#16760))

- fix: yield to allow prerender updates to be visible
([#16748](#16748))

- fix: don't destroy partial-line app output with the prerender progress
line ([#16750](#16750))
## @sveltejs/package@3.0.0-next.7

### Patch Changes

- chore: bump `svelte2tsx` to 0.7.60
([#16745](#16745))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
For the longest time, we weren't logging stuff in build correctly. If
the user hasn't set the log level explicitly, Vite saves the value as
`undefined`, which should be treated the same as it being set to 'info'
(the default value).

---

### 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

- [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: Copilot App <223556219+Copilot@users.noreply.github.com>
Reverts #16751. Moving `RequestEvent` and `Cookies` to `$app/server` was
a reasonable enough idea but it leaves an awkward asymmetry with
`ServerLoadEvent` (which extends `RequestEvent` but remains in
`@sveltejs/kit`) and `LoadEvent` (which extends `NavigationEvent`; both
of these are also in `@sveltejs/kit`).

We _could_ move `ServerLoadEvent` to `$app/server` instead, though then
we would probably need to move `ServerLoad`, and at that point we should
probably also consider moving
`Action`/`Actions`/`ActionFailure`/`AwaitedActions` there too, and if
we're moving stuff that defines exports from route files then it would
probably be weird to leave `PrerenderOption` behind (except that
obviously doesn't belong in `$app/server`).

And if we did that, we should probably move `LoadEvent` and
`NavigationEvent` to... `$app/navigation` presumably? But then we would
also want to move `Load` and `LoadProperties` there and I'm not sure how
I feel about that.

I'm not 100% on any of this. But I think the safest option is _probably_
to move `RequestEvent` and `Cookies` back to the `@sveltejs/kit` dumping
ground.

---

### 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

- [ ] 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.
this takes advantage of a small change on the `next` branch of
`svelte.dev` — collapses all the Private Types under the header, which
makes the page look a bit less chaotic
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/kit@3.0.0-next.22

### Patch Changes

- fix: respect Vite default log level
([#16767](#16767))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Fixes #16617

The client remote-function runtime is bundled and shipped to browsers
verbatim, but `Promise.withResolvers()` only shipped in Safari 17.4 /
Chrome 119 / Firefox 121. Vite 8's default `build.target` is Safari 16.4
/ Chrome 111, and the API is not polyfilled, so any app using remote
functions throws on Safari 16.4–17.3 (and older Chrome/Firefox).

PR #15510 removed the internal `with_resolvers()` helper in favour of
the native method on the assumption that Node 22 is the floor — which
holds for the server/build-time call sites but not for the client
runtime. This restores a plain executor wrapper and uses it at the four
client call sites only:

-
`packages/kit/src/runtime/client/remote-functions/query/instance.svelte.js`
-
`packages/kit/src/runtime/client/remote-functions/query-live/instance.svelte.js`
(constructor, `#main`, `reconnect`)

Server and build-time call sites keep the native
`Promise.withResolvers()`.

## Test

Added
`packages/kit/src/runtime/client/remote-functions/with-resolvers.svelte.spec.js`,
which stubs `Promise.withResolvers` to `undefined` (simulating a browser
that predates it) and:

- RED (before fix): `Query` returns `undefined` instead of `'value'`;
`LiveQuery` throws `TypeError: Promise.withResolvers is not a function`.
- GREEN (after fix): both pass.

`pnpm -F @sveltejs/kit test:unit` → 58 files / 729 passed, 110 skipped.
`check` and `lint` clean.

### Checklist
- [x] Fixes a real bug with a clear root cause
- [x] Includes a test that fails without this PR but passes with it
- [x] Changeset added (`@sveltejs/kit` patch)

Note: the full Playwright integration suite (`pnpm test:kit`) was not
run in this environment; the relevant surface is covered by the unit
test above.

---------

Co-authored-by: Sskift <Sskift@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Tee Ming <chewteeming01@gmail.com>
Okay I think _this_ is the last part of #16676. We already did this, but
briefly decided _not_ to put types in `$app/server`, even though that
would be more consistent with how we're doing everything else, because
then you might find yourself importing types from `$app/server` into
client-side code. But honestly, that's fine — it's an honest
representation of what's happening.

There _is_ a practical consideration in that these are treated
differently:

```ts
import type { RemoteQuery } from '$app/server';
import { type RemoteQuery } from '$app/server';
```

In the first case the import is removed entirely as far as bundling is
concerned; in the second case it's as though you imported `{}`. But I'm
not too concerned about it:

1. you will almost never need to import these things. it will basically
always be inferred
2. we can guide people towards the right outcome with a combination of
docs and good error messages

This PR also moves `invalid`, `isValidationError` and `ValidationError`
back into `@sveltejs/kit`, since they're closely related to `error` and
`redirect` etc. It also renames some of the remote function types that
for whatever reason ignored the naming conventions when they were
introduced.

---

### 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.
Fixes a small bug introduced in #16750 — the `moveCursor` and
`clearLine` calls were _themselves_ being intercepted, so `mid_line` was
always true, and we'd just print newline after newline

---

### 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.
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/kit@3.0.0-next.23

### Patch Changes

- fix: only print prerender progress newline when necessary
([#16766](#16766))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
closes #9423

With `rewriteRelativeImportExtensions` enabled, `svelte-package` already
emits `.ts` modules as `.js` and rewrites explicit imports. Static
`import.meta.glob` patterns were left pointing at the source extension,
so they no longer matched the packaged files.

This applies the same rewrite to relative static glob patterns,
including arrays, negated patterns, and no-substitution template
literals. Dynamic patterns and calls that are not Vite's exact
`import.meta.glob` form remain unchanged.

---

### 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`

Validated with:
- `pnpm run format`
- `pnpm run lint`
- `pnpm run check`
- `pnpm -F @sveltejs/package test`
- `pnpm -F @sveltejs/kit test:unit`

### 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.
# Add the new HTTP method

Adding the new QUERY method.
---

### 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.

---------

Co-authored-by: Nic Polumeyv <162764842+Nic-Polumeyv@users.noreply.github.com>
…n error is thrown during rendering (#16526)

Fixes the error page placement half of #16345.

Since #16301, an error thrown while rendering is caught by the boundary
at the depth that threw it, so the nearest `+error.svelte` renders
inside every layout between its own directory and the throwing
component. The same error thrown in `load` renders that component at its
own depth with the intervening layouts unmounted. Before #16301 the
generated root only armed a boundary at depths that own an error
component (`failed={errors[depth] ? failed : undefined}`), which made
render errors rethrow up to the owning depth. The unconditional boundary
plus the nearest-ancestor `findLast` changed that without a changeset,
first shipping in 3.0.0-next.8, the version #16345 was filed against.
SvelteKit 2 places the same error at the owning depth.

The client and the server now build that array with one shared function
instead of a copy each. Nearest-boundary selection (#14410, #15745) is
unchanged, only where the selected error page renders.

`set_nearest_error_page` rebuilt the chain with no errors at all, so a
render error inside a form error page fell back to the root one. It now
passes the route's.

Conditional arming exposed a latent ordering problem in the #16296 reset
path: `navigate` drains the resetters as soon as the new props are
applied, before the flush, so a stale failed boundary re-renders its old
content (which throws again) at a depth the new tree may no longer have.
Unconditionally armed boundaries silently re-swallowed that throw on
every teardown; with sparse arming it escaped to an ancestor boundary
and rendered an error page instead of the new route. The drain now runs
after `settled()`, matching the fork branch, which resets after state is
applied. Boundaries at removed depths are simply unmounted by the flush;
boundaries at surviving depths reset against a consistent tree.

The async test app's `/server-error-boundary` route already had exactly
this shape, with the root error page silently rendering inside the
section layout. The two existing tests now assert the layout is gone.

---------

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
…xclude list (#16788)

Fixes #13310. Netlify treats a trailing slash in `excludedPath` as
required rather than optional, but the prerendered root is recorded as
`/base/` when a base path is set, and `trailingSlash: 'always'` pages as
`/foo/`, so they were never excluded and hit the edge function.

Alternative to #16472.
`walk` in `utils/filesystem.js` and `list_files` in `core/utils.js` were
the same recursive walk with minor drift. Merged into one generator that
yields posix paths. `walk`'s `dirs` parameter had no callers.

---

### 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>
closes #16116

`get_buffer` and `LazyFile#stream` each had their own copy of the
chunk-range scan, now shared as a `read_range` async generator. This
fixes reading a zero-length file at the exact end of the payload, which
errored with 'incomplete file data' because the scan never found a chunk
containing its offset. The new test fails without the change.

Body reads are also chained now so that at most one is pending at a
time, which workerd requires. Verified against the #16116 repro app
under wrangler: on 3.0.0-next.4 the upload fails as reported, with this
patch applied both files read completely.

---

### 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>
…`nodeName` (#16769)

Fixes #15419

Named form controls shadow DOM properties on their form, so
`form.nodeName` can be an input element rather than a string. Same class
as #7593, #8467 and #16138.
…16774)

Stacked on #16526, the diff includes its commits until it merges. Second
half of the error-chain unification: the load-error rewind walk exists
in client and server copies. Server conversion and tests still to come.

---------

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
…6793)

A request whose body has been fully read never aborts its signal on
client disconnect, because `readableAborted` requires the stream to die
before `end`. Give `getRequest` the response so disconnects are detected
on the response side instead — `writableEnded` rather than
`writableFinished` because HTTP/2 marks cancelled streams as finished.
Split out of #16790.
By using subpath imports, we can get rid of grotesqueries like this:

```js
export const version = BROWSER ? payload.version : __SVELTEKIT_APP_VERSION__;
```

This gets more interesting when we do the same for `$app/navigation` and
`client.js`, but I'm starting small. No changeset because this is
invisible to the user

---

### 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

- [ ] 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: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…resolve (#16765)

closes #16689

`submit()` now resolves after the redirect navigation, as discussed in
the issue. This also keeps `pending` set until the redirect lands
(#15725). External redirects still resolve immediately, since their
navigations never settle.
Follow-up to #16795 — this applies the same thinking to `$app/state`. It
allows us to get rid of the awful `BROWSER` hack and colocate logic more
sensibly, with less indirection.

Again, no changeset, since no user-observable changes.

---

### 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

- [ ] 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>
closes #16785

Basically, paths in the manifest are relative to Vite's configured
`root`, but `write_client_manifest` was resolving them relative to
`process.cwd()`. These are normally the same, but aren't when Vite is
started programmatically from another directory, causing the generated
client manifest to import route files from the wrong place.

Passes the Vite root through to `write_client_manifest` and uses it to
resolve components, universal modules, and param matchers before
generating their imports. Adds a regression test where the project root
differs from `process.cwd()`.
#16794)

On Node, `setResponse` streams every `response.body` through a reader
loop, so a response without a pre-computed `content-length` header is
served with chunked transfer encoding. That is why the runtime can't
move off the deprecated `json`/`text` helpers, whose only load-bearing
job is stamping that header, and why a plain `Response.json` returned
from an endpoint is served chunked today. Every other runtime derives
the header from fixed bodies at serve time.

`setResponse` now races the body's first reads against a `setImmediate`
deadline before writing the head. A fixed body settles value-then-done
on microtasks, so it is sent with a measured `content-length`; a body
that leaves a read pending is a genuine stream and goes through the
existing streaming path unchanged, with its headers delayed by at most
one tick. Nothing is added when the response already carries a
`content-length` or a `transfer-encoding` (proxied responses can carry
the latter, and the pair would be invalid). Same approach as hono's
node-server.

`json`/`text` are untouched. Retiring them internally becomes a
follow-up; its one catch is the `http.response.body.size` span
attribute, which reads the `content-length` header.


#16804 is stacked on this.
as suggested in #16754, modernizes the cloudflare adapter's docs to
mention `wrangler types`. No changeset because docs-only

---

### 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:`.
Ref #15212.

Something we've wanted to do for a while is get rid of the virtual
modules, in favour of writing stuff to disk. The system becomes a lot
easier to understand when it involves real artifacts instead of the
crazy indirection we have going on at the moment.

I started with the `$app/env/*` stuff because that's likely to be the
most challenging, since it involves some mad science around starting up
a mini Vite dev server to load the `src/env.ts` module so that we can
analyse it so that we can create a generated module that _also_ loads
the `src/env.ts` module... anyway, it works, and so I assume we will be
able to do the same for the other `__sveltekit/*` modules.

(We could probably replace the `resolveId` logic with an alias that just
points to the `generated` folder, same as we have for `$app/*`
currently. That can wait for a follow-up PR though.)

Another thing I'm doing in this PR is creating the plugin in a separate
module, rather than adding to the chaos in `vite/index.js`. It involves
a little bit of duplication, but it makes everything so much more
self-contained, and makes the coupling between different plugins more
explicit (e.g. the `callback`).

---

### 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.

---------

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: Nic Polumeyv <162764842+Nic-Polumeyv@users.noreply.github.com>
closes #<!-- Add the related issue number here. Repeat this line for
each additional issue it closes -->

<!-- Explain the goal of the PR, why it is needed, and what has been
changed to achieve that goal -->

---

### 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.