Single Fetch: Add a new unstable_data() API as a replacement for json/defer when custom status/headers are needed (#9769)
Add a new replace(url, init?) alternative to redirect(url, init?) that performs a history.replaceState instead of a history.pushState on client-side navigation redirects (#9764)
Fog of War: Simplify implementation now that React Router handles slug/splat edge cases and tracks previously discovered routes (see remix-run/react-router#11883) (#9860)
This changes the return signature of the internal __manifest endpoint since we no longer need the notFoundPaths field
Single Fetch: Add a new unstable_data() API as a replacement for json/defer when custom status/headers are needed (#9769)
Add a new replace(url, init?) alternative to redirect(url, init?) that performs a history.replaceState instead of a history.pushState on client-side navigation redirects (#9764)
Rename future.unstable_fogOfWar to future.unstable_lazyRouteDiscovery for clarity (#9763)
Single Fetch: Remove responseStub in favor of headers (#9769)
Background
The original Single Fetch approach was based on an assumption that an eventual middleware implementation would require something like ResponseStub so users could mutate status/headers in middleware before/after handlers as well as during handlers
We wanted to align how headers got merged between document and data requests
So we made document requests also use ResponseStub and removed the usage of headers in Single Fetch
The realization/alignment between Michael and Ryan on the recent roadmap planning made us realize that the original assumption was incorrect
middleware won't need a stub - users can just mutate the Response they get from await next() directly
With that gone, and still wanting to align how headers get merged, it makes more sense to stick with the current headers API and apply that to Single Fetch and avoid introducing a totally new thing in RepsonseStub (that always felt a bit awkward to work with anyway)
With this change:
You are encouraged to stop returning Response instances in favor of returning raw data from loaders and actions:
return json({ data: whatever });
return { data: whatever };
In most cases, you can remove your json() and defer() calls in favor of returning raw data if they weren't setting custom status/headers
We will be removing both json and defer in the next major version, but both should still work in Single Fetch in v2 to allow for incremental adoption of the new behavior
If you need custom status/headers:
We've added a new unstable_data({...}, responseInit) utility that will let you send back status/headers alongside your raw data without having to encode it into a Response
The headers() function will let you control header merging for both document and data requests
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the remix group with 6 updates:
2.10.3
2.11.2
2.10.3
2.11.2
2.10.3
2.11.2
2.10.3
2.11.2
2.10.3
2.11.2
2.10.3
2.11.2
Updates
@remix-run/architect
from 2.10.3 to 2.11.2Release notes
Sourced from
@remix-run/architect
's releases.Changelog
Sourced from
@remix-run/architect
's changelog.Commits
37219b4
chore: Update version for release (#9869)6e75e9a
chore: Update version for release (pre) (#9867)6a4e51f
chore: Update version for release (pre) (#9862)73fdcdc
chore: Update version for release (#9833)7482bc1
chore: Update version for release (pre) (#9832)63c1385
chore: Update version for release (#9817)f5e350c
chore: Update version for release (pre) (#9816)d975f04
chore: Update version for release (pre) (#9812)94b7aa0
chore: Update version for release (pre) (#9808)Updates
@remix-run/css-bundle
from 2.10.3 to 2.11.2Release notes
Sourced from
@remix-run/css-bundle
's releases.Changelog
Sourced from
@remix-run/css-bundle
's changelog.Commits
37219b4
chore: Update version for release (#9869)6e75e9a
chore: Update version for release (pre) (#9867)6acfe0c
Update release notes6a4e51f
chore: Update version for release (pre) (#9862)73fdcdc
chore: Update version for release (#9833)7482bc1
chore: Update version for release (pre) (#9832)63c1385
chore: Update version for release (#9817)f5e350c
chore: Update version for release (pre) (#9816)d975f04
chore: Update version for release (pre) (#9812)94b7aa0
chore: Update version for release (pre) (#9808)Updates
@remix-run/node
from 2.10.3 to 2.11.2Release notes
Sourced from
@remix-run/node
's releases.Changelog
Sourced from
@remix-run/node
's changelog.Commits
37219b4
chore: Update version for release (#9869)6e75e9a
chore: Update version for release (pre) (#9867)6a4e51f
chore: Update version for release (pre) (#9862)73fdcdc
chore: Update version for release (#9833)7482bc1
chore: Update version for release (pre) (#9832)63c1385
chore: Update version for release (#9817)f5e350c
chore: Update version for release (pre) (#9816)d975f04
chore: Update version for release (pre) (#9812)94b7aa0
chore: Update version for release (pre) (#9808)b163e06
Remove single fetch response stub, add headers (#9769)Updates
@remix-run/react
from 2.10.3 to 2.11.2Release notes
Sourced from
@remix-run/react
's releases.Changelog
Sourced from
@remix-run/react
's changelog.... (truncated)
Commits
37219b4
chore: Update version for release (#9869)6e75e9a
chore: Update version for release (pre) (#9867)5887992
Bump router (#9866)6a4e51f
chore: Update version for release (pre) (#9862)fda3885
Merge branch 'main' into release-nextdfc3401
Bump RR dependency (#9861)8460c77
Handle fog of war edge cases with server-known higher-scoring routes (#9860)50c4e9f
fix: update turbo-stream to v2.3.0 (#9856)7c0366f
Update release notes73fdcdc
chore: Update version for release (#9833)Updates
@remix-run/dev
from 2.10.3 to 2.11.2Release notes
Sourced from
@remix-run/dev
's releases.Changelog
Sourced from
@remix-run/dev
's changelog.Commits
37219b4
chore: Update version for release (#9869)6e75e9a
chore: Update version for release (pre) (#9867)5887992
Bump router (#9866)6a4e51f
chore: Update version for release (pre) (#9862)dfc3401
Bump RR dependency (#9861)8460c77
Handle fog of war edge cases with server-known higher-scoring routes (#9860)73fdcdc
chore: Update version for release (#9833)7482bc1
chore: Update version for release (pre) (#9832)63c1385
chore: Update version for release (#9817)f5e350c
chore: Update version for release (pre) (#9816)Updates
@remix-run/eslint-config
from 2.10.3 to 2.11.2Release notes
Sourced from
@remix-run/eslint-config
's releases.Changelog
Sourced from
@remix-run/eslint-config
's changelog.Commits
37219b4
chore: Update version for release (#9869)6e75e9a
chore: Update version for release (pre) (#9867)6acfe0c
Update release notes6a4e51f
chore: Update version for release (pre) (#9862)73fdcdc
chore: Update version for release (#9833)7482bc1
chore: Update version for release (pre) (#9832)63c1385
chore: Update version for release (#9817)f5e350c
chore: Update version for release (pre) (#9816)d975f04
chore: Update version for release (pre) (#9812)94b7aa0
chore: Update version for release (pre) (#9808)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show