@sveltejs/kit 2.46.3 → 2.46.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/kit",
3
- "version": "2.46.3",
3
+ "version": "2.46.5",
4
4
  "description": "SvelteKit is the fastest way to build Svelte apps",
5
5
  "keywords": [
6
6
  "framework",
@@ -537,8 +537,21 @@ export function form(id) {
537
537
  (path, value) => {
538
538
  if (path.length === 0) {
539
539
  input = value;
540
+ update_all_versions();
540
541
  } else {
541
542
  input = deep_set(input, path.map(String), value);
543
+
544
+ const key = build_path_string(path);
545
+ versions[key] ??= 0;
546
+ versions[key] += 1;
547
+ touched[key] = true;
548
+
549
+ const parent_path = path.slice();
550
+ while (parent_path.pop() !== undefined) {
551
+ const parent_key = build_path_string(parent_path);
552
+ versions[parent_key] ??= 0;
553
+ versions[parent_key] += 1;
554
+ }
542
555
  }
543
556
  },
544
557
  () => issues
@@ -3,7 +3,9 @@
3
3
  /** @import { StandardSchemaV1 } from '@standard-schema/spec' */
4
4
 
5
5
  import { DEV } from 'esm-env';
6
- import { untrack } from 'svelte';
6
+ import * as svelte from 'svelte';
7
+ // Svelte 4 and under don't have `untrack` - you'll not be able to use remote functions with Svelte 4 but this will still be loaded
8
+ const untrack = svelte.untrack ?? ((value) => value());
7
9
 
8
10
  /**
9
11
  * Sets a value in a nested object using a path string, not mutating the original object but returning a new object
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // generated during release, do not modify
2
2
 
3
3
  /** @type {string} */
4
- export const VERSION = '2.46.3';
4
+ export const VERSION = '2.46.5';