From 9c9077c78852dc9a9f29d7462590c1118bc8f357 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 13 Sep 2023 15:57:05 +0000 Subject: [PATCH 1/2] chore: Update version for release --- .changeset/aborted-query-error-message.md | 5 ----- .changeset/align-types.md | 11 ---------- .changeset/encode-uri-ssr.md | 5 ----- .changeset/error-response-type.md | 9 -------- .changeset/export-should-revalidate-args.md | 9 -------- .changeset/gold-ghosts-draw.md | 5 ----- .changeset/pre.json | 22 ------------------- .changeset/remix-v2-prep.md | 9 -------- .changeset/route-lazy-race.md | 5 ----- .../should-revalidate-action-result-type.md | 5 ----- .../react-router-dom-v5-compat/CHANGELOG.md | 14 ++++++++++++ .../react-router-dom-v5-compat/package.json | 4 ++-- packages/react-router-dom/CHANGELOG.md | 21 ++++++++++++++++++ packages/react-router-dom/package.json | 6 ++--- packages/react-router-native/CHANGELOG.md | 13 +++++++++++ packages/react-router-native/package.json | 4 ++-- packages/react-router/CHANGELOG.md | 19 ++++++++++++++++ packages/react-router/package.json | 4 ++-- packages/router/CHANGELOG.md | 21 ++++++++++++++++++ packages/router/package.json | 2 +- 20 files changed, 98 insertions(+), 95 deletions(-) delete mode 100644 .changeset/aborted-query-error-message.md delete mode 100644 .changeset/align-types.md delete mode 100644 .changeset/encode-uri-ssr.md delete mode 100644 .changeset/error-response-type.md delete mode 100644 .changeset/export-should-revalidate-args.md delete mode 100644 .changeset/gold-ghosts-draw.md delete mode 100644 .changeset/pre.json delete mode 100644 .changeset/remix-v2-prep.md delete mode 100644 .changeset/route-lazy-race.md delete mode 100644 .changeset/should-revalidate-action-result-type.md diff --git a/.changeset/aborted-query-error-message.md b/.changeset/aborted-query-error-message.md deleted file mode 100644 index 34c80237f3..0000000000 --- a/.changeset/aborted-query-error-message.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/router": patch ---- - -Add method/url to error message on aborted `query`/`queryRoute` calls diff --git a/.changeset/align-types.md b/.changeset/align-types.md deleted file mode 100644 index defa4f9663..0000000000 --- a/.changeset/align-types.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"react-router-dom": patch -"react-router": patch -"@remix-run/router": patch ---- - -In order to move towards stricter TypeScript support in the future, we're aiming to replace current usages of `any` with `unknown` on exposed typings for user-provided data. To do this in Remix v2 without introducing breaking changes in React Router v6, we have added generics to a number of shared types. These continue to default to `any` in React Router and are overridden with `unknown` in Remix. In React Router v7 we plan to move these to `unknown` as a breakjing change. - -- `Location` now accepts a generic for the `location.state` value -- `ActionFunctionArgs`/`ActionFunction`/`LoaderFunctionArgs`/`LoaderFunction` now accept a generic for the `context` parameter (only used in SSR usages via `createStaticHandler`) -- The return type of `useMatches` (now exported as `UIMatch`) accepts generics for `match.data` and `match.handle` - both of which were already set to `unknown` diff --git a/.changeset/encode-uri-ssr.md b/.changeset/encode-uri-ssr.md deleted file mode 100644 index 39529243c3..0000000000 --- a/.changeset/encode-uri-ssr.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router-dom": patch ---- - -Proeprly encode rendered URIs in server rendering to avoid hydration errors diff --git a/.changeset/error-response-type.md b/.changeset/error-response-type.md deleted file mode 100644 index 6218825360..0000000000 --- a/.changeset/error-response-type.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"react-router-dom-v5-compat": patch -"react-router-native": patch -"react-router-dom": patch -"react-router": patch -"@remix-run/router": patch ---- - -Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. diff --git a/.changeset/export-should-revalidate-args.md b/.changeset/export-should-revalidate-args.md deleted file mode 100644 index b7fb51690a..0000000000 --- a/.changeset/export-should-revalidate-args.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"react-router-dom-v5-compat": patch -"react-router-native": patch -"react-router-dom": patch -"react-router": patch -"@remix-run/router": patch ---- - -Export `ShouldRevalidateFunctionArgs` interface diff --git a/.changeset/gold-ghosts-draw.md b/.changeset/gold-ghosts-draw.md deleted file mode 100644 index 25dc7cd12a..0000000000 --- a/.changeset/gold-ghosts-draw.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/router": patch ---- - -[REMOVE] Use long generic names diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index b52f7c4c44..0000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "mode": "exit", - "tag": "pre", - "initialVersions": { - "react-router": "6.15.0", - "react-router-dom": "6.15.0", - "react-router-dom-v5-compat": "6.15.0", - "react-router-native": "6.15.0", - "@remix-run/router": "1.8.0" - }, - "changesets": [ - "aborted-query-error-message", - "align-types", - "encode-uri-ssr", - "error-response-type", - "export-should-revalidate-args", - "gold-ghosts-draw", - "remix-v2-prep", - "route-lazy-race", - "should-revalidate-action-result-type" - ] -} diff --git a/.changeset/remix-v2-prep.md b/.changeset/remix-v2-prep.md deleted file mode 100644 index 6a671cdcf8..0000000000 --- a/.changeset/remix-v2-prep.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"react-router-dom-v5-compat": minor -"react-router-native": minor -"react-router-dom": minor -"react-router": minor -"@remix-run/router": minor ---- - -Removed internal API only required for the Remix v1 back-compat layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) diff --git a/.changeset/route-lazy-race.md b/.changeset/route-lazy-race.md deleted file mode 100644 index 5f469cfea1..0000000000 --- a/.changeset/route-lazy-race.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/router": patch ---- - -Fix a race-condition with loader/action-thrown errors on `route.lazy` routes diff --git a/.changeset/should-revalidate-action-result-type.md b/.changeset/should-revalidate-action-result-type.md deleted file mode 100644 index e55e1e77a7..0000000000 --- a/.changeset/should-revalidate-action-result-type.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/router": patch ---- - -Fix type for `actionResult` on the arguments object passed to `shouldRevalidate` diff --git a/packages/react-router-dom-v5-compat/CHANGELOG.md b/packages/react-router-dom-v5-compat/CHANGELOG.md index 3e9030446f..6786cd3a16 100644 --- a/packages/react-router-dom-v5-compat/CHANGELOG.md +++ b/packages/react-router-dom-v5-compat/CHANGELOG.md @@ -1,5 +1,19 @@ # `react-router-dom-v5-compat` +## 6.16.0 + +### Minor Changes + +- Removed internal API only required for the Remix v1 back-compat layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715)) + +### Patch Changes + +- Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. ([#10811](https://github.com/remix-run/react-router/pull/10811)) +- Export `ShouldRevalidateFunctionArgs` interface ([#10797](https://github.com/remix-run/react-router/pull/10797)) +- Updated dependencies: + - `react-router-dom@6.16.0` + - `react-router@6.16.0` + ## 6.16.0-pre.2 ### Patch Changes diff --git a/packages/react-router-dom-v5-compat/package.json b/packages/react-router-dom-v5-compat/package.json index e2e53acb95..d70c9e0778 100644 --- a/packages/react-router-dom-v5-compat/package.json +++ b/packages/react-router-dom-v5-compat/package.json @@ -1,6 +1,6 @@ { "name": "react-router-dom-v5-compat", - "version": "6.16.0-pre.2", + "version": "6.16.0", "description": "Migration path to React Router v6 from v4/5", "keywords": [ "react", @@ -24,7 +24,7 @@ "types": "./dist/index.d.ts", "dependencies": { "history": "^5.3.0", - "react-router": "6.16.0-pre.2" + "react-router": "6.16.0" }, "peerDependencies": { "react": ">=16.8", diff --git a/packages/react-router-dom/CHANGELOG.md b/packages/react-router-dom/CHANGELOG.md index a451dd7726..e715280c06 100644 --- a/packages/react-router-dom/CHANGELOG.md +++ b/packages/react-router-dom/CHANGELOG.md @@ -1,5 +1,26 @@ # `react-router-dom` +## 6.16.0 + +### Minor Changes + +- Removed internal API only required for the Remix v1 back-compat layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715)) + +### Patch Changes + +- In order to move towards stricter TypeScript support in the future, we're aiming to replace current usages of `any` with `unknown` on exposed typings for user-provided data. To do this in Remix v2 without introducing breaking changes in React Router v6, we have added generics to a number of shared types. These continue to default to `any` in React Router and are overridden with `unknown` in Remix. In React Router v7 we plan to move these to `unknown` as a breakjing change. ([#10843](https://github.com/remix-run/react-router/pull/10843)) + + - `Location` now accepts a generic for the `location.state` value + - `ActionFunctionArgs`/`ActionFunction`/`LoaderFunctionArgs`/`LoaderFunction` now accept a generic for the `context` parameter (only used in SSR usages via `createStaticHandler`) + - The return type of `useMatches` (now exported as `UIMatch`) accepts generics for `match.data` and `match.handle` - both of which were already set to `unknown` + +- Proeprly encode rendered URIs in server rendering to avoid hydration errors ([#10769](https://github.com/remix-run/react-router/pull/10769)) +- Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. ([#10811](https://github.com/remix-run/react-router/pull/10811)) +- Export `ShouldRevalidateFunctionArgs` interface ([#10797](https://github.com/remix-run/react-router/pull/10797)) +- Updated dependencies: + - `@remix-run/router@1.9.0` + - `react-router@6.16.0` + ## 6.16.0-pre.2 ### Patch Changes diff --git a/packages/react-router-dom/package.json b/packages/react-router-dom/package.json index 6ae0450fd7..4a5b08d839 100644 --- a/packages/react-router-dom/package.json +++ b/packages/react-router-dom/package.json @@ -1,6 +1,6 @@ { "name": "react-router-dom", - "version": "6.16.0-pre.2", + "version": "6.16.0", "description": "Declarative routing for React web applications", "keywords": [ "react", @@ -23,8 +23,8 @@ "module": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@remix-run/router": "1.9.0-pre.2", - "react-router": "6.16.0-pre.2" + "@remix-run/router": "1.9.0", + "react-router": "6.16.0" }, "devDependencies": { "react": "^18.2.0", diff --git a/packages/react-router-native/CHANGELOG.md b/packages/react-router-native/CHANGELOG.md index 42d28ddfec..9b1a37dd7e 100644 --- a/packages/react-router-native/CHANGELOG.md +++ b/packages/react-router-native/CHANGELOG.md @@ -1,5 +1,18 @@ # `react-router-native` +## 6.16.0 + +### Minor Changes + +- Removed internal API only required for the Remix v1 back-compat layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715)) + +### Patch Changes + +- Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. ([#10811](https://github.com/remix-run/react-router/pull/10811)) +- Export `ShouldRevalidateFunctionArgs` interface ([#10797](https://github.com/remix-run/react-router/pull/10797)) +- Updated dependencies: + - `react-router@6.16.0` + ## 6.16.0-pre.2 ### Patch Changes diff --git a/packages/react-router-native/package.json b/packages/react-router-native/package.json index fa81755556..41b5c3347c 100644 --- a/packages/react-router-native/package.json +++ b/packages/react-router-native/package.json @@ -1,6 +1,6 @@ { "name": "react-router-native", - "version": "6.16.0-pre.2", + "version": "6.16.0", "description": "Declarative routing for React Native applications", "keywords": [ "react", @@ -22,7 +22,7 @@ "types": "./dist/index.d.ts", "dependencies": { "@ungap/url-search-params": "^0.2.2", - "react-router": "6.16.0-pre.2" + "react-router": "6.16.0" }, "devDependencies": { "react": "^18.2.0", diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md index 60b321a1e2..93f922fa55 100644 --- a/packages/react-router/CHANGELOG.md +++ b/packages/react-router/CHANGELOG.md @@ -1,5 +1,24 @@ # `react-router` +## 6.16.0 + +### Minor Changes + +- Removed internal API only required for the Remix v1 back-compat layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715)) + +### Patch Changes + +- In order to move towards stricter TypeScript support in the future, we're aiming to replace current usages of `any` with `unknown` on exposed typings for user-provided data. To do this in Remix v2 without introducing breaking changes in React Router v6, we have added generics to a number of shared types. These continue to default to `any` in React Router and are overridden with `unknown` in Remix. In React Router v7 we plan to move these to `unknown` as a breakjing change. ([#10843](https://github.com/remix-run/react-router/pull/10843)) + + - `Location` now accepts a generic for the `location.state` value + - `ActionFunctionArgs`/`ActionFunction`/`LoaderFunctionArgs`/`LoaderFunction` now accept a generic for the `context` parameter (only used in SSR usages via `createStaticHandler`) + - The return type of `useMatches` (now exported as `UIMatch`) accepts generics for `match.data` and `match.handle` - both of which were already set to `unknown` + +- Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. ([#10811](https://github.com/remix-run/react-router/pull/10811)) +- Export `ShouldRevalidateFunctionArgs` interface ([#10797](https://github.com/remix-run/react-router/pull/10797)) +- Updated dependencies: + - `@remix-run/router@1.9.0` + ## 6.16.0-pre.2 ### Patch Changes diff --git a/packages/react-router/package.json b/packages/react-router/package.json index e949387b74..e4412d028f 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -1,6 +1,6 @@ { "name": "react-router", - "version": "6.16.0-pre.2", + "version": "6.16.0", "description": "Declarative routing for React", "keywords": [ "react", @@ -23,7 +23,7 @@ "module": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@remix-run/router": "1.9.0-pre.2" + "@remix-run/router": "1.9.0" }, "devDependencies": { "react": "^18.2.0" diff --git a/packages/router/CHANGELOG.md b/packages/router/CHANGELOG.md index 8c78eef378..3066e3fefa 100644 --- a/packages/router/CHANGELOG.md +++ b/packages/router/CHANGELOG.md @@ -1,5 +1,26 @@ # `@remix-run/router` +## 1.9.0 + +### Minor Changes + +- Removed internal API only required for the Remix v1 back-compat layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715)) + +### Patch Changes + +- Add method/url to error message on aborted `query`/`queryRoute` calls ([#10793](https://github.com/remix-run/react-router/pull/10793)) +- In order to move towards stricter TypeScript support in the future, we're aiming to replace current usages of `any` with `unknown` on exposed typings for user-provided data. To do this in Remix v2 without introducing breaking changes in React Router v6, we have added generics to a number of shared types. These continue to default to `any` in React Router and are overridden with `unknown` in Remix. In React Router v7 we plan to move these to `unknown` as a breakjing change. ([#10843](https://github.com/remix-run/react-router/pull/10843)) + + - `Location` now accepts a generic for the `location.state` value + - `ActionFunctionArgs`/`ActionFunction`/`LoaderFunctionArgs`/`LoaderFunction` now accept a generic for the `context` parameter (only used in SSR usages via `createStaticHandler`) + - The return type of `useMatches` (now exported as `UIMatch`) accepts generics for `match.data` and `match.handle` - both of which were already set to `unknown` + +- Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. ([#10811](https://github.com/remix-run/react-router/pull/10811)) +- Export `ShouldRevalidateFunctionArgs` interface ([#10797](https://github.com/remix-run/react-router/pull/10797)) +- [REMOVE] Use long generic names ([#10845](https://github.com/remix-run/react-router/pull/10845)) +- Fix a race-condition with loader/action-thrown errors on `route.lazy` routes ([#10778](https://github.com/remix-run/react-router/pull/10778)) +- Fix type for `actionResult` on the arguments object passed to `shouldRevalidate` ([#10779](https://github.com/remix-run/react-router/pull/10779)) + ## 1.9.0-pre.2 ### Patch Changes diff --git a/packages/router/package.json b/packages/router/package.json index e546e8a4ec..6fb89b8c6a 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/router", - "version": "1.9.0-pre.2", + "version": "1.9.0", "description": "Nested/Data-driven/Framework-agnostic Routing", "keywords": [ "remix", From 28908f9d8d969de9a43598c6ec28cb70aa4254b2 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Wed, 13 Sep 2023 12:14:38 -0400 Subject: [PATCH 2/2] Update changelogs --- .../react-router-dom-v5-compat/CHANGELOG.md | 36 -------------- packages/react-router-dom/CHANGELOG.md | 48 +------------------ packages/react-router-native/CHANGELOG.md | 33 ------------- packages/react-router/CHANGELOG.md | 41 ++-------------- packages/router/CHANGELOG.md | 37 +------------- 5 files changed, 6 insertions(+), 189 deletions(-) diff --git a/packages/react-router-dom-v5-compat/CHANGELOG.md b/packages/react-router-dom-v5-compat/CHANGELOG.md index 6786cd3a16..5610fd8a0d 100644 --- a/packages/react-router-dom-v5-compat/CHANGELOG.md +++ b/packages/react-router-dom-v5-compat/CHANGELOG.md @@ -4,46 +4,10 @@ ### Minor Changes -- Removed internal API only required for the Remix v1 back-compat layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715)) - -### Patch Changes - -- Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. ([#10811](https://github.com/remix-run/react-router/pull/10811)) -- Export `ShouldRevalidateFunctionArgs` interface ([#10797](https://github.com/remix-run/react-router/pull/10797)) - Updated dependencies: - `react-router-dom@6.16.0` - `react-router@6.16.0` -## 6.16.0-pre.2 - -### Patch Changes - -- Updated dependencies: - - `react-router@6.16.0-pre.2` - - `react-router-dom@6.16.0-pre.2` - -## 6.16.0-pre.1 - -### Patch Changes - -- Updated dependencies: - - `react-router-dom@6.16.0-pre.1` - - `react-router@6.16.0-pre.1` - -## 6.16.0-pre.0 - -### Minor Changes - -- Removed internal API only required for the Remix v1 back-compat layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715)) - -### Patch Changes - -- Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. ([#10811](https://github.com/remix-run/react-router/pull/10811)) -- Export `ShouldRevalidateFunctionArgs` interface ([#10797](https://github.com/remix-run/react-router/pull/10797)) -- Updated dependencies: - - `react-router-dom@6.16.0-pre.0` - - `react-router@6.16.0-pre.0` - ## 6.15.0 ### Minor Changes diff --git a/packages/react-router-dom/CHANGELOG.md b/packages/react-router-dom/CHANGELOG.md index e715280c06..1b63f809ce 100644 --- a/packages/react-router-dom/CHANGELOG.md +++ b/packages/react-router-dom/CHANGELOG.md @@ -4,59 +4,13 @@ ### Minor Changes -- Removed internal API only required for the Remix v1 back-compat layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715)) - -### Patch Changes - -- In order to move towards stricter TypeScript support in the future, we're aiming to replace current usages of `any` with `unknown` on exposed typings for user-provided data. To do this in Remix v2 without introducing breaking changes in React Router v6, we have added generics to a number of shared types. These continue to default to `any` in React Router and are overridden with `unknown` in Remix. In React Router v7 we plan to move these to `unknown` as a breakjing change. ([#10843](https://github.com/remix-run/react-router/pull/10843)) - - - `Location` now accepts a generic for the `location.state` value - - `ActionFunctionArgs`/`ActionFunction`/`LoaderFunctionArgs`/`LoaderFunction` now accept a generic for the `context` parameter (only used in SSR usages via `createStaticHandler`) - - The return type of `useMatches` (now exported as `UIMatch`) accepts generics for `match.data` and `match.handle` - both of which were already set to `unknown` - -- Proeprly encode rendered URIs in server rendering to avoid hydration errors ([#10769](https://github.com/remix-run/react-router/pull/10769)) -- Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. ([#10811](https://github.com/remix-run/react-router/pull/10811)) -- Export `ShouldRevalidateFunctionArgs` interface ([#10797](https://github.com/remix-run/react-router/pull/10797)) - Updated dependencies: - `@remix-run/router@1.9.0` - `react-router@6.16.0` -## 6.16.0-pre.2 - -### Patch Changes - -- Updated dependencies: - - `@remix-run/router@1.9.0-pre.2` - - `react-router@6.16.0-pre.2` - -## 6.16.0-pre.1 - ### Patch Changes -- In order to move towards stricter TypeScript support in the future, we're aiming to replace current usages of `any` with `unknown` on exposed typings for user-provided data. To do this in Remix v2 without introducing breaking changes in React Router v6, we have added generics to a number of shared types. These continue to default to `any` in React Router and are overridden with `unknown` in Remix. In React Router v7 we plan to move these to `unknown` as a breakjing change. ([#10843](https://github.com/remix-run/react-router/pull/10843)) - - - `Location` now accepts a generic for the `location.state` value - - `ActionFunctionArgs`/`ActionFunction`/`LoaderFunctionArgs`/`LoaderFunction` now accept a generic for the `context` parameter (only used in SSR usages via `createStaticHandler`) - - The return type of `useMatches` (now exported as `UIMatch`) accepts generics for `match.data` and `match.handle` - both of which were already set to `unknown` - -- Updated dependencies: - - `react-router@6.16.0-pre.1` - - `@remix-run/router@1.9.0-pre.1` - -## 6.16.0-pre.0 - -### Minor Changes - -- Removed internal API only required for the Remix v1 back-compat layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715)) - -### Patch Changes - -- Proeprly encode rendered URIs in server rendering to avoid hydration errors ([#10769](https://github.com/remix-run/react-router/pull/10769)) -- Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. ([#10811](https://github.com/remix-run/react-router/pull/10811)) -- Export `ShouldRevalidateFunctionArgs` interface ([#10797](https://github.com/remix-run/react-router/pull/10797)) -- Updated dependencies: - - `@remix-run/router@1.9.0-pre.0` - - `react-router@6.16.0-pre.0` +- Properly encode rendered URIs in server rendering to avoid hydration errors ([#10769](https://github.com/remix-run/react-router/pull/10769)) ## 6.15.0 diff --git a/packages/react-router-native/CHANGELOG.md b/packages/react-router-native/CHANGELOG.md index 9b1a37dd7e..c998f0c2e4 100644 --- a/packages/react-router-native/CHANGELOG.md +++ b/packages/react-router-native/CHANGELOG.md @@ -4,42 +4,9 @@ ### Minor Changes -- Removed internal API only required for the Remix v1 back-compat layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715)) - -### Patch Changes - -- Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. ([#10811](https://github.com/remix-run/react-router/pull/10811)) -- Export `ShouldRevalidateFunctionArgs` interface ([#10797](https://github.com/remix-run/react-router/pull/10797)) - Updated dependencies: - `react-router@6.16.0` -## 6.16.0-pre.2 - -### Patch Changes - -- Updated dependencies: - - `react-router@6.16.0-pre.2` - -## 6.16.0-pre.1 - -### Patch Changes - -- Updated dependencies: - - `react-router@6.16.0-pre.1` - -## 6.16.0-pre.0 - -### Minor Changes - -- Removed internal API only required for the Remix v1 back-compat layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715)) - -### Patch Changes - -- Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. ([#10811](https://github.com/remix-run/react-router/pull/10811)) -- Export `ShouldRevalidateFunctionArgs` interface ([#10797](https://github.com/remix-run/react-router/pull/10797)) -- Updated dependencies: - - `react-router@6.16.0-pre.0` - ## 6.15.0 ### Minor Changes diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md index 93f922fa55..95cffeb86d 100644 --- a/packages/react-router/CHANGELOG.md +++ b/packages/react-router/CHANGELOG.md @@ -4,53 +4,18 @@ ### Minor Changes -- Removed internal API only required for the Remix v1 back-compat layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715)) - -### Patch Changes - -- In order to move towards stricter TypeScript support in the future, we're aiming to replace current usages of `any` with `unknown` on exposed typings for user-provided data. To do this in Remix v2 without introducing breaking changes in React Router v6, we have added generics to a number of shared types. These continue to default to `any` in React Router and are overridden with `unknown` in Remix. In React Router v7 we plan to move these to `unknown` as a breakjing change. ([#10843](https://github.com/remix-run/react-router/pull/10843)) - +- In order to move towards stricter TypeScript support in the future, we're aiming to replace current usages of `any` with `unknown` on exposed typings for user-provided data. To do this in Remix v2 without introducing breaking changes in React Router v6, we have added generics to a number of shared types. These continue to default to `any` in React Router and are overridden with `unknown` in Remix. In React Router v7 we plan to move these to `unknown` as a breaking change. ([#10843](https://github.com/remix-run/react-router/pull/10843)) - `Location` now accepts a generic for the `location.state` value - `ActionFunctionArgs`/`ActionFunction`/`LoaderFunctionArgs`/`LoaderFunction` now accept a generic for the `context` parameter (only used in SSR usages via `createStaticHandler`) - The return type of `useMatches` (now exported as `UIMatch`) accepts generics for `match.data` and `match.handle` - both of which were already set to `unknown` - - Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. ([#10811](https://github.com/remix-run/react-router/pull/10811)) - Export `ShouldRevalidateFunctionArgs` interface ([#10797](https://github.com/remix-run/react-router/pull/10797)) -- Updated dependencies: - - `@remix-run/router@1.9.0` - -## 6.16.0-pre.2 +- Removed private/internal APIs only required for the Remix v1 backwards compatibility layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715)) ### Patch Changes - Updated dependencies: - - `@remix-run/router@1.9.0-pre.2` - -## 6.16.0-pre.1 - -### Patch Changes - -- In order to move towards stricter TypeScript support in the future, we're aiming to replace current usages of `any` with `unknown` on exposed typings for user-provided data. To do this in Remix v2 without introducing breaking changes in React Router v6, we have added generics to a number of shared types. These continue to default to `any` in React Router and are overridden with `unknown` in Remix. In React Router v7 we plan to move these to `unknown` as a breakjing change. ([#10843](https://github.com/remix-run/react-router/pull/10843)) - - - `Location` now accepts a generic for the `location.state` value - - `ActionFunctionArgs`/`ActionFunction`/`LoaderFunctionArgs`/`LoaderFunction` now accept a generic for the `context` parameter (only used in SSR usages via `createStaticHandler`) - - The return type of `useMatches` (now exported as `UIMatch`) accepts generics for `match.data` and `match.handle` - both of which were already set to `unknown` - -- Updated dependencies: - - `@remix-run/router@1.9.0-pre.1` - -## 6.16.0-pre.0 - -### Minor Changes - -- Removed internal API only required for the Remix v1 back-compat layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715)) - -### Patch Changes - -- Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. ([#10811](https://github.com/remix-run/react-router/pull/10811)) -- Export `ShouldRevalidateFunctionArgs` interface ([#10797](https://github.com/remix-run/react-router/pull/10797)) -- Updated dependencies: - - `@remix-run/router@1.9.0-pre.0` + - `@remix-run/router@1.9.0` ## 6.15.0 diff --git a/packages/router/CHANGELOG.md b/packages/router/CHANGELOG.md index 3066e3fefa..d524687114 100644 --- a/packages/router/CHANGELOG.md +++ b/packages/router/CHANGELOG.md @@ -4,50 +4,17 @@ ### Minor Changes -- Removed internal API only required for the Remix v1 back-compat layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715)) - -### Patch Changes - -- Add method/url to error message on aborted `query`/`queryRoute` calls ([#10793](https://github.com/remix-run/react-router/pull/10793)) -- In order to move towards stricter TypeScript support in the future, we're aiming to replace current usages of `any` with `unknown` on exposed typings for user-provided data. To do this in Remix v2 without introducing breaking changes in React Router v6, we have added generics to a number of shared types. These continue to default to `any` in React Router and are overridden with `unknown` in Remix. In React Router v7 we plan to move these to `unknown` as a breakjing change. ([#10843](https://github.com/remix-run/react-router/pull/10843)) - +- In order to move towards stricter TypeScript support in the future, we're aiming to replace current usages of `any` with `unknown` on exposed typings for user-provided data. To do this in Remix v2 without introducing breaking changes in React Router v6, we have added generics to a number of shared types. These continue to default to `any` in React Router and are overridden with `unknown` in Remix. In React Router v7 we plan to move these to `unknown` as a breaking change. ([#10843](https://github.com/remix-run/react-router/pull/10843)) - `Location` now accepts a generic for the `location.state` value - `ActionFunctionArgs`/`ActionFunction`/`LoaderFunctionArgs`/`LoaderFunction` now accept a generic for the `context` parameter (only used in SSR usages via `createStaticHandler`) - The return type of `useMatches` (now exported as `UIMatch`) accepts generics for `match.data` and `match.handle` - both of which were already set to `unknown` - - Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. ([#10811](https://github.com/remix-run/react-router/pull/10811)) - Export `ShouldRevalidateFunctionArgs` interface ([#10797](https://github.com/remix-run/react-router/pull/10797)) -- [REMOVE] Use long generic names ([#10845](https://github.com/remix-run/react-router/pull/10845)) -- Fix a race-condition with loader/action-thrown errors on `route.lazy` routes ([#10778](https://github.com/remix-run/react-router/pull/10778)) -- Fix type for `actionResult` on the arguments object passed to `shouldRevalidate` ([#10779](https://github.com/remix-run/react-router/pull/10779)) - -## 1.9.0-pre.2 - -### Patch Changes - -- [REMOVE] Use long generic names ([#10845](https://github.com/remix-run/react-router/pull/10845)) - -## 1.9.0-pre.1 - -### Patch Changes - -- In order to move towards stricter TypeScript support in the future, we're aiming to replace current usages of `any` with `unknown` on exposed typings for user-provided data. To do this in Remix v2 without introducing breaking changes in React Router v6, we have added generics to a number of shared types. These continue to default to `any` in React Router and are overridden with `unknown` in Remix. In React Router v7 we plan to move these to `unknown` as a breakjing change. ([#10843](https://github.com/remix-run/react-router/pull/10843)) - - - `Location` now accepts a generic for the `location.state` value - - `ActionFunctionArgs`/`ActionFunction`/`LoaderFunctionArgs`/`LoaderFunction` now accept a generic for the `context` parameter (only used in SSR usages via `createStaticHandler`) - - The return type of `useMatches` (now exported as `UIMatch`) accepts generics for `match.data` and `match.handle` - both of which were already set to `unknown` - -## 1.9.0-pre.0 - -### Minor Changes - -- Removed internal API only required for the Remix v1 back-compat layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715)) +- Removed private/internal APIs only required for the Remix v1 backwards compatibility layer and no longer needed in Remix v2 (`_isFetchActionRedirect`, `_hasFetcherDoneAnything`) ([#10715](https://github.com/remix-run/react-router/pull/10715)) ### Patch Changes - Add method/url to error message on aborted `query`/`queryRoute` calls ([#10793](https://github.com/remix-run/react-router/pull/10793)) -- Move the `@private` class export `ErrorResponse` to an `UNSAFE_ErrorResponseImpl` export since it is an implementation detail and there should be no construction of `ErrorResponse` instances in userland. This frees us up to export a `type ErrorResponse` which correlates to an instance of the class via `InstanceType`. Userland code should only ever be using `ErrorResponse` as a type and should be type-narrowing via `isRouteErrorResponse`. ([#10811](https://github.com/remix-run/react-router/pull/10811)) -- Export `ShouldRevalidateFunctionArgs` interface ([#10797](https://github.com/remix-run/react-router/pull/10797)) - Fix a race-condition with loader/action-thrown errors on `route.lazy` routes ([#10778](https://github.com/remix-run/react-router/pull/10778)) - Fix type for `actionResult` on the arguments object passed to `shouldRevalidate` ([#10779](https://github.com/remix-run/react-router/pull/10779))