svelte 5.56.2 → 5.56.3

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
@@ -2,7 +2,7 @@
2
2
  "name": "svelte",
3
3
  "description": "Cybernetically enhanced web apps",
4
4
  "license": "MIT",
5
- "version": "5.56.2",
5
+ "version": "5.56.3",
6
6
  "type": "module",
7
7
  "types": "./types/index.d.ts",
8
8
  "engines": {
@@ -3,7 +3,7 @@
3
3
  import { DEV } from 'esm-env';
4
4
  import { FILENAME } from '../../constants.js';
5
5
  import { is_firefox } from './dom/operations.js';
6
- import { ERROR_VALUE, BOUNDARY_EFFECT, REACTION_RAN, EFFECT } from './constants.js';
6
+ import { ERROR_VALUE, BOUNDARY_EFFECT, REACTION_RAN, EFFECT, DESTROYED } from './constants.js';
7
7
  import { define_property, get_descriptor } from '../shared/utils.js';
8
8
  import { active_effect, active_reaction } from './runtime.js';
9
9
 
@@ -45,6 +45,10 @@ export function handle_error(error) {
45
45
  * @param {Effect | null} effect
46
46
  */
47
47
  export function invoke_error_boundary(error, effect) {
48
+ if (effect !== null && (effect.f & DESTROYED) !== 0) {
49
+ return;
50
+ }
51
+
48
52
  while (effect !== null) {
49
53
  if ((effect.f & BOUNDARY_EFFECT) !== 0) {
50
54
  if ((effect.f & REACTION_RAN) === 0) {
@@ -180,4 +180,3 @@ export {
180
180
  } from '../shared/validate.js';
181
181
  export { strict_equals, equals } from './dev/equality.js';
182
182
  export { log_if_contains_state } from './dev/console-log.js';
183
- export { invoke_error_boundary } from './error-handling.js';
package/src/version.js CHANGED
@@ -4,5 +4,5 @@
4
4
  * The current version, as set in package.json.
5
5
  * @type {string}
6
6
  */
7
- export const VERSION = '5.56.2';
7
+ export const VERSION = '5.56.3';
8
8
  export const PUBLIC_VERSION = '5';
package/types/index.d.ts CHANGED
@@ -3229,7 +3229,7 @@ declare function $state<T>(initial: T): T;
3229
3229
  declare function $state<T>(): T | undefined;
3230
3230
 
3231
3231
  declare namespace $state {
3232
- type Primitive = string | number | boolean | null | undefined;
3232
+ type Primitive = string | number | bigint | boolean | null | undefined;
3233
3233
 
3234
3234
  type TypedArray =
3235
3235
  | Int8Array