Conversation
🦋 Changeset detectedLatest commit: e76b3d7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This was referenced Mar 19, 2026
Member
teemingc
commented
Jun 4, 2026
teemingc
commented
Jun 4, 2026
Member
|
Finally it looks like we have a clean run and can go back to opening PRs against this branch. Will see how much work is involved in fixing the conflicts on #15574 |
This PR removes the deprecated `base`, `assets` and `resolveRoute` APIs from `$app/paths`. It also removes/refactors some tests related to those APIs. For the removed tests, I wasn't sure if they were superseded by some `resolve` and `asset` tests or if we still needed them. Requires sveltejs/svelte.dev#1848 to get the site building --- ### 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.
Follow up to #15469 where we started using the Vite `root` instead of `process.cwd()`. The fallback value of `kit.env.dir` should not use `process.cwd()` when validating the config as later on in `process_config` it will correctly be resolve to the Vite `root` setting --- ### 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 - [ ] 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.
Very insignificant but omitting the default `goto` type from the playwright test fixture allows us to override it correctly --- ### 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 adjusts the docs and code to accept configuration only through the SvelteKit Vite plugin. Notably, it hides the `config.kit` prefix in favour of just`config.` since that `kit` property no longer exists when passing options to the SvelteKit Vite plugin ~EDIT: blocked by sveltejs/language-tools#3055 so svelte check will fail until this is resolved~ --- ### 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: Rich Harris <rich.harris@vercel.com> Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
closes #14285 `goto` now errors if you navigate to a route that doesn't exist, even when it's a relative route This also changes remote functions to use `_goto` to navigate to redirects so that they don't error for external redirects. --------- Co-authored-by: Tee Ming <chewteeming01@gmail.com> Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
regression test + fix. Pretty easy, just make sure to clone dates appropriately closes #16165 --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>
Module service workers are baseline now, so we can stop registering classic workers in production. This also lets us delete the `env.script.js` workaround entirely and just import `env.js` directly. closes #16158
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-netlify@7.0.0-next.1 ### Major Changes - breaking: require `vite@^8.0.12`, the first Vite 8 release bundling stable `rolldown` 1.0.0 ([#16134](#16134)) ### Patch Changes - Updated dependencies [[`a9629f1`](a9629f1), [`53d37f9`](53d37f9), [`dba6239`](dba6239), [`ab12cb6`](ab12cb6), [`f0eab52`](f0eab52), [`cd884c1`](cd884c1), [`9ed38a8`](9ed38a8), [`53aa049`](53aa049), [`984e57a`](984e57a), [`51785be`](51785be), [`4f6bcbb`](4f6bcbb), [`78e7137`](78e7137)]: - @sveltejs/kit@3.0.0-next.5 ## @sveltejs/adapter-node@6.0.0-next.1 ### Major Changes - breaking: require `vite@^8.0.12`, the first Vite 8 release bundling stable `rolldown` 1.0.0 ([#16134](#16134)) ### Patch Changes - Updated dependencies [[`a9629f1`](a9629f1), [`53d37f9`](53d37f9), [`dba6239`](dba6239), [`ab12cb6`](ab12cb6), [`f0eab52`](f0eab52), [`cd884c1`](cd884c1), [`9ed38a8`](9ed38a8), [`53aa049`](53aa049), [`984e57a`](984e57a), [`51785be`](51785be), [`4f6bcbb`](4f6bcbb), [`78e7137`](78e7137)]: - @sveltejs/kit@3.0.0-next.5 ## @sveltejs/adapter-vercel@7.0.0-next.1 ### Major Changes - breaking: require `vite@^8.0.12`, the first Vite 8 release bundling stable `rolldown` 1.0.0 ([#16134](#16134)) ### Patch Changes - Updated dependencies [[`a9629f1`](a9629f1), [`53d37f9`](53d37f9), [`dba6239`](dba6239), [`ab12cb6`](ab12cb6), [`f0eab52`](f0eab52), [`cd884c1`](cd884c1), [`9ed38a8`](9ed38a8), [`53aa049`](53aa049), [`984e57a`](984e57a), [`51785be`](51785be), [`4f6bcbb`](4f6bcbb), [`78e7137`](78e7137)]: - @sveltejs/kit@3.0.0-next.5 ## @sveltejs/enhanced-img@1.0.0-next.1 ### Major Changes - breaking: require `vite@^8.0.12`, the first Vite 8 release bundling stable `rolldown` 1.0.0 ([#16134](#16134)) ## @sveltejs/kit@3.0.0-next.5 ### Major Changes - breaking: remove `base`, `assets`, and `resolveRoute` from `$app/paths` ([#15507](#15507)) - breaking: require Svelte config options to be passed through the Vite plugin ([#16007](#16007)) - 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 ([#16164](#16164)) - breaking: add 'error' result type to `preloadData` ([#12579](#12579)) - breaking: require `vite@^8.0.12`, the first Vite 8 release bundling stable `rolldown` 1.0.0 ([#16134](#16134)) ### Minor Changes - feat: expose `submitted` property of remote forms ([#14811](#14811)) ### Patch Changes - fix: clear issues and touched states on form reset ([#16163](#16163)) - fix: return 404 for form actions and remote functions whose name is an `Object.prototype` member ([#16072](#16072)) - feat: send periodic `keep-alive` SSE comments from `query.live` to prevent idle-timeout errors ([#16063](#16063)) - fix: render pages over sibling endpoints without GET or HEAD handlers ([#16125](#16125)) - fix: sort directory entries when building the route manifest so node indices are deterministic across runtimes (e.g. Bun and Node) ([#16074](#16074)) - fix: include hoisted packages in Vite's `server.fs.allow` list ([#15998](#15998)) ## @sveltejs/package@3.0.0-next.1 ### Patch Changes - fix: declare typescript as an optional peer dependency so svelte-package works under strict node-linkers ([#16073](#16073)) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
closes #15862 A lighter alternative to #16171 , where we just add the rules under the URL if the URL already exists. According to the Cloudflare docs, multiple headers will just be joined with a comma https://developers.cloudflare.com/workers/static-assets/headers/#attach-a-header and we _shouldn't_ worry about someone also declaring new cache header values for those URLs since they're framework related. The original issue is mostly concerned about adding __new__ headers for CORS --- ### 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 #16172 Bumps `cookie` from v1 to v2 which is ESM-only and changes its method names and signature for serialising a set-cookie value https://github.com/jshttp/cookie/releases/tag/v2.0.0 but our lockfile still has cookie v1 because of some Netlify deps but we will get rid of that when we move to platform tests We should make a decision if we want to change our methods to match the new `cookie` API or leave it as is EDIT: we decided to stick to our current API in the June monthly meeting --- ### 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 - [ ] 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.
hopefully switching to non-deprecated version + delaying (mimicking typing more closely) helps
`props.form` and `props.error` were each missed on the SSR side during review of #16547 and fixed in follow-up commits. Passing them through the constructor makes the next missed one a type error instead of a silent `undefined` in the rendered page. `pending_invalidate` lost its `export` since nothing imports it. --- ### 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.
…ient's (#16531) #16372 added the `_app/immutable` filter when computing `$app/manifest`'s `immutable`, but the serviceWorker environment kept the unfiltered file set it inherited from `$service-worker`'s `build`. That copy includes `_app/manifest.js`, whose filename never changes, so a service worker that caches `immutable` per the docs serves the previous deployment's manifest after a redeploy. Both lists are now computed by one helper; the `bundleStrategy: 'inline'` special case is subsumed by its existence check. The truthiness checks on `css`/`assets` make the helper robust to the full range of Vite's optional `css?: string[]` field, so a hypothetical `css: null` entry is skipped cleanly instead of crashing the build. The client-side list was also computed before the `bundleStrategy: 'inline'` deletions it was supposed to reflect, so the page's `immutable` included the deleted bundle and stylesheet while the service worker's, computed after them, did not. The inlined files are now tracked directly and excluded everywhere, instead of checking the filesystem after the fact. `_app/manifest.js` is no longer precached, so an offline-first app that imports `$app/manifest` in client code only has it cached once a page has fetched it. The precached copy was guaranteed stale after the next deploy anyway; moving the chunk to `assets`, as floated in #16372, would give such apps a correct offline copy. --------- Co-authored-by: Rich Harris <richard.a.harris@gmail.com> Co-authored-by: Rich Harris <rich.harris@vercel.com>
…server fetch (#16525) `has_prerendered_path` expects a base-inclusive pathname (its JSDoc says so, and the `respond` call site passes one), but the `fetch` call site prepends `base` to a pathname that already contains it, so the prerendered bail-out never matches when `paths.base` is set. #13575 extracted the helper out of this check and added a second caller in `respond.js`, prefixing `base` here in the same hunk; before that, `fetch` checked `prerendered_routes.has(decoded)` directly. With the bail-out firing, base-path apps also stop forwarding cookies and auth headers on these sub-requests, matching what apps without a base already do.
The `test-kit` CI jobs take more than 17 minutes each because it's several consecutive groups of tests. If one test fails, everything needs to be retried and that's another 17 minutes. Separating them into unit, dev, and build, might make it a little faster since they run in parallel and it also makes test retries less painful. This may take up more CI minutes but definitely less wall clock time. This PR also tightens the Vitest workspace config so that it works with both the VS Code Vitest extension and the built-in one for Zed. EDIT: it takes 10 minutes to complete everything now
We need to specify `include` for the prerendering test apps otherwise they type check the build output too. This fixes svelte-ecosystem-ci which is currently timing out because it has to type check all the build output files.
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-vercel@7.0.0-next.4 ### Major Changes - breaking: remove support for edge and Node 20 runtimes ([#16520](#16520)) ### Patch Changes - chore: bump `@vercel/nft` dependency ([#16522](#16522)) - Updated dependencies [[`6942ddb`](6942ddb), [`68137d4`](68137d4), [`15dc603`](15dc603), [`a4f1521`](a4f1521), [`629b45d`](629b45d), [`7a7833a`](7a7833a), [`e6591a0`](e6591a0), [`7a7833a`](7a7833a), [`b196a39`](b196a39), [`66bf343`](66bf343), [`4bde76b`](4bde76b), [`d9f05cb`](d9f05cb), [`40efca1`](40efca1), [`8ef5548`](8ef5548), [`9efb8f2`](9efb8f2), [`6a670dc`](6a670dc), [`3416dcc`](3416dcc), [`6850fa5`](6850fa5), [`e6591a0`](e6591a0), [`688bead`](688bead), [`b596610`](b596610), [`0f26c13`](0f26c13), [`110a3db`](110a3db), [`665d467`](665d467), [`9c8c60c`](9c8c60c)]: - @sveltejs/kit@3.0.0-next.13 ## @sveltejs/kit@3.0.0-next.13 ### Major Changes - 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` ([#16558](#16558)) - breaking: deprecate `error(status, {...})` in favour of `error(status, message, {...})` ([#16540](#16540)) ### Minor Changes - feat: add shallow routing to `goto` and deprecate `pushState` and `replaceState` ([#16449](#16449)) - feat: preserve page state set through `goto(..., { state, persistState: true })` across reloads ([#16449](#16449)) ### Patch Changes - chore: deduplicate repeated CSP directive handling ([#16498](#16498)) - fix: avoid Vite dev server reload on initial page request ([#16553](#16553)) - fix: don't set a `null` `accept-language` header on internal `fetch` sub-requests when the incoming request has none ([#16527](#16527)) - fix: correctly detect prerendered paths in server `fetch` when `paths.base` is set ([#16525](#16525)) - fix: don't duplicate remote modules in the generated manifest ([#16532](#16532)) - fix: exclude inlined files from the page's `$app/manifest` immutable list ([#16531](#16531)) - perf: avoid quadratic remote form issue merging ([#16493](#16493)) - fix: don't attempt to serialize fetch responses when the request body is not a string or TypedArray ([#16501](#16501)) - fix: read the error status of `App.Error` in the `prerender` and `query.live` remote functions ([#16529](#16529)) - fix: propagate errors from prerendered remote responses instead of re-running the function ([#16535](#16535)) - fix: respect the status returned from `handleError` on the fallback error page served to error-page sub-requests ([#16528](#16528)) - fix: skip unnecessary `version.json` checks if `updated.current` is already `true` ([#16518](#16518)) - fix: allow generation of $app/tsconfig without TypeScript installed ([#16534](#16534)) - perf: use a `Set` to check element ids when validating fragment links during prerendering ([#16494](#16494)) - fix: only include `_app/immutable` files in `$app/manifest`'s `immutable` in the service worker ([#16531](#16531)) - fix: log errors caught by the Vite dev server handler ([#16550](#16550)) - fix: resolve `root` per instance of the SvelteKit Vite plugin ([#16513](#16513)) - fix: ignore path casing differences when warning about overridden Vite config on Windows ([#16545](#16545)) - fix: preserve the current URL search parameters when submitting a remote form without JavaScript ([#16373](#16373)) - fix: treeshake prerendered remote functions in the right chunks ([#16533](#16533)) - fix: error during development if the adapter does not support instrumentation and it exists ([#16548](#16548)) ## @sveltejs/adapter-netlify@7.0.0-next.5 ### Patch Changes - chore: replace @netlify/functions with @netlify/types for the Context type ([#16542](#16542)) - Updated dependencies [[`6942ddb`](6942ddb), [`68137d4`](68137d4), [`15dc603`](15dc603), [`a4f1521`](a4f1521), [`629b45d`](629b45d), [`7a7833a`](7a7833a), [`e6591a0`](e6591a0), [`7a7833a`](7a7833a), [`b196a39`](b196a39), [`66bf343`](66bf343), [`4bde76b`](4bde76b), [`d9f05cb`](d9f05cb), [`40efca1`](40efca1), [`8ef5548`](8ef5548), [`9efb8f2`](9efb8f2), [`6a670dc`](6a670dc), [`3416dcc`](3416dcc), [`6850fa5`](6850fa5), [`e6591a0`](e6591a0), [`688bead`](688bead), [`b596610`](b596610), [`0f26c13`](0f26c13), [`110a3db`](110a3db), [`665d467`](665d467), [`9c8c60c`](9c8c60c)]: - @sveltejs/kit@3.0.0-next.13 ## @sveltejs/adapter-static@4.0.0-next.2 ### Patch Changes - fix: match adapter-vercel's prerendered redirect handling when deploying to Vercel ([#16497](#16497)) - Updated dependencies [[`6942ddb`](6942ddb), [`68137d4`](68137d4), [`15dc603`](15dc603), [`a4f1521`](a4f1521), [`629b45d`](629b45d), [`7a7833a`](7a7833a), [`e6591a0`](e6591a0), [`7a7833a`](7a7833a), [`b196a39`](b196a39), [`66bf343`](66bf343), [`4bde76b`](4bde76b), [`d9f05cb`](d9f05cb), [`40efca1`](40efca1), [`8ef5548`](8ef5548), [`9efb8f2`](9efb8f2), [`6a670dc`](6a670dc), [`3416dcc`](3416dcc), [`6850fa5`](6850fa5), [`e6591a0`](e6591a0), [`688bead`](688bead), [`b596610`](b596610), [`0f26c13`](0f26c13), [`110a3db`](110a3db), [`665d467`](665d467), [`9c8c60c`](9c8c60c)]: - @sveltejs/kit@3.0.0-next.13 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
split off from #15574 EDIT: This PR adds a `customHandler` property which adapters can resolve to a module that runs `server.init` and `server.respond` with additional logic. The handler runs during dev, build, prerender, and preview. It's main purpose is to set us up to unify the `dev` and `preview` experiences. --- ### 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 - [ ] 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: Rich Harris <rich.harris@vercel.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Rich Harris <richard.a.harris@gmail.com> Co-authored-by: Rich-Harris <hello@rich-harris.dev>
Corrected the dead link for Partytown's SvelteKit integration to the correct URL. --- ### 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: Elliott Johnson <hello+git@ell.iott.dev> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Tee Ming <chewteeming01@gmail.com>
This is the last TODO comment or deprecation I could find that needs to be addressed before 3.0 — as such, this closes #1247
…the current URL (#16572) In many SPAs, clicking on a link to the current page causes a refresh of all the data, matching what would happen in an MPA. You can see this on sites like https://bsky.app (or https://x.com if you're a person of questionable taste) among many others. This creates a user expectation that they can force a refresh, bypassing whatever client-side caches might be in operation. In SvelteKit, clicking on a link to the current page is effectively a noop. This PR changes that. It might seem like a weird special case, but such links are _already_ a special case in that they default to `history.replaceState` instead of `history.pushState` (mirroring MPA behaviour); this feels like a mildly-opinionated-but-defensible extension of that 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 - [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> Co-authored-by: Tee Ming <chewteeming01@gmail.com>
#16569) The `[` and `]` escapes prescribed in `documentation/docs/30-advanced/10-advanced-routing.md` have never worked: a route directory named `[x+5b]` fails the build with `Invalid regular expression: /^/\\[/?$/: Unterminated character class`, and `[x+5d]` compiles to a pattern that cannot match `/]`. Introduced with the escape syntax itself in #7644. `escape()` escapes `[` and `]` first to protect the `%2[Ff]` and `%3[Ff]` classes the URL substitutions emit, then its final pass re-escapes those backslashes because `\\` is in its character class. Regex escaping now runs before the substitutions rather than around them. `parse_route_id` output is byte-identical to `version-3` for every printable ASCII character and 23 mixed route ids; only `[x+5b]` and `[x+5d]` change. Co-authored-by: Nic Polumeyv <nicolas.polum@gmail.com>
…16570) `resolve('/[x+2e]well-known')` returns the route id verbatim instead of `/.well-known`, so a pathname built from an escaped route id does not match the route it came from. `parse_route_id` has expanded `[x+nn]` and `[u+nnnn]` since #7644, but `resolve_route` never has, because `basic_param_pattern` cannot match `x+2e`. The expansion happens in the same pass as the params rather than a second pass over the result, so a param value that itself contains `[x+2f]` is left alone. `parse_route_id` output is unchanged. Its `x+` and `u+` branches were already equivalent, since splitting a two character code on `-` is a no-op.
alternative to #16580 closes #5793 We already implemented the feature but it has the bug mentioned in that issue. This PR removes route data for directories with no route files and items in `routes` that would likely return a 404 (no page, no endpoint, etc.). Some additional fixes are that `LayoutParams` only includes paths with layout files. Also, the route data gets considerably smaller for larger projects. --- ### 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 - [ ] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.
…#16568) When a package's only tsconfig or jsconfig lives above the package root, no `.d.ts` reaches `dist` at all. `emitDts` resolves a relative `declarationDir` against the tsconfig's directory rather than the cwd, so the declarations were written outside `__package_types_tmp__` and the copy step never saw them. Absolute paths only started working in svelte2tsx 0.7.56 (sveltejs/language-tools#2965), so the bump and the fix are both needed. Reported from the svelte2tsx side in sveltejs/language-tools#2182, where the kit half was spotted but never filed.
…arset parameter (#16567) The prerenderer compares `content-type` with `===`, so `text/html; charset=utf-8` is not treated as HTML: the page is written without a `.html` extension and its links are never crawled. `is_content_type` already normalizes the header for this reason, from #7195 (strip parameters) and GHSA-gv7g-x59x-wf8f (case-insensitive compare); the two prerender checks predate both. Reproduces #13612, closed as unreproducible, using the charset workaround from #3184. The root `+server.js` error added in #15994 is gated on the same value, so it can fire for an app that has none. Co-authored-by: Nic Polumeyv <nicolas.polum@gmail.com> Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
#16564) Picks up the `adapter-node` half of #13753. #16234 fixed `.ico` by adding `mimes['ico']` to the shared `mrmime` module. That works in dev and preview, which share one instance with `sirv`. `adapter-node` bundles its own copy of `mrmime` through `sirv`, so the patch never reaches it and `.ico` still goes out with an empty `Content-Type` in production. The manifest already records the right type at build time, resolved through the patched lookup, so this reads it back rather than relying on `sirv`'s copy.
…16563) Going back or forward to a shallow entry restores the state and renders the page you were on when you called `goto`, while the address bar keeps the pushed URL. The page documents that split for the live case and for reloads, but not for back/forward, which is where #11465, #11503 and #11671 all landed. ### 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 * #11465 - [x] This message body should clearly illustrate what problems it solves. - [ ] Ideally, include a test that fails without this PR but passes with it. * docs only ### Tests - [ ] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check` * docs only ### 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:`. * docs only ### Edits - [x] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed. --------- Co-authored-by: Nic Polumeyv <nicolas.polum@gmail.com>
#16591) Part of #15529. The node call uses no secrets, and only `report-status` needs `contents: write`. Vercel and netlify keep `secrets: inherit` for now: explicit `secrets:` blocks only work if those are repo or org secrets rather than environment secrets (actions/runner#4453), and that's only visible in the repo settings. Happy to open a PR once someone confirms.
#16589) Neat little find The cause of [the playwright pin](#16538 (comment)) is that [its tsconfig loader](https://github.com/microsoft/playwright/blob/v1.62.0/packages/playwright/src/transform/tsconfig-loader.ts#L54) only ever looks up `node_modules/$app/tsconfig.json`, while [tsc also resolves](https://www.typescriptlang.org/tsconfig/#extends) the directory form we currently generate. Writing the file where both look removes the pin's cause and lets `paths` reach Playwright test files again. Verified against 1.61.1, 1.62.0 and 1.62.1.
…ecompressed (#16566) The remaining half of #10343, and the first concrete piece of #16565. #15182 stopped the header when `precompress` is `false`. It still goes out on every asset when `precompress` is `true`, because `sirv` sets `Vary` from its options rather than from the file, while `builder.compress` only compresses a fixed extension list. So a `.ico` or a `.png` advertises a variant that was never produced. Only extensions that were written but never compressed lose the header, since `setHeaders` sees the request pathname, not the file `sirv` resolved, and `/` or `/v1.0` may be serving `index.html.gz`. Commits are separated by layer so the kit-side and adapter-side changes can be reviewed apart. This rewrites the same `setHeaders` block as #16564, so whichever lands first, the other needs a rebase. --------- Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
…uteId` (#16580) Closes #14847. #15027 fixed the `Path` half of that issue; the `RouteId` union still lists every directory, so `resolve('/a')` type-checks when `/a` only holds child routes. `LayoutParams` now keys off the generated layout map instead of `RouteId`, and a layout sitting in a directory that isn't a route stops claiming its own id in `LayoutRouteId`. `resolve('/')` stops type-checking in an app whose root page lives in a group, since `/(app)` is the route that serves `/`. Write `resolve('')` instead. #16588 covers the `$app/manifest` side. Also points #16588's `routes` filter at `is_app_route` so the two stay in sync, and rewords its changeset to cover the #5793 fix. --------- Co-authored-by: Elliott Johnson <hello@ell.iott.dev>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…6499) These two copies have to stay in sync, so build the hash in one place. Co-authored-by: Rich Harris <rich.harris@vercel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opened just so that I could easily see CI checks
You can try SvelteKit 3 by installing any of the packages following #15497 (comment) or the ones published with the
nexttag https://npmx.dev/package/@sveltejs/kitPlease don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits