Skip to content

Commit

Permalink
Merge branch 'dev' into release-next
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Oct 23, 2024
2 parents 4bf819e + 5c7cc02 commit fde6951
Show file tree
Hide file tree
Showing 158 changed files with 1,868 additions and 2,058 deletions.
2 changes: 1 addition & 1 deletion .changeset/little-cooks-pull.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"react-router": patch
---

Fix typegen for routes with a client loader but no server loader
[PRERELEASE] Fix typegen for routes with a client loader but no server loader
15 changes: 15 additions & 0 deletions .changeset/long-peas-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"react-router": major
---

Migrate Remix type generics to React Router

- These generics are provided for Remix v2 migration purposes
- These generics and the APIs they exist on should be considered informally deprecated in favor of the new `Route.*` types
- Anyone migrating from React Router v6 should probably not leverage these new generics and should migrate straight to the `Route.*` types
- For React Router v6 users, these generics are new and should not impact your app, with one exception
- `useFetcher` previously had an optional generic (used primarily by Remix v2) that expected the data type
- This has been updated in v7 to expect the type of the function that generates the data (i.e., `typeof loader`/`typeof action`)
- Therefore, you should update your usages:
-`useFetcher<LoaderData>()`
-`useFetcher<typeof loader>()`
4 changes: 2 additions & 2 deletions .changeset/rare-plums-chew.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"react-router": patch
---

- Fix `react-router-serve` handling of prerendered HTML files by removing the `redirect: false` option so it now falls back on the default `redirect: true` behavior of redirecting from `/folder` -> `/folder/` which will then pick up `/folder/index.html` from disk. See https://expressjs.com/en/resources/middleware/serve-static.html
- Proxy prerendered loader data into prerender pass for HTML files to avoid double-invocations of the loader at build time
- [PRERELEASE] Fix `react-router-serve` handling of prerendered HTML files by removing the `redirect: false` option so it now falls back on the default `redirect: true` behavior of redirecting from `/folder` -> `/folder/` which will then pick up `/folder/index.html` from disk. See https://expressjs.com/en/resources/middleware/serve-static.html
- [PRERELEASE] Proxy prerendered loader data into prerender pass for HTML files to avoid double-invocations of the loader at build time
5 changes: 5 additions & 0 deletions .changeset/silver-cats-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-router": patch
---

Replace `substr` with `substring`
11 changes: 11 additions & 0 deletions .changeset/sour-cycles-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@react-router/dev": major
"react-router": major
---

- Consolidate types previously duplicated across `@remix-run/router`, `@remix-run/server-runtime`, and `@remix-run/react` now that they all live in `react-router`
- Examples: `LoaderFunction`, `LoaderFunctionArgs`, `ActionFunction`, `ActionFunctionArgs`, `DataFunctionArgs`, `RouteManifest`, `LinksFunction`, `Route`, `EntryRoute`
- The `RouteManifest` type used by the "remix" code is now slightly stricter because it is using the former `@remix-run/router` `RouteManifest`
- `Record<string, Route> -> Record<string, Route | undefined>`
- Removed `AppData` type in favor of inlining `unknown` in the few locations it was used
- Removed `ServerRuntimeMeta*` types in favor of the `Meta*` types they were duplicated from
7 changes: 7 additions & 0 deletions .changeset/strange-jeans-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"react-router": patch
---

Remove the deprecated `json` utility

- You can use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) if you still need to construct JSON responses in your app
10 changes: 10 additions & 0 deletions .changeset/tidy-pens-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@react-router/express": major
"@react-router/node": major
"@react-router/dev": major
"react-router": major
---

Drop support for Node 18, update minimum Node vestion to 20

- Remove `installGlobals()` as this should no longer be necessary
5 changes: 5 additions & 0 deletions .changeset/wet-actors-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-router": major
---

Update `cookie` dependency to `^1.0.1` - please see the [release notes](https://github.com/jshttp/cookie/releases) for any breaking changes
6 changes: 3 additions & 3 deletions .github/workflows/integration-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: ./.github/workflows/shared-integration.yml
with:
os: "ubuntu-latest"
node_version: "[18, 20]"
node_version: "[20, 22]"
browser: '["chromium", "firefox"]'

integration-windows:
Expand All @@ -43,7 +43,7 @@ jobs:
uses: ./.github/workflows/shared-integration.yml
with:
os: "windows-latest"
node_version: "[18, 20]"
node_version: "[20, 22]"
browser: '["msedge"]'

integration-macos:
Expand All @@ -52,5 +52,5 @@ jobs:
uses: ./.github/workflows/shared-integration.yml
with:
os: "macos-latest"
node_version: "[18, 20]"
node_version: "[20, 22]"
browser: '["webkit"]'
2 changes: 1 addition & 1 deletion .github/workflows/integration-pr-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ jobs:
uses: ./.github/workflows/shared-integration.yml
with:
os: "ubuntu-latest"
node_version: "[20]"
node_version: "[22]"
browser: '["chromium"]'
6 changes: 3 additions & 3 deletions .github/workflows/integration-pr-windows-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: ./.github/workflows/shared-integration.yml
with:
os: "ubuntu-latest"
node_version: "[20]"
node_version: "[22]"
browser: '["firefox"]'

integration-msedge:
Expand All @@ -30,7 +30,7 @@ jobs:
uses: ./.github/workflows/shared-integration.yml
with:
os: "windows-latest"
node_version: "[20]"
node_version: "[22]"
browser: '["msedge"]'

integration-webkit:
Expand All @@ -39,5 +39,5 @@ jobs:
uses: ./.github/workflows/shared-integration.yml
with:
os: "macos-latest"
node_version: "[20]"
node_version: "[22]"
browser: '["webkit"]'
2 changes: 1 addition & 1 deletion .github/workflows/shared-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
node_version:
required: true
# this is limited to string | boolean | number (https://github.community/t/can-action-inputs-be-arrays/16457)
# but we want to pass an array (node_version: "[18, 20]"),
# but we want to pass an array (node_version: "[20, 22]"),
# so we'll need to manually stringify it for now
type: string
browser:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
fail-fast: false
matrix:
node:
- 18
- 20
- 22

runs-on: ubuntu-latest

Expand Down
Loading

0 comments on commit fde6951

Please sign in to comment.