@mxjs/router
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -0,1 +1,16 @@ | ||
## [0.1.3](https://github.com/twinh/miaoxing/compare/@mxjs/router@0.1.2...@mxjs/router@0.1.3) (2021-05-10) | ||
### Bug Fixes | ||
* `ModalContext` 移到 `@mxjs/router` 中,解决循环依赖 ([cd248cf](https://github.com/twinh/miaoxing/commit/cd248cfddc26324433379b1936d69f7e4559f17e)) | ||
### Dependencies | ||
* **@miaoxing/dev:** upgrade from `6.4.0` to `7.0.0` | ||
## [0.1.2](https://github.com/twinh/miaoxing/compare/@mxjs/router@0.1.1...@mxjs/router@0.1.2) (2021-03-12) | ||
@@ -2,0 +17,0 @@ |
13
Link.js
import React from 'react'; | ||
import {Link as RouterLink} from 'react-router-dom'; | ||
import {ModalContext} from '@mxjs/router-modal'; | ||
import {createLocation} from 'history'; | ||
import PropTypes from 'prop-types'; | ||
import ModalContext from './ModalContext'; | ||
export default function Link({to, modal, autoModal, ...props}) { | ||
function Link({to, modal, autoModal, ...props}) { | ||
const location = createLocation(to, {modal}); | ||
@@ -21,1 +22,9 @@ | ||
} | ||
Link.propTypes = { | ||
to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), | ||
modal: PropTypes.bool, | ||
autoModal: PropTypes.bool, | ||
}; | ||
export default Link; |
{ | ||
"name": "@mxjs/router", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"main": "index.js", | ||
@@ -10,8 +10,22 @@ "license": "MIT", | ||
}, | ||
"jest": { | ||
"preset": "jest-preset-miaoxing" | ||
}, | ||
"dependencies": { | ||
"@mxjs/router-modal": "^0.1.2" | ||
"react": "^16.13.1", | ||
"react-router": "^5.2.0", | ||
"react-router-dom": "^5.2.0", | ||
"history": "^4.10.1", | ||
"prop-types": "^15.7.2" | ||
}, | ||
"devDependencies": { | ||
"@miaoxing/dev": "^7.0.0", | ||
"@testing-library/react": "^11.2.6" | ||
}, | ||
"ciDependencies": { | ||
"@mxjs/router-modal": "miaoxing/mxjs-router-modal" | ||
"@mxjs/router-modal": "miaoxing/mxjs-router-modal", | ||
"babel-preset-miaoxing": "miaoxing/babel-preset-miaoxing", | ||
"jest-preset-miaoxing": "miaoxing/jest-preset-miaoxing", | ||
"@miaoxing/dev": "miaoxing/dev" | ||
} | ||
} |
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
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
6682
9
43
5
2
+ Addedhistory@^4.10.1
+ Addedprop-types@^15.7.2
+ Addedreact@^16.13.1
+ Addedreact-router@^5.2.0
+ Addedreact-router-dom@^5.2.0
- Removed@mxjs/router-modal@^0.1.2
- Removed@mxjs/router@0.1.4(transitive)
- Removed@mxjs/router-modal@0.1.4(transitive)
- Removed@popperjs/core@2.11.8(transitive)
- Removed@restart/context@2.1.4(transitive)
- Removed@restart/hooks@0.4.16(transitive)
- Removed@types/invariant@2.2.37(transitive)
- Removed@types/prop-types@15.7.13(transitive)
- Removed@types/react@18.3.10(transitive)
- Removed@types/react-transition-group@4.4.11(transitive)
- Removed@types/warning@3.0.3(transitive)
- Removedclassnames@2.5.1(transitive)
- Removedcsstype@3.1.3(transitive)
- Removeddequal@2.0.3(transitive)
- Removeddom-helpers@5.2.1(transitive)
- Removedinvariant@2.2.4(transitive)
- Removedprop-types-extra@1.1.1(transitive)
- Removedreact-bootstrap@1.6.8(transitive)
- Removedreact-dom@16.14.0(transitive)
- Removedreact-lifecycles-compat@3.0.4(transitive)
- Removedreact-overlays@5.2.1(transitive)
- Removedreact-transition-group@4.4.5(transitive)
- Removedscheduler@0.19.1(transitive)
- Removeduncontrollable@7.2.1(transitive)
- Removedwarning@4.0.3(transitive)