-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat: allow for fine grained invalidation of search params #11066
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
Closed
paoloricciuti
wants to merge
26
commits into
sveltejs:version-2
from
paoloricciuti:fine-grained-search-params
Closed
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
364c2a4
feat: allow for fine grained invalidation of search params
paoloricciuti 988bcb6
add other instances of search params functions and fix bindings
paoloricciuti 0e51f81
fix tests for make_trackable
paoloricciuti 47b7b9b
old and new url could be null or undefined
paoloricciuti ac11e75
update test
paoloricciuti d3b4d2f
try with logs to debug tests
paoloricciuti e0c67f8
remove only
paoloricciuti fe6b814
more logs
paoloricciuti 4968f42
access searchParams before adding the getter and remove logs
paoloricciuti 5373dfa
add e2e tests for fine grained invalidation
paoloricciuti ad8d2c6
fix linting
paoloricciuti bbc62f1
Add docs
paoloricciuti 5b6b253
update docs
paoloricciuti d3a9ae8
add feature flag to avoid breaking change
paoloricciuti 8fc1328
Create strange-eyes-sort.md
paoloricciuti d470608
fix config tests and typescript
paoloricciuti 9e04dad
Update packages/kit/src/exports/public.d.ts
paoloricciuti 92c45f2
Update packages/kit/src/utils/url.spec.js
paoloricciuti e8bb9f1
Update packages/kit/src/runtime/server/respond.js
paoloricciuti f4975dd
Update documentation/docs/20-core-concepts/20-load.md
paoloricciuti 6172001
Update documentation/docs/20-core-concepts/20-load.md
paoloricciuti 51c20ab
remove todos and function check
paoloricciuti 23ea3f5
update check_search_params_changed logic to handle multiple search pa…
paoloricciuti 56b50d5
specify where to set fineGrainedSearchParamsInvalidation
paoloricciuti d72cac9
use vite define to access fine grained config
paoloricciuti ff8b4bb
remove config since will be on the 2.0 milestone
paoloricciuti 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 @@ | ||
| --- | ||
| "@sveltejs/kit": minor | ||
| --- | ||
|
|
||
| feat: allow for fine grained invalidation of search params |
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
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
8 changes: 8 additions & 0 deletions
8
...st/apps/basics/src/routes/load/invalidation/search-params/layout-server/+layout.server.js
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,8 @@ | ||
| let count = 0; | ||
|
|
||
| export function load({ url: { searchParams } }) { | ||
| searchParams.get('test'); | ||
| return { | ||
| count: count++ | ||
| }; | ||
| } |
7 changes: 7 additions & 0 deletions
7
...it/test/apps/basics/src/routes/load/invalidation/search-params/layout-server/+page.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 |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <script> | ||
| export let data; | ||
| </script> | ||
|
|
||
| <span>count: {data.count}</span> | ||
| <a href={`?test=${data.count + 1}`}>Change test</a> | ||
| <a href={`?test=${data.count}&another=another`}>Change another param</a> |
8 changes: 8 additions & 0 deletions
8
packages/kit/test/apps/basics/src/routes/load/invalidation/search-params/layout/+layout.js
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,8 @@ | ||
| let count = 0; | ||
|
|
||
| export function load({ url: { searchParams } }) { | ||
| searchParams.get('test'); | ||
| return { | ||
| count: count++ | ||
| }; | ||
| } |
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.