Conversation
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>
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 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>
Left it in the types so that it shows up in the reference docs for users who are still on SvelteKit 2
closes #13756 This PR is going to be hard to look at because of all the indentation changes, but basically I moved some `if` statements in our Vite plugin hooks to a `filter` methods to be faster. The changes themselves are pretty straightforward if you ignore the spacing changes. There was only one where it was a little gnarly to convert the `if` to a regex. I put a comment on that regex explaining what it's supposed to do --------- Co-authored-by: Tee Ming <chewteeming01@gmail.com>
This PR removes some guards and optional chaining that were only necessary to support older Kit versions --- ### 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: Ben McCann <322311+benmccann@users.noreply.github.com>
Part of #1247 Removes some TODOs that we wanted to get done for the next adapter major such as ensuring new Kit features are always available by bumping the peer dep and removing workarounds for ambient types not being available (they are now) --- ### 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 detectedLatest commit: 8a0af32 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…ory (#15469) closes #11356 closes #12140 closes #15188 This PR standardises the use of `process.cwd()` to prefer the Vite config `root` setting when available [similar to VPS](https://github.com/sveltejs/vite-plugin-svelte/blob/main/packages/vite-plugin-svelte/src/utils/options.js#L354-L356). This helps us resolve paths correctly before reading files or generating tsconfig paths. It eases lots of monorepo tooling usage, particularly Vitest workspaces. This also allows us to use the Vitest IDE extension to run unit tests (which didn't work before because of the aforementioned issues). We _could_ backport these changes to v2 but it's a bit easier to base it on v3 which already makes use of `import.meta.dirname` in many places thanks to #15434 I've only made changes to `kit` itself for now, so other packages still default to `process.cwd()` but those are probably less problematic since they won't run for Vitest tests --- ### 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: Ben McCann <322311+benmccann@users.noreply.github.com>
This PR cleans up some unnecessary types/guards because we were trying to support older versions of SvelteKit. Now that we will only support v3, we don't need to be careful about which features from SvelteKit aren't available such as instrumentation --- ### 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: Ben McCann <322311+benmccann@users.noreply.github.com>
This PR removes the deprecated `builder.createEntries` API. Requires #15506 to be merged first to remove references to it in the adapters --- ### 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.
This PR addresses a TODO comment to remove the `delta` property from navigation events which aren't `popstate` --- ### 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.
This PR removes any test workarounds we had in place when we were testing on Node 18 in CI. --- ### 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opened just so that I could easily see CI checks
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits