react-router
Advanced tools
Comparing version 0.0.0-experimental-3ec205f42 to 0.0.0-experimental-3f102fccb
# `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 | ||
@@ -64,3 +99,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> | ||
@@ -311,3 +346,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)) | ||
@@ -402,3 +437,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)) | ||
@@ -486,3 +521,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)) | ||
@@ -764,3 +799,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). | ||
@@ -767,0 +802,0 @@ **New APIs** |
101
package.json
{ | ||
"name": "react-router", | ||
"version": "0.0.0-experimental-3ec205f42", | ||
"version": "0.0.0-experimental-3f102fccb", | ||
"description": "Declarative routing for React", | ||
@@ -21,16 +21,96 @@ "keywords": [ | ||
"sideEffects": false, | ||
"main": "./dist/main.js", | ||
"unpkg": "./dist/umd/react-router.production.min.js", | ||
"module": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"types": "./dist/production/index.d.ts", | ||
"main": "./dist/production/index.js", | ||
"module": "./dist/production/index.mjs", | ||
"exports": { | ||
".": { | ||
"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": { | ||
"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": { | ||
"@remix-run/router": "0.0.0-experimental-3ec205f42" | ||
"@types/cookie": "^0.6.0", | ||
"cookie": "^1.0.1", | ||
"set-cookie-parser": "^2.6.0", | ||
"turbo-stream": "2.4.0" | ||
}, | ||
"devDependencies": { | ||
"@types/set-cookie-parser": "^2.4.1", | ||
"react": "^18.2.0", | ||
"react-router-dom": "0.0.0-experimental-3ec205f42" | ||
"react-dom": "^18.2.0", | ||
"rimraf": "^6.0.1", | ||
"tsup": "^8.3.0", | ||
"typescript": "^5.1.6", | ||
"wireit": "0.14.9" | ||
}, | ||
"peerDependencies": { | ||
"react": ">=16.8" | ||
"react": ">=18", | ||
"react-dom": ">=18" | ||
}, | ||
"peerDependenciesMeta": { | ||
"react-dom": { | ||
"optional": true | ||
} | ||
}, | ||
"files": [ | ||
@@ -43,4 +123,7 @@ "dist/", | ||
"engines": { | ||
"node": ">=14.0.0" | ||
"node": ">=20.0.0" | ||
}, | ||
"scripts": { | ||
"build": "wireit" | ||
} | ||
} |
@@ -1,16 +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 for both | ||
[`react-router-dom`](https://github.com/remix-run/react-router/tree/main/packages/react-router-dom) | ||
and | ||
[`react-router-native`](https://github.com/remix-run/react-router/tree/main/packages/react-router-native). | ||
## Installation | ||
If you're using React Router, you should never `import` anything directly from | ||
the `react-router` package, but you should have everything you need in either | ||
`react-router-dom` or `react-router-native`. Both of those packages re-export | ||
everything from `react-router`. | ||
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
Network access
Supply chain riskThis module accesses the network.
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
2255676
42
58272
2
8
6
7
8
13
+ Added@types/cookie@^0.6.0
+ Addedcookie@^1.0.1
+ Addedset-cookie-parser@^2.6.0
+ Addedturbo-stream@2.4.0
+ Added@types/cookie@0.6.0(transitive)
+ Addedcookie@1.0.2(transitive)
+ Addedreact-dom@18.3.1(transitive)
+ Addedscheduler@0.23.2(transitive)
+ Addedset-cookie-parser@2.7.1(transitive)
+ Addedturbo-stream@2.4.0(transitive)
- Removed@remix-run/router@0.0.0-experimental-3ec205f42(transitive)