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

@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 5.4.0 to 5.5.0

17

CHANGELOG.md

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

# [5.5.0](https://github.com/gregberge/svgr/tree/master/packages/core/compare/v5.4.0...v5.5.0) (2020-11-15)
### Bug Fixes
* **typescript:** fix react-native support [#465](https://github.com/gregberge/svgr/tree/master/packages/core/issues/465) ([#488](https://github.com/gregberge/svgr/tree/master/packages/core/issues/488)) ([d61e0cf](https://github.com/gregberge/svgr/tree/master/packages/core/commit/d61e0cface065afc1478fdb44d87ca8177041eab))
* prevent removing the namespace by svgr ([[#475](https://github.com/gregberge/svgr/tree/master/packages/core/issues/475)](https://github.com/gregberge/svgr/issues/475) ([#498](https://github.com/gregberge/svgr/tree/master/packages/core/issues/498)) ([00e84ea](https://github.com/gregberge/svgr/tree/master/packages/core/commit/00e84ead96d89bcbd072b9585b4db1365e392d33))
### Features
* allow custom name for named export ([#493](https://github.com/gregberge/svgr/tree/master/packages/core/issues/493)) ([16a58d6](https://github.com/gregberge/svgr/tree/master/packages/core/commit/16a58d6e817c065f72a68be91600a1a360205f44))
# [5.4.0](https://github.com/gregberge/svgr/tree/master/packages/core/compare/v5.3.1...v5.4.0) (2020-04-27)

@@ -8,0 +25,0 @@

37

lib/config.js

@@ -11,6 +11,2 @@ "use strict";

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 _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
const DEFAULT_CONFIG = {

@@ -33,3 +29,4 @@ dimensions: true,

runtimeConfig: true,
plugins: null
plugins: null,
namedExport: 'ReactComponent'
};

@@ -78,20 +75,22 @@ exports.DEFAULT_CONFIG = DEFAULT_CONFIG;

async function loadConfig(_ref, state = {}) {
let {
configFile
} = _ref,
baseConfig = _objectWithoutPropertiesLoose(_ref, ["configFile"]);
async function loadConfig({
configFile,
...baseConfig
}, state = {}) {
const rcConfig = state.filePath && baseConfig.runtimeConfig !== false ? await resolveConfig(state.filePath, configFile) : {};
return _extends({}, DEFAULT_CONFIG, {}, rcConfig, {}, baseConfig);
return { ...DEFAULT_CONFIG,
...rcConfig,
...baseConfig
};
}
loadConfig.sync = (_ref2, state = {}) => {
let {
configFile
} = _ref2,
baseConfig = _objectWithoutPropertiesLoose(_ref2, ["configFile"]);
loadConfig.sync = ({
configFile,
...baseConfig
}, state = {}) => {
const rcConfig = state.filePath && baseConfig.runtimeConfig !== false ? resolveConfig.sync(state.filePath, configFile) : {};
return _extends({}, DEFAULT_CONFIG, {}, rcConfig, {}, baseConfig);
return { ...DEFAULT_CONFIG,
...rcConfig,
...baseConfig
};
};

@@ -16,2 +16,3 @@ "use strict";

if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _config[key]) return;
exports[key] = _config[key];

@@ -18,0 +19,0 @@ });

@@ -12,4 +12,2 @@ "use strict";

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); }
const validCharacters = /[^a-zA-Z0-9_-]/g;

@@ -26,5 +24,6 @@

function expandState(state) {
return _extends({
componentName: state.componentName || getComponentName(state)
}, state);
return {
componentName: state.componentName || getComponentName(state),
...state
};
}
{
"name": "@svgr/core",
"description": "Transform SVG into React Components.",
"version": "5.4.0",
"version": "5.5.0",
"main": "lib/index.js",

@@ -33,7 +33,7 @@ "repository": "https://github.com/gregberge/svgr/tree/master/packages/core",

"dependencies": {
"@svgr/plugin-jsx": "^5.4.0",
"camelcase": "^6.0.0",
"cosmiconfig": "^6.0.0"
"@svgr/plugin-jsx": "^5.5.0",
"camelcase": "^6.2.0",
"cosmiconfig": "^7.0.0"
},
"gitHead": "e9c9d2fbfbce7a6879c90cd8522101caf2406d42"
"gitHead": "b5920550bd966f876cb65c5e23af180461e5aa23"
}
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