mirror of https://github.com/sveltejs/svelte
fix: show correct errors for invalid runes in `.svelte.js` files (#12432)
* fix: show correct error for renamed runes in `.svelte.js` files * better * changeset * comment * cleanup * types & lint * lint * revert src changes * move existing validation logic --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>pull/12433/head
parent
8d3c0266ce
commit
879d88f612
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: show correct errors for invalid runes in `.svelte.js` files
|
@ -0,0 +1,8 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
error: {
|
||||||
|
code: 'rune_renamed',
|
||||||
|
message: '`$effect.active` is now `$effect.tracking`'
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1 @@
|
|||||||
|
$effect.active();
|
@ -0,0 +1,8 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
error: {
|
||||||
|
code: 'rune_invalid_name',
|
||||||
|
message: '`$effect.imnotarune` is not a valid rune'
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1 @@
|
|||||||
|
$effect.imnotarune();
|
Loading…
Reference in new issue