react-router
Advanced tools
Comparing version 5.1.2 to 6.0.0-alpha.0
{ | ||
"name": "react-router", | ||
"version": "5.1.2", | ||
"version": "6.0.0-alpha.0", | ||
"description": "Declarative routing for React", | ||
"author": "React Training <hello@reacttraining.com>", | ||
"repository": "ReactTraining/react-router", | ||
"license": "MIT", | ||
"authors": [ | ||
"Michael Jackson", | ||
"Ryan Florence" | ||
], | ||
"files": [ | ||
"MemoryRouter.js", | ||
"Prompt.js", | ||
"Redirect.js", | ||
"Route.js", | ||
"Router.js", | ||
"StaticRouter.js", | ||
"Switch.js", | ||
"cjs", | ||
"es", | ||
"esm", | ||
"index.js", | ||
"generatePath.js", | ||
"matchPath.js", | ||
"modules/*.js", | ||
"modules/utils/*.js", | ||
"withRouter.js", | ||
"warnAboutDeprecatedCJSRequire.js", | ||
"umd" | ||
], | ||
"main": "index.js", | ||
"module": "esm/react-router.js", | ||
"sideEffects": false, | ||
"scripts": { | ||
"build": "rollup -c", | ||
"lint": "eslint modules", | ||
"test": "jest" | ||
"main": "node-main.js", | ||
"module": "react-router.js", | ||
"unpkg": "umd/react-router.production.min.js", | ||
"dependencies": { | ||
"prop-types": "^15.7.2" | ||
}, | ||
"peerDependencies": { | ||
"react": ">=15" | ||
"history": "5.0.0-beta.3", | ||
"react": ">=16.8" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.1.2", | ||
"history": "^4.9.0", | ||
"hoist-non-react-statics": "^3.1.0", | ||
"loose-envify": "^1.3.1", | ||
"mini-create-react-context": "^0.3.0", | ||
"path-to-regexp": "^1.7.0", | ||
"prop-types": "^15.6.2", | ||
"react-is": "^16.6.0", | ||
"tiny-invariant": "^1.0.2", | ||
"tiny-warning": "^1.0.0" | ||
}, | ||
"browserify": { | ||
"transform": [ | ||
"loose-envify" | ||
] | ||
}, | ||
"sideEffects": false, | ||
"keywords": [ | ||
@@ -66,4 +26,3 @@ "react", | ||
"link" | ||
], | ||
"gitHead": "f31bb27aa61dd4cb1c3cd9aa78133f739e2e9bb9" | ||
] | ||
} |
@@ -1,39 +0,16 @@ | ||
# react-router | ||
# React Router | ||
Declarative routing for [React](https://facebook.github.io/react). | ||
The `react-router` package is the heart of [React Router](/) and provides all | ||
the core functionality for both | ||
[`react-router-dom`](https://github.com/ReactTraining/react-router/packages/react-router-dom) | ||
and | ||
[`react-router-native`](https://github.com/ReactTraining/react-router/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`. | ||
Using [npm](https://www.npmjs.com/): | ||
$ npm install --save react-router | ||
**Note:** This package provides the core routing functionality for React Router, but you might not want to install it directly. If you are writing an application that will run in the browser, you should instead install `react-router-dom`. Similarly, if you are writing a React Native application, you should instead install `react-router-native`. Both of those will install `react-router` as a dependency. | ||
Then with a module bundler like [webpack](https://webpack.github.io/), use as you would anything else: | ||
```js | ||
// using ES6 modules | ||
import { Router, Route, Switch } from "react-router"; | ||
// using CommonJS modules | ||
var Router = require("react-router").Router; | ||
var Route = require("react-router").Route; | ||
var Switch = require("react-router").Switch; | ||
``` | ||
The UMD build is also available on [unpkg](https://unpkg.com): | ||
```html | ||
<script src="https://unpkg.com/react-router/umd/react-router.min.js"></script> | ||
``` | ||
You can find the library on `window.ReactRouter`. | ||
## Issues | ||
If you find a bug, please file an issue on [our issue tracker on GitHub](https://github.com/ReactTraining/react-router/issues). | ||
## Credits | ||
React Router is built and maintained by [React Training](https://reacttraining.com). | ||
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. |
Sorry, the diff of this file is not supported yet
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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
3
1
17
271251
14
215
4
17
1
+ Addedhistory@5.0.0-beta.3(transitive)
- Removed@babel/runtime@^7.1.2
- Removedhistory@^4.9.0
- Removedhoist-non-react-statics@^3.1.0
- Removedloose-envify@^1.3.1
- Removedmini-create-react-context@^0.3.0
- Removedpath-to-regexp@^1.7.0
- Removedreact-is@^16.6.0
- Removedtiny-invariant@^1.0.2
- Removedtiny-warning@^1.0.0
- Removedhistory@4.10.1(transitive)
- Removedhoist-non-react-statics@3.3.2(transitive)
- Removedisarray@0.0.1(transitive)
- Removedmini-create-react-context@0.3.3(transitive)
- Removedpath-to-regexp@1.9.0(transitive)
- Removedreact@17.0.2(transitive)
- Removedresolve-pathname@3.0.0(transitive)
- Removedtiny-invariant@1.3.3(transitive)
- Removedtiny-warning@1.0.3(transitive)
- Removedvalue-equal@1.0.1(transitive)
Updatedprop-types@^15.7.2