New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-cssnano

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-cssnano - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

29

index.js

@@ -11,7 +11,7 @@ 'use strict';

module.exports = function(options) {
options = options || {};
module.exports = function (opts) {
opts = opts || {};
var stream = new Transform({objectMode: true});
stream._transform = function(file, encoding, cb) {
stream._transform = function (file, encoding, cb) {
if (file.isNull()) {

@@ -24,21 +24,14 @@ return cb(null, file);

} else if (file.isBuffer()) {
try {
var result = nano.process(String(file.contents), assign(options, {
map: (file.sourceMap) ? {annotation: false} : false,
from: file.relative,
to: file.relative
}));
nano.process(String(file.contents), assign(opts, {
map: (file.sourceMap) ? {annotation: false} : false,
from: file.relative,
to: file.relative
})).then(function (result) {
if (result.map && file.sourceMap) {
applySourceMap(file, String(result.map));
file.contents = new Buffer(result.css);
} else {
file.contents = new Buffer(result);
}
file.contents = new Buffer(result.css);
this.push(file);
} catch (e) {
var p = new PluginError(PLUGIN_NAME, e, {fileName: file.path});
this.emit('error', p);
}
cb();
cb();
}.bind(this));
}

@@ -45,0 +38,0 @@ };

{
"name": "gulp-cssnano",
"version": "1.1.0",
"version": "2.0.0",
"description": "Minify CSS with cssnano.",

@@ -29,3 +29,3 @@ "main": "index.js",

"dependencies": {
"cssnano": "^2.0.0",
"cssnano": "^3.0.0",
"gulp-util": "^3.0.6",

@@ -32,0 +32,0 @@ "object-assign": "^3.0.0",

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