Skip to content

feat: version 3 - #15497

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

feat: version 3#15497
teemingc wants to merge 806 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: 4da6320

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

This PR includes changesets to release 1 package
Name Type
@sveltejs/adapter-netlify Major

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 4da6320:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/4da6320db8d70b73b93e142e4bb6ba9173be3b97

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
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
kit-basic Ready Ready Preview Jul 31, 2026 2:24pm

Comment thread packages/kit/src/exports/vite/utils.js Fixed
Nic-Polumeyv and others added 7 commits August 6, 2026 21:51
Part of #16519, doing the unification suggested in
#16507 (comment). One
request state object, forked for `event.fetch` sub-requests. This also
makes the `state.prerendering`-in-dev idea from #16507 workable, since
there's no second carrier to desync from anymore.

---------

Co-authored-by: Rich Harris <hello@rich-harris.dev>
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-auto@8.0.0-next.3

### Major Changes

- breaking: require SvelteKit 3

### Patch Changes

- fix: convert resolved adapter path to a file URL before importing, so
builds work on Windows

- fix: allow prerelease versions of SvelteKit 3 to satisfy the peer
dependency range
- Updated dependencies
[[`bbd1e2f`](bbd1e2f),
[`e21d27b`](e21d27b),
[`6044d05`](6044d05),
[`7fb611f`](7fb611f),
[`9f06b3a`](9f06b3a),
[`8763327`](8763327),
[`7dc2379`](7dc2379),
[`a70c3eb`](a70c3eb),
[`89f49c7`](89f49c7),
[`f36b3a4`](f36b3a4),
[`1144a63`](1144a63),
[`9f06b3a`](9f06b3a)]:
  - @sveltejs/kit@3.0.0-next.15
## @sveltejs/adapter-cloudflare@8.0.0-next.5

### Major Changes

- breaking: minimum Wrangler version required is `4.118.0`
([#16668](#16668))

- breaking: upgrade `@cloudflare/workers-types` to 4.20260219.0

- breaking: upgrade minimum `wrangler` version to ^4.67.0

- breaking: remove `platform.context` in favour of `platform.ctx`

- breaking: require SvelteKit 3

- breaking: remove use of the Cloudflare Workers Cache API in favour of
Workers Caching ([#16640](#16640))

### Patch Changes

- chore: use `node:fs` instead of deprecated `builder.rimraf` and
`builder.mkdirp` ([#16286](#16286))

- chore: bump `@cloudflare/workers-types` to `4.20260621.1`

- fix: avoid overriding user's existing `_headers` rules

- chore: check the `WORKERS_CI` environment variable to determine if
we're building for Cloudflare Workers

- fix: allow prerelease versions of SvelteKit 3 to satisfy the peer
dependency range

- fix: avoid caching immutable asset 404s
- Updated dependencies
[[`bbd1e2f`](bbd1e2f),
[`e21d27b`](e21d27b),
[`6044d05`](6044d05),
[`7fb611f`](7fb611f),
[`9f06b3a`](9f06b3a),
[`8763327`](8763327),
[`7dc2379`](7dc2379),
[`a70c3eb`](a70c3eb),
[`89f49c7`](89f49c7),
[`f36b3a4`](f36b3a4),
[`1144a63`](1144a63),
[`9f06b3a`](9f06b3a)]:
  - @sveltejs/kit@3.0.0-next.15
## @sveltejs/adapter-netlify@7.0.0-next.6

### Major Changes

- chore: use `rolldown` for edge function bundling

- breaking: write output that conforms to the stable [Netlify Frameworks
API](https://docs.netlify.com/build/frameworks/frameworks-api/).
  
Deploying and previewing with Netlify CLI now requires
[v17.31.0](https://github.com/netlify/cli/releases/tag/v17.31.0) or
later. Run `npm i -g netlify-cli@latest` to upgrade.
- breaking: require SvelteKit 3

- breaking: edge function build target is now `es2022`

- breaking: require `vite@^8.0.12`, the first Vite 8 release bundling
stable `rolldown` 1.0.0

### Patch Changes

- chore: use `node:fs` instead of deprecated `builder.rimraf` and
`builder.mkdirp` ([#16286](#16286))

- fix: ensure types for `platform.context` work

- fix: include `utils.js` in package.json `files`

- chore: replace @netlify/functions with @netlify/types for the Context
type

- fix: provide distinct names for each split serverless function
([#16667](#16667))

- fix: await `init` on every request to prevent race condition

- chore: bump Rolldown to `1.2.0`
- Updated dependencies
[[`bbd1e2f`](bbd1e2f),
[`e21d27b`](e21d27b),
[`6044d05`](6044d05),
[`7fb611f`](7fb611f),
[`9f06b3a`](9f06b3a),
[`8763327`](8763327),
[`7dc2379`](7dc2379),
[`a70c3eb`](a70c3eb),
[`89f49c7`](89f49c7),
[`f36b3a4`](f36b3a4),
[`1144a63`](1144a63),
[`9f06b3a`](9f06b3a)]:
  - @sveltejs/kit@3.0.0-next.15
## @sveltejs/adapter-node@6.0.0-next.8

### Major Changes

- chore: migrate from rollup to rolldown

- breaking: require SvelteKit 3

- breaking: add `kit.paths.origin` config option, remove
`kit.prerender.origin` and the `adapter-node` `ORIGIN` environment
variable

- breaking: require `vite@^8.0.12`, the first Vite 8 release bundling
stable `rolldown` 1.0.0

### Minor Changes

- feat: better error logging

### Patch Changes

- fix: serve static files with the Content-Type recorded in the manifest

- chore: use `node:fs` instead of deprecated `builder.rimraf` and
`builder.mkdirp` ([#16286](#16286))

- fix: allow prerelease versions of SvelteKit 3 to satisfy the peer
dependency range

- fix: correctly bundle entrypoints on Windows

- fix: preserve stripped path prefixes by making trailing-slash
redirects relative

- chore: bump Rolldown to `1.2.0`

- fix: don't send `Vary: Accept-Encoding` for assets that were never
precompressed
- Updated dependencies
[[`bbd1e2f`](bbd1e2f),
[`e21d27b`](e21d27b),
[`6044d05`](6044d05),
[`7fb611f`](7fb611f),
[`9f06b3a`](9f06b3a),
[`8763327`](8763327),
[`7dc2379`](7dc2379),
[`a70c3eb`](a70c3eb),
[`89f49c7`](89f49c7),
[`f36b3a4`](f36b3a4),
[`1144a63`](1144a63),
[`9f06b3a`](9f06b3a)]:
  - @sveltejs/kit@3.0.0-next.15
## @sveltejs/adapter-static@4.0.0-next.4

### Major Changes

- breaking: require SvelteKit 3

### Patch Changes

- chore: use `node:fs` instead of deprecated `builder.rimraf` and
`builder.mkdirp` ([#16286](#16286))

- fix: avoid caching immutable asset 404s when configuring for Vercel

- fix: match adapter-vercel's prerendered redirect handling when
deploying to Vercel

- fix: allow prerelease versions of SvelteKit 3 to satisfy the peer
dependency range
- Updated dependencies
[[`bbd1e2f`](bbd1e2f),
[`e21d27b`](e21d27b),
[`6044d05`](6044d05),
[`7fb611f`](7fb611f),
[`9f06b3a`](9f06b3a),
[`8763327`](8763327),
[`7dc2379`](7dc2379),
[`a70c3eb`](a70c3eb),
[`89f49c7`](89f49c7),
[`f36b3a4`](f36b3a4),
[`1144a63`](1144a63),
[`9f06b3a`](9f06b3a)]:
  - @sveltejs/kit@3.0.0-next.15
## @sveltejs/adapter-vercel@7.0.0-next.5

### Major Changes

- chore: use `rolldown` for edge function bundling

- breaking: edge function build target is now `es2022`

- breaking: require `vite@^8.0.12`, the first Vite 8 release bundling
stable `rolldown` 1.0.0

- breaking: remove support for edge and Node 20 runtimes

### Patch Changes

- chore: bump `@vercel/nft` dependency

- chore: use `node:fs` instead of deprecated `builder.rimraf` and
`builder.mkdirp` ([#16286](#16286))

- fix: allow prerelease versions of SvelteKit 3 to satisfy the peer
dependency range

- fix: await `init` on every request to prevent race condition

- chore: bump Rolldown to `1.2.0`
- Updated dependencies
[[`bbd1e2f`](bbd1e2f),
[`e21d27b`](e21d27b),
[`6044d05`](6044d05),
[`7fb611f`](7fb611f),
[`9f06b3a`](9f06b3a),
[`8763327`](8763327),
[`7dc2379`](7dc2379),
[`a70c3eb`](a70c3eb),
[`89f49c7`](89f49c7),
[`f36b3a4`](f36b3a4),
[`1144a63`](1144a63),
[`9f06b3a`](9f06b3a)]:
  - @sveltejs/kit@3.0.0-next.15
## @sveltejs/enhanced-img@1.0.0-next.4

### Major Changes

- breaking: require Node 22 or newer

- breaking: require `vite@^8.0.12`, the first Vite 8 release bundling
stable `rolldown` 1.0.0

### Minor Changes

- breaking: require Vite 8 and `vite-plugin-svelte` 7

### Patch Changes

- chore: replace the `$lib` alias with `#lib` in docs

- chore: bump `vite-imagetools` to v11
## @sveltejs/kit@3.0.0-next.15

### Major Changes

- breaking: remove `experimental.handleRenderingErrors` flag

- breaking: make `getRequest` and `setResponse` synchronous

- breaking: TypeScript 6 is now the minimum required version

- breaking: refresh all load functions/queries when clicking a link to
the current URL

- breaking: upgrade to `cookie` v2. Cookie names must now contain only
ASCII characters

- breaking: require Node 22 or newer

- breaking: remove the `preloadStrategy` option. `modulepreload` will
always be used

- breaking: default the cookie `path` option to `'/'`

- breaking: remove `@sveltejs/kit/node/polyfills`

- breaking: add `config.kit.output.linkHeaderPreload` to preload using
the `Link` header

- breaking: require `@sveltejs/vite-plugin-svelte` v7

- breaking: make `page.url` immutable on a type level

- breaking: remove `base`, `assets`, and `resolveRoute` from
`$app/paths`

- breaking: remove `createEntries` from the `Builder` object passed to
adapter functions

- breaking: return no content for 204 responses

- breaking: rename `Pathname` type to `Path` and `Asset` to `AssetPath`
  breaking: remove leading `/` from `Path` and `AssetPath`
- breaking: `handle`'s `resolve` is now typed to always return a
`Promise`

- breaking: require Svelte config options to be passed through the Vite
plugin

- breaking: form action responses now use the HTTP status code returned
from `fail`

- breaking: write tsconfig to `node_modules/$app/tsconfig`

- breaking: remove the deprecated CSRF `checkOrigin` option in favor of
`trustedOrigins`

- breaking: the `delta` property now only exists for `popstate`
navigation events

- breaking: change `form.error` type from `any` to `App.Error |
undefined`

- breaking: remove deprecated `pragma` header in version polling for
improved CORS support

- 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

- breaking: require Svelte 5.56.4 or newer

- breaking: error on `event.url`, `event.params` and `event.route`
access inside queries

- breaking: delete `$service-worker` module

- breaking: move `defineEnvVars` to `@sveltejs/kit/env`

- breaking: nested server-only directories

- feat: allow adapters to provide additional Vite plugins

- breaking: replace the `$lib` alias with `#lib` and remove `files.lib`
config.

- chore: change `error`, `isHttpError`, `redirect`, and `isRedirect` to
refer to public type instead of internal class

- breaking: add 'error' result type to `preloadData`

- breaking: detect new deployments on data, remote, and form action
responses, tab focus, and visibility change, and default
`version.pollInterval` to 1 hour

- breaking: disallow cross-origin form submissions without a
`Content-Type` header

- breaking: Server-only directories (`/server/` in the path) are now
treated as server-only everywhere inside the project (except
`src/routes` and the assets directory)

- breaking: `config` exported from a universal route file takes
precedence over a server one

- breaking: require Vite 8. Provides new functionality even for existing
Vite 8 users such as faster builds with Vite hook filters and more
powerful SvelteKit adapters with the Vite environment API

- breaking: remove `data-sveltekit-*` option `'off'` in favour of
`false`

- breaking: move tracing out of the experimental namespace and remove
the instrumentation flag

- breaking: add `kit.paths.origin` config option, remove
`kit.prerender.origin` and the `adapter-node` `ORIGIN` environment
variable

- breaking: remove `$app/stores`

- breaking: add `refreshAll` and deprecate `invalidateAll`

- breaking: disallow `*.remote.ts/js` files unless
`experimental.remoteFunctions` is enabled

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

- breaking: don't abort navigation when calling `invalidate(All)` during
navigation

- breaking: consistent special filename patterns

- breaking: allow `handleError` to influence status code

- breaking: delegate CORS handling to Vite for static directory requests
during development

- breaking: require `vite@^8.0.12`, the first Vite 8 release bundling
stable `rolldown` 1.0.0

- breaking: only include routes with a `+page` or `+server` in `RouteId`

- breaking: require Node 22.17

- breaking: deprecate `error(status, {...})` in favour of `error(status,
message, {...})`

- breaking: forbid external redirects by default

- breaking: remove param files in folder in favor of `params.js/ts` file

- breaking: `preloadCode` now takes a route ID (e.g. `/blog/[slug]`)
instead of a pathname. Route IDs are not prefixed with `paths.base`

- breaking: remove deprecated `.run()` method from live queries

### Minor Changes

- feat: allow hyphens in param and matcher names

- feat: add `$app/manifest` module with `immutable`, `assets`,
`prerendered`, and `routes` exports

- feat: add `ErrorProps` to generated types

- feat: support sourcemaps in production

- feat: return the list of compressed files from `builder.compress`

- feat: warn when tsconfig doesn't exclude service worker
([#16645](#16645))

- feat: validate that all remote form fields were created with
form.fields.foo.as(...)

- feat: support function validators for environment variables

- feat: use `type: 'module'` for service worker registrations

- feat: add shallow routing to `goto` and deprecate `pushState` and
`replaceState`

- feat: make `$app/paths` importable in service workers

- feat: preserve page state set through `goto(..., { state,
persistState: true })` across reloads

- feat: reinstate `$env/static/private`, `$env/dynamic/private`,
`$env/static/public`, `$env/dynamic/public` and `$app/environment` as
deprecated aliases for `$app/env/private` `$app/env/public` and
`$app/env`

- feat: add `page` and `endpoint` booleans to `$app/manifest`'s
`routes`, and export a `ManifestRoute` type

- feat: `$app/service-worker` module

- feat: resolve paths using the Vite config `root` option instead of
`process.cwd()` to better support monorepo configurations such as Vitest
workspaces

- feat: better error logging

- feat: add `PageRouteId` and `EndpointRouteId` to `$app/types`

- feat: better tsconfig validation

- feat: add `dirty()` property to form fields

- chore: deprecate `Response` helpers in favor of platform-provided
alternatives

- feat: add `cookies.parse` method

- feat: support custom values in `page.state` via `transport` hook
([#16662](#16662))

- fix: default cookies to `secure` to `false` during development

- feat: warn when naively proxying requests that result in responses
with a `content-encoding` header
([#16633](#16633))

### Patch Changes

- fix: persist global app state across module graph reloads
([#16663](#16663))

- fix: generate valid `Path` types for routes with optional or rest
params, several params in one segment, or escape sequences

- fix: allow `undefined` values to be passed to form field `.as(...)`
where applicable

- chore: deprecate `builder.rimraf` and `builder.mkdirp` in favour of
`node:fs` methods ([#16610](#16610))

- fix: don't treat callable standard schemas as function param matchers

- fix: decode all numeric character references, including above `ffff`,
when crawling prerendered pages

- fix: include queries refreshed from within another query in the
serialized response

- fix: reject malformed streamed data encoding

- perf: cache the default cookie header parse and avoid allocations in
`cookies.get`

- fix: exclude deleted cookies from `cookies.getAll()` so it stays
consistent with `cookies.get()`

- fix: hide stack traces for internal errors like 404s

- chore: deduplicate repeated CSP directive handling

- fix: defer `query.refresh()` in server commands until after the
command body completes

- fix: drain unconsumed request bodies so keep-alive connections don't
hang

- fix: resolve service worker and `tsconfig.json` based on Vite `root`
setting

- perf: match only unpaired surrogates when escaping HTML

- fix: treat `data:` protocol URLs as external for redirect

- chore: deduplicate request hashing for serialized fetch responses

- fix: don't treat `Object.prototype` members as param matchers during
validation

- fix: don't report empty environment variables as missing

- fix: exclude routes without a page or endpoint from `routes` in
`$app/manifest`, and remove directories with no route files from
`LayoutParams`

- fix: avoid Vite dev server reload on initial page request

- fix: don't set a `null` `accept-language` header on internal `fetch`
sub-requests when the incoming request has none

- fix: correctly detect prerendered paths in server `fetch` when
`paths.base` is set

- fix: populate `$app/env/*` dynamic variables in contexts that don't
run the dev server, such as `vite-node`

- fix: properly handle Date objects in form.fields.set

- fix: return 404 for form actions and remote functions whose name is an
`Object.prototype` member

- fix: no longer throw "An impossible situation occurred" when a
server-only module is imported by both server and client code

- fix: don't duplicate remote modules in the generated manifest

- chore: reuse base64 and text decoding helpers

- fix: explain the removal of `$lib` and `$service-worker` when their
imports fail to resolve
([#16635](#16635))

- fix: correctly massage stack traces with async frames
([#16633](#16633))

- fix: mark `RequestEvent` properties as `readonly`
([#16661](#16661))

- fix: update `match` parameter type
([#16636](#16636))

- fix: generate sourcemaps for remote modules

- fix: avoid empty getElementById() call on hash routing navigation

- fix: serve `.ico` files with `image/x-icon` Content-Type

- fix: exclude inlined files from the page's `$app/manifest` immutable
list

- fix: avoid client-side code being bundled by Cloudflare Wrangler

- fix: record the mime types of prerendered paths in the server manifest

- chore: clarify which hooks run during server route resolution

- fix: make `paths.origin` type looser

- feat: send periodic `keep-alive` SSE comments from `query.live` to
prevent idle-timeout errors

- fix: warn if hook files are spelled as "hook" instead of "hooks"

- chore: only generate each route's resolution module once when
prerendering

- fix: skip clean fields when programmatically validating forms

- perf: skip import graph collection outside client environments

- breaking: experimental remote form `validate({ includeUntouched })`
option is now `all`

- fix: avoid client build warning about externalising `node:async_hooks`

- fix: reinstate `$app/environment` as an alias for `$app/env`, in case
dependencies import it

- fix: error when reading non-serialized `set-cookie` headers via
`getSetCookie` in `load`
([#16614](#16614))

- perf: avoid quadratic remote form issue merging

- chore: deprecate the `alias` option

- fix: don't attempt to serialize fetch responses when the request body
is not a string or TypedArray

- fix: handle rejected streamed server data after delayed loads

- fix: render pages over sibling endpoints without GET or HEAD handlers

- fix: prevent infinite loops when server-side queries refresh each
other in a cycle during the single-flight drain

- fix: populate `version` in service workers

- feat: add field.touched() helper to remote form fields

- fix: read the error status of `App.Error` in the `prerender` and
`query.live` remote functions

- fix: resolve remote modules as external during dev prebundling so
packages can re-export remote functions

- fix: propagate errors from prerendered remote responses instead of
re-running the function

- fix: allow reserved words (e.g. `delete`, `class`) as remote function
export names

- fix: reset failed `<svelte:boundary>` on client navigation so a stale
`+error.svelte` is torn down

- fix: expand `[x+nn]` and `[u+nnnn]` escape sequences when resolving a
route id to a pathname

- fix: respect the status returned from `handleError` on the fallback
error page served to error-page sub-requests

- fix: warn if there are plugins using `transformIndexHtml`

- fix: refetch route-tracking server data when navigating away from an
error page

- fix: allow routes to contain `[` and `]` via the `[x+5b]` and `[x+5d]`
escapes

- chore: remove dependency on kleur

- fix: serialize `query(...).set(...)`/`query(...).refresh()` values
into the rendered HTML when called from within a query during SSR

- fix: detect `$app/server` and `$app/env/private` client imports when
SvelteKit is installed inside the project root
([#16648](#16648))

- fix: sort directory entries when building the route manifest so node
indices are deterministic across runtimes (e.g. Bun and Node)

- fix: skip unnecessary `version.json` checks if `updated.current` is
already `true`

- fix: allow generation of $app/tsconfig without TypeScript installed

- chore: remove dependency on `set-cookie-parser`

- fix: fall back to the page's form actions when a sibling endpoint has
no POST handler

- perf: use a `Set` to check element ids when validating fragment links
during prerendering

- fix: preserve shared client chunk hashes when the app version changes

- fix: include hoisted packages in Vite's `server.fs.allow` list

- fix: only include `_app/immutable` files in `$app/manifest`'s
`immutable` in the service worker

- chore: remove the dead `SSRState.fallback` field and name the server
state fork semantics

- fix: import resolved peer dependencies as file URLs so
project-relative resolution works on Windows

- fix: log errors caught by the Vite dev server handler

- fix: resolve `root` per instance of the SvelteKit Vite plugin

- fix: ignore path casing differences when warning about overridden Vite
config on Windows

- fix: return a lightweight 404 instead of rendering the error page for
subresource requests

- fix: preserve stripped path prefixes by making trailing-slash
redirects relative

- fix: preserve the current URL search parameters when submitting a
remote form without JavaScript

- fix: only treat files in node_modules as remote modules when the
package has a peer dependency on @sveltejs/kit
([#16492](#16492))

- fix: treeshake prerendered remote functions in the right chunks

- chore: deduplicate type-stripping logic in `tweak_types`

- fix: error during development if the adapter does not support
instrumentation and it exists

- fix: use mouseover+mousemove for preloading to reduce events

- fix: write generated tsconfig to `node_modules/$app/tsconfig.json` so
that tools with simplified tsconfig resolution can find it

- fix: more informative error message when running a command inside a
query or prerender function

- fix: prerender and crawl pages whose `content-type` header carries a
`charset` parameter

- fix: stream promised `read` results lazily instead of eagerly
buffering them

- fix: correctly decode `[u+nnnn]` escape sequences above `ffff`
## @sveltejs/package@3.0.0-next.5

### Major Changes

- breaking: require Node 22 or newer

### Minor Changes

- feat: warn when using a `.server.` file or file inside a `server`
directory without importing a server-only module

- feat: transform import aliases into relative imports in files

### Patch Changes

- chore: remove dependency on sade

- chore: replace private fs helpers with Node built-ins
([#16610](#16610))

- chore: remove dependency on kleur

- fix: import resolved peer dependencies as file URLs so
project-relative resolution works on Windows

- fix: emit declarations when the tsconfig lives above the package root

- fix: declare typescript as an optional peer dependency so
svelte-package works under strict node-linkers

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
#16536 but manually because renovate
bot is not rebasing. Partly helps stop the audit warnings but `wrangler`
still causes them to be there
Inspired by https://bsky.app/profile/ariperkkio.dev/post/3msd4brc2gk2u I
want to see if we can skip these installs

We were already caching the Playwright installs to reduce the install
times. This helps skip it entirely for Chrome testing. On ubuntu, it
shaves off an average of 10 seconds. On windows, it shaves off 20
seconds.
Fixes #16579. Same fix as #11269: for `.html` pages the resolution
module is emitted as a sibling (`page.html__route.js`) instead of
nested.
`packages/package/src/config.js` has its own `resolveConfig` +
find-plugin loader, with `import_peer` and `resolve_peer` copied
alongside it. It resolves under `'build'`, so reading the config runs
the full `sync.all` and needs `src/app.html`, and it makes `vite`
mandatory even for a library that only has a `svelte.config.js`.

Use `@sveltejs/load-config` instead. It resolves under `'serve'` and
falls back to `svelte.config.js` when the Vite config has no Svelte
plugin.
`Server.respond` returns `HEAD` responses with a body. The HTTP layer in
front of it has always discarded that body, so nothing noticed until
`Server.respond` was called directly.

It now cancels the body and returns a bodiless copy of the response,
after the dev-only error lookup keyed on the original response object.
Headers, including `content-length`, are kept.
@vercel-security-reviewer

Copy link
Copy Markdown

Security review details

teemingc and others added 27 commits September 8, 2026 00:14
This PR moves some Netlify tests which can be run without deploying the
app. They only inspect the build output
Follow-up on
#17022 (comment)

This PR opts to generating a unique ID that Netlify split serverless
functions check before restoring the requested original URL pathname.
This approach works with Netlify edge functions too that don't have the
`process.env.NETLIFY_FUNCTIONS_TOKEN` environment variable.
Previously, `_redirects` was only copied when deploying serverless
functions. This PR fixes it so it's also copied for edge builds

---

### 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.
This PR swaps out the error-prone serverless function file naming of
replacing symbols in the route id to using an index (similar to the
Vercel adapter). This fixes a situation where a `/foo.bar` route would
be overridden by `/foo_bar` because we were replacing `.` with `_`.

It also adds the route id to the display name for the serverless
function, shown in the Netlify function logs.

---

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

2c4e73d moved Config to @sveltejs/kit/vite and deleted the
configuration page with it, so the docs lost the left-nav entry and the
per-option On-this-page anchors (everything collapsed under a single
#Config). This puts the page back, pointing EXPANDED_TYPES at
@sveltejs/kit/vite#Config. The 31 existing (configuration#...) links in
18 files resolve again.

Heads up: svelte.dev sync-docs still looks for Config/KitConfig in
@sveltejs/kit, so it'll need a companion tweak to read Config from
@sveltejs/kit/vite (it throws before preprocess runs on version-3).
Happy to follow up there.

---

### 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>
related to #10828

Adds a regression test when `kit.paths.relative` is enabled and the app
is mounted at `/proxy`.

---

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

- [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>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
fixes #10828

---

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

- [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>
Co-authored-by: Nic Polumeyv <162764842+Nic-Polumeyv@users.noreply.github.com>
Scroll restoration and focus reset live in `client.js` but read none of
its state. This moves them, unchanged, into their own module, the shape
`snapshots.js` took in #16685.
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-cloudflare@8.0.0-next.7

### Major Changes

- breaking: populate env vars before `instrumentation.server.js` is
evaluated and update the adapter instrumentation API
([#16303](#16303))

- breaking: remove cloudflare `platform`, emulate the
`cloudflare:workers` module instead
([#16754](#16754))

- breaking: replace the `builder.generateManifest` with
`builder.generateServerInstance` and `builder.manifest`
([#16875](#16875))

### Patch Changes

- Updated dependencies
[[`9a4b343`](9a4b343),
[`ee2f55b`](ee2f55b),
[`65673a4`](65673a4),
[`1b79845`](1b79845),
[`b12bb78`](b12bb78),
[`03f1687`](03f1687),
[`49f0808`](49f0808),
[`e7c74bf`](e7c74bf),
[`0876d63`](0876d63),
[`9a2b9ba`](9a2b9ba),
[`c9f54b5`](c9f54b5),
[`22b8152`](22b8152),
[`f6d44cf`](f6d44cf),
[`3c3a27b`](3c3a27b),
[`7f376b1`](7f376b1),
[`8a587c7`](8a587c7),
[`aa4f960`](aa4f960)]:
  - @sveltejs/kit@3.0.0-next.27
## @sveltejs/adapter-netlify@7.0.0-next.11

### Major Changes

- breaking: populate env vars before `instrumentation.server.js` is
evaluated and update the adapter instrumentation API
([#16303](#16303))

- breaking: replace the `builder.generateManifest` with
`builder.generateServerInstance` and `builder.manifest`
([#16875](#16875))

### Patch Changes

- fix: route requests with omitted optional parameters to split
serverless functions
([#17020](#17020))

- fix: copy `_redirects` when deploying edge function
([#17047](#17047))

- chore: replace `@iarna/toml` with `smol-toml`
([#16948](#16948))

- chore: identify serverless functions with a UUID instead of Netlify's
function token ([#17044](#17044))

- fix: ensure serverless function files have unique names
([#17049](#17049))
- Updated dependencies
[[`9a4b343`](9a4b343),
[`ee2f55b`](ee2f55b),
[`65673a4`](65673a4),
[`1b79845`](1b79845),
[`b12bb78`](b12bb78),
[`03f1687`](03f1687),
[`49f0808`](49f0808),
[`e7c74bf`](e7c74bf),
[`0876d63`](0876d63),
[`9a2b9ba`](9a2b9ba),
[`c9f54b5`](c9f54b5),
[`22b8152`](22b8152),
[`f6d44cf`](f6d44cf),
[`3c3a27b`](3c3a27b),
[`7f376b1`](7f376b1),
[`8a587c7`](8a587c7),
[`aa4f960`](aa4f960)]:
  - @sveltejs/kit@3.0.0-next.27
## @sveltejs/adapter-node@6.0.0-next.12

### Major Changes

- breaking: populate env vars before `instrumentation.server.js` is
evaluated and update the adapter instrumentation API
([#16303](#16303))

- breaking: replace the `builder.generateManifest` with
`builder.generateServerInstance` and `builder.manifest`
([#16875](#16875))

### Patch Changes

- Updated dependencies
[[`9a4b343`](9a4b343),
[`ee2f55b`](ee2f55b),
[`65673a4`](65673a4),
[`1b79845`](1b79845),
[`b12bb78`](b12bb78),
[`03f1687`](03f1687),
[`49f0808`](49f0808),
[`e7c74bf`](e7c74bf),
[`0876d63`](0876d63),
[`9a2b9ba`](9a2b9ba),
[`c9f54b5`](c9f54b5),
[`22b8152`](22b8152),
[`f6d44cf`](f6d44cf),
[`3c3a27b`](3c3a27b),
[`7f376b1`](7f376b1),
[`8a587c7`](8a587c7),
[`aa4f960`](aa4f960)]:
  - @sveltejs/kit@3.0.0-next.27
## @sveltejs/adapter-vercel@7.0.0-next.9

### Major Changes

- breaking: populate env vars before `instrumentation.server.js` is
evaluated and update the adapter instrumentation API
([#16303](#16303))

- breaking: replace the `builder.generateManifest` with
`builder.generateServerInstance` and `builder.manifest`
([#16875](#16875))

### Patch Changes

- fix: pass the requested pathname, including any trailing slash, to ISR
functions ([#16903](#16903))

- fix: trace `process.cwd()`-relative files from the project directory
and never glob from the filesystem root
([#16972](#16972))
- Updated dependencies
[[`9a4b343`](9a4b343),
[`ee2f55b`](ee2f55b),
[`65673a4`](65673a4),
[`1b79845`](1b79845),
[`b12bb78`](b12bb78),
[`03f1687`](03f1687),
[`49f0808`](49f0808),
[`e7c74bf`](e7c74bf),
[`0876d63`](0876d63),
[`9a2b9ba`](9a2b9ba),
[`c9f54b5`](c9f54b5),
[`22b8152`](22b8152),
[`f6d44cf`](f6d44cf),
[`3c3a27b`](3c3a27b),
[`7f376b1`](7f376b1),
[`8a587c7`](8a587c7),
[`aa4f960`](aa4f960)]:
  - @sveltejs/kit@3.0.0-next.27
## @sveltejs/kit@3.0.0-next.27

### Major Changes

- major: error when a client-requested single-flight mutation isn't
respected by the server, allow the server to explicitly ignore refreshes
([#16892](#16892))

- breaking: remove `Server` constructor and `SSRManifest` from public
types ([#16876](#16876))

- breaking: replace the `builder.generateManifest` with
`builder.generateServerInstance` and `builder.manifest`
([#16875](#16875))

### Minor Changes

- feat: allow adapters to receive the Svelte config as a function
argument when adding Vite plugins
([#16986](#16986))

- feat: allow adapters to override `getRequest` and `setResponse` during
`vite dev` and `vite preview`
([#16753](#16753))

### Patch Changes

- fix: respect `paths.relative` during development for client files
([#17053](#17053))

- fix: clarify circular imports from `src/env`
([#17014](#17014))

- breaking: populate env vars before `instrumentation.server.js` is
evaluated and update the adapter instrumentation API
([#16303](#16303))

- fix: record a history traversal before resolving its route
([#16959](#16959))

- fix: support coordinate objects from image inputs in remote forms
([#16944](#16944))

- fix: walk and copy directories without a stat per file
([#16995](#16995))

- fix: widen remote form fields for union schemas and string enums
([#16937](#16937))

- fix: respond to `HEAD` requests without a body
([#17036](#17036))

- chore: replace deprecated Vite dev server APIs
([#16961](#16961))

- fix: settle a query's pending request in place when its value arrives
through `set()` ([#16958](#16958))

- fix: prevent `await_reactivity_loss` warning and
`state_unsafe_mutation` error when the new version detector runs after
an `await` ([#16915](#16915))

- chore: parse page options and remote modules with Vite's `parseSync`
instead of `acorn`
([#16947](#16947))
## @sveltejs/adapter-auto@8.0.0-next.4

### Minor Changes

- feat: add zero-config deployment support for Render
([#16850](#16850))

### Patch Changes

- Updated dependencies
[[`9a4b343`](9a4b343),
[`ee2f55b`](ee2f55b),
[`65673a4`](65673a4),
[`1b79845`](1b79845),
[`b12bb78`](b12bb78),
[`03f1687`](03f1687),
[`49f0808`](49f0808),
[`e7c74bf`](e7c74bf),
[`0876d63`](0876d63),
[`9a2b9ba`](9a2b9ba),
[`c9f54b5`](c9f54b5),
[`22b8152`](22b8152),
[`f6d44cf`](f6d44cf),
[`3c3a27b`](3c3a27b),
[`7f376b1`](7f376b1),
[`8a587c7`](8a587c7),
[`aa4f960`](aa4f960)]:
  - @sveltejs/kit@3.0.0-next.27
## @sveltejs/package@3.0.0-next.8

### Patch Changes

- chore: read the Svelte config via `@sveltejs/load-config`
([#17039](#17039))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
fixes #10828 for server-side route resolution too

render.js and server_routing.js each had their own rule for turning
manifest paths into URLs, and the server routing one never applied
`paths.relative` once a base path was set, so a built app with
`router.resolution: 'server'` breaks behind a prefix-stripping proxy.
Both now share `resolve_paths` and `client_path`, and the proxy test
from #17051 runs in build mode too.

---------

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: teemingc <chewteeming01@gmail.com>
same changes already made on the `main` branch in
#17052

makes deploy logs a bit more verbose

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Moves Netlify edge function configuration from `config.json` into the
generated function module

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
refactors the edge entrypoint to be similar to the serverless one so we
can dedupe some of the build 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
- [ ] 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: Copilot App <223556219+Copilot@users.noreply.github.com>
This PR removes the arbitrary limitation preventing Netlify edge
functions from being split. It also adds a variation of the `split` test
suite with `edge: true` set

---

### 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: Copilot App <223556219+Copilot@users.noreply.github.com>
The server tests in `basics` never needed a browser: they assert on
status, headers and body. Running them through Playwright with
JavaScript off meant a preview server and a browser per project,
repeated in every no-js leg of the matrix, and a 1 to 2 minute loop to
run one of them locally. The file said so itself (`server.test.js:33`,
"this would ideally be a unit test of `Server`").

They now run under vitest from `unit-test/server.spec.js`, calling the
built app's `Server.respond` directly with no HTTP in between. With
`KIT_TEST_DEV` set the same file goes through Vite's dev server in
middleware mode instead, so both modes keep their coverage. The suite
runs from the app's own `test:dev` and `test:build` after Playwright,
against the build Playwright already made, so nothing builds twice and
the unit job is untouched. 13 tests stay in Playwright because they
assert what `vite preview` and the dev server do around `Server` (static
assets, prerendered output).

Stacked on #17036: three of the moved `HEAD` tests need it in build
mode.

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
Two kinds of test in the moved server suite exercise nothing in kit
under a direct `Server.respond` call.

Six of the eight CSRF cases repeat `csrf.spec.js` one for one: same
origin, non-allowed origins, GET, non-form content types, the method
loop, missing origin. Only the 403 body text and the
`csrf.trustedOrigins` wiring are checked nowhere else, so those two
stay.

The slow-read test hands the endpoint an in-memory buffer, so nothing is
read slowly and the digest round-trip only proves `Request.body`. The
backpressure it used to reach over HTTP has its own cases in
`node/index.spec.js`.

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
The recently added `unit-test` directory doesn't contain unit tests. The
most salient distinction between them and the contents of `test` is that
one set uses Playwright while the other uses Vitest. This makes that
explicit

---------

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Adds regression coverage for adapter-node's production dependency
externalization. The platform app now consumes a local fixture
dependency at runtime and verifies its implementation is absent from the
generated JavaScript.
adds default values to the jsdoc for the adapter options
closes #1604

As mentioned in
#1604 (comment) , we
should stop inferring the output directory from the netlify.toml file as
it simplifies things for us. In its place, we add a `publish` adapter
option if users want to configure where that goes, similar to the Node
and static adapters.

---

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

- [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>
stacked on #17069

Adds two tests:
- checks that `handler` is exported from `build/handler.js`
- ensures user module IDs aren't replaced by us during the build

Co-authored-by: Elliott Johnson <hello@ell.iott.dev>
stacked on top of #17077

This PR gets rid of the second bundle step in the Node adapter in favour
of configuring the Vite build.
stacked on #17068

closes #10040

Adapter builders can copy generated sourcemaps to a different directory,
leaving relative source paths pointing at the wrong path.

This PR rebases relative `sources` and `sourceRoot` values during copies
while preserving absolute paths, URLs, mappings, indexed-map structure,
and unchanged map text when no rewrite is needed.

An alternative is to use the Rolldown `sourcemapPathTransform` hook but
that makes them invalid for vite preview
https://rolldown.rs/reference/OutputOptions.sourcemapPathTransform

---

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

- [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>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
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.