Skip to content

feat: version 3#15497

Draft
teemingc wants to merge 102 commits intomainfrom
version-3
Draft

feat: version 3#15497
teemingc wants to merge 102 commits intomainfrom
version-3

Conversation

@teemingc
Copy link
Copy Markdown
Member

@teemingc teemingc commented Mar 5, 2026

Opened just so that I could easily see CI checks

You can try SvelteKit 3 by installing any of the packages with

# https://pkg.pr.new/package_name@pr_number_or_commit_hash
# For example:
pnpm i -D https://pkg.pr.new/@sveltejs/kit@15497
pnpm i -D https://pkg.pr.new/@sveltejs/adapter-cloudflare@15497

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.

benmccann and others added 30 commits February 12, 2026 16:06
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Closes #11190

`modulepreload` is now baseline 2023:
https://caniuse.com/?search=modulepreload

I left the type so that it will show up in the docs still for users on
older versions of Kit

Removed the test from the options app because `modulepreload` only gets
written when not prerendering
closes #12986

This PR changes the `error`, `isHttpError`, `redirect`, and `isRedirect`
functions to use the public interface version of the `HttpError` and
`Redirect` errors instead of our internal classes.

---

### 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: Chew Tee Ming <chew.tee.ming@nindatech.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
closes #13845

---------

Co-authored-by: Tee Ming <chewteeming01@gmail.com>
#15347)

This PR upgrades wrangler to a newer version without vulnerabilities.
Bumps the peer version too. Additionally, we remove the deprecated
`platform.context` property.

Also ran `pnpm dedupe` to try to get rid of as many older unused
transitive dependencies that were setting off dependabot security
alerts.

---

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
…API (#15294)

~~(Stacked on top of #15203

closes #15169

The current implementation of the Netlify adapter writes output to paths
and config files that are under-documented and in some cases entirely
undocumented.

18 months ago, Netlify addressed this by releasing the stable,
documented Netlify Frameworks
API](https://docs.netlify.com/build/frameworks/frameworks-api/).

This PR migrates the adapter to write output that conforms to this spec.

POTENTIALLY BREAKING CHANGE: 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.

---

### Please don't delete this checklist! Before submitting the PR, please
make sure you do the following:
- [x] It's really useful if your PR references an issue where it is
discussed ahead of time. In many cases, features are absent for a
reason. For large changes, please create an RFC:
https://github.com/sveltejs/rfcs
- [x] This message body should clearly illustrate what problems it
solves.
- [x] Ideally, include a test that fails without this PR but passes with
it.

### Tests

- [x] Run the tests with `pnpm test` and lint the project with `pnpm
lint` and `pnpm check`

### Changesets

- [x] If your PR makes a change that should be noted in one or more
packages' changelogs, generate a changeset by running `pnpm changeset`
and following the prompts. Changesets that add features should be
`minor` and those that fix bugs should be `patch`. Please prefix
changeset messages with `feat:`, `fix:`, or `chore:`.

### Edits

- [x] Please ensure that 'Allow edits from maintainers' is checked. PRs
without this option may be closed.

---------

Co-authored-by: Tee Ming <chewteeming01@gmail.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
This PR adds more integration test coverage for
`@sveltejs/adapter-netlify`.

---

### Please don't delete this checklist! Before submitting the PR, please
make sure you do the following:
- [ ] It's really useful if your PR references an issue where it is
discussed ahead of time. In many cases, features are absent for a
reason. For large changes, please create an RFC:
https://github.com/sveltejs/rfcs
- [x] This message body should clearly illustrate what problems it
solves.
- [x] Ideally, include a test that fails without this PR but passes with
it.

### Tests
- [x] Run the tests with `pnpm test` and lint the project with `pnpm
lint` and `pnpm check`

### Changesets
- [ ] 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>
removes some stuff for testing Node 18 since we don't support it anymore

Already separately bumped the peer dependency in another PR for a
cleaner PR and changeset
I should have done this as part of
#15388

Closes #11799
I missed this one since it wasn't snake_case like the others
Drops the `set-cookie-parser` dependency (and its `@types/*` package) by
using `parseSetCookie` from the already-bundled `cookie@1.x` package and
the standard `Headers.prototype.getSetCookie()` API (Node.js ≥ 18).

### Key changes

- **`server/fetch.js`**: Replace `splitCookiesString` + `parseString`
with `response.headers.getSetCookie()` (returns individual Set-Cookie
headers as an array) + `parseSetCookie(str, { decode: (v) => v })`
- **`exports/node/index.js`**: Replace
`splitCookiesString(response.headers.get('set-cookie'))` workaround with
`response.headers.getSetCookie()` directly
- **`exports/vite/index.js`**: Remove `set-cookie-parser` from SSR
externals list
- **`package.json` / `pnpm-workspace.yaml`**: Remove `set-cookie-parser`
and `@types/set-cookie-parser`

```js
// Before
for (const str of set_cookie_parser.splitCookiesString(response.headers.get('set-cookie'))) {
    const { name, value, ...options } = set_cookie_parser.parseString(str, { decodeValues: false });
    // ...
}

// After
for (const str of response.headers.getSetCookie()) {
    const { name, value, ...options } = parseSetCookie(str, { decode: (v) => v });
    // ...
}
```

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Various cookie upgrades and package
removals</issue_title>
> <issue_description>### Describe the problem
> 
> Upgrade to cookie 1.x
> Allows dropping types package
> Next release will allow dropping set-cookie-parser
(jshttp/cookie#244)
> 
> ### Describe the proposed solution
> 
> Update to latest cookie package 
> 
> ### Alternatives considered
> 
> _No response_
> 
> ### Importance
> 
> nice to have
> 
> ### Additional Information
> 
> _No response_</issue_description>
> 
> <agent_instructions>use `parseSetCookie` from the `cookie` package to
replace the `set-cookie-parser` package</agent_instructions>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> <comment_new><author>@Conduitry</author><body>
> We don't want to work on this until we're ready to start making the
push to SvelteKit 3.0 as it's going to be a breaking
change.</body></comment_new>
> <comment_new><author>@benmccann</author><body>
> We tried to upgrade cookie earlier, but had to roll it back due to
breaking changes. SvelteKit 3 will happen soon and will upgrade to the
latest </body></comment_new>
> <comment_new><author>@benmccann</author><body>
> @copilot use `parseSetCookie` from the `cookie` package to replace the
`set-cookie-parser` package in the `version-3`
branch</body></comment_new>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes #14553

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/sveltejs/kit/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benmccann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Tee Ming <chewteeming01@gmail.com>
Didn't bump the peer dependency or create a changelog entry yet because
we'll probably upgrade to TypeScript 6 before a final release. I created
an issue to ensure we don't lose track of that

---------

Co-authored-by: Tee Ming <chewteeming01@gmail.com>
… for Cloudflare Workers (#13733)

Inspired by unjs/std-env#156

~This PR detects the `WORKERS_CI` environment variable so that
`adapter-auto` and `adapter-cloudflare` can work with Cloudflare's
[Workers Git
integration](https://developers.cloudflare.com/workers/ci-cd/builds/) to
build the app without requiring a wrangler configuration from the user.~

I've changed the scope of the PR to focus on only the Cloudflare adapter
because we'll may end up deprecating adapter-auto. Also, it doesn't work
well with adapter-auto since it requires a wrangler config file.

---

### 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: Chew Tee Ming <chew.tee.ming@nindatech.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change needs-ecosystem-ci This PR needs to have an ecosystem CI run started prior to its last commit before merging. needs-platform-tests This PR needs to run platform tests in order to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants