react-router
Advanced tools
Comparing version 0.0.0-nightly-f47048541-20240813 to 0.0.0-nightly-f763fd2eb-20241122
# `react-router` | ||
## 6.28.0 | ||
### Minor Changes | ||
- - Log deprecation warnings for v7 flags ([#11750](https://github.com/remix-run/react-router/pull/11750)) | ||
- Add deprecation warnings to `json`/`defer` in favor of returning raw objects | ||
- These methods will be removed in React Router v7 | ||
### Patch Changes | ||
- Update JSDoc URLs for new website structure (add /v6/ segment) ([#12141](https://github.com/remix-run/react-router/pull/12141)) | ||
- Updated dependencies: | ||
- `@remix-run/router@1.21.0` | ||
## 6.27.0 | ||
### Minor Changes | ||
- Stabilize `unstable_patchRoutesOnNavigation` ([#11973](https://github.com/remix-run/react-router/pull/11973)) | ||
- Add new `PatchRoutesOnNavigationFunctionArgs` type for convenience ([#11967](https://github.com/remix-run/react-router/pull/11967)) | ||
- Stabilize `unstable_dataStrategy` ([#11974](https://github.com/remix-run/react-router/pull/11974)) | ||
- Stabilize the `unstable_flushSync` option for navigations and fetchers ([#11989](https://github.com/remix-run/react-router/pull/11989)) | ||
- Stabilize the `unstable_viewTransition` option for navigations and the corresponding `unstable_useViewTransitionState` hook ([#11989](https://github.com/remix-run/react-router/pull/11989)) | ||
### Patch Changes | ||
- Fix bug when submitting to the current contextual route (parent route with an index child) when an `?index` param already exists from a prior submission ([#12003](https://github.com/remix-run/react-router/pull/12003)) | ||
- Fix `useFormAction` bug - when removing `?index` param it would not keep other non-Remix `index` params ([#12003](https://github.com/remix-run/react-router/pull/12003)) | ||
- Fix types for `RouteObject` within `PatchRoutesOnNavigationFunction`'s `patch` method so it doesn't expect agnostic route objects passed to `patch` ([#11967](https://github.com/remix-run/react-router/pull/11967)) | ||
- Updated dependencies: | ||
- `@remix-run/router@1.20.0` | ||
## 6.26.2 | ||
### Patch Changes | ||
- Updated dependencies: | ||
- `@remix-run/router@1.19.2` | ||
## 6.26.1 | ||
### Patch Changes | ||
- Rename `unstable_patchRoutesOnMiss` to `unstable_patchRoutesOnNavigation` to match new behavior ([#11888](https://github.com/remix-run/react-router/pull/11888)) | ||
- Updated dependencies: | ||
- `@remix-run/router@1.19.1` | ||
## 6.26.0 | ||
@@ -18,6 +68,4 @@ | ||
### Patch Changes | ||
No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/react-router/blob/main/CHANGELOG.md) for an overview of all changes in v6.25.1. | ||
- Memoize some `RouterProvider` internals to reduce unnecessary re-renders ([#11803](https://github.com/remix-run/react-router/pull/11803)) | ||
## 6.25.0 | ||
@@ -52,3 +100,3 @@ | ||
- RFC: <https://github.com/remix-run/react-router/discussions/11113> | ||
- `unstable_patchRoutesOnMiss` docs: <https://reactrouter.com/en/main/routers/create-browser-router> | ||
- `unstable_patchRoutesOnMiss` docs: <https://reactrouter.com/v6/routers/create-browser-router> | ||
@@ -299,3 +347,3 @@ ### Patch Changes | ||
- Add `unstable_flushSync` option to `useNavigate`/`useSumbit`/`fetcher.load`/`fetcher.submit` to opt-out of `React.startTransition` and into `ReactDOM.flushSync` for state updates ([#11005](https://github.com/remix-run/react-router/pull/11005)) | ||
- Remove the `unstable_` prefix from the [`useBlocker`](https://reactrouter.com/en/main/hooks/use-blocker) hook as it's been in use for enough time that we are confident in the API. We do not plan to remove the prefix from `unstable_usePrompt` due to differences in how browsers handle `window.confirm` that prevent React Router from guaranteeing consistent/correct behavior. ([#10991](https://github.com/remix-run/react-router/pull/10991)) | ||
- Remove the `unstable_` prefix from the [`useBlocker`](https://reactrouter.com/v6/hooks/use-blocker) hook as it's been in use for enough time that we are confident in the API. We do not plan to remove the prefix from `unstable_usePrompt` due to differences in how browsers handle `window.confirm` that prevent React Router from guaranteeing consistent/correct behavior. ([#10991](https://github.com/remix-run/react-router/pull/10991)) | ||
@@ -390,3 +438,3 @@ ### Patch Changes | ||
- Move [`React.startTransition`](https://react.dev/reference/react/startTransition) usage behind a [future flag](https://reactrouter.com/en/main/guides/api-development-strategy) to avoid issues with existing incompatible `Suspense` usages. We recommend folks adopting this flag to be better compatible with React concurrent mode, but if you run into issues you can continue without the use of `startTransition` until v7. Issues usually boils down to creating net-new promises during the render cycle, so if you run into issues you should either lift your promise creation out of the render cycle or put it behind a `useMemo`. ([#10596](https://github.com/remix-run/react-router/pull/10596)) | ||
- Move [`React.startTransition`](https://react.dev/reference/react/startTransition) usage behind a [future flag](https://reactrouter.com/v6/guides/api-development-strategy) to avoid issues with existing incompatible `Suspense` usages. We recommend folks adopting this flag to be better compatible with React concurrent mode, but if you run into issues you can continue without the use of `startTransition` until v7. Issues usually boils down to creating net-new promises during the render cycle, so if you run into issues you should either lift your promise creation out of the render cycle or put it behind a `useMemo`. ([#10596](https://github.com/remix-run/react-router/pull/10596)) | ||
@@ -474,3 +522,3 @@ Existing behavior will no longer include `React.startTransition`: | ||
- Added support for [**Future Flags**](https://reactrouter.com/en/main/guides/api-development-strategy) in React Router. The first flag being introduced is `future.v7_normalizeFormMethod` which will normalize the exposed `useNavigation()/useFetcher()` `formMethod` fields as uppercase HTTP methods to align with the `fetch()` behavior. ([#10207](https://github.com/remix-run/react-router/pull/10207)) | ||
- Added support for [**Future Flags**](https://reactrouter.com/v6/guides/api-development-strategy) in React Router. The first flag being introduced is `future.v7_normalizeFormMethod` which will normalize the exposed `useNavigation()/useFetcher()` `formMethod` fields as uppercase HTTP methods to align with the `fetch()` behavior. ([#10207](https://github.com/remix-run/react-router/pull/10207)) | ||
@@ -752,3 +800,3 @@ - When `future.v7_normalizeFormMethod === false` (default v6 behavior), | ||
Whoa this is a big one! `6.4.0` brings all the data loading and mutation APIs over from Remix. Here's a quick high level overview, but it's recommended you go check out the [docs](https://reactrouter.com), especially the [feature overview](https://reactrouter.com/start/overview) and the [tutorial](https://reactrouter.com/start/tutorial). | ||
Whoa this is a big one! `6.4.0` brings all the data loading and mutation APIs over from Remix. Here's a quick high level overview, but it's recommended you go check out the [docs](https://reactrouter.com), especially the [feature overview](https://reactrouter.com/en/6.4.0/start/overview) and the [tutorial](https://reactrouter.com/en/6.4.0/start/tutorial). | ||
@@ -755,0 +803,0 @@ **New APIs** |
{ | ||
"name": "react-router", | ||
"version": "0.0.0-nightly-f47048541-20240813", | ||
"version": "0.0.0-nightly-f763fd2eb-20241122", | ||
"description": "Declarative routing for React", | ||
@@ -21,27 +21,77 @@ "keywords": [ | ||
"sideEffects": false, | ||
"main": "./dist/main.js", | ||
"unpkg": "./dist/umd/react-router.production.min.js", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"types": "./dist/production/index.d.ts", | ||
"main": "./dist/production/index.js", | ||
"module": "./dist/production/index.mjs", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/main.js" | ||
"node": { | ||
"types": "./dist/production/index.d.ts", | ||
"development": { | ||
"module-sync": "./dist/development/index.mjs", | ||
"default": "./dist/development/index.js" | ||
}, | ||
"module-sync": "./dist/production/index.mjs", | ||
"default": "./dist/production/index.js" | ||
}, | ||
"import": { | ||
"types": "./dist/production/index.d.mts", | ||
"development": "./dist/development/index.mjs", | ||
"default": "./dist/production/index.mjs" | ||
}, | ||
"default": { | ||
"types": "./dist/production/index.d.ts", | ||
"development": "./dist/development/index.js", | ||
"default": "./dist/production/index.js" | ||
} | ||
}, | ||
"./route-module": { | ||
"import": { | ||
"types": "./dist/production/lib/types/route-module.d.mts" | ||
}, | ||
"default": { | ||
"types": "./dist/production/lib/types/route-module.d.ts" | ||
} | ||
}, | ||
"./dom": { | ||
"types": "./dist/dom-export.d.ts", | ||
"import": "./dist/dom-export.mjs", | ||
"require": "./dist/main-dom-export.js" | ||
"node": { | ||
"types": "./dist/production/dom-export.d.ts", | ||
"development": { | ||
"module-sync": "./dist/development/dom-export.mjs", | ||
"default": "./dist/development/dom-export.js" | ||
}, | ||
"module-sync": "./dist/production/dom-export.mjs", | ||
"default": "./dist/production/dom-export.js" | ||
}, | ||
"import": { | ||
"types": "./dist/production/dom-export.d.mts", | ||
"development": "./dist/development/dom-export.mjs", | ||
"default": "./dist/production/dom-export.mjs" | ||
}, | ||
"default": { | ||
"types": "./dist/production/dom-export.d.ts", | ||
"development": "./dist/development/dom-export.js", | ||
"default": "./dist/production/dom-export.js" | ||
} | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"wireit": { | ||
"build": { | ||
"command": "rimraf dist && tsup", | ||
"files": [ | ||
"lib/**", | ||
"*.ts", | ||
"tsconfig.json", | ||
"package.json" | ||
], | ||
"output": [ | ||
"dist/**" | ||
] | ||
} | ||
}, | ||
"dependencies": { | ||
"@types/cookie": "^0.6.0", | ||
"@web3-storage/multipart-parser": "^1.0.0", | ||
"cookie": "^0.6.0", | ||
"cookie": "^1.0.1", | ||
"set-cookie-parser": "^2.6.0", | ||
"source-map": "^0.7.3", | ||
"turbo-stream": "^2.2.0", | ||
"react-router": "0.0.0-nightly-f47048541-20240813" | ||
"turbo-stream": "2.4.0" | ||
}, | ||
@@ -51,3 +101,7 @@ "devDependencies": { | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
"react-dom": "^18.2.0", | ||
"rimraf": "^6.0.1", | ||
"tsup": "^8.3.0", | ||
"typescript": "^5.1.6", | ||
"wireit": "0.14.9" | ||
}, | ||
@@ -70,4 +124,7 @@ "peerDependencies": { | ||
"engines": { | ||
"node": ">=18.0.0" | ||
"node": ">=20.0.0" | ||
}, | ||
"scripts": { | ||
"build": "wireit" | ||
} | ||
} |
@@ -1,7 +0,7 @@ | ||
# React Router | ||
`react-router` is the primary package in the React Router project. | ||
The `react-router` package is the heart of [React Router](https://github.com/remix-run/react-router) and provides all the core functionality. | ||
## Installation | ||
If you'd like to extend React Router and you know what you're doing, you should | ||
add `react-router` **as a peer dependency, not a regular dependency** in your | ||
package. | ||
```sh | ||
npm i react-router | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
6
58272
2
8
2255752
7
42
+ Addedcookie@1.0.2(transitive)
+ Addedturbo-stream@2.4.0(transitive)
- Removedsource-map@^0.7.3
- Removed@web3-storage/multipart-parser@1.0.0(transitive)
- Removedcookie@0.6.0(transitive)
- Removedsource-map@0.7.4(transitive)
- Removedturbo-stream@2.4.1(transitive)
Updatedcookie@^1.0.1
Updatedturbo-stream@2.4.0