-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: turn
reactive_declaration_non_reactive_property
into a runtim…
…e warning (#14192) * turn `reactive_declaration_non_reactive_property` into a runtime warning * ignore warning * Update packages/svelte/src/internal/client/reactivity/effects.js Co-authored-by: Simon H <[email protected]> * Update packages/svelte/src/internal/client/runtime.js Co-authored-by: Simon H <[email protected]> * fix * test * changeset * Update .changeset/witty-turtles-bake.md Co-authored-by: Simon H <[email protected]> * add some details * check * regenerate --------- Co-authored-by: Simon H <[email protected]>
- Loading branch information
1 parent
87863da
commit a5de086
Showing
20 changed files
with
217 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'svelte': patch | ||
--- | ||
|
||
chore: turn reactive_declaration_non_reactive_property into a runtime warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { DEV } from 'esm-env'; | ||
import { FILENAME } from '../../../constants.js'; | ||
import { dev_current_component_function } from '../runtime.js'; | ||
|
||
/** | ||
* | ||
* @param {number} [line] | ||
* @param {number} [column] | ||
*/ | ||
export function get_location(line, column) { | ||
if (!DEV || line === undefined) return undefined; | ||
|
||
var filename = dev_current_component_function?.[FILENAME]; | ||
var location = filename && `${filename}:${line}:${column}`; | ||
|
||
return sanitize_location(location); | ||
} | ||
|
||
/** | ||
* Prevent devtools trying to make `location` a clickable link by inserting a zero-width space | ||
* @param {string | undefined} location | ||
*/ | ||
export function sanitize_location(location) { | ||
return location?.replace(/\//g, '/\u200b'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.