Socket
Socket
Sign inDemoInstall

@svgr/core

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@svgr/core - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

LICENSE

17

CHANGELOG.md

@@ -6,2 +6,19 @@ # Change Log

<a name="2.2.0"></a>
# [2.2.0](https://github.com/smooth-code/svgr/compare/v2.1.1...v2.2.0) (2018-08-13)
### Bug Fixes
* remove null-byte characters ([#154](https://github.com/smooth-code/svgr/issues/154)) ([de7f8a7](https://github.com/smooth-code/svgr/commit/de7f8a7)), closes [#153](https://github.com/smooth-code/svgr/issues/153)
### Features
* **core:** pass info to SVGO ([2b2353b](https://github.com/smooth-code/svgr/commit/2b2353b)), closes [#152](https://github.com/smooth-code/svgr/issues/152)
<a name="2.1.1"></a>

@@ -8,0 +25,0 @@ ## [2.1.1](https://github.com/smooth-code/svgr/compare/v2.1.0...v2.1.1) (2018-07-11)

4

lib/convert.js

@@ -27,3 +27,5 @@ "use strict";

state = (0, _util.expandState)(state);
let result = code;
let result = code; // Remove null-byte character (copy/paste from Illustrator)
result = String(result).replace('\0', '');
result = await (0, _svgo.default)(result, config, state);

@@ -30,0 +32,0 @@ result = await (0, _h2x.default)(result, config, state);

@@ -34,5 +34,11 @@ "use strict";

const svgo = new _svgo.default((0, _mergeConfigs.default)(getBaseSvgoConfig(config), svgoRcConfig, config.svgoConfig));
const info = state.filePath ? {
input: 'file',
path: state.filePath
} : {
input: 'string'
};
const {
data
} = await svgo.optimize(code);
} = await svgo.optimize(code, info);
return data;

@@ -39,0 +45,0 @@ };

{
"name": "@svgr/core",
"description": "Transform SVG into React Components.",
"version": "2.1.1",
"version": "2.2.0",
"main": "lib/index.js",

@@ -25,9 +25,10 @@ "repository": "git@github.com:smooth-code/svgr.git",

"dependencies": {
"cosmiconfig": "^5.0.5",
"cosmiconfig": "^5.0.6",
"h2x-core": "^1.0.0",
"h2x-plugin-jsx": "^1.0.0",
"lodash": "^4.17.10",
"prettier": "^1.13.7",
"prettier": "^1.14.2",
"svgo": "^1.0.5"
}
},
"gitHead": "c7ab92b534b0e099670bb9c826e2ffe611a8926c"
}
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