Conversation
🦋 Changeset detectedLatest commit: 2eed638 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 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 |
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/2eed638671196bb4734d7e17f5f6d70a2b704b5dOpen in |
…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>
Based on #16580. Adds a few goodies: - `PageRouteId` and `EndpointRouteId`, which combine to make up `RouteId` — these make the internal types a bit cleaner and allow you to discriminate between which routes do what if needed - `page` and `endpoint` booleans on each entry in `$app/manifest.routes`, allowing routes to be filtered by capability; routes containing both `+page` and `+server` have both set to `true` - A `ManifestRoute` discriminated union that narrows `id` to the corresponding page-only, endpoint-only, or combined route IDs - A private `LayoutParamsId` alias for the IDs accepted by `LayoutParams`, which now correspond specifically to directories containing layouts - More accurate layout load types: a colocated endpoint-only route is no longer included in a layout’s possible `event.route.id` values, since endpoint requests do not execute layouts Layouts only run for page routes, not endpoints. Previously, a directory with both `+layout` and `+server` incorrectly included its endpoint-only ID in the layout’s possible `event.route.id` type, even though that value can never occur at runtime. The change restricts it to page IDs that can actually execute the layout. --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>
closes #16616 Not sure if the changeset should be a major. Decided on patch since it doesn't actually break anything user-facing for `@sveltejs/enhanced-img`
…respected by the server, allow the server to explicitly ignore refreshes (#16892) closes #16839 Prior to the PR, client-requested single-flight mutations had a weird inconsistency. When calling `requested(query, limit)`, queries that exceeded `limit` would be failed by the server -- the server would generate a failure response for each one of them and send it back to the client. However, if `requested` wasn't called _at all_, we would just do... nothing. Your queries would just not refresh and you wouldn't know about it unless you happened to notice. In addition to the inconsistency, the design was silly. The error for a missed refresh is the same for every query. The client already knows which queries were requested. So the server doesn't need to send back information about them! The client can just diff its list of requested refreshes with the response! This PR addresses the two issues: - Any client-requested updates that aren't honored by the server will produce errors. These errors will now be generated on the client. - The server can intentionally ignore refreshes (basically saying "this didn't change" or "you don't actually need to update") by calling `ignore`: ```ts for (const { arg, query, ignore } of requested(query, 5)) { if (was_updated(arg)) { void query.refresh(); } else { ignore(); } } ``` If you just want to ignore a query altogether, there's a similar shorthand: `requested(...).ignoreAll()`. --------- Co-authored-by: Tee Ming <chewteeming01@gmail.com>
Fixes a flaky navigation lifecycle test observed in [PR #16900](#16900) and [CI run 32992201226](https://github.com/sveltejs/kit/actions/runs/32992201226). When a popstate navigation is cancelled, SvelteKit performs a compensating history traversal. `page.goBack()` can resolve before that traversal and the resulting reactive DOM update have settled, causing the test to read the initial state. Use Playwright web-first assertions for both the rendered navigation state and restored URL. Verification: - five separate focused runs passed - 200 dev-mode repeats with four workers passed - 100 build-mode repeats with four workers passed - 18 nearby navigation lifecycle tests passed - full cross-platform client spec passed with one worker (97 tests) Co-authored-by: svelte-triage-bot <team@svelte.com>
Fixes: #12231 This PR tries to add a Svelte declaration tag if the image source is an expression that should only be computed once. - ~It requires a newer version of Svelte to do so, which is a a breaking change.~ uses the old declaration tag by wrapping it in an if block that is always true. This works in both legacy and runes mode - It also replaces `svelte-markup-parser` with the official Svelte parser so that we can check for colliding declaration references. --- ### 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` Targeted validation: enhanced-img formatting and type checks, unit tests, integration tests, and diff checks. ### 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:`. Added a patch changeset for `@sveltejs/enhanced-img`. ### 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> Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
`@iarna/toml` last shipped in 2020 and implements TOML 0.5. `smol-toml` is TOML 1.0, ESM, dependency-free, and is what `@netlify/config` itself parses `netlify.toml` with, so the adapter now accepts exactly what Netlify accepts (TOML 1.0 mixed-type arrays, for one, throw today).
breaking #16843 into smaller pieces This PR just removes all adapter code that accesses SSRManifest. #16876 is stacked on top of this and actually makes `SSRManifest` private, which is the end goal. --- ### 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:`. --------- Co-authored-by: Tee Ming <chewteeming01@gmail.com>
We want `SSRManifest` to be an internal implementation detail rather than a public type that has to remain stable. #16875 removes all adapter uses of `SSRManifest`, this PR moves it to `internal.d.ts`. --- ### Please don't delete this checklist! Before submitting the PR, please make sure you do the following: - [ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs - [x] This message body should clearly illustrate what problems it solves. - [ ] Ideally, include a test that fails without this PR but passes with it. ### Tests - [x] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check` ### Changesets - [x] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. Changesets that add features should be `minor` and those that fix bugs should be `patch`. Please prefix changeset messages with `feat:`, `fix:`, or `chore:`. --- <sub>Stack created with <a href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
Fixes two pre-existing async e2e flakes exposed by the CI run for #16892. The form reconnect test previously polled a server-side iterator cleanup counter. The failed traces show that the form response succeeded and the targeted `get_count` connection restarted, but transport cleanup had not updated the counter within the assertion window. Assert the observable reconnect requests directly instead, including that `get_finite_count` is not reconnected. The serial batch tests also retained module-level todo mutations across retries. Reset the todos before asserting the baseline state so reruns are idempotent. Failed workflow: https://github.com/sveltejs/kit/actions/runs/32541364509 Verification: - primary test: 100 dev repetitions and 100 build repetitions - batch mutation sequence: 40 tests - relevant dev tests with two workers: 120 tests - relevant build tests: 60 tests - `pnpm -F test-async check` - formatting and diff checks Co-authored-by: svelte-triage-bot <team@svelte.com>
This adds zero-config deployment support for [Render](https://render.com/) to `adapter-auto`. Render exposes `RENDER` in the build environment and uses `adapter-node` for its [SvelteKit template](https://github.com/render-examples/sveltekit/blob/main/svelte.config.js). This PR adds a Render detection mapping to `adapter-node`. I've also updated the `Zero-config deployments` docs to list Render as a supported environment. --- ### Please don't delete this checklist! Before submitting the PR, please make sure you do the following: - [ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs - [x] This message body should clearly illustrate what problems it solves. - [ ] Ideally, include a test that fails without this PR but passes with it. ### Tests - [x] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check` ### Changesets - [x] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. Changesets that add features should be `minor` and those that fix bugs should be `patch`. Please prefix changeset messages with `feat:`, `fix:`, or `chore:`. ### Edits - [x] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed. --------- Co-authored-by: Rich Harris <hello@rich-harris.dev> Co-authored-by: Rich Harris <rich.harris@vercel.com> Co-authored-by: Tee Ming <chewteeming01@gmail.com>
Now that #16876 makes `SSRManifest` an internal type, we can remove the `_` property and rename everything to snake_case. No changeset because no user impact. --- ### 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:`. --------- Co-authored-by: Tee Ming <chewteeming01@gmail.com>
…ault only until edited (#16939) Since #16331 moved coercion into `coerce_form_value`, `handle_input` has stored the raw string of every typed value: `fields.value()` reported `'20'` while typing and `200` after a reset, and an emptied number field held `''` instead of `undefined`. Typed values are coerced again, the same way the submitter path already is. That re-exposes #15937: the default passed to `.as(type, default)` was re-applied whenever the field's value became `undefined` or `null`, so an emptied number input, or one cleared with `set()`, snapped back to its default. The default now only applies until the field is dirty. `defaultValue` and `defaultChecked` are unchanged, so reset still restores it. `dirty` is the modified signal from #16208; `touched` would drop the default on a tab-through. It is client-only, so SSR and a failed no-JS submission still render defaults. #16237 keys the same rule on key presence in the model instead. Fixes #15937.
`.as()` in `packages/kit/src/runtime/form-utils.js` is restructured:
data props are assigned directly with `Object.defineProperty` reserved
for the accessors, the FileList is built from one array, the optional
second argument is spelled as `[type, value?: X]` in `AsArgs`, and the
two option guards are one.
The output of `.as()` is unchanged; the new unit test pins it per input
kind including key order. `[type, value?: boolean]` still accepts
`boolean | undefined`, since checkbox fields are optional in the schema,
and `(string & {})` stays on the `string[]` and `radio` branches where a
plain string option has to type-check against a literal union.
In dev, rejecting a field name that is not JS object notation now says
what is expected and links the docs. Improves the error reported in
#14801.
Stacked on #16939.
`create_field_proxy` resolves each field method through one exit, builds
keys and closures only in the branch that uses them, and only clones the
field value in `value()`; `deep_get` returns `undefined` for a path that
runs through a primitive.
Not cloning inside `.as()` means `.as('select multiple').value` is the
live `$state` array rather than a copy; Svelte reads it per option on
every rerun, so reactivity is unchanged, and mutating it from user code
bypasses the `dirty` bookkeeping the same way it always did for `set()`.
In dev, enumerating fields or checking a key with `in` now warns once
and points at `.value()`, since fields are created as they are accessed
and there is nothing to enumerate
(#14647 (comment)).
Closes #14647.
Stacked on #16938.
---------
Co-authored-by: Elliott Johnson <hello@ell.iott.dev>
This enables the cloudflare adapter to emulate the Request.cf property and later handle websockets responses. --- ### Please don't delete this checklist! Before submitting the PR, please make sure you do the following: - [ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs - [x] This message body should clearly illustrate what problems it solves. - [ ] Ideally, include a test that fails without this PR but passes with it. ### Tests - [x] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check` ### Changesets - [x] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. Changesets that add features should be `minor` and those that fix bugs should be `patch`. Please prefix changeset messages with `feat:`, `fix:`, or `chore:`. --------- Co-authored-by: Tee Ming <chewteeming01@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
The docs say to opt fonts into preloading with a `preload` filter but not what to match against, so what everyone writes is a substring check against the hashed output path, which silently stops matching when the font is renamed. #16443 added `filename` for this; this shows 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 - [ ] 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>
Vite's `future` flags (`removePluginHookHandleHotUpdate`,
`removeServerHot`, `removePluginHookSsrArgument`) flag three things
kit's dev path still uses: the `handleHotUpdate` hook in the env-vars
plugin, `server.hot.send` in `dev/index.js`, and spreading `resolveId`
`options` in the guard plugin, which enumerates the deprecated `ssr`
getter.
`hotUpdate` also fires for `create`/`delete`, so the manual
`watcher.on('add'|'unlink')` block that existed because
`handleHotUpdate` only covered `change` folds into it. `hot.send` moves
to the client environment, and the guard passes `options` through
unchanged since `skipSelf` already defaults to true.
Let's see if there's any advantage to using the Rust-ified pnpm in CI https://pnpm.io/blog/releases/12.0 EDIT: ok seems to shave off 3-8 seconds on Node setup depending on the Node version (24 is faster than 22)
Corrects the import path in the docs snippet
…16960) `src/runtime`, `src/exports` (minus `exports/vite`) and `src/utils` are bundled into user apps, but nothing stops them importing `vite`, `src/core` or `src/exports/vite`. #15953 was exactly that: `exports/internal/env.js` importing `stackless` from `exports/vite/utils.js`. This scopes a `no-restricted-imports` block to those directories. Core rule, so it runs unchanged under oxlint (#16703). Fixes #15963
Replaces #16954. The `popstate` handler in `client.js` awaits route resolution (`get_navigation_intent`, and again inside `navigate` before `accept`) before recording that the browser has moved. Under server-side route resolution that is a network round-trip, during which `current_history_index` still points at the entry we left. A popstate arriving in that window is swallowed by the cancellation guard, and a `goto` pushes an entry with a duplicate `historyIndex`, so later scroll and snapshot restores read the wrong entry. This is the flake in https://github.com/sveltejs/kit/actions/runs/33085846048. Record the traversal synchronously: capture the source entry's scroll and snapshots and move the indices before anything async, restore them in `block()` before `history.go(-delta)`, and capture the navigation token up front so a superseded popstate stops instead of taking over the newer navigation's token. `navigate` skips its own capture for popped navigations. Repro: a 120 ms delay after the `get_navigation_intent` await in the handler fails `Preserves scroll and focus across popstate...` 4/4 in `test:server-side-route-resolution:dev` before this change and passes 4/4 after it.
`Query#run` settles a request by resolving the older resolvers in `#latest` and leaves its own behind, so `#latest` is never empty once a request has settled. `set()` resolves everything in `#latest` and then replaces `#promise` unconditionally. When a value arrives through `set()` while the request is pending, the normal path for single-flight responses (`remote_request` in `shared.svelte.js`), awaiting consumers settle twice: through the resolved promise, then again when the new `#promise` invalidates `#then`. The second settlement runs in a new batch while the first is still applying, deriveds lose memoization across the two, and a deep graph downstream of the query recomputes exponentially (#16854). `#run()` now removes its own resolver when it settles, so `#latest` holds exactly the pending requests, and `set()` only replaces `#promise` when nothing was pending. Fixes #16854
In `runtime/client/client.js`, `_preload_data` stores every `load_route` result in `load_cache` and `load_route` hands the entry back whenever the intent id matches. `navigate` only clears `load_cache` on the commit path, after `history.pushState`; the redirect branch recurses into `navigate` for the redirect target and returns before that. So when a preloaded route redirects and a later hop of the same navigation comes back to it (a gate: `/dashboard` redirects to `/select` until a flag is set, `/select` sets it and redirects to `/dashboard`), the cached redirect is replayed without a fetch on every return until the 20-redirect limit renders the 500 page. Discard the consumed entry in the redirect branch before recursing, keyed on `intent.id` so a preload of a different route (such as the redirect target) survives. The first hop is still served from the preload; anything after it loads fresh. Fixes #16484. Replaces #16930. Thank you for the attempt @bmdavis419, big fan of your content. Co-authored-by: Benjamin Davis <davis.benjamin41902@gmail.com>
Cleans up the Vite dev file a bit but most importantly makes the logic reusable for when we want to use it in analysis and prerendering using a Vite dev server
Vite 8 exports `parseSync` (oxc, bundled inside rolldown) and deprecates `parseAst` in its favour: https://vite.dev/guide/migration#advanced. It parses TS natively, so `@sveltejs/acorn-typescript` goes too.
closes #16914<!-- Add the related issue number here. Repeat this line for each additional issue it closes --> <!-- Explain the goal of the PR, why it is needed, and what has been changed to achieve that goal --> The fix was trivial, the test was painful to write and requied ai assistance - runs in its own file to set DEV to true globally - has a hand-written svelte component to reproduce the issue The diff is big because I bumped svelte to latest --- ### 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: Nic Polumeyv <162764842+Nic-Polumeyv@users.noreply.github.com>
Fixes a pre-existing async live-query test flake observed on #16944 in CI run https://github.com/sveltejs/kit/actions/runs/32994679500. The stats button previously awaited `get_stats()` without first refreshing its cached query. Cache eviction therefore depended on `FinalizationRegistry`/GC timing, and CI polling could repeatedly read the original `cleanup_count` after reconnecting. Explicitly start a refresh, then await `get_stats()` again. Query proxies for the same query share the cached resource, so the second proxy resolves with fresh server state while using the idiomatic remote-query API. The follow-up passed async-app type checking, formatting, and diff validation. A targeted Playwright build also completed, though browser launch was unavailable in the sandbox because required Chromium system libraries could not be installed. --------- Co-authored-by: svelte-triage-bot <team@svelte.com>
…16903) Fixed #12556 --- ### 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: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: Nic Polumeyv <nicolas.polum@outlook.com> Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> Co-authored-by: Nic Polumeyv <162764842+Nic-Polumeyv@users.noreply.github.com>
…6944) I was today years old when I discovered `<input type="image" />` and how it works and it got me unreasonably excited. So obviously, I had to try if it worked correctly with remote functions, and it turns out it doesn't. This PR fixes that. ## How it works in HTML Initially, I thought that `<input type="image" />` was just to show an image as a submit button, a relic of an era where you couldn't properly style buttons. But it turns out that it does something much more interesting. Because when you submit a form with `<input type="image" />` two properties are added to the `FormData` (or to the search): `name.x` and `name.y` with the coordinates of where the pointer was (inside the image) when it was clicked. I legit never used it, but I can see how this could sometimes be necessary, and it would be a shame to lose this progressive enhanced functionality. ## The fix The fix works both type wise and runtime wise by allowing the user to declare `as("image")` when the field is an object with `x` and `y` as numbers. A few important notes: - If it has any other property you can't specify `field.as("image")` as you would have no way to set the last property - You can still set `field.x.as("text")` and `field.y.as("text")` so if by chance you have an `{ x: number; y: number }` schema, but it's not for an `image` input you can still use them. Now the kind-of bad news: I think this is a breaking change in case someone was using `as("image")` on a field which was not `{ x: number; y: number }`...however this would've error at runtime before (because of the extra fields) so maybe is acceptable? P.s. I know AIs love to write in paragraphs, but this was handwritten lol --------- Co-authored-by: Nic Polumeyv <nicolas.polum@outlook.com> Co-authored-by: Nic Polumeyv <nicolas.polum@gmail.com> Co-authored-by: Rich Harris <rich.harris@vercel.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…the server runtime (#16967) `Server` keeps the manifest in `#manifest` and passes it to `respond`, from where it travels through 16 parameter positions in `runtime/server`, down to `has_prerendered_path` and `load_error_components`. The same object is written to `runtime/server/internal.js` by `set_manifest` in the `Server` constructor, and `$app/server`'s `read`, `$app/paths`'s `resolve` and the `read_implementation` branch in `fetch.js` already read it from there, so `fetch.js` mixed the parameter and the module singleton in one function. The parameter is gone and every reader imports `manifest` from `internal.js`, the same shape #16871 gave `options`. The `Server` constructor argument and its `set_manifest` call stay. In dev that call runs per request, so a request in flight during a manifest regeneration now sees the regenerated manifest, which `read` and `resolve` already did. Closes #16519. --------- Co-authored-by: Tee Ming <chewteeming01@gmail.com>
…kers` (#16754) Breaking #16705 into smaller pieces; this is the first step of making the dev environment closer to the workerd runtime. Instead of accessing Cloudflare bindings on `platform.env`, you would do the following: ```js import { env } from 'cloudflare:workers'; export function GET({ request }) { const value = await env.KV.get('key'); // instead of platform.env const userCountry = request.cf.country; // instead of platform.cf const cache = caches.open('name'); // instead of platform.caches } ``` --- ### 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:`. --------- Co-authored-by: Tee Ming <chewteeming01@gmail.com>
…dows (#16972) `create_function_bundle` traces with `base` set to the filesystem root. nft treats any absolute-looking string with a dynamic segment as an asset glob, and the server output has URL strings like ```js `/${app_dir}/routes${route_id}` // runtime/pathname.js ``` On Linux this resolves to `/<*>/routes`, the parent directory is `''`, the stat fails and nothing happens. On Windows it resolves to `D:\<*>\routes`, the parent `D:` stats fine, and nft runs `glob('D:/**/*/routes')` over the whole drive, which never finishes once it hits `pagefile.sys`. nft also evaluates `process.cwd()` as `base` unless told otherwise, so `path.join(process.cwd(), 'asset.txt')` was traced from `/` and never bundled. nft calls `ignore` with the glob relative to `base` before walking, and a base-rooted glob is `**\*\routes`. The cwd case has a regression test; the root-glob case can't fire on Linux for the reason above. Fixes #16963. Supersedes #16964. Related: vercel/nft#609.
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