Socket
Socket
Sign inDemoInstall

broccoli-svg-optimizer

Package Overview
Dependencies
170
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.1.0

12

index.js
'use strict';
const PersistentFilter = require('broccoli-persistent-filter');
const _ = require('lodash');
const stringify = require('json-stable-stringify');
const { Promise } = require('rsvp');
const stringify = require('safe-stable-stringify');
const DefaultSVGO = require('svgo');
function promisify(optimize) {
return (svg) => {
return svg => {
return new Promise((resolve, reject) => {
optimize(svg, (result) => {
optimize(svg, result => {
if (result.error) {

@@ -43,5 +41,5 @@ reject(result.error);

targetExtension: 'svg',
persist: _.isUndefined(options.persist) ? true : options.persist,
persist: typeof options.persist === 'undefined' ? true : options.persist,
async: options.async,
annotation: options.annotation
annotation: options.annotation,
});

@@ -48,0 +46,0 @@

{
"name": "broccoli-svg-optimizer",
"version": "2.0.0",
"version": "2.1.0",
"description": "Broccoli plugin for optimizing SVG files with SVGO",
"keywords": [
"broccoli",
"broccoli-plugin",
"svgo"
],
"license": "MIT",
"author": "Ivan Volti <voltidev@gmail.com>",
"main": "index.js",
"homepage": "https://github.com/voltidev/broccoli-svg-optimizer",
"repository": {
"type": "git",
"url": "https://github.com/voltidev/broccoli-svg-optimizer.git"
},
"bugs": {
"url": "https://github.com/voltidev/broccoli-svg-optimizer/issues"
},
"scripts": {
"lerna:lint-staged": "lint-staged",
"lint": "eslint ./*.js tests",
"test": "mocha tests/*test.js --timeout 1000"
},
"dependencies": {
"broccoli-persistent-filter": "^2.3.1",
"json-stable-stringify": "^1.0.1",
"lodash": "^4.17.15",
"rsvp": "^4.8.5",
"broccoli-persistent-filter": "^3.1.2",
"safe-stable-stringify": "^2.2.0",
"svgo": "1.3.0"

@@ -17,52 +36,23 @@ },

"chai-as-promised": "^7.1.1",
"eslint": "^6.1.0",
"eslint-config-airbnb-base": "^13.2.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-node": "^9.1.0",
"mocha": "^6.2.0",
"husky": "^3.0.1",
"lint-staged": "^9.2.1",
"prettier": "^1.18.2"
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"lint-staged": ">=10",
"mocha": "^9.2.0",
"prettier": "^2.5.1"
},
"scripts": {
"prepublishOnly": "npm test",
"lint": "eslint ./*.js tests",
"nodetest": "mocha tests/*test.js --timeout 1000",
"test": "npm run lint && npm run nodetest",
"update-fixtures": "node ./tests/utils/update-plugin-fixtures.js"
},
"main": "index.js",
"author": "Ivan Votti",
"license": "MIT",
"homepage": "https://github.com/ivanvotti/broccoli-svg-optimizer",
"repository": {
"type": "git",
"url": "https://github.com/ivanvotti/broccoli-svg-optimizer.git"
},
"bugs": {
"url": "https://github.com/ivanvotti/broccoli-svg-optimizer/issues"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"**/*.{json,md}": [
"prettier --write",
"git add"
"prettier --write"
],
"**/*.{js,ts}": [
"eslint --fix",
"git add"
"eslint --cache --fix"
]
},
"keywords": [
"broccoli",
"broccoli-plugin",
"svgo"
],
"engines": {
"node": "8.* || >= 10.*"
}
"node": "12.* || 14.* || >= 16"
},
"gitHead": "b09bcf27f628440cfb2b9b7812905e782c771738"
}
# broccoli-svg-optimizer
[![Build Status](https://travis-ci.org/ivanvotti/broccoli-svg-optimizer.svg?branch=master)](https://travis-ci.org/ivanvotti/broccoli-svg-optimizer)
[![Build status](https://ci.appveyor.com/api/projects/status/26lyufkk6ueam952/branch/master?svg=true)](https://ci.appveyor.com/project/ivanvotti/broccoli-svg-optimizer)
[![Build Status](https://travis-ci.org/voltidev/broccoli-svg-optimizer.svg?branch=master)](https://travis-ci.org/voltidev/broccoli-svg-optimizer)
[![Build status](https://ci.appveyor.com/api/projects/status/26lyufkk6ueam952/branch/master?svg=true)](https://ci.appveyor.com/project/voltidev/broccoli-svg-optimizer)

@@ -19,6 +19,4 @@ Broccoli plugin for optimizing SVG files by [SVGO](https://github.com/svg/svgo) with a persistent cache for fast restarts.

svgoConfig: {
plugins: [
{ removeTitle: true }
]
}
plugins: [{ removeTitle: true }],
},
});

@@ -45,3 +43,3 @@ ```

{ removeDesc: { removeAny: true } },
]
];
}

@@ -63,3 +61,3 @@ ```

let outputNode = new SVGOptimizer(inputNode, {
svgoModule: require('svgo')
svgoModule: require('svgo'),
});

@@ -88,3 +86,3 @@ ```

GitHub [@ivanvotti](https://github.com/ivanvotti) &nbsp;&middot;&nbsp;
Twitter [@ivanvotti](https://twitter.com/ivanvotti)
GitHub [@voltidev](https://github.com/voltidev) &nbsp;&middot;&nbsp;
Twitter [@voltidev](https://twitter.com/voltidev)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc