Skip to content

Commit 3c53168

Browse files
committed
fix: improved warning message for legacy non-reactive properties
1 parent 9b2a8f1 commit 3c53168

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

documentation/docs/98-reference/.generated/compile-warnings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ Reassignments of module-level declarations will not cause reactive statements to
729729
### reactive_declaration_non_reactive_property
730730

731731
```
732-
Properties of objects and arrays are not reactive unless in runes mode. Changes to this property will not cause the reactive statement to update
732+
Arrays and object properties are only reactive in runes mode. This may be unexpected if referencing an imported runes-based object and the behavior of this statement will change when migrating to runes mode.
733733
```
734734

735735
### script_context_deprecated

packages/svelte/messages/compile-warnings/script.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
2929
## reactive_declaration_non_reactive_property
3030

31-
> Properties of objects and arrays are not reactive unless in runes mode. Changes to this property will not cause the reactive statement to update
31+
> Arrays and object properties are only reactive in runes mode. This may be unexpected if referencing an imported runes-based object and the behavior of this statement will change when migrating to runes mode.
3232
3333
## state_referenced_locally
3434

packages/svelte/src/compiler/warnings.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,11 +642,11 @@ export function reactive_declaration_module_script_dependency(node) {
642642
}
643643

644644
/**
645-
* Properties of objects and arrays are not reactive unless in runes mode. Changes to this property will not cause the reactive statement to update
645+
* Arrays and object properties are only reactive in runes mode. This may be unexpected if referencing an imported runes-based object and the behavior of this statement will change when migrating to runes mode.
646646
* @param {null | NodeLike} node
647647
*/
648648
export function reactive_declaration_non_reactive_property(node) {
649-
w(node, "reactive_declaration_non_reactive_property", "Properties of objects and arrays are not reactive unless in runes mode. Changes to this property will not cause the reactive statement to update");
649+
w(node, "reactive_declaration_non_reactive_property", "Arrays and object properties are only reactive in runes mode. This may be unexpected if referencing an imported runes-based object and the behavior of this statement will change when migrating to runes mode.");
650650
}
651651

652652
/**

packages/svelte/tests/validator/samples/reactive-statement-non-reactive-import-statement/warnings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[
22
{
33
"code": "reactive_declaration_non_reactive_property",
4-
"message": "Properties of objects and arrays are not reactive unless in runes mode. Changes to this property will not cause the reactive statement to update",
4+
"message": "Arrays and object properties are only reactive in runes mode. This may be unexpected if referencing an imported runes-based object and the behavior of this statement will change when migrating to runes mode.",
55
"start": {
66
"line": 4,
77
"column": 11

0 commit comments

Comments
 (0)