@svgr/core
Advanced tools
Comparing version 6.5.1 to 7.0.0
import { Options } from 'prettier'; | ||
import { OptimizeOptions } from 'svgo'; | ||
import { Config as Config$1 } from 'svgo'; | ||
import { Options as Options$1 } from '@svgr/babel-preset'; | ||
@@ -19,3 +19,3 @@ import { TransformOptions } from '@babel/core'; | ||
} | ||
declare type ConfigPlugin = string | Plugin; | ||
type ConfigPlugin = string | Plugin; | ||
@@ -41,3 +41,3 @@ interface Config { | ||
svgo?: boolean; | ||
svgoConfig?: OptimizeOptions; | ||
svgoConfig?: Config$1; | ||
configFile?: string; | ||
@@ -49,2 +49,8 @@ template?: Options$1['template']; | ||
jsxRuntime?: 'classic' | 'classic-preact' | 'automatic'; | ||
jsxRuntimeImport?: { | ||
source: string; | ||
namespace?: string; | ||
specifiers?: string[]; | ||
defaultSpecifier?: string; | ||
}; | ||
index?: boolean; | ||
@@ -51,0 +57,0 @@ plugins?: ConfigPlugin[]; |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var path = require('path'); | ||
var camelCase = require('camelcase'); | ||
var cosmiconfig = require('cosmiconfig'); | ||
var jsx = require('@svgr/plugin-jsx'); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var camelCase__default = /*#__PURE__*/_interopDefaultLegacy(camelCase); | ||
var jsx__default = /*#__PURE__*/_interopDefaultLegacy(jsx); | ||
var __defProp$1 = Object.defineProperty; | ||
@@ -35,3 +27,3 @@ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols; | ||
return "SvgComponent"; | ||
const pascalCaseFileName = camelCase__default["default"]( | ||
const pascalCaseFileName = camelCase( | ||
path.parse(filePath).name.replace(VALID_CHAR_REGEX, ""), | ||
@@ -137,3 +129,3 @@ { | ||
const DEFAULT_PLUGINS = [jsx__default["default"]]; | ||
const DEFAULT_PLUGINS = []; | ||
const getPlugins = (config, state) => { | ||
@@ -140,0 +132,0 @@ var _a; |
{ | ||
"name": "@svgr/core", | ||
"description": "Transform SVG into React Components.", | ||
"version": "6.5.1", | ||
"version": "7.0.0", | ||
"main": "./dist/index.js", | ||
@@ -27,3 +27,3 @@ "types": "./dist/index.d.ts", | ||
"engines": { | ||
"node": ">=10" | ||
"node": ">=14" | ||
}, | ||
@@ -38,16 +38,12 @@ "homepage": "https://react-svgr.com", | ||
"reset": "rm -rf dist", | ||
"build": "rollup -c ../../build/rollup.config.js", | ||
"build": "rollup -c ../../build/rollup.config.mjs", | ||
"prepublishOnly": "npm run reset && npm run build" | ||
}, | ||
"dependencies": { | ||
"@babel/core": "^7.19.6", | ||
"@svgr/babel-preset": "^6.5.1", | ||
"@svgr/plugin-jsx": "^6.5.1", | ||
"@babel/core": "^7.21.3", | ||
"@svgr/babel-preset": "^7.0.0", | ||
"camelcase": "^6.2.0", | ||
"cosmiconfig": "^7.0.1" | ||
"cosmiconfig": "^8.1.3" | ||
}, | ||
"devDependencies": { | ||
"@types/svgo": "^2.6.4" | ||
}, | ||
"gitHead": "d5efedd372999692f84d30072e502b5a6b8fe734" | ||
"gitHead": "3b04a923ae6e0945a9401ad7da7efe26204c8390" | ||
} |
@@ -37,3 +37,3 @@ # @svgr/core | ||
By default `@svgr/core` doesn't include `svgo` and `prettier` plugins, if you want them, you have to install them and include them in config. | ||
By default `@svgr/core` doesn't include any plugin, if you want them, you have to install them and include them in config. | ||
@@ -58,5 +58,1 @@ ```js | ||
[license]: https://github.com/smooth-code/svgr/blob/master/LICENSE | ||
``` | ||
``` |
Sorry, the diff of this file is not supported yet
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
4
0
259
24723
57
+ Added@svgr/babel-plugin-add-jsx-attribute@7.0.0(transitive)
+ Added@svgr/babel-plugin-remove-jsx-attribute@7.0.0(transitive)
+ Added@svgr/babel-plugin-remove-jsx-empty-expression@7.0.0(transitive)
+ Added@svgr/babel-plugin-replace-jsx-attribute-value@7.0.0(transitive)
+ Added@svgr/babel-plugin-svg-dynamic-title@7.0.0(transitive)
+ Added@svgr/babel-plugin-svg-em-dimensions@7.0.0(transitive)
+ Added@svgr/babel-plugin-transform-react-native-svg@7.0.0(transitive)
+ Added@svgr/babel-plugin-transform-svg-component@7.0.0(transitive)
+ Added@svgr/babel-preset@7.0.0(transitive)
+ Addedargparse@2.0.1(transitive)
+ Addedcosmiconfig@8.3.6(transitive)
+ Addedjs-yaml@4.1.0(transitive)
- Removed@svgr/plugin-jsx@^6.5.1
- Removed@svgr/babel-plugin-add-jsx-attribute@6.5.1(transitive)
- Removed@svgr/babel-plugin-remove-jsx-attribute@8.0.0(transitive)
- Removed@svgr/babel-plugin-remove-jsx-empty-expression@8.0.0(transitive)
- Removed@svgr/babel-plugin-replace-jsx-attribute-value@6.5.1(transitive)
- Removed@svgr/babel-plugin-svg-dynamic-title@6.5.1(transitive)
- Removed@svgr/babel-plugin-svg-em-dimensions@6.5.1(transitive)
- Removed@svgr/babel-plugin-transform-react-native-svg@6.5.1(transitive)
- Removed@svgr/babel-plugin-transform-svg-component@6.5.1(transitive)
- Removed@svgr/babel-preset@6.5.1(transitive)
- Removed@svgr/hast-util-to-babel-ast@6.5.1(transitive)
- Removed@svgr/plugin-jsx@6.5.1(transitive)
- Removed@types/parse-json@4.0.2(transitive)
- Removedcosmiconfig@7.1.0(transitive)
- Removedentities@4.5.0(transitive)
- Removedsvg-parser@2.0.4(transitive)
- Removedyaml@1.10.2(transitive)
Updated@babel/core@^7.21.3
Updated@svgr/babel-preset@^7.0.0
Updatedcosmiconfig@^8.1.3