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

@svgr/babel-plugin-transform-svg-component

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@svgr/babel-plugin-transform-svg-component - npm Package Compare versions

Comparing version 7.0.0 to 8.0.0

11

dist/index.js

@@ -43,5 +43,5 @@ 'use strict';

};
const getOrCreateImport = ({ imports }, sourceValue) => {
const getOrCreateImport = ({ imports }, sourceValue, importKind = void 0) => {
const existing = imports.find(
(imp2) => imp2.source.value === sourceValue && !imp2.specifiers.some(
(imp2) => imp2.source.value === sourceValue && imp2.importKind === importKind && !imp2.specifiers.some(
(specifier) => specifier.type === "ImportNamespaceSpecifier"

@@ -53,2 +53,5 @@ )

const imp = core.types.importDeclaration([], core.types.stringLiteral(sourceValue));
if (importKind !== void 0) {
imp.importKind = importKind;
}
imports.push(imp);

@@ -60,3 +63,3 @@ return imp;

const identifier2 = core.types.identifier("SvgProps");
getOrCreateImport(ctx, "react-native-svg").specifiers.push(
getOrCreateImport(ctx, "react-native-svg", "type").specifiers.push(
core.types.importSpecifier(identifier2, identifier2)

@@ -67,3 +70,3 @@ );

const identifier = core.types.identifier("SVGProps");
getOrCreateImport(ctx, ctx.importSource).specifiers.push(
getOrCreateImport(ctx, ctx.importSource, "type").specifiers.push(
core.types.importSpecifier(identifier, identifier)

@@ -70,0 +73,0 @@ );

{
"name": "@svgr/babel-plugin-transform-svg-component",
"description": "Transform SVG into component",
"version": "7.0.0",
"version": "8.0.0",
"main": "./dist/index.js",

@@ -37,5 +37,8 @@ "types": "./dist/index.d.ts",

"build": "rollup -c ../../build/rollup.config.mjs",
"prepublishOnly": "npm run reset && npm run build"
"prepublishOnly": "pnpm run reset && pnpm run build"
},
"gitHead": "3b04a923ae6e0945a9401ad7da7efe26204c8390"
"devDependencies": {
"@types/babel__template": "^7.4.1"
},
"gitHead": "52a1079681477587ef0d842c0e78531adf2d2520"
}

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