Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-flag-icon-css

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-flag-icon-css - npm Package Compare versions

Comparing version 1.0.23 to 1.0.24

37

CHANGELOG.md

@@ -0,1 +1,38 @@

<a name="1.0.24"></a>
## <small>1.0.24 (2018-07-17)</small>
* chore: add 'exit if not logged in to NPM' step to bumped ([a299393](https://github.com/matteocng/react-flag-icon-css/commit/a299393))
* chore: add Node.JS 10 to travis ([e2589d8](https://github.com/matteocng/react-flag-icon-css/commit/e2589d8))
* chore: bring package.json up to date and fix Flow and Eslint errors ([0944102](https://github.com/matteocng/react-flag-icon-css/commit/0944102))
* chore: finish upgrading packages and run 'npm audit fix' to fix security issues ([d364496](https://github.com/matteocng/react-flag-icon-css/commit/d364496))
* chore: move 'prettier' settings to 'package.json' for format-on-save compatibility ([a361673](https://github.com/matteocng/react-flag-icon-css/commit/a361673)), closes [#83](https://github.com/matteocng/react-flag-icon-css/issues/83)
* chore: remove deprecated 'nsp' and use 'npm audit' ([8f08c7f](https://github.com/matteocng/react-flag-icon-css/commit/8f08c7f))
* chore(BREAKING): drop Node.js 4 ([67f8471](https://github.com/matteocng/react-flag-icon-css/commit/67f8471))
* chore(breaking): remove Node.js 6 and 7 from travis ([af1d07a](https://github.com/matteocng/react-flag-icon-css/commit/af1d07a))
* chore(CI): add Node.js 9 to travis ([29e6707](https://github.com/matteocng/react-flag-icon-css/commit/29e6707))
* chore(eslint): restore 'no-unexpected-multiline' error rule ([bc8298d](https://github.com/matteocng/react-flag-icon-css/commit/bc8298d))
* chore(package): correct prop-types semver in peerDependencies ([5d66ca2](https://github.com/matteocng/react-flag-icon-css/commit/5d66ca2))
* chore(package): update ava to version 0.24.0 ([6220a07](https://github.com/matteocng/react-flag-icon-css/commit/6220a07))
* chore(package): update ava to version 0.25.0 ([634d896](https://github.com/matteocng/react-flag-icon-css/commit/634d896))
* chore(package): update eslint-plugin-babel to version 5.0.0 ([6e683a5](https://github.com/matteocng/react-flag-icon-css/commit/6e683a5))
* chore(package): update flow-bin to version 0.59.0 ([b8547ef](https://github.com/matteocng/react-flag-icon-css/commit/b8547ef))
* chore(package): update lockfiles ([839f2b5](https://github.com/matteocng/react-flag-icon-css/commit/839f2b5))
* chore(package): update nsp to version 3.0.0 ([e0502dd](https://github.com/matteocng/react-flag-icon-css/commit/e0502dd))
* chore(package): update postcss-cli to version 5.0.0 ([a76f711](https://github.com/matteocng/react-flag-icon-css/commit/a76f711))
* chore(package): update postcss-custom-properties to version 7.0.0 ([4573352](https://github.com/matteocng/react-flag-icon-css/commit/4573352))
* chore(package): update stylelint to version 9.0.0 ([10a18d1](https://github.com/matteocng/react-flag-icon-css/commit/10a18d1))
* chore(package): upgrade prettier to version 1.7.4 ([04605b8](https://github.com/matteocng/react-flag-icon-css/commit/04605b8))
* chore(prettier): run 'yarn prettier' ([bda79e4](https://github.com/matteocng/react-flag-icon-css/commit/bda79e4))
* fix: remove flow folders and hidden files from release bundle shipped to npm ([d74f679](https://github.com/matteocng/react-flag-icon-css/commit/d74f679))
* fix: use 'npx' to run 'git-dirty' ([625d24c](https://github.com/matteocng/react-flag-icon-css/commit/625d24c))
* docs: update software versions in docs ([1d14898](https://github.com/matteocng/react-flag-icon-css/commit/1d14898))
* docs(README): bump webpack versions ([5c2a758](https://github.com/matteocng/react-flag-icon-css/commit/5c2a758))
* docs(README): specify webpack version better ([17f7137](https://github.com/matteocng/react-flag-icon-css/commit/17f7137))
* chore(bumped) switch changelog generation and lock files ([7c2946c](https://github.com/matteocng/react-flag-icon-css/commit/7c2946c))
* wip ([921a31f](https://github.com/matteocng/react-flag-icon-css/commit/921a31f))
* test: improve prop-types tests ([89a404b](https://github.com/matteocng/react-flag-icon-css/commit/89a404b))
* refactor: rename 'ExactValidator' validator to 'NoExtraPropsValidator' ([1ee4fbc](https://github.com/matteocng/react-flag-icon-css/commit/1ee4fbc)), closes [#49](https://github.com/matteocng/react-flag-icon-css/issues/49)
<a name="1.0.23"></a>

@@ -2,0 +39,0 @@ ## 1.0.23 (2017-10-29)

6

lib/functions/classnames.js

@@ -12,3 +12,3 @@ 'use strict';

var _classNameToStyleName = require('../functions/classNameToStyleName');
var _classNameToStyleName = require('./classNameToStyleName');

@@ -51,2 +51,4 @@ var _classNameToStyleName2 = _interopRequireDefault(_classNameToStyleName);

if (useCssModules) {
var className = props.className;
var aClasses = strClasses.split(' ');

@@ -56,3 +58,3 @@ var nClasses = aClasses.length;

strClasses = aClasses.map(function (c, i) {
if (props.className && i === nClasses - 1) return c;
if (className && i === nClasses - 1) return c;

@@ -59,0 +61,0 @@ return (0, _classNameToStyleName2.default)(c, styles || {});

@@ -45,3 +45,3 @@ 'use strict';

var fnExactValidator = function fnExactValidator(propsObject, propsValues, propName, componentName) {
var fnNoExtraPropsValidator = function fnNoExtraPropsValidator(propsObject, propsValues, propName, componentName) {
var passedPropNames = Object.keys(propsValues);

@@ -57,4 +57,4 @@ var extra = passedPropNames.filter(function (prop) {

var AddExactValidator = exports.AddExactValidator = function AddExactValidator(obj) {
var validatorKeyName = '__exact__';
var AddNoExtraPropsValidator = exports.AddNoExtraPropsValidator = function AddNoExtraPropsValidator(obj) {
var validatorKeyName = '__no__extra__props__validator___';
if (Object.prototype.hasOwnProperty.call(obj, validatorKeyName)) {

@@ -64,3 +64,3 @@ return obj;

return _extends({}, obj, _defineProperty({}, validatorKeyName, fnExactValidator.bind(undefined, obj)));
return _extends({}, obj, _defineProperty({}, validatorKeyName, fnNoExtraPropsValidator.bind(undefined, obj)));
};

@@ -136,2 +136,5 @@ 'use strict';

}, {
name: 'Catalonia',
code: 'es-ct'
}, {
name: 'Cayman Islands',

@@ -138,0 +141,0 @@ code: 'ky'

@@ -48,3 +48,3 @@ 'use strict';

var MakeFlagIconPropsType = exports.MakeFlagIconPropsType = function MakeFlagIconPropsType(codes) {
return (0, _propTypes3.AddExactValidator)(makeFlagIconPropsTypeObject(codes));
return (0, _propTypes3.AddNoExtraPropsValidator)(makeFlagIconPropsTypeObject(codes));
};

@@ -59,3 +59,3 @@

var MakeFlagIconOptionsPropType = exports.MakeFlagIconOptionsPropType = function MakeFlagIconOptionsPropType() {
return (0, _propTypes3.AddExactValidator)((0, _propTypes3.AddThemeStylesValidator)(flagIconOptionsType));
return (0, _propTypes3.AddNoExtraPropsValidator)((0, _propTypes3.AddThemeStylesValidator)(flagIconOptionsType));
};

@@ -5,3 +5,3 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

import classNameToStyleName from '../functions/classNameToStyleName';
import classNameToStyleName from './classNameToStyleName';
import { baseThemeStyleName, flagIconClassesPrefix, flagIconClassesPrefixName } from './constants';

@@ -37,2 +37,4 @@

if (useCssModules) {
var className = props.className;
var aClasses = strClasses.split(' ');

@@ -42,3 +44,3 @@ var nClasses = aClasses.length;

strClasses = aClasses.map(function (c, i) {
if (props.className && i === nClasses - 1) return c;
if (className && i === nClasses - 1) return c;

@@ -45,0 +47,0 @@ return classNameToStyleName(c, styles || {});

@@ -41,3 +41,3 @@ var _this = this;

var fnExactValidator = function fnExactValidator(propsObject, propsValues, propName, componentName) {
var fnNoExtraPropsValidator = function fnNoExtraPropsValidator(propsObject, propsValues, propName, componentName) {
var passedPropNames = Object.keys(propsValues);

@@ -53,4 +53,4 @@ var extra = passedPropNames.filter(function (prop) {

export var AddExactValidator = function AddExactValidator(obj) {
var validatorKeyName = '__exact__';
export var AddNoExtraPropsValidator = function AddNoExtraPropsValidator(obj) {
var validatorKeyName = '__no__extra__props__validator___';
if (Object.prototype.hasOwnProperty.call(obj, validatorKeyName)) {

@@ -60,3 +60,3 @@ return obj;

return _extends({}, obj, _defineProperty({}, validatorKeyName, fnExactValidator.bind(_this, obj)));
return _extends({}, obj, _defineProperty({}, validatorKeyName, fnNoExtraPropsValidator.bind(_this, obj)));
};

@@ -132,2 +132,5 @@

}, {
name: 'Catalonia',
code: 'es-ct'
}, {
name: 'Cayman Islands',

@@ -134,0 +137,0 @@ code: 'ky'

@@ -5,3 +5,3 @@ 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 { getRotates, getFlips, getSizes } from '../functions/props';
import { AddExactValidator, AddThemeStylesValidator } from '../functions/propTypes';
import { AddNoExtraPropsValidator, AddThemeStylesValidator } from '../functions/propTypes';

@@ -37,3 +37,3 @@

export var MakeFlagIconPropsType = function MakeFlagIconPropsType(codes) {
return AddExactValidator(makeFlagIconPropsTypeObject(codes));
return AddNoExtraPropsValidator(makeFlagIconPropsTypeObject(codes));
};

@@ -48,3 +48,3 @@

export var MakeFlagIconOptionsPropType = function MakeFlagIconOptionsPropType() {
return AddExactValidator(AddThemeStylesValidator(flagIconOptionsType));
return AddNoExtraPropsValidator(AddThemeStylesValidator(flagIconOptionsType));
};

@@ -5,3 +5,3 @@ {

"homepage": "https://github.com/matteocng/react-flag-icon-css#readme",
"version": "1.0.23",
"version": "1.0.24",
"main": "./lib",

@@ -29,11 +29,11 @@ "module": "./module",

"dependencies": {
"classnames": "^2.2.5",
"flag-icon-css": "^2.8.0",
"prop-types": "^15.6.0"
"classnames": "^2.2.6",
"flag-icon-css": "^3.0.0",
"prop-types": "^15.6.2"
},
"devDependencies": {
"ava": "^0.23.0",
"ava": "^0.25.0",
"babel-cli": "^6.26.0",
"babel-eslint": "^8.0.0",
"babel-plugin-istanbul": "^4.1.5",
"babel-eslint": "^8.2.6",
"babel-plugin-istanbul": "^4.1.6",
"babel-plugin-transform-export-extensions": "^6.22.0",

@@ -44,41 +44,45 @@ "babel-plugin-transform-object-rest-spread": "^6.26.0",

"babel-preset-react": "^6.24.1",
"chalk": "^2.0.1",
"classnames": "^2.2.5",
"codecov": "^3.0.0",
"coveralls": "^3.0.0",
"cpy-cli": "^1.0.1",
"cross-env": "^5.0.3",
"css-modules-require-hook": "^4.2.2",
"eslint": "^4.10.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-config-prettier": "^2.3.0",
"eslint-plugin-ava": "^4.2.1",
"eslint-plugin-babel": "^4.1.2",
"eslint-plugin-flowtype": "^2.35.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0",
"flag-icon-css": "^2.8.0",
"flow-bin": "^0.57.3",
"flow-copy-source": "^1.2.0",
"chalk": "^2.4.1",
"classnames": "^2.2.6",
"codecov": "^3.0.4",
"coveralls": "^3.0.2",
"cpy-cli": "^2.0.0",
"cross-env": "^5.2.0",
"css-modules-require-hook": "^4.2.3",
"eslint": "^5.1.0",
"eslint-config-airbnb": "17.0.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-ava": "^5.0.0",
"eslint-plugin-babel": "^5.1.0",
"eslint-plugin-flowtype": "^2.50.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.9.1",
"flag-icon-css": "^3.0.0",
"flow-bin": "^0.76.0",
"flow-copy-source": "^2.0.1",
"mkdirp": "^0.5.1",
"nsp": "^2.7.0",
"nyc": "^11.3.0",
"postcss-at-rules-variables": "^0.1.1",
"postcss-cli": "^4.1.0",
"postcss-custom-properties": "^6.1.0",
"postcss-discard-comments": "^4.0.0-rc.2",
"nyc": "^12.0.2",
"postcss-at-rules-variables": "^0.1.5",
"postcss-cli": "^5.0.0",
"postcss-custom-properties": "^7.0.0",
"postcss-discard-comments": "^4.0.0",
"postcss-each": "^0.10.0",
"prettier": "^1.5.3",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-test-renderer": "^16.0.0",
"prettier": "^1.13.7",
"react": "^16.4.0",
"react-dom": "^16.4.0",
"react-test-renderer": "^16.4.0",
"rimraf": "^2.6.2",
"stylelint": "^8.0.0",
"stylelint-config-standard": "^17.0.0"
"stylelint": "^9.0.0",
"stylelint-config-standard": "^18.2.0"
},
"engines": {
"node": ">=4"
"node": ">=6"
},
"files": [
"lib",
"module"
],
"scripts": {
"audit": "npm audit",
"build": "cross-env BABEL_ENV=build babel src --out-dir ./lib",

@@ -93,8 +97,8 @@ "build:module": "cross-env BABEL_ENV=module babel src --out-dir ./module ",

"coverage:coveralls": "coveralls < .nyc_output/coverage.lcov",
"flow": "flow --include-warnings; test $? -eq 0 -o $? -eq 2",
"flow": "flow --include-warnings",
"generate:types": "cross-env BABEL_ENV=build babel-node ./scripts/tasks/generateFlowTypes.js",
"lint": "npm run lint:js && npm run lint:css",
"lint:css": "stylelint src/styles/main.css",
"lint:js": "eslint src static cmrh.conf.js .eslintrc.js",
"lint:js:fix": "eslint src static cmrh.conf.js --fix",
"lint:js": "eslint src .eslintrc.js",
"lint:js:fix": "eslint src --fix",
"nsp": "nsp check",

@@ -108,3 +112,3 @@ "postbuild": "npm run styles && flow-copy-source --ignore *__tests__/**/* -v src lib",

"precoverage": "mkdirp .nyc_output",
"prepublishOnly": "npm run test && npm run nsp && npm run build && npm run build:module",
"prepublishOnly": "npm run test && npm run audit && npm run build && npm run build:module",
"prettier": "cross-env BABEL_ENV=build babel-node ./scripts/tasks/prettier.js write",

@@ -141,3 +145,3 @@ "prettier:check": "cross-env BABEL_ENV=build babel-node ./scripts/tasks/prettier.js",

"peerDependencies": {
"prop-types": "^15.5.10",
"prop-types": "^15.6.0",
"react": "^0.14 || ^15.0 || ^16.0",

@@ -154,2 +158,11 @@ "react-dom": "^0.14 || ^15.0 || ^16.0"

},
"prettier": {
"bracketSpacing": true,
"jsxBracketSameLine": true,
"parser": "flow",
"printWidth": 80,
"semi": false,
"singleQuote": true,
"trailingComma": "all"
},
"stylelint": {

@@ -156,0 +169,0 @@ "extends": "stylelint-config-standard",

@@ -18,3 +18,3 @@ A simple `React` SVG country flags component: it works with `Css Modules` (default) or standard `Css`.

We recommend installing and managing `npm` packages with [`yarn`](https://yarnpkg.com/) or [`npm 5`](https://www.npmjs.com/package/npm5):
We recommend installing and managing `npm` packages with [`yarn`](https://yarnpkg.com/) or [`npm 6`](https://www.npmjs.com/package/npm5):

@@ -31,13 +31,13 @@ ```bash

<sup>1</sup> *You can omit --save if using npm 5.*
<sup>1</sup> *You can omit --save if using npm >= 5.*
## Using in a `create-react-app` app
Apps bootstrapped with [`create-react-app`](https://github.com/facebookincubator/create-react-app) support this module out of the box, just follow the [Basic Usage](#basic-usage) example and remember to set `useCssModules` to `false` (unfortunately `create-react-app` [does not currently](https://github.com/facebookincubator/create-react-app/pull/2285) support Css modules).
Apps bootstrapped with [`create-react-app`](https://github.com/facebookincubator/create-react-app) support this module out of the box, just follow the [Basic Usage](#basic-usage) example and remember to set `useCssModules` to `false` (`create-react-app` [does not currently](https://github.com/facebookincubator/create-react-app/pull/2285) support Css modules in its stable version, you can try [the alpha](https://github.com/facebook/create-react-app/issues/3815) but it will still not work with this module).
## Prerequisites for *custom* apps
We recommend using the [`webpack >= 2`](//github.com/webpack/webpack) module bundler and ecosystem to *assemble* your app, but this module also works with `webpack 1` and should work with other bundlers.
We recommend using the [`webpack 4`](//github.com/webpack/webpack) module bundler and ecosystem to *assemble* your app, but this module also works with `webpack 3`, `webpack 2` and `webpack 1` and should work with other bundlers.
If you are using `webpack`, you will need to install and configure a few commmonly used modules (see the [webpack 2 example project](//github.com/matteocng/react-flag-icon-css-example-multi)):
If you are using `webpack`, you will need to install and configure a few commmonly used modules (see the [webpack 3 example project](//github.com/matteocng/react-flag-icon-css-example-multi), or the [webpack 2](https://github.com/matteocng/react-flag-icon-css-example-multi/tree/webpack-2), [webpack 1](https://github.com/matteocng/react-flag-icon-css-example-multi/tree/webpack-1) versions of it):

@@ -93,3 +93,3 @@ ```bash

A [`webpack 2` example project](//github.com/matteocng/react-flag-icon-css-example-multi) is available.
A [`webpack 3` example project](//github.com/matteocng/react-flag-icon-css-example-multi) is available ([webpack 2](https://github.com/matteocng/react-flag-icon-css-example-multi/tree/webpack-2) and [webpack 1](https://github.com/matteocng/react-flag-icon-css-example-multi/tree/webpack-1) versions).

@@ -123,3 +123,3 @@ ## :flags: FlagIcon props

| React * | `Module` | `ReactModule` | Your app's `React` instance. | Versions in [peerDependencies](./package.json). |
| options | `Object` | `FlagIconOptionsType` | | ||
| options | `Object` | `FlagIconOptionsType` | | See *FlagIconFactory options* below. ||

@@ -138,3 +138,3 @@ ### :factory: FlagIconFactory options

This module has **0** Flow errors on `flow-bin` version: **^0.57.3**.
This module has **0** Flow errors on `flow-bin` version: **^0.76.0**.

@@ -141,0 +141,0 @@ If in your app you are using a Flow version that is the same or newer than that, you should not need any specific configuration excluding the installation of the [flow-typed](https://github.com/flowtype/flow-typed) definition for `prop-types` (you may also take the opportunity to install definitions for all your app's modules using [flow-typed](https://github.com/flowtype/flow-typed)).

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc