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

grunt-contrib-compress

Package Overview
Dependencies
Maintainers
7
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-contrib-compress - npm Package Compare versions

Comparing version 1.6.0 to 2.0.0

38

package.json
{
"name": "grunt-contrib-compress",
"description": "Compress files and folders",
"version": "1.6.0",
"version": "2.0.0",
"author": {

@@ -12,3 +12,3 @@ "name": "Grunt Team",

"engines": {
"node": ">=4.0"
"node": ">=10.16"
},

@@ -20,21 +20,25 @@ "main": "tasks/compress.js",

"dependencies": {
"archiver": "^1.3.0",
"chalk": "^1.1.1",
"lodash": "^4.7.0",
"pretty-bytes": "^4.0.2",
"stream-buffers": "^2.1.0"
"adm-zip": "^0.5.1",
"archiver": "^5.1.0",
"chalk": "^4.1.0",
"lodash": "^4.17.20",
"pretty-bytes": "^5.4.1",
"stream-buffers": "^3.0.2"
},
"optionalDependencies": {
"iltorb": "^2.4.3"
},
"devDependencies": {
"grunt": "^1.0.0",
"grunt-contrib-clean": "^1.0.0",
"grunt": "^1.3.0",
"grunt-contrib-clean": "^2.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-internal": "^4.0.1",
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-nodeunit": "^1.0.0",
"tar": "^4.4.8",
"unzip": "^0.1.5"
"grunt-contrib-internal": "^5.0.1",
"grunt-contrib-jshint": "^3.0.0",
"grunt-run": "^0.8.1",
"jest": "^26.6.3",
"tar": "^6.0.5"
},
"jest": {
"modulePathIgnorePatterns": [
"tmp",
"test/fixtures"
]
},
"keywords": [

@@ -41,0 +45,0 @@ "gruntplugin",

@@ -1,2 +0,2 @@

# grunt-contrib-compress v1.6.0 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-compress.svg?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-compress) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/tiwbi1smm1j8aa5j/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/grunt-contrib-compress/branch/master)
# grunt-contrib-compress v2.0.0 [![Build Status](https://github.com/gruntjs/grunt-contrib-compress/workflows/Tests/badge.svg)](https://github.com/gruntjs/grunt-contrib-compress/actions?workflow=Tests)

@@ -65,9 +65,14 @@ > Compress files and folders

{
mode: 0,
quality: 11,
lgwin: 22,
lgblock: 0
[zlib.constants.BROTLI_PARAM_MODE]: 0,
[zlib.constants.BROTLI_PARAM_QUALITY]: 11,
[zlib.constants.BROTLI_PARAM_LGWIN]: 22,
[zlib.constants.BROTLI_PARAM_LGBLOCK]: 0
}
```
Do not forget require `zlib` for `zlib.constants`, example:
```
const zlib = require('zlib');
```
##### mode

@@ -285,2 +290,3 @@ Type: `Integer`

* 2020-12-12   v2.0.0   Remove iltorb dependency, now uses zlib brotli features. Requires node >=10.16. Dependency and test updates.
* 2019-10-21   v1.6.0   Update iltorb dependency

@@ -334,2 +340,2 @@ * 2018-04-24   v1.5.0   Update to node 4 as minimum version update tar to 4.4.8

*This file was generated on Mon Oct 21 2019 10:25:59.*
*This file was generated on Sat Dec 12 2020 14:15:27.*

@@ -14,10 +14,3 @@ /*

var compress = require('./lib/compress')(grunt);
var iltorb;
try {
iltorb = require('iltorb');
} catch (er) {
iltorb = null;
}
grunt.registerMultiTask('compress', 'Compress files.', function() {

@@ -42,7 +35,2 @@ compress.options = this.options({

if (compress.options.mode.match('brotli') && !iltorb) {
grunt.fail.fatal('iltorb dependency wasn\'t found; in order to use brotli, ' +
'make sure you have a supported C++ compiler available and run `npm install` again.');
}
if (_.includes(['zip', 'tar', 'tgz', 'gzip', 'deflate', 'deflateRaw', 'brotli'], compress.options.mode) === false) {

@@ -49,0 +37,0 @@ grunt.fail.warn('Mode ' + String(compress.options.mode) + ' not supported.');

@@ -20,10 +20,2 @@ /*

var iltorb;
try {
iltorb = require('iltorb');
} catch (er) {
iltorb = null;
}
module.exports = function(grunt) {

@@ -68,3 +60,3 @@

exports.brotli = function(files, done) {
exports.singleFile(files, iltorb.compressStream, 'br', done);
exports.singleFile(files, zlib.createBrotliCompress, 'br', done);
grunt.log.ok('Compressed ' + chalk.cyan(files.length) + ' ' +

@@ -74,3 +66,3 @@ grunt.util.pluralize(files.length, 'file/files.'));

// 1 to 1 compression of files, expects a compatible zlib or iltorb/brotli method to be passed in, see above
// 1 to 1 compression of files, expects a compatible zlib method to be passed in, see above
exports.singleFile = function(files, algorithm, extension, done) {

@@ -117,10 +109,4 @@ grunt.util.async.forEachSeries(files, function(filePair, nextPair) {

var compressor;
var compressor = algorithm.call(zlib, exports.options);
if (iltorb && extension === 'br') {
compressor = algorithm.call(iltorb, exports.options.brotli);
} else {
compressor = algorithm.call(zlib, exports.options);
}
compressor.on('error', function(err) {

@@ -127,0 +113,0 @@ grunt.log.error(err);

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