-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
breaking: rename svelte/reactivity helpers to include Svelte prefix #12248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f4ef72e
breaking: rename svelte/reactivity helpers to include Svelte prefix
trueadm c537b81
keep old exports
trueadm fdf867f
add runtime errors
trueadm 04f1208
add runtime errors
trueadm c2cfc5e
feedback
trueadm e109821
feedback
trueadm 7463dcb
feedback
trueadm 5c553ce
Update .changeset/nice-jobs-breathe.md
trueadm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 | ||
| --- | ||
|
|
||
| breaking: rename svelte/reactivity helpers to include Svelte prefix | ||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,4 +1,36 @@ | ||
| export { ReactiveDate as Date } from './date.js'; | ||
| export { ReactiveSet as Set } from './set.js'; | ||
| export { ReactiveMap as Map } from './map.js'; | ||
| export { ReactiveURL as URL, ReactiveURLSearchParams as URLSearchParams } from './url.js'; | ||
| export { SvelteDate } from './date.js'; | ||
| export { SvelteSet } from './set.js'; | ||
| export { SvelteMap } from './map.js'; | ||
| export { SvelteURL, SvelteURLSearchParams } from './url.js'; | ||
|
|
||
| /** @deprecated Use `SvelteDate` instead */ | ||
| function DeprecatedDate() { | ||
| throw new Error('Date is deprecated, use SvelteDate instead.'); | ||
| } | ||
|
|
||
| /** @deprecated Use `SvelteSet` instead */ | ||
| function DeprecatedSet() { | ||
| throw new Error('Set is deprecated, use SvelteSet instead.'); | ||
| } | ||
|
|
||
| /** @deprecated Use `SvelteMap` instead */ | ||
| function DeprecatedMap() { | ||
| throw new Error('Map is deprecated, use DeprecatedMap instead.'); | ||
| } | ||
|
|
||
| /** @deprecated Use `SvelteURL` instead */ | ||
| function DeprecatedURL() { | ||
| throw new Error('URL is deprecated, use DeprecatedURL instead.'); | ||
| } | ||
|
|
||
| /** @deprecated Use `SvelteURLSearchParams` instead */ | ||
| function DeprecatedURLSearchParams() { | ||
| throw new Error('URLSearchParams is deprecated, use SvelteURLSearchParams instead.'); | ||
| } | ||
|
|
||
| // Deprecated | ||
| export { DeprecatedDate as Date }; | ||
| export { DeprecatedSet as Set }; | ||
| export { DeprecatedMap as Map }; | ||
| export { DeprecatedURL as URL }; | ||
| export { DeprecatedURLSearchParams as URLSearchParams }; |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,5 +1,12 @@ | ||
| export const Date = globalThis.Date; | ||
| export const Set = globalThis.Set; | ||
| export const Map = globalThis.Map; | ||
| export const URL = globalThis.URL; | ||
| export const URLSearchParams = globalThis.URLSearchParams; | ||
| export const SvelteDate = globalThis.Date; | ||
| export const SvelteSet = globalThis.Set; | ||
| export const SvelteMap = globalThis.Map; | ||
| export const SvelteURL = globalThis.URL; | ||
| export const SvelteURLSearchParams = globalThis.URLSearchParams; | ||
|
|
||
| // Deprecated | ||
| export const Date = SvelteDate; | ||
| export const Set = SvelteSet; | ||
| export const Map = SvelteMap; | ||
| export const URL = SvelteURL; | ||
| export const URLSearchParams = SvelteURLSearchParams; | ||
trueadm marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
4 changes: 2 additions & 2 deletions
4
packages/svelte/tests/runtime-runes/samples/reactive-date/main.svelte
This file contains hidden or 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
4 changes: 2 additions & 2 deletions
4
packages/svelte/tests/runtime-runes/samples/reactive-map/main.svelte
This file contains hidden or 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
4 changes: 2 additions & 2 deletions
4
packages/svelte/tests/runtime-runes/samples/reactive-set/main.svelte
This file contains hidden or 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
8 changes: 4 additions & 4 deletions
8
packages/svelte/tests/runtime-runes/samples/reactive-to-string/main.svelte
This file contains hidden or 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 |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| <script> | ||
| import { Set as ReactiveSet, Map as ReactiveMap } from 'svelte/reactivity'; | ||
| import { SvelteSet, SvelteMap } from 'svelte/reactivity'; | ||
|
|
||
| let map = new Map(); | ||
| let set = new Set(); | ||
| let rmap = new ReactiveMap(); | ||
| let rset = new ReactiveSet(); | ||
| let rmap = new SvelteMap(); | ||
| let rset = new SvelteSet(); | ||
| </script> | ||
|
|
||
| <div>{rset.entries()} {rset.keys()} {rset.values()}</div> | ||
| <div>{set.entries()} {set.keys()} {set.values()}</div> | ||
| <div>{rmap.entries()} {rmap.keys()} {rmap.values()}</div> | ||
| <div>{map.entries()} {map.keys()} {map.values()}</div> | ||
| <div>{map.entries()} {map.keys()} {map.values()}</div> |
4 changes: 2 additions & 2 deletions
4
packages/svelte/tests/runtime-runes/samples/reactive-url/main.svelte
This file contains hidden or 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
4 changes: 2 additions & 2 deletions
4
packages/svelte/tests/runtime-runes/samples/state-in-template/main.svelte
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.