gamesguru/tg-svelte-kit.git
2 months agoVersion Packages (#14839)
github-actions[bot] [Wed, 29 Oct 2025 07:13:24 +0000 (08:13 +0100)]
Version Packages (#14839)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2 months agochore: enable commented out test
Ben McCann [Wed, 29 Oct 2025 03:26:11 +0000 (20:26 -0700)]
chore: enable commented out test

2 months agofix: expose `issue.path` in `.allIssues()` for field containers (#14784)
Matt DeKok [Tue, 28 Oct 2025 22:01:21 +0000 (17:01 -0500)]
fix: expose `issue.path` in `.allIssues()` for field containers (#14784)

fixes #14688

Changes .allIssues() from { message: string } to the following to indicate where in the field container the issue occurred.

2 months agofix: prefix route pathname with hash when using `resolve` with hash routing enabled...
Tee Ming [Tue, 28 Oct 2025 21:58:16 +0000 (05:58 +0800)]
fix: prefix route pathname with hash when using `resolve` with hash routing enabled (#14786)

fixes #14785

This PR changes the client-side resolve implementation to take into account the hash router setting. As a result, it'll add a hash so you get a route such as /base#/my-route which is what you want when hash routing is enabled.

2 months agodocs: document how form field name attributes work (#14807)
Matt DeKok [Tue, 28 Oct 2025 21:56:02 +0000 (16:56 -0500)]
docs: document how form field name attributes work (#14807)

* fix: document how remote form field `name` attributes work

* Update documentation/docs/20-core-concepts/60-remote-functions.md

---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
2 months agodocs: remote function cannot be server-only modules (#14813)
Hyunbin Seo [Tue, 28 Oct 2025 21:51:10 +0000 (06:51 +0900)]
docs: remote function cannot be server-only modules (#14813)

* docs: remote function cannot be server-only modules

* Update documentation/docs/20-core-concepts/60-remote-functions.md

---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
2 months agofix: `afterNavigate` callback not running after hydration when experimental async...
Patrick [Tue, 28 Oct 2025 21:44:51 +0000 (22:44 +0100)]
fix: `afterNavigate` callback not running after hydration when experimental async is enabled (#14644)

Fixes #14618

If svelte experimental async is enabled we need to wait a microtask(?) between mounting the app and running the after_navigate_callbacks, otherwise the script blocks run after running the after_navigate_callbacks (which means there are no callbacks yet).

---------

Co-authored-by: Tee Ming <chewteeming01@gmail.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
2 months agochore: improve runtime validation for adapter-vercel (#14838)
Elliott Johnson [Tue, 28 Oct 2025 20:35:14 +0000 (14:35 -0600)]
chore: improve runtime validation for adapter-vercel (#14838)

* chore: improve runtime validation for adapter-vercel

* Update packages/adapter-vercel/utils.js

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
2 months agochore(deps): update actions/upload-artifact action to v5 (#14804)
renovate[bot] [Tue, 28 Oct 2025 13:17:02 +0000 (06:17 -0700)]
chore(deps): update actions/upload-artifact action to v5 (#14804)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2 months agochore(deps): update dependency node to v24 (#14828)
renovate[bot] [Tue, 28 Oct 2025 13:16:24 +0000 (06:16 -0700)]
chore(deps): update dependency node to v24 (#14828)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2 months agochore: format
Ben McCann [Tue, 28 Oct 2025 13:14:50 +0000 (06:14 -0700)]
chore: format

2 months agochore: add integration tests for enhanced-img
Ben McCann [Tue, 28 Oct 2025 12:41:32 +0000 (05:41 -0700)]
chore: add integration tests for enhanced-img

2 months agoVersion Packages (#14831)
github-actions[bot] [Tue, 28 Oct 2025 07:26:52 +0000 (08:26 +0100)]
Version Packages (#14831)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2 months agofix: update DOM before running navigate callbacks (#14829)
Rich Harris [Tue, 28 Oct 2025 07:24:41 +0000 (08:24 +0100)]
fix: update DOM before running navigate callbacks (#14829)

* fix: also await for `settled` in case there's no fork but there's async work

* await tick() twice

* update changeset

* add test

* format

* lint

---------

Co-authored-by: paoloricciuti <ricciutipaolo@gmail.com>
Co-authored-by: Tee Ming <chewteeming01@gmail.com>
Co-authored-by: Tee Ming Chew <chew.tee.ming@nindatech.com>
2 months agoVersion Packages (#14819)
github-actions[bot] [Tue, 28 Oct 2025 03:32:23 +0000 (21:32 -0600)]
Version Packages (#14819)

2 months agoAdd experimental Bun support (#14817)
Javi Velasco [Tue, 28 Oct 2025 03:29:22 +0000 (20:29 -0700)]
Add experimental Bun support (#14817)

2 months agofix: wait for commit promise instead of `settled` (#14818)
Paolo Ricciuti [Mon, 27 Oct 2025 08:13:12 +0000 (09:13 +0100)]
fix: wait for commit promise instead of `settled` (#14818)

3 months agoVersion Packages (#14805)
github-actions[bot] [Sun, 26 Oct 2025 18:38:09 +0000 (14:38 -0400)]
Version Packages (#14805)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 months agofeat: forking (#14793)
Rich Harris [Sun, 26 Oct 2025 18:35:11 +0000 (14:35 -0400)]
feat: forking (#14793)

* feat: forking

* remove log

* tweak

* bump

* fixes

* changeset

* bail if load_cache was already discarded

3 months agofix: await for `settled` instead of `tick` in navigate (#14800)
Paolo Ricciuti [Sat, 25 Oct 2025 15:03:42 +0000 (17:03 +0200)]
fix: await for `settled` instead of `tick` in navigate (#14800)

3 months agochore(deps): update all non-major dependencies (#14783)
renovate[bot] [Wed, 22 Oct 2025 16:28:04 +0000 (09:28 -0700)]
chore(deps): update all non-major dependencies (#14783)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
3 months agoVersion Packages (#14763)
github-actions[bot] [Wed, 22 Oct 2025 15:39:18 +0000 (08:39 -0700)]
Version Packages (#14763)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 months agofix: error pages with discarded promises fail to load (#14722)
Patrick [Tue, 21 Oct 2025 02:27:11 +0000 (04:27 +0200)]
fix: error pages with discarded promises fail to load (#14722)

* test

* fix

* changeset

* Update .changeset/clear-vans-sniff.md

Co-authored-by: Tee Ming <chewteeming01@gmail.com>
* move test

* format

* move test back

---------

Co-authored-by: Tee Ming <chewteeming01@gmail.com>
3 months agochore: form state rework (#14771)
Simon H [Mon, 20 Oct 2025 21:00:47 +0000 (23:00 +0200)]
chore: form state rework (#14771)

We now use `$state` instead of `$state.raw` for the internal representation of `value()/set(...)`. This has several advantages:
- we can get rid of the version code which became quite a bit
- you can put a `$state` object yourself into `set(...)` and then just push to it, making array operations very easy (closes #14662)
- fine-grained without any additional footwork

The reason I made this `$state.raw` originally is so that `fields.x.value()` would fire even if something within `x` would update, but honestly that's a bad reason looking back. You _can_ get that behavior by running JSON.stringify on the result, or you just access the properties you care about and it will all take care of it automatically.

The one drawback is that prototype pollution prevention became a tiny but trickier, we now have to check for a set of keys. We should consider changing `$state` in Svelte itself to also proxify `Object.create(null)`

3 months agochore: treeshake load function code if we know it's unused (#14764)
Simon H [Mon, 20 Oct 2025 20:56:48 +0000 (22:56 +0200)]
chore: treeshake load function code if we know it's unused (#14764)

This shaves off about ~1kb minified when you're not using any load functions in your code base, which can become more common with load functions

3 months agofix: `RecursiveFormFields` type for recursive or unknown schemas (#14734)
Matt DeKok [Mon, 20 Oct 2025 01:28:43 +0000 (20:28 -0500)]
fix: `RecursiveFormFields` type for recursive or unknown schemas (#14734)

* fix: `RecursiveFormFields` type for recursive or unknown schemas

* fix: better recursive unknown fields

* simplify type

3 months agoVersion Packages (#14749)
github-actions[bot] [Mon, 20 Oct 2025 00:45:41 +0000 (20:45 -0400)]
Version Packages (#14749)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 months agofeat: allow to run preflight validation only (#14744)
Simon H [Sun, 19 Oct 2025 21:34:06 +0000 (23:34 +0200)]
feat: allow to run preflight validation only (#14744)

* feat: allow to run preflight validation only

That way you can e.g. run preflight on each keystroke and full validation only on blur

* clientOnly -> preflightOnly

* Preserve server issues when doing preflight-only validation (#14759)

* preserve server issues on preflight validation, unless there are newer preflight-only issues

* sort correctly

* no longer necessary

* lint

* Update packages/kit/src/runtime/client/remote-functions/form.svelte.js

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
3 months agofix: streamed promise not resolving (#14753)
Patrick [Sun, 19 Oct 2025 13:54:18 +0000 (15:54 +0200)]
fix: streamed promise not resolving (#14753)

* test

* fix

* format

* changeset

* dont' hang

* DRY

* simpler version

3 months agofix: update overload to set `invalid` type to schema input (#14748)
Matt DeKok [Fri, 17 Oct 2025 18:36:44 +0000 (13:36 -0500)]
fix: update overload to set `invalid` type to schema input (#14748)

3 months agoVersion Packages (#14742)
github-actions[bot] [Fri, 17 Oct 2025 08:15:55 +0000 (10:15 +0200)]
Version Packages (#14742)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 months agofix: more robust remote files generation (#14682)
Simon H [Fri, 17 Oct 2025 08:12:39 +0000 (10:12 +0200)]
fix: more robust remote files generation (#14682)

We tried very hard to get manualChunks to work (see #14632 for the latest attempt) but it just doesn't quite work out. What we need is to actually have Vite/Rollup know about the proper entry points to then resolve everything from there. The problem previously was that we didn't know of a good way to know which entry points we have on the fly.

Turns out, `this.emitFile` is our savior (https://rollupjs.org/plugin-development/#this-emitfile). We can use it to create entry points while traversing the module graph and have Vite/Rollup wire up everything correctly.

Fixes #14679
Fixes #14708
Fixes #14736

3 months agofix: set manifest and read implementation before evaluating remote function files...
Copilot [Fri, 17 Oct 2025 02:22:34 +0000 (10:22 +0800)]
fix: set manifest and read implementation before evaluating remote function files during build (#14672)

* Initial plan

* Initial test setup for remote function read at top-level issue

Co-authored-by: teemingc <54401897+teemingc@users.noreply.github.com>
* Update test to use prerender remote function

Co-authored-by: teemingc <54401897+teemingc@users.noreply.github.com>
* Fix: set manifest and read implementation before loading remote functions in prerender

Co-authored-by: teemingc <54401897+teemingc@users.noreply.github.com>
* Remove temporary test app

Co-authored-by: teemingc <54401897+teemingc@users.noreply.github.com>
* Add page using with_read remote function and changeset

Co-authored-by: teemingc <54401897+teemingc@users.noreply.github.com>
* Apply suggestion from @teemingc

* Apply suggestion from @teemingc

* Apply suggestion from @teemingc

* Apply suggestion from @teemingc

* Apply suggestion from @teemingc

* Apply suggestion from @teemingc

* Apply suggestion from @teemingc

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: teemingc <54401897+teemingc@users.noreply.github.com>
Co-authored-by: Tee Ming <chewteeming01@gmail.com>
3 months agoVersion Packages (#14738)
github-actions[bot] [Thu, 16 Oct 2025 15:08:28 +0000 (08:08 -0700)]
Version Packages (#14738)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 months agobreaking: update to adapter-vercel to version 6 (#14737)
Ben McCann [Thu, 16 Oct 2025 14:52:58 +0000 (07:52 -0700)]
breaking: update to adapter-vercel to version 6 (#14737)

* breaking: update to adapter-vercel to version 6

* Update .changeset/rotten-towns-clean.md

---------

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
3 months agoVersion Packages (#14727)
github-actions[bot] [Wed, 15 Oct 2025 16:41:47 +0000 (12:41 -0400)]
Version Packages (#14727)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 months agobreaking: remove Node polyfills (and by extension support for Node 18) (#14732)
Rich Harris [Wed, 15 Oct 2025 15:10:42 +0000 (11:10 -0400)]
breaking: remove Node polyfills (and by extension support for Node 18) (#14732)

* breaking: remove Node polyfills (and by extension support for Node 18)

* remove other references to node 18

* format

---------

Co-authored-by: Tee Ming <chewteeming01@gmail.com>
3 months agochore: format some code that is causing CI failures??? (#14733)
Rich Harris [Wed, 15 Oct 2025 15:09:24 +0000 (11:09 -0400)]
chore: format some code that is causing CI failures??? (#14733)

3 months agofeat: add signal property to request (#14715)
Patrick [Wed, 15 Oct 2025 15:00:33 +0000 (17:00 +0200)]
feat: add signal property to request (#14715)

* add signal

* test

* changeset

3 months agoFix Syntax Errors in Remote Module Code Concatenation (#14728)
Alazli [Wed, 15 Oct 2025 09:07:08 +0000 (12:07 +0300)]
Fix Syntax Errors in Remote Module Code Concatenation (#14728)

* Fix Syntax Errors in Remote Module Code Concatenation

Problem
Remote module transformation fails with syntax errors when the source file ends with an expression or a comment and does not include a trailing semicolon, space, or newline. This results in invalid concatenated code.

Root Cause
When Vite transforms .remote.js files, it concatenates the generated code with the original module. If the original module ends with an expression (e.g. console.log) or a comment without a trailing newline, the resulting code becomes syntactically invalid.

* chore: add changeset

* Apply suggestion from @dummdidumm

* Apply suggestion from @dummdidumm

---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
3 months agodocs: add missing async to remote functions example (#14709)
Vladislav Atakhanov [Tue, 14 Oct 2025 22:04:32 +0000 (03:04 +0500)]
docs: add missing async to remote functions example (#14709)

3 months agofix: allow strings for ISR expiration, parse input (#14691)
Elliott Johnson [Tue, 14 Oct 2025 21:33:49 +0000 (15:33 -0600)]
fix: allow strings for ISR expiration, parse input (#14691)

* fix: allow strings for ISR expiration, parse input

* improvements

3 months agochore: fix flaky test (#14670)
Ben McCann [Tue, 14 Oct 2025 18:07:45 +0000 (11:07 -0700)]
chore: fix flaky test (#14670)

3 months agochore(deps): update pnpm to v10.18.3 (#14720)
renovate[bot] [Tue, 14 Oct 2025 15:41:27 +0000 (08:41 -0700)]
chore(deps): update pnpm to v10.18.3 (#14720)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
3 months agochore: re-enable typechecking after netlify update
Ben McCann [Tue, 14 Oct 2025 15:40:22 +0000 (08:40 -0700)]
chore: re-enable typechecking after netlify update

3 months agochore(deps): update dependency @netlify/functions to v5 (#14721)
renovate[bot] [Tue, 14 Oct 2025 15:37:56 +0000 (08:37 -0700)]
chore(deps): update dependency @netlify/functions to v5 (#14721)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
3 months agochore(deps): update actions/setup-node action to v6 (#14710)
renovate[bot] [Tue, 14 Oct 2025 15:35:55 +0000 (08:35 -0700)]
chore(deps): update actions/setup-node action to v6 (#14710)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
3 months agoVersion Packages (#14664)
github-actions[bot] [Mon, 13 Oct 2025 08:06:21 +0000 (10:06 +0200)]
Version Packages (#14664)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 months agochore(deps): update pnpm to v10.18.2 (#14674)
renovate[bot] [Fri, 10 Oct 2025 15:13:09 +0000 (08:13 -0700)]
chore(deps): update pnpm to v10.18.2 (#14674)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
3 months agofix: ensure remote form fields.set triggers reactivity (#14661)
LeeWxx [Thu, 9 Oct 2025 06:55:36 +0000 (15:55 +0900)]
fix: ensure remote form fields.set triggers reactivity (#14661)

* fix: ensure remote form fields.set triggers reactivity

* test: cover remote form fields.set reactivity

* chore: changeset

* Apply suggestion from @teemingc

* Apply suggestion from @teemingc

---------

Co-authored-by: Tee Ming <chewteeming01@gmail.com>
3 months agoVersion Packages (#14659)
github-actions[bot] [Wed, 8 Oct 2025 14:49:56 +0000 (16:49 +0200)]
Version Packages (#14659)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 months agofix: prevent access of Svelte 5-only `untrack` function (#14658)
Simon H [Wed, 8 Oct 2025 14:44:56 +0000 (16:44 +0200)]
fix: prevent access of Svelte 5-only `untrack` function (#14658)

Fixes #14657

3 months agochore(deps): update pnpm/action-setup action to v4.2.0 (#14652)
renovate[bot] [Wed, 8 Oct 2025 14:38:53 +0000 (07:38 -0700)]
chore(deps): update pnpm/action-setup action to v4.2.0 (#14652)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
3 months agoVersion Packages (#14640)
github-actions[bot] [Wed, 8 Oct 2025 10:42:24 +0000 (12:42 +0200)]
Version Packages (#14640)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 months agofix: merge `field.set(...)` calls (#14651)
Rich Harris [Wed, 8 Oct 2025 09:22:26 +0000 (05:22 -0400)]
fix: merge `field.set(...)` calls (#14651)

3 months agofix: normalize path strings when updating field values (#14649)
Rich Harris [Wed, 8 Oct 2025 08:53:04 +0000 (04:53 -0400)]
fix: normalize path strings when updating field values (#14649)

* fix: normalize path strings when updating field values

* fix

3 months agofix: don't reset form after enhanced form submit (#14626)
Rich Harris [Tue, 7 Oct 2025 15:27:11 +0000 (11:27 -0400)]
fix: don't reset form after enhanced form submit (#14626)

* WIP don't reset form after enhanced form submit

* fix test

* changeset

* docs

3 months agoVersion Packages (#14638)
github-actions[bot] [Tue, 7 Oct 2025 14:33:54 +0000 (16:33 +0200)]
Version Packages (#14638)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 months agofix: prevent code execution order issues around SvelteKit's `env` modules (#14637)
Simon H [Tue, 7 Oct 2025 13:34:36 +0000 (15:34 +0200)]
fix: prevent code execution order issues around SvelteKit's `env` modules (#14637)

For real this time - #14632 did put it on the wrong object

Fixes #14590

3 months agoVersion Packages (#14634)
github-actions[bot] [Tue, 7 Oct 2025 12:24:14 +0000 (08:24 -0400)]
Version Packages (#14634)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 months agofix: require a value with `submit` and `hidden` fields (#14635)
Rich Harris [Tue, 7 Oct 2025 12:19:41 +0000 (08:19 -0400)]
fix: require a value with `submit` and `hidden` fields (#14635)

* fix: require a value with `submit` and `hidden` fields

* Apply suggestion from @dummdidumm

---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
3 months agodocs: remove `@example` blocks to allow docs to deploy (#14636)
Rich Harris [Tue, 7 Oct 2025 12:18:07 +0000 (08:18 -0400)]
docs: remove `@example` blocks to allow docs to deploy (#14636)

3 months agofix: granular updates of `field.value()` (#14621)
Rich Harris [Tue, 7 Oct 2025 11:40:36 +0000 (07:40 -0400)]
fix: granular updates of `field.value()` (#14621)

* fix: use `$derived` for form fields

* make it work

* const

* Update packages/kit/src/runtime/client/remote-functions/form.svelte.js

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
3 months agofix: delete hydration cache on effect teardown (#14611)
Rich Harris [Tue, 7 Oct 2025 11:35:56 +0000 (07:35 -0400)]
fix: delete hydration cache on effect teardown (#14611)

3 months agoVersion Packages (#14633)
github-actions[bot] [Tue, 7 Oct 2025 11:20:50 +0000 (07:20 -0400)]
Version Packages (#14633)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 months agofeat: imperative form validation (#14624)
Simon H [Tue, 7 Oct 2025 11:18:16 +0000 (13:18 +0200)]
feat: imperative form validation (#14624)

* feat: imperative form validation

Not all validation can happen via the schema, this introduces a way to do it imperatively

* fix

* Apply suggestion from @Rich-Harris

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
* Apply suggestion from @Rich-Harris

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
* tweak `invalid(...)` API (#14625)

* Apply suggestions from code review

---------

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
3 months agochore(deps): update all non-major dependencies (#14620)
renovate[bot] [Tue, 7 Oct 2025 11:12:50 +0000 (07:12 -0400)]
chore(deps): update all non-major dependencies (#14620)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
3 months agofix: wait a tick before collecting form data for validation (#14631)
Simon H [Tue, 7 Oct 2025 11:12:17 +0000 (13:12 +0200)]
fix: wait a tick before collecting form data for validation (#14631)

This way when you're doing
```ts
myForm.fields.foo.set('bar')
myForm.validate();
```
you'll validate on the up-to-date data

closes #14630

3 months agofix: prevent code execution order issues around SvelteKit's `env` modules (#14632)
Simon H [Tue, 7 Oct 2025 11:11:01 +0000 (13:11 +0200)]
fix: prevent code execution order issues around SvelteKit's `env` modules (#14632)

With #14571 we hoped to have solved the chunk/code execution order issues, but they snuck back in.

The problem, it turns out (read https://rollupjs.org/configuration-options/#output-manualchunks very carefully), is that dependencies of a manual chunk might get pulled into that manual chunk, too. If the dependency happens to be our env module, this can cause issues since the module might eagerly access the env.

Luckily Rollup has recently solved this via a dedicated option (that will be the default in version 5 and is hence deprecated right away) named `onlyExplicitManualChunks` (https://github.com/rollup/rollup/pull/6087). This solves our problems around chunk ordering. For users not on the latest version yet we do a best-effort fallback by extracting env into its own chunk. This should solve most issues people encounter but the general problem can still occur, which is only fixed with the new option (hence we warn if the rollup version is not up to date).

Fixes #14590

3 months agoVersion Packages (#14614)
github-actions[bot] [Tue, 7 Oct 2025 01:57:32 +0000 (21:57 -0400)]
Version Packages (#14614)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 months agofeat: `form.for(id)` now implicitly sets id on form object (#14623)
Simon H [Tue, 7 Oct 2025 00:04:58 +0000 (02:04 +0200)]
feat: `form.for(id)` now implicitly sets id on form object (#14623)

* feat: `form.for(id)` now implicitly sets id on form object

* fix

* client

* docs

* enforce id type

* preserve type of id

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 months agofix: allow `fetch` in remote function without emitting a warning (#14610)
Rich Harris [Mon, 6 Oct 2025 06:46:31 +0000 (02:46 -0400)]
fix: allow `fetch` in remote function without emitting a warning (#14610)

3 months agoVersion Packages (#14597)
github-actions[bot] [Sun, 5 Oct 2025 19:18:31 +0000 (15:18 -0400)]
Version Packages (#14597)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 months agofix: add script block only when there are imports to add (#14604)
Ben McCann [Sun, 5 Oct 2025 19:05:54 +0000 (12:05 -0700)]
fix: add script block only when there are imports to add (#14604)

3 months agofeat: expose `event.route` and `event.url` to remote functions (#14606)
Rich Harris [Sun, 5 Oct 2025 19:05:00 +0000 (15:05 -0400)]
feat: expose `event.route` and `event.url` to remote functions (#14606)

* feat: expose `event.route` and `event.url` to remote functions

* Update packages/kit/src/runtime/server/respond.js

Co-authored-by: Patrick <Patrick@ShowYou.us>
* Update packages/kit/test/apps/basics/test/test.js

* fix, hopefully

* update docs

* gah

* fix

* fix

* fix

---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Patrick <Patrick@ShowYou.us>
3 months agofeat: better remote form field interactions (#14481)
Simon H [Sun, 5 Oct 2025 19:04:42 +0000 (21:04 +0200)]
feat: better remote form field interactions (#14481)

* feat: better remote form field interactions

Shortly after merging enhanced form validation we noticed that we can do better with respects to interacting with the form, specifically `field()/issues/input`.

This removes those properties in favor of a new `fields` property which makes interacting with the form much easier. It's using a proxy under the hood.

* value() / value(...) with correct POJO at all levels
TODO: doesn't work for nested due to Object.create(null)

* WIP has(...)

* get value(input?) working

* remove name method

* remove as(...) from non-leaves, implement allIssues

* allow schema to contain number/boolean

* snake_case

* coerce numbers and booleans

* redact implementation details

* don't return input to client unnecessarily, only redact sensitive fields when reloading

* toggle checkboxes off

* wip

* docs

* more coercion

* fix types

* handle checkbox arrays, disallow radio arrays

* as('select'), initial(...) (TODO, do we really want it?), preserve server issues

* remove initial(...) method

* fix most tests

* fix

* get checkboxes working properly

* various

* fix and DRY out error messages

* fix radio inputs

* document fields

* more docs

* tweak

* fix docs

* fix

* changeset

* Update .changeset/shaky-ties-look.md

* allow fields.set to work during SSR

* we can get rid of file_transport since we're sanitizing issues

* bit more consistency in naming

* expose RemoteFormField and RemoteFormFieldValue

* expose RemoteFormFieldType

* Update packages/kit/src/runtime/form-utils.svelte.js

Co-authored-by: Patrick <Patrick@ShowYou.us>
* tighten up types

* tidy up

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
Co-authored-by: Patrick <Patrick@ShowYou.us>
3 months agofix: don't crawl error responses during prerendering (#14596)
Rich Harris [Fri, 3 Oct 2025 14:19:43 +0000 (10:19 -0400)]
fix: don't crawl error responses during prerendering (#14596)

3 months agoVersion Packages (#14588)
github-actions[bot] [Fri, 3 Oct 2025 12:55:03 +0000 (08:55 -0400)]
Version Packages (#14588)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 months agoUpdate 30-project-structure.md (#14593)
Tee Ming [Fri, 3 Oct 2025 12:54:26 +0000 (20:54 +0800)]
Update 30-project-structure.md (#14593)

3 months agofix: avoid client modules while traversing dependencies to prevent FOUC during dev...
Simon H [Fri, 3 Oct 2025 12:38:53 +0000 (14:38 +0200)]
fix: avoid client modules while traversing dependencies to prevent FOUC during dev (#14577)

* fix: avoid client modules while traversing dependencies to prevent FOUC during dev

This tweaks the way we're traversing dependencies to avoid a flash of unstyled content during dev. Previously we were using `getModuleByURL` which loads both the client and server version of the module. This means that server-only dependencies can end up being loaded into the client module graph, which is more likely to happen with remote modules.

Example:
+page.svelte -> foo.remote.ts -> {client: nothing, server: server-only-dependency } -> getModuleByURL for both client and server of server-only dependency -> crash

I'm not totally sure if this may have been a somewhat hidden breaking change from Vite 5 -> 6, but either way this ensures that Vite 5-7 now only load the ssr variant.

Fixes #14519

* snake_case

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 months agodocs: update more links to packages page (#14589)
Ben McCann [Thu, 2 Oct 2025 21:13:48 +0000 (14:13 -0700)]
docs: update more links to packages page (#14589)

3 months agofix: HMR for `query` (#14587)
Rich Harris [Thu, 2 Oct 2025 21:12:25 +0000 (17:12 -0400)]
fix: HMR for `query` (#14587)

* accept hot updates

* update cached entries

* changeset

* Update packages/kit/src/runtime/client/remote-functions/query.svelte.js

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
3 months agofix: skip prebundling of .remote.js files (#14583)
Rich Harris [Thu, 2 Oct 2025 21:11:58 +0000 (17:11 -0400)]
fix: skip prebundling of .remote.js files (#14583)

* fix: skip prebundling of .remote.js files

* robustify

* Update packages/kit/src/exports/vite/index.js

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
3 months agofix: more robust remote file pattern matching (#14578)
Simon H [Thu, 2 Oct 2025 19:36:43 +0000 (21:36 +0200)]
fix: more robust remote file pattern matching (#14578)

Prevents "is this a remote file"-false-negatives which can occur during dev when an ID has a version hash, e.g. `/foo/bar.remote.js?v=123`, which in turn meant the remote file wasn't transformed and the server version ended up on the client

3 months agodocs: remove outdated note (#14586)
Rich Harris [Thu, 2 Oct 2025 18:22:11 +0000 (14:22 -0400)]
docs: remove outdated note (#14586)

3 months agodocs: point to new packages page (#14584)
Ben McCann [Thu, 2 Oct 2025 17:47:37 +0000 (10:47 -0700)]
docs: point to new packages page (#14584)

3 months agochore(deps): update pnpm to v10.18.0 (#14582)
renovate[bot] [Thu, 2 Oct 2025 17:31:27 +0000 (10:31 -0700)]
chore(deps): update pnpm to v10.18.0 (#14582)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
3 months agoVersion Packages (#14580)
github-actions[bot] [Thu, 2 Oct 2025 14:21:11 +0000 (10:21 -0400)]
Version Packages (#14580)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 months agochore: fix "homepage" field in package.json (#14579)
Rich Harris [Thu, 2 Oct 2025 13:49:39 +0000 (09:49 -0400)]
chore: fix "homepage" field in package.json (#14579)

3 months agoVersion Packages (#14574)
github-actions[bot] [Wed, 1 Oct 2025 16:23:23 +0000 (12:23 -0400)]
Version Packages (#14574)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 months agofix: force remote module chunks to isolate themselves (#14571)
Rich Harris [Wed, 1 Oct 2025 16:18:50 +0000 (12:18 -0400)]
fix: force remote module chunks to isolate themselves (#14571)

* fix: force remote module chunks to isolate themselves

* remove hardcoded chunks

3 months agofix: correctly type `form` remote functions that do not accept data (#14573)
Tee Ming [Wed, 1 Oct 2025 13:57:29 +0000 (21:57 +0800)]
fix: correctly type `form` remote functions that do not accept data (#14573)

* fix

* changeset

* generate types

* test

3 months agoVersion Packages (#14541)
github-actions[bot] [Tue, 30 Sep 2025 22:03:38 +0000 (18:03 -0400)]
Version Packages (#14541)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 months agofix: smooth scroll to deep link (#14569)
Rich Harris [Tue, 30 Sep 2025 22:01:20 +0000 (18:01 -0400)]
fix: smooth scroll to deep link (#14569)

* fix: smooth scroll to deep link

* remove log

Removed console log for scroll position.

* Update packages/kit/src/runtime/client/client.js

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
3 months agofix: ensure cache key is consistent between client/server (#14563)
Grant Montgomery [Tue, 30 Sep 2025 07:54:16 +0000 (02:54 -0500)]
fix: ensure cache key is consistent between client/server (#14563)

fixes #14562

Use same function to generate cache keys for remote query data during ssr and hydration so the logic doesn't need to be duplicated.

3 months agofix: deduplicate `HEAD` entry in 405 response `allow` header (#14564)
Tee Ming [Tue, 30 Sep 2025 07:34:54 +0000 (15:34 +0800)]
fix: deduplicate `HEAD` entry in 405 response `allow` header (#14564)

* deduplicate items in allow header

* changeset

* add test

* clarify comment

* format

3 months agofix: keep resolve relative to initial base during prerender (#14533)
LeeWxx [Fri, 26 Sep 2025 18:25:17 +0000 (03:25 +0900)]
fix: keep resolve relative to initial base during prerender (#14533)

* fix: keep resolve relative to initial base during prerender

* test: cover resolve helper relative link in prerender

* chore: changeset

* Update packages/kit/src/runtime/app/paths/internal/server.js

* Update packages/kit/src/runtime/app/paths/server.js

* Update packages/kit/src/runtime/app/paths/server.js

---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
4 months agoVersion Packages (#14538)
github-actions[bot] [Thu, 25 Sep 2025 17:52:44 +0000 (19:52 +0200)]
Version Packages (#14538)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
4 months agofix: fall back to non-relative resolution when calling `resolve(...)` outside an...
Rich Harris [Thu, 25 Sep 2025 17:45:22 +0000 (13:45 -0400)]
fix: fall back to non-relative resolution when calling `resolve(...)` outside an event context (#14532)

* fix: fall back to non-relative resolution when calling `resolve(...)` outside an event context

* lint

4 months agoVersion Packages (#14527)
github-actions[bot] [Wed, 24 Sep 2025 14:28:40 +0000 (10:28 -0400)]
Version Packages (#14527)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>