-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Routeloader split #8501
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
Draft
wmertens
wants to merge
10
commits into
build/v2
Choose a base branch
from
routeloader-split
base: build/v2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Routeloader split #8501
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a038baa
feat(router): replace q-data with per-loader data
wmertens 11a6b99
feat(router): capture middleware redirects/errors in JSON API responses
wmertens 174b64a
feat(router): add eTag support to routeLoader$
wmertens 4f4192c
feat(router): add search param filtering to routeLoader$
wmertens f119d9c
test(router): fix flaky SPA e2e tests
wmertens 3a06721
feat(router): add strictLoaders option and allowStale pass-through
wmertens f0af85b
chore(ci): fix e2e test results, bump action versions
wmertens ba68022
fix(optimizer): don't migrate transitive deps used by other segments
wmertens e02ae82
fix(router): global async request store
wmertens 7488793
test(router): accept flash of stale data on SPA loader redirects
wmertens 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,3 @@ | ||
| '@qwik.dev/router': minor | ||
|
|
||
| Refactor route loaders to be backed by shared async signals across SSR, client refresh, and action invalidation. | ||
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,13 @@ | ||
| --- | ||
| '@qwik.dev/router': major | ||
| --- | ||
|
|
||
| BREAKING: Qwik Router no longer retrieves `q-data.json` files on every SPA navigation. You can remove any caching rules for these. | ||
|
|
||
| Instead, Qwik Router now retrieves `q-loader-hash.manifestHash.json` for RouteLoader data. You can specify expiry for each RouteLoader individually, and it is automatically used to set browser caching headers. The `manifestHash` ensures that when you build a new version of your app, the old cached data will be invalidated and the new data will be fetched. | ||
|
|
||
| The default expiry for RouteLoader data is 5 minutes, so that prefetching and caching of RouteLoader data is enabled by default. You can set `expiry: 0` to mark a RouteLoader as never expiring. | ||
|
|
||
| Furthermore, any RouteLoader that has `expiry: 0` will be generated as a file during SSG, which allows SPA navigation to work even without a server. | ||
|
|
||
| Note: Be careful with caching for RouteLoaders that return user-specific data, especially regarding logout and CDN caching. |
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 @@ | ||
| --- | ||
| '@qwik.dev/router': major | ||
| --- | ||
|
|
||
| BREAKING: routeloader failures are no longer stored as `loaderSignal.value.failed` but instead are at `loaderSignal.error`. Reading `loaderSignal.value` will throw the error if the loader failed. This is in line with the AsyncSignal API. |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format here is wrong