@figma-export/transform-svg-with-svgo
Advanced tools
Comparing version 5.0.1 to 6.0.0-beta.0
import { Config } from 'svgo'; | ||
import * as FigmaExport from '@figma-export/types'; | ||
declare const _default: (options: Config) => FigmaExport.StringTransformer; | ||
export = _default; | ||
export default _default; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,7 +10,7 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
const svgo_1 = require("svgo"); | ||
module.exports = (options) => { | ||
import { optimize } from 'svgo'; | ||
export default (options) => { | ||
return (svg) => __awaiter(void 0, void 0, void 0, function* () { | ||
try { | ||
const result = (0, svgo_1.optimize)(svg, options); | ||
const result = optimize(svg, options); | ||
if (!('data' in result)) { | ||
@@ -18,0 +17,0 @@ return undefined; |
{ | ||
"name": "@figma-export/transform-svg-with-svgo", | ||
"version": "5.0.1", | ||
"version": "6.0.0-beta.0", | ||
"description": "Transformer for @figma-export that optimizes svgs using svgo tool", | ||
@@ -23,2 +23,3 @@ "main": "dist/index.js", | ||
"license": "MIT", | ||
"type": "module", | ||
"publishConfig": { | ||
@@ -28,3 +29,3 @@ "access": "public" | ||
"dependencies": { | ||
"@figma-export/types": "^5.0.1", | ||
"@figma-export/types": "^6.0.0-beta.0", | ||
"@types/svgo": "~2.6.4", | ||
@@ -34,5 +35,5 @@ "svgo": "~3.2.0" | ||
"engines": { | ||
"node": ">= 16.14" | ||
"node": ">= 18.12" | ||
}, | ||
"gitHead": "b36a6dbd644dccbd461d058de6bb4a2afec0ade1" | ||
"gitHead": "559f5bfe3cf41a2cbed16a6a4348c781940f80ce" | ||
} |
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
5012
Yes
28
2
+ Added@figma-export/types@6.0.0(transitive)
- Removed@figma-export/types@5.0.1(transitive)