diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts index fd721eb33b..8aab2b4898 100644 --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -1227,7 +1227,7 @@ export default class Component { should_add_as_dependency = false; component.warn(node as any, { code: 'module-script-reactive-declaration', - message: `"${name}" is declared in a module variable and will not be reactive` + message: `"${name}" is declared in a module script and will not be reactive` }); } } diff --git a/test/js/samples/reactive-class-optimized/expected.js b/test/js/samples/reactive-class-optimized/expected.js index c47a6e53a7..b7c2c3a60b 100644 --- a/test/js/samples/reactive-class-optimized/expected.js +++ b/test/js/samples/reactive-class-optimized/expected.js @@ -159,4 +159,4 @@ class Component extends SvelteComponent { } } -export default Component; \ No newline at end of file +export default Component; diff --git a/test/runtime/samples/reactive-statement-module-vars/_config.js b/test/runtime/samples/reactive-statement-module-vars/_config.js index 332800a7de..63b89cd164 100644 --- a/test/runtime/samples/reactive-statement-module-vars/_config.js +++ b/test/runtime/samples/reactive-statement-module-vars/_config.js @@ -12,7 +12,7 @@ export default { a: moduleA b: moduleB moduleA: moduleA - moduleB: moduleB + moduleB: moduleB `); } }; diff --git a/test/runtime/samples/reactive-statement-module-vars/main.svelte b/test/runtime/samples/reactive-statement-module-vars/main.svelte index 33564c3e36..70e0404657 100644 --- a/test/runtime/samples/reactive-statement-module-vars/main.svelte +++ b/test/runtime/samples/reactive-statement-module-vars/main.svelte @@ -1,5 +1,5 @@ \ No newline at end of file + $: bar = foo; + diff --git a/test/validator/samples/reactive-module-variable/warnings.json b/test/validator/samples/reactive-module-variable/warnings.json index d09bd3bee7..c3c52cb479 100644 --- a/test/validator/samples/reactive-module-variable/warnings.json +++ b/test/validator/samples/reactive-module-variable/warnings.json @@ -1,16 +1,16 @@ [ { "code": "module-script-reactive-declaration", - "message": "\"foo\" is declared in a module variable and will not be reactive", - "pos": 67, + "message": "\"foo\" is declared in a module script and will not be reactive", + "pos": 65, "start": { - "character": 67, - "column": 11, + "character": 65, + "column": 10, "line": 5 }, "end": { - "character": 70, - "column": 14, + "character": 68, + "column": 13, "line": 5 } }