react-flag-icon-css
Advanced tools
Comparing version 1.0.12 to 1.0.13
@@ -0,1 +1,13 @@ | ||
<a name="1.0.13"></a> | ||
## 1.0.13 (2017-04-26) | ||
* test: add tests for types/propTypes ([b0f07a7](https://github.com/matteocng/react-flag-icon-css/commit/b0f07a7)) | ||
* refactor: migrate from tcomb & tcomb-react to prop-types ([f8b6758](https://github.com/matteocng/react-flag-icon-css/commit/f8b6758)) | ||
* chore(package): bump enzyme, flow-bin, tcomb ([3459e45](https://github.com/matteocng/react-flag-icon-css/commit/3459e45)) | ||
* chore(package): remove tape (unused) ([450855e](https://github.com/matteocng/react-flag-icon-css/commit/450855e)) | ||
* chore(package): update eslint-plugin-flowtype to 2.32.1 ([bb32323](https://github.com/matteocng/react-flag-icon-css/commit/bb32323)) | ||
* fix(flow): make FlagIconOptionsType exact ([7e30bb1](https://github.com/matteocng/react-flag-icon-css/commit/7e30bb1)) | ||
<a name="1.0.12"></a> | ||
@@ -2,0 +14,0 @@ ## 1.0.12 (2017-04-10) |
@@ -11,4 +11,2 @@ 'use strict'; | ||
var _tcombReact = require('tcomb-react'); | ||
var _FlagIcon = require('./FlagIcon'); | ||
@@ -24,3 +22,3 @@ | ||
var _tcomb = require('../types/tcomb'); | ||
var _propTypes = require('../types/propTypes'); | ||
@@ -34,7 +32,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var FlagIconComponent = (0, _FlagIcon2.default)(React, computedOptions); | ||
FlagIconComponent.displayName = 'FlagIcon'; | ||
if (process.env.NODE_ENV !== 'production') { | ||
FlagIconComponent = Object.assign(FlagIconComponent, { | ||
propTypes: (0, _tcombReact.propTypes)(_tcomb.FlagIconPropsTypeTcomb) | ||
}); | ||
FlagIconComponent.propTypes = _propTypes.FlagIconPropsType; | ||
} | ||
@@ -41,0 +38,0 @@ |
@@ -9,4 +9,10 @@ 'use strict'; | ||
var _tcomb = require('../types/tcomb'); | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
var _propTypes3 = require('../types/propTypes'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var defaultOptions = { | ||
@@ -17,3 +23,6 @@ useCssModules: true | ||
exports.default = function (options) { | ||
return (0, _tcomb.FlagIconOptionsTypeTcomb)(_extends({}, defaultOptions, options)); | ||
var computedOptions = _extends({}, defaultOptions, options); | ||
_propTypes2.default.checkPropTypes(_propTypes3.FlagIconOptionsType, computedOptions, 'key', 'FlagIconFactory options'); | ||
return computedOptions; | ||
}; |
import CssModulesTransform from 'react-css-modules'; | ||
import { propTypes as tcombPropTypes } from 'tcomb-react'; | ||
@@ -8,3 +7,3 @@ import FlagIcon from './FlagIcon'; | ||
import { makeStyles, makeFlagIconOptions } from '../functions'; | ||
import { FlagIconPropsTypeTcomb } from '../types/tcomb'; | ||
import { FlagIconPropsType as FlagIconPropsTypeReact } from '../types/propTypes'; | ||
@@ -17,7 +16,6 @@ | ||
var FlagIconComponent = FlagIcon(React, computedOptions); | ||
FlagIconComponent.displayName = 'FlagIcon'; | ||
if (process.env.NODE_ENV !== 'production') { | ||
FlagIconComponent = Object.assign(FlagIconComponent, { | ||
propTypes: tcombPropTypes(FlagIconPropsTypeTcomb) | ||
}); | ||
FlagIconComponent.propTypes = FlagIconPropsTypeReact; | ||
} | ||
@@ -24,0 +22,0 @@ |
@@ -0,1 +1,2 @@ | ||
import { ThrowNoJsonLoaderError } from './config'; | ||
@@ -2,0 +3,0 @@ |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
import { FlagIconOptionsTypeTcomb } from '../types/tcomb'; | ||
import PropTypes from 'prop-types'; | ||
import { FlagIconOptionsType as FlagIconOptionsTypeReact } from '../types/propTypes'; | ||
var defaultOptions = { | ||
@@ -10,3 +12,6 @@ useCssModules: true | ||
export default (function (options) { | ||
return FlagIconOptionsTypeTcomb(_extends({}, defaultOptions, options)); | ||
var computedOptions = _extends({}, defaultOptions, options); | ||
PropTypes.checkPropTypes(FlagIconOptionsTypeReact, computedOptions, 'key', 'FlagIconFactory options'); | ||
return computedOptions; | ||
}); |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://github.com/matteocng/react-flag-icon-css#readme", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"main": "./lib", | ||
@@ -30,5 +30,4 @@ "author": { | ||
"flag-icon-css": "^2.8.0", | ||
"react-css-modules": "^4.2.0", | ||
"tcomb": "^3.2.20", | ||
"tcomb-react": "^0.9.3" | ||
"prop-types": "^15.5.8", | ||
"react-css-modules": "^4.2.0" | ||
}, | ||
@@ -51,3 +50,3 @@ "devDependencies": { | ||
"css-modules-require-hook": "^4.0.6", | ||
"enzyme": "^2.8.0", | ||
"enzyme": "^2.8.1", | ||
"eslint": "^3.19.0", | ||
@@ -57,3 +56,3 @@ "eslint-config-airbnb": "^14.1.0", | ||
"eslint-plugin-babel": "^4.1.1", | ||
"eslint-plugin-flowtype": "^2.30.4", | ||
"eslint-plugin-flowtype": "^2.32.1", | ||
"eslint-plugin-import": "^2.2.0", | ||
@@ -63,3 +62,3 @@ "eslint-plugin-jsx-a11y": "^4.0.0", | ||
"flag-icon-css": "^2.8.0", | ||
"flow-bin": "^0.43.1", | ||
"flow-bin": "^0.44.0", | ||
"flow-copy-source": "^1.1.0", | ||
@@ -78,8 +77,6 @@ "jsdom": "^9.12.0", | ||
"react-dom": "^15.5.3", | ||
"react-test-renderer": "^15.5.4", | ||
"rimraf": "^2.6.1", | ||
"stylelint": "^7.9.0", | ||
"stylelint-config-standard": "^16.0.0", | ||
"tape": "^4.6.3", | ||
"tcomb": "^3.2.17", | ||
"tcomb-react": "^0.9.3" | ||
"stylelint-config-standard": "^16.0.0" | ||
}, | ||
@@ -119,3 +116,4 @@ "engines": { | ||
"files": [ | ||
"src/__tests__/FlagIcon.js" | ||
"src/__tests__/FlagIcon.js", | ||
"src/__tests__/types/propTypes.js" | ||
] | ||
@@ -134,2 +132,3 @@ }, | ||
"peerDependencies": { | ||
"prop-types": "^15.5.8", | ||
"react": "^0.14 || ^15.0", | ||
@@ -136,0 +135,0 @@ "react-dom": "^0.14 || ^15.0" |
@@ -94,3 +94,3 @@ A simple `React` SVG country flags component: it works with `React Css Modules` (default) or standard `Css`. | ||
**Runtime type checking**: in development mode (`process.env.NODE_ENV !== 'production'`), when using unsupported props or prop values, you are warned by *Failed prop type* errors in the browser console. Feature powered by [`tcomb`](https://github.com/gcanti/tcomb). | ||
**Runtime type checking**: in development mode (`process.env.NODE_ENV !== 'production'`), when using unsupported props or prop values, you are warned at runtime by *Failed prop type* errors in the browser console. Feature powered by [`prop-types`](https://github.com/reactjs/prop-types). | ||
@@ -97,0 +97,0 @@ **Static type checking**: if you use Facebook's [`flow`](https://github.com/facebook/flow) in your app (otherwise you can skip this section, unless you want to submit a PR), it should automatically pick up this package's definitions from the `.js.flow` files that are distributed with it, checking your code accordingly when you run `yarn flow`. Using the latest `Flow` version or the version in `./package.json` is recommended. We also recommend using a `Flow`-aware editor such as [`Nuclide`](https://nuclide.io/) for [`Atom`](https://atom.io/). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
366150
43
78
1506
+ Addedprop-types@^15.5.8
- Removedtcomb@^3.2.20
- Removedtcomb-react@^0.9.3
- Removeddoctrine@0.7.2(transitive)
- Removedesutils@1.1.6(transitive)
- Removedget-comments@1.0.1(transitive)
- Removedisarray@0.0.1(transitive)
- Removedtcomb@3.2.29(transitive)
- Removedtcomb-doc@0.5.2(transitive)
- Removedtcomb-react@0.9.3(transitive)
- Removedtcomb-validation@3.4.1(transitive)