Skip to content

Commit

Permalink
chore: Update version for release (#10981)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 31, 2023
1 parent 3c6e27c commit 667f936
Show file tree
Hide file tree
Showing 23 changed files with 45 additions and 146 deletions.
10 changes: 0 additions & 10 deletions .changeset/fetcher-cleanup.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fetcher-data.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/fetcher-key.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/fetcher-ref-count.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fix-get-delete-fetcher-types.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/fix-router-future-prop.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/form-navigate-false.md

This file was deleted.

21 changes: 0 additions & 21 deletions .changeset/pre.json

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/support-optional-path-segments-in-match-path.md

This file was deleted.

2 changes: 2 additions & 0 deletions docs/components/form.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ interface FormProps
| "text/plain";
action?: string;
onSubmit?: React.FormEventHandler<HTMLFormElement>;
fetcherKey?: string;
navigate?: boolean;
preventScrollReset?: boolean;
relative?: "route" | "path";
reloadDocument?: boolean;
Expand Down
3 changes: 2 additions & 1 deletion docs/guides/api-development-strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ const router = createBrowserRouter(routes, {

| Flag | Description |
| ------------------------ | --------------------------------------------------------------------- |
| `v7_normalizeFormMethod` | Normalize `useNavigation().formMethod` to be an uppercase HTTP Method |
| `v7_fetcherPersist` | Delay active fetcher cleanup until they return to an `idle` state |
| `v7_normalizeFormMethod` | Normalize `useNavigation().formMethod` to be an uppercase HTTP Method |
| `v7_prependBasename` | Prepend the router basename to navigate/fetch paths |

### React Router Future Flags

Expand Down
7 changes: 4 additions & 3 deletions docs/hooks/use-fetcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ Fetchers have a lot of built-in behavior:

### `key`

By default, `useFetcher` generate a unique fetcher scoped to that component (however, it may be looked up in [`useFetchers()`][use_fetchers] while in-flight). If you want to identify a fetcher with your own key such that you can access it from elsewhere in your app, you can do that with the `key` option:
By default, `useFetcher` generate a unique fetcher scoped to that component (however, it may be looked up in [`useFetchers()`][use-fetchers] while in-flight). If you want to identify a fetcher with your own `key` such that you can access it from elsewhere in your app, you can do that with the `key` option:

```tsx
```tsx lines=[2,8]
function AddToBagButton() {
const fetcher = useFetcher({ key: "add-to-bag" });
return <fetcher.Form method="post">...</fetcher.Form>;
Expand Down Expand Up @@ -277,4 +277,5 @@ fetcher.formMethod; // "post"
[link]: ../components/link
[form]: ../components/form
[api-development-strategy]: ../guides/api-development-strategy
[use-submit]: ./use-submit.md
[use-submit]: ./use-submit
[use-fetchers]: ./use-fetchers
11 changes: 8 additions & 3 deletions docs/routers/create-browser-router.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,22 @@ const router = createBrowserRouter(routes, {
});
```

The following future flags are currently available:

| Flag | Description |
| ------------------------ | --------------------------------------------------------------------- |
| `v7_fetcherPersist` | Delay active fetcher cleanup until they return to an `idle` state |
| `v7_normalizeFormMethod` | Normalize `useNavigation().formMethod` to be an uppercase HTTP Method |
| `v7_prependBasename` | Prepend the router basename to navigate/fetch paths |

## `window`

Useful for environments like browser devtool plugins or testing to use a different window than the global `window`.

[loader]: ../route/loader
[action]: ../route/action
[fetcher]: ../hooks/use-fetcher
[browser-router]: ./browser-router
[form]: ../components/form
[route]: ../route/route
[routes]: ../components/routes
[historyapi]: https://developer.mozilla.org/en-US/docs/Web/API/History
[api-development-strategy]: ../guides/api-development-strategy
[remixing-react-router]: https://remix.run/blog/remixing-react-router
Expand Down
14 changes: 3 additions & 11 deletions packages/react-router-dom-v5-compat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
# `react-router-dom-v5-compat`

## 6.18.0-pre.1
## 6.18.0

### Patch Changes

- Updated dependencies:
- `react-router@6.18.0-pre.1`
- `react-router-dom@6.18.0-pre.1`

## 6.18.0-pre.0

### Patch Changes

- Updated dependencies:
- `react-router-dom@6.18.0-pre.0`
- `react-router@6.18.0-pre.0`
- `react-router-dom@6.18.0`
- `react-router@6.18.0`

## 6.17.0

Expand Down
4 changes: 2 additions & 2 deletions packages/react-router-dom-v5-compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-router-dom-v5-compat",
"version": "6.18.0-pre.1",
"version": "6.18.0",
"description": "Migration path to React Router v6 from v4/5",
"keywords": [
"react",
Expand All @@ -24,7 +24,7 @@
"types": "./dist/index.d.ts",
"dependencies": {
"history": "^5.3.0",
"react-router": "6.18.0-pre.1"
"react-router": "6.18.0"
},
"peerDependencies": {
"react": ">=16.8",
Expand Down
16 changes: 4 additions & 12 deletions packages/react-router-dom/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# `react-router-dom`

## 6.18.0-pre.1

### Patch Changes

- Updated dependencies:
- `@remix-run/router@1.11.0-pre.1`
- `react-router@6.18.0-pre.1`

## 6.18.0-pre.0
## 6.18.0

### Minor Changes

Expand All @@ -24,10 +16,10 @@
### Patch Changes

- Adds a fetcher context to `RouterProvider` that holds completed fetcher data, in preparation for the upcoming future flag that will change the fetcher persistence/cleanup behavior ([#10961](https://github.com/remix-run/react-router/pull/10961))
- Fix the `future`prop on `BrowserRouter`, `HashRouter` and `MemoryRouter` so that it accepts a `Partial<FutureConfig>` instead of requiring all flags to be included. ([#10962](https://github.com/remix-run/react-router/pull/10962))
- Fix the `future` prop on `BrowserRouter`, `HashRouter` and `MemoryRouter` so that it accepts a `Partial<FutureConfig>` instead of requiring all flags to be included. ([#10962](https://github.com/remix-run/react-router/pull/10962))
- Updated dependencies:
- `@remix-run/router@1.11.0-pre.0`
- `react-router@6.18.0-pre.0`
- `@remix-run/router@1.11.0`
- `react-router@6.18.0`

## 6.17.0

Expand Down
6 changes: 3 additions & 3 deletions packages/react-router-dom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-router-dom",
"version": "6.18.0-pre.1",
"version": "6.18.0",
"description": "Declarative routing for React web applications",
"keywords": [
"react",
Expand All @@ -23,8 +23,8 @@
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"dependencies": {
"@remix-run/router": "1.11.0-pre.1",
"react-router": "6.18.0-pre.1"
"@remix-run/router": "1.11.0",
"react-router": "6.18.0"
},
"devDependencies": {
"react": "^18.2.0",
Expand Down
11 changes: 2 additions & 9 deletions packages/react-router-native/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
# `react-router-native`

## 6.18.0-pre.1
## 6.18.0

### Patch Changes

- Updated dependencies:
- `react-router@6.18.0-pre.1`

## 6.18.0-pre.0

### Patch Changes

- Updated dependencies:
- `react-router@6.18.0-pre.0`
- `react-router@6.18.0`

## 6.17.0

Expand Down
4 changes: 2 additions & 2 deletions packages/react-router-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-router-native",
"version": "6.18.0-pre.1",
"version": "6.18.0",
"description": "Declarative routing for React Native applications",
"keywords": [
"react",
Expand All @@ -22,7 +22,7 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@ungap/url-search-params": "^0.2.2",
"react-router": "6.18.0-pre.1"
"react-router": "6.18.0"
},
"devDependencies": {
"react": "^18.2.0",
Expand Down
13 changes: 3 additions & 10 deletions packages/react-router/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
# `react-router`

## 6.18.0-pre.1
## 6.18.0

### Patch Changes

- Fix the `future` prop on `BrowserRouter`, `HashRouter` and `MemoryRouter` so that it accepts a `Partial<FutureConfig>` instead of requiring all flags to be included. ([#10962](https://github.com/remix-run/react-router/pull/10962))
- Updated dependencies:
- `@remix-run/router@1.11.0-pre.1`

## 6.18.0-pre.0

### Patch Changes

- Fix the `future`prop on `BrowserRouter`, `HashRouter` and `MemoryRouter` so that it accepts a `Partial<FutureConfig>` instead of requiring all flags to be included. ([#10962](https://github.com/remix-run/react-router/pull/10962))
- Updated dependencies:
- `@remix-run/router@1.11.0-pre.0`
- `@remix-run/router@1.11.0`

## 6.17.0

Expand Down
4 changes: 2 additions & 2 deletions packages/react-router/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-router",
"version": "6.18.0-pre.1",
"version": "6.18.0",
"description": "Declarative routing for React",
"keywords": [
"react",
Expand All @@ -23,7 +23,7 @@
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"dependencies": {
"@remix-run/router": "1.11.0-pre.1"
"@remix-run/router": "1.11.0"
},
"devDependencies": {
"react": "^18.2.0"
Expand Down
19 changes: 7 additions & 12 deletions packages/router/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
# `@remix-run/router`

## 1.11.0-pre.1
## 1.11.0

### Minor Changes

- When `v7_fetcherPersist` is enabled, the router now performs ref-counting on fetcher keys via `getFetcher`/`deleteFetcher` so it knows when a given fetcher is totally unmounted from the UI ([#10977](https://github.com/remix-run/react-router/pull/10977))

- Once a fetcher has been totally unmounted, we can ignore post-processing of a persisted fetcher result such as a redirect or an error
- The router will also pass a new `deletedFetchers` array to the subscriber callbacks so that the UI layer can remove associated fetcher data

## 1.11.0-pre.0

### Minor Changes

- Add a new `future.v7_fetcherPersist` flag to the `@remix-run/router` to change the persistence behavior of fetchers when `router.deleteFetcher` is called. Instead of being immediately cleaned up, fetchers will persist until they return to an `idle` state([RFC](https://github.com/remix-run/remix/discussions/7698)) ([#10962](https://github.com/remix-run/react-router/pull/10962))
- Add a new `future.v7_fetcherPersist` flag to the `@remix-run/router` to change the persistence behavior of fetchers when `router.deleteFetcher` is called. Instead of being immediately cleaned up, fetchers will persist until they return to an `idle` state ([RFC](https://github.com/remix-run/remix/discussions/7698)) ([#10962](https://github.com/remix-run/react-router/pull/10962))

- This is sort of a long-standing bug fix as the `useFetchers()` API was always supposed to only reflect **in-flight** fetcher information for pending/optimistic UI -- it was not intended to reflect fetcher data or hang onto fetchers after they returned to an `idle` state
- With `v7_fetcherPersist`, the `router` only knows about in-flight fetchers - they do not exist in `state.fetchers` until a `fetch()` call is made, and they are removed as soon as it returns to `idle` (and the data is handed off to the React layer)
- Keep an eye out for the following specific behavioral changes when opting into this flag and check your app for compatibility:
- Fetchers that complete _while still mounted_ will no longer appear in `useFetchers()`. They served effectively no purpose in there since you can access the data via `useFetcher().data`).
- Fetchers that previously unmounted _while in-flight_ will not be immediately aborted and will instead be cleaned up once they return to an `idle` state. They will remain exposed via `useFetchers` while in-flight so you can still access pending/optimistic data after unmount.

- When `v7_fetcherPersist` is enabled, the router now performs ref-counting on fetcher keys via `getFetcher`/`deleteFetcher` so it knows when a given fetcher is totally unmounted from the UI ([#10977](https://github.com/remix-run/react-router/pull/10977))

- Once a fetcher has been totally unmounted, we can ignore post-processing of a persisted fetcher result such as a redirect or an error
- The router will also pass a new `deletedFetchers` array to the subscriber callbacks so that the UI layer can remove associated fetcher data

- Add support for optional path segments in `matchPath` ([#10768](https://github.com/remix-run/react-router/pull/10768))

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/router/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-run/router",
"version": "1.11.0-pre.1",
"version": "1.11.0",
"description": "Nested/Data-driven/Framework-agnostic Routing",
"keywords": [
"remix",
Expand Down

0 comments on commit 667f936

Please sign in to comment.