@svgr/plugin-svgo
Advanced tools
Comparing version 5.4.0 to 5.5.0
@@ -6,2 +6,18 @@ # Change Log | ||
# [5.5.0](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/compare/v5.4.0...v5.5.0) (2020-11-15) | ||
### Features | ||
* **svgo:** add .svgorc.js config file support ([#451](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/issues/451)) ([8049b1a](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/commit/8049b1a63603672096892b6ab3d303580c2f303f)), closes [#412](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/issues/412) | ||
### Performance Improvements | ||
* replace merge-deep with smaller deepmerge ([#463](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/issues/463)) ([1f015eb](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/commit/1f015eb16fca093a08b012236dc83623f7bcce55)) | ||
# [5.4.0](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/compare/v5.3.1...v5.4.0) (2020-04-27) | ||
@@ -8,0 +24,0 @@ |
@@ -9,8 +9,6 @@ "use strict"; | ||
var _mergeDeep = _interopRequireDefault(require("merge-deep")); | ||
var _deepmerge = _interopRequireDefault(require("deepmerge")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
function getFilePath(state) { | ||
@@ -56,3 +54,3 @@ return state.filePath || process.cwd(); | ||
function mergePlugins(configs) { | ||
const plugins = configs.reduce((merged, config) => (0, _mergeDeep.default)(merged, ...extractPlugins(config)), {}); | ||
const plugins = configs.reduce((merged, config) => _deepmerge.default.all([merged, ...extractPlugins(config)]), {}); | ||
return Object.keys(plugins).reduce((array, key) => { | ||
@@ -68,5 +66,5 @@ array.push({ | ||
const plugins = mergePlugins(configs); | ||
return _extends({}, (0, _mergeDeep.default)(...configs), { | ||
return { ..._deepmerge.default.all(configs.filter(Boolean)), | ||
plugins | ||
}); | ||
}; | ||
} |
@@ -16,3 +16,3 @@ "use strict"; | ||
const explorer = (0, _cosmiconfig.cosmiconfigSync)('svgo', { | ||
searchPlaces: ['package.json', '.svgorc', '.svgorc.json', '.svgorc.yaml', '.svgorc.yml', 'svgo.config.js', '.svgo.yml'], | ||
searchPlaces: ['package.json', '.svgorc', '.svgorc.js', '.svgorc.json', '.svgorc.yaml', '.svgorc.yml', 'svgo.config.js', '.svgo.yml'], | ||
transform: result => result && result.config, | ||
@@ -19,0 +19,0 @@ cache: true |
{ | ||
"name": "@svgr/plugin-svgo", | ||
"description": "Optimize SVG", | ||
"version": "5.4.0", | ||
"version": "5.5.0", | ||
"main": "lib/index.js", | ||
@@ -29,7 +29,7 @@ "repository": "https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo", | ||
"dependencies": { | ||
"cosmiconfig": "^6.0.0", | ||
"merge-deep": "^3.0.2", | ||
"cosmiconfig": "^7.0.0", | ||
"deepmerge": "^4.2.2", | ||
"svgo": "^1.2.2" | ||
}, | ||
"gitHead": "e9c9d2fbfbce7a6879c90cd8522101caf2406d42" | ||
"gitHead": "b5920550bd966f876cb65c5e23af180461e5aa23" | ||
} |
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
10812
137
+ Addeddeepmerge@^4.2.2
+ Addedcosmiconfig@7.1.0(transitive)
+ Addeddeepmerge@4.3.1(transitive)
- Removedmerge-deep@^3.0.2
- Removedarr-union@3.1.0(transitive)
- Removedclone-deep@0.2.4(transitive)
- Removedcosmiconfig@6.0.0(transitive)
- Removedfor-in@0.1.81.0.2(transitive)
- Removedfor-own@0.1.5(transitive)
- Removedis-buffer@1.1.6(transitive)
- Removedis-extendable@0.1.1(transitive)
- Removedis-plain-object@2.0.4(transitive)
- Removedisobject@3.0.1(transitive)
- Removedkind-of@2.0.13.2.2(transitive)
- Removedlazy-cache@0.2.71.0.4(transitive)
- Removedmerge-deep@3.0.3(transitive)
- Removedmixin-object@2.0.1(transitive)
- Removedshallow-clone@0.1.2(transitive)
Updatedcosmiconfig@^7.0.0