Skip to content
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

[pull] main from remix-run:main #49

Merged
merged 34 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d20ba30
Merge branch 'release-next' into dev
pcattori Dec 3, 2024
e1fd999
chore: format
remix-run-bot Dec 3, 2024
d816819
fix(fs-routes): throw error if routes directory is missing (#12407)
GuptaSiddhant Dec 3, 2024
f0145cc
test(fs-routes): Write test files to temp dir (#12446)
markdalgleish Dec 3, 2024
722d488
test: silence expected errors in integration test (#12456)
pcattori Dec 3, 2024
5813c1e
silence remaining expected errors from integration tests (#12457)
pcattori Dec 3, 2024
8ff4d5f
internally deprecate createappfixture (#12458)
pcattori Dec 3, 2024
9a3d9fc
clean up tsconfigs (#12461)
pcattori Dec 4, 2024
0ea8e66
Add tsup temp files to gitignore (#12481)
markdalgleish Dec 6, 2024
5213a95
Remove deprecated `ABORT_DELAY` in favor of `streamTimeout` (#12478)
brophdawg11 Dec 6, 2024
64e0a03
Remove false positive link prefetch warning (#12485)
brophdawg11 Dec 6, 2024
7cd5c54
Throw single fetch redirects fetched from the server (#12506)
brophdawg11 Dec 11, 2024
c9487e6
ignore redirects when inferring loader data types (#12527)
pcattori Dec 11, 2024
a897f99
tests: silence `require(esm)` warnings for Node 22.12 (#12545)
pcattori Dec 13, 2024
151c25c
refactor vite plugin (#12539)
pcattori Dec 13, 2024
8b82164
remove client route virtual modules during dev (#12547)
pcattori Dec 13, 2024
3be44ec
fix(create-react-router): Add missing fs-extra dep (#12556)
markdalgleish Dec 16, 2024
5115991
Add Vite 6 support (#12469)
markdalgleish Dec 17, 2024
99e5a74
Update DEVELOPMENT.md
brophdawg11 Dec 18, 2024
540626b
docs: improve template instructions in installation docs (#12572)
thomasgauvin Dec 18, 2024
2abe5f5
Fix changesets patch to ignore peerDependency bumps for fixed RR pack…
brophdawg11 Dec 18, 2024
32c119d
Merge branch 'main' into release-next
brophdawg11 Dec 18, 2024
ca0a62c
Enter prerelease mode
brophdawg11 Dec 18, 2024
1907596
Properly initialize `NODE_ENV` if not already set (#12578)
brophdawg11 Dec 18, 2024
d81928e
chore: Update version for release (pre) (#12585)
github-actions[bot] Dec 18, 2024
9d36efa
Draft release notes
brophdawg11 Dec 18, 2024
674e007
Fix up release notes
brophdawg11 Dec 18, 2024
fde17e9
Update release notes for 6.28.1
brophdawg11 Dec 20, 2024
7019563
Update release notes
brophdawg11 Dec 20, 2024
63230c1
Exit prerelease mode
brophdawg11 Dec 20, 2024
c51985e
chore: Update version for release (#12604)
github-actions[bot] Dec 20, 2024
3441787
Merge branch 'release-next'
brophdawg11 Dec 20, 2024
61f257e
Fix changelog details/summary
brophdawg11 Dec 20, 2024
6a5b4f2
chore: format
remix-run-bot Dec 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ node_modules/
.wireit
.eslintcache
.tmp
tsup.config.bundled_*.mjs
/.env
/NOTES.md

Expand Down
269 changes: 147 additions & 122 deletions CHANGELOG.md

Large diffs are not rendered by default.

14 changes: 2 additions & 12 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,8 @@ Hotfix releases follow the same process as standard releases above, but the `rel
- Once the stable release is out:
- Merge `release-v6` back to `v6` with a **Normal Merge**
- **Do not** merge `release-v6` to `main`
- Copy the updated root `CHANGELOG.md` entries for the `6.X.Y` release to `main` and `dev`
- `git checkout main`
- `git diff [email protected]@6.X.Y -- "***CHANGELOG.md" > ./docs.patch`
- `git apply ./docs.patch`
- `git checkout dev`
- `git apply ./docs.patch`
- `rm ./docs.patch`
- Copy the docs changes to `main` so they show up on the live docs site for v6
- `git checkout main`
- `git diff [email protected]@6.X.Y docs/ > ./docs.patch`
- `git apply ./docs.patch`
- `rm ./docs.patch`
- Manually copy the new root `CHANGELOG.md` entry to `main` and `dev`
- We don't worry about backporting individual `packages/*/CHANGELOG.md` updates to `main` for subsequent v6 releases
- The _code_ changes should already be in the `dev` branch
- This should have happened at the time the v6 change was made (except for changes such as deprecation warnings)
- Confirm that the commits in this release are all included in `dev` already, and if not you can manually bring them over by cherry-picking the commit or re-doing the work
Expand Down
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@
- johnpangalos
- jonkoops
- jrakotoharisoa
- jrestall
- juanpprieto
- jungwoo3490
- kachun333
Expand Down
27 changes: 27 additions & 0 deletions docs/explanation/special-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,32 @@ The `default` export of this module is a function that lets you create the respo

This module should render the markup for the current page using a `<ServerRouter>` element with the `context` and `url` for the current request. This markup will (optionally) be re-hydrated once JavaScript loads in the browser using the [client entry module][client-entry].

### `streamTimeout`

If you are [streaming] responses, you can export an optional `streamTimeout` value (in milliseconds) that will control the amount of time the server will wait for streamed promises to settle before rejecting outstanding promises them and closing the stream.

It's recommended to decouple this value from the timeout in which you abort the React renderer. You should always set the React rendering timeout to a higher value so it has time to stream down the underlying rejections from your `streamTimeout`.

```tsx lines=[1-2,13-15]
// Reject all pending promises from handler functions after 10 seconds
export const streamTimeout = 10000;

export default function handleRequest(...) {
return new Promise((resolve, reject) => {
// ...

const { pipe, abort } = renderToPipeableStream(
<ServerRouter context={routerContext} url={request.url} />,
{ /* ... */ }
);

// Abort the streaming render pass after 11 seconds soto allow the rejected
// boundaries to be flushed
setTimeout(abort, streamTimeout + 1000);
});
}
```

### `handleDataRequest`

You can export an optional `handleDataRequest` function that will allow you to modify the response of a data request. These are the requests that do not render HTML, but rather return the loader and action data to the browser once client-side hydration has occurred.
Expand Down Expand Up @@ -328,4 +354,5 @@ console.log(supportsVibrationAPI);
[rendertopipeablestream]: https://react.dev/reference/react-dom/server/renderToPipeableStream
[rendertoreadablestream]: https://react.dev/reference/react-dom/server/renderToReadableStream
[node-streaming-entry-server]: https://github.com/remix-run/react-router/blob/dev/packages/react-router-dev/config/defaults/entry.server.node.tsx
[streaming]: ../how-to/suspense
[use_effect]: https://react.dev/reference/react/useEffect
7 changes: 6 additions & 1 deletion docs/start/framework/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@ You can now open your browser to `http://localhost:5173`

You can [view the template on GitHub][default-template] to see how to manually set up your project.

To get started with a template that deploys to your preferred host, check out [all of our templates](https://github.com/remix-run/react-router-templates).
We also have a number of [ready to deploy templates][react-router-templates] available for you to get started with:

```shellscript nonumber
npx create-react-router@latest --template remix-run/react-router-templates/<template-name>
```

---

Next: [Routing](./routing)

[manual_usage]: ../how-to/manual-usage
[default-template]: https://github.com/remix-run/react-router-templates/tree/main/default
[react-router-templates]: https://github.com/remix-run/react-router-templates
3 changes: 1 addition & 2 deletions examples/auth-router-provider/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
3 changes: 1 addition & 2 deletions examples/auth/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
3 changes: 1 addition & 2 deletions examples/basic-data-router/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
3 changes: 1 addition & 2 deletions examples/basic/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
3 changes: 1 addition & 2 deletions examples/custom-filter-link/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
3 changes: 1 addition & 2 deletions examples/custom-link/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
3 changes: 1 addition & 2 deletions examples/custom-query-parsing/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
3 changes: 1 addition & 2 deletions examples/data-router/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
3 changes: 1 addition & 2 deletions examples/error-boundaries/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
3 changes: 1 addition & 2 deletions examples/lazy-loading-router-provider/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
3 changes: 1 addition & 2 deletions examples/lazy-loading/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
3 changes: 1 addition & 2 deletions examples/modal-route-with-outlet/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
3 changes: 1 addition & 2 deletions examples/modal/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
3 changes: 1 addition & 2 deletions examples/navigation-blocking/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
3 changes: 1 addition & 2 deletions examples/notes/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
3 changes: 1 addition & 2 deletions examples/route-objects/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
3 changes: 1 addition & 2 deletions examples/scroll-restoration/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
3 changes: 1 addition & 2 deletions examples/search-params/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
3 changes: 1 addition & 2 deletions examples/ssr-data-router/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"types": ["vite/client"],
Expand Down
3 changes: 1 addition & 2 deletions examples/ssr/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"types": ["vite/client"],
Expand Down
3 changes: 1 addition & 2 deletions examples/view-transitions/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"jsx": "react-jsx",
"importsNotUsedAsValues": "error"
Expand Down
8 changes: 8 additions & 0 deletions integration/catch-boundary-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { PlaywrightFixture } from "./helpers/playwright-fixture.js";
test.describe("ErrorBoundary (thrown responses)", () => {
let fixture: Fixture;
let appFixture: AppFixture;
let originalConsoleError: typeof console.error;
let originalConsoleWarn: typeof console.warn;

let ROOT_BOUNDARY_TEXT = "ROOT_TEXT" as const;
let OWN_BOUNDARY_TEXT = "OWN_BOUNDARY_TEXT" as const;
Expand Down Expand Up @@ -214,10 +216,16 @@ test.describe("ErrorBoundary (thrown responses)", () => {
});

appFixture = await createAppFixture(fixture);
originalConsoleError = console.error;
console.error = () => {};
originalConsoleWarn = console.warn;
console.warn = () => {};
});

test.afterAll(() => {
appFixture.close();
console.error = originalConsoleError;
console.warn = originalConsoleWarn;
});

test("non-matching urls on document requests", async () => {
Expand Down
Loading
Loading