Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gruntjs/grunt-contrib-compress
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3c41adf795d9cbe867f49ef1c2d6027039a98019
Choose a base ref
...
head repository: gruntjs/grunt-contrib-compress
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bd9fc8e20bd1b2e844467de86e12f45847a069a9
Choose a head ref
  • 14 commits
  • 16 files changed
  • 6 contributors

Commits on Jun 17, 2017

  1. Copy the full SHA
    b8ed0cc View commit details

Commits on Apr 20, 2019

  1. update tar to 4.4.8 (#211)

    * update tar to 4.4.8
    
    * updated tests with new tar syntax
    
    * resume entry events
    phrred authored and vladikoff committed Apr 20, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    targos Michaël Zasso
    Copy the full SHA
    fd055e9 View commit details

Commits on Apr 24, 2019

  1. Updated iltorb to latest minor version for v1.* (#209)

    Alexander Botteram authored and vladikoff committed Apr 24, 2019
    Copy the full SHA
    050ae41 View commit details
  2. Add package lock (#213)

    vladikoff authored Apr 24, 2019
    Copy the full SHA
    f6e95ab View commit details
  3. Update changelog

    vladikoff committed Apr 24, 2019
    Copy the full SHA
    e7cb371 View commit details
  4. 1.5.0

    vladikoff committed Apr 24, 2019
    Copy the full SHA
    a8998ec View commit details

Commits on Oct 21, 2019

  1. update iltorb to 2.4.3 (#216)

    fixes tar vulnerability
    closes #214 and closes #215
    caseyjhol authored and vladikoff committed Oct 21, 2019
    Copy the full SHA
    1cfa1f1 View commit details
  2. Update deps (#218)

    vladikoff authored Oct 21, 2019
    Copy the full SHA
    ea2bb69 View commit details
  3. v1.6.0

    vladikoff committed Oct 21, 2019
    Copy the full SHA
    0603886 View commit details

Commits on Dec 12, 2020

  1. Bump ini from 1.3.5 to 1.3.7 (#228)

    Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
    - [Release notes](https://github.com/isaacs/ini/releases)
    - [Commits](npm/ini@v1.3.5...v1.3.7)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 12, 2020
    Copy the full SHA
    5759edd View commit details
  2. Update tests and dependencies (#230)

    * Update tests
    
    * Update deps
    
    * Switch to Github Actions
    
    * Use npx
    vladikoff authored Dec 12, 2020
    Copy the full SHA
    b70c1d9 View commit details
  3. Copy the full SHA
    f6815bf View commit details
  4. Update Archiver (#232)

    vladikoff authored Dec 12, 2020
    Copy the full SHA
    b8565a9 View commit details
  5. v2.0.0

    vladikoff committed Dec 12, 2020
    Copy the full SHA
    bd9fc8e View commit details
Showing with 7,676 additions and 384 deletions.
  1. +37 −0 .github/workflows/test.yml
  2. +2 −1 .jshintrc
  3. +0 −24 .travis.yml
  4. +2 −1 AUTHORS
  5. +15 −0 CHANGELOG
  6. +1 −1 CONTRIBUTING.md
  7. +9 −7 Gruntfile.js
  8. +15 −7 README.md
  9. +0 −37 appveyor.yml
  10. +9 −4 docs/compress-options.md
  11. +7,299 −0 package-lock.json
  12. +21 −17 package.json
  13. +0 −12 tasks/compress.js
  14. +3 −17 tasks/lib/compress.js
  15. +263 −0 test/compress.test.js
  16. +0 −256 test/compress_test.js
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Tests
on: [push, pull_request]
env:
CI: true

jobs:
run:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node: [10, 12, 14]
os: [ubuntu-latest, windows-latest]

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Set Node.js version
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Install npm dependencies
run: npm ci

- name: Run tests
run: npm test

# We test multiple Windows shells because of prior stdout buffering issues
# filed against Grunt. https://github.com/joyent/node/issues/3584
- name: Run PowerShell tests
run: "npm test # PowerShell" # Pass comment to PS for easier debugging
shell: powershell
if: startsWith(matrix.os, 'windows')
3 changes: 2 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
@@ -10,5 +10,6 @@
"node": true,
"sub": true,
"undef": true,
"unused": true
"unused": true,
"esversion": 6
}
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Chris Talkington (http://christalkington.com/)
Tyler Kellen (http://goingslowly.com/)
Kyle Robinson Young (http://twitter.com/shamakry)
Dav Glass (http://blog.davglass.com/)
Dav Glass (http://blog.davglass.com/)
Vlad Filippov (https://vladfilippov.com/)
15 changes: 15 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
v2.0.0:
date: 2020-12-12
changes:
- Remove iltorb dependency, now uses zlib brotli features.
- Requires node >=10.16.
- Dependency and test updates.
v1.6.0:
date: 2019-10-21
changes:
- Update iltorb dependency
v1.5.0:
date: 2018-04-24
changes:
- Update to node 4 as minimum version
- update tar to 4.4.8
v1.4.3:
date: 2017-05-20
changes:
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Please see the [Contributing to grunt](http://gruntjs.com/contributing) guide for information on contributing to this project.
Please see the [Contributing to grunt](https://gruntjs.com/contributing) guide for information on contributing to this project.
16 changes: 9 additions & 7 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ module.exports = function(grunt) {
all: [
'Gruntfile.js',
'tasks/*.js',
'<%= nodeunit.tests %>'
'tests/*.js'
],
options: {
jshintrc: '.jshintrc'
@@ -239,8 +239,10 @@ module.exports = function(grunt) {
},

// Unit tests.
nodeunit: {
tests: ['test/*_test.js']
run: {
jest: {
exec: 'npx jest',
}
}
});

@@ -251,14 +253,14 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-internal');
grunt.loadNpmTasks('grunt-run');

// Whenever the "test" task is run, first clean the "tmp" dir, then run this
// plugin's task(s), then test the result.
grunt.registerTask('test', ['jshint', 'clean', 'copy', 'compress', 'nodeunit']);
grunt.registerTask('test', ['jshint', 'clean', 'copy', 'compress', 'run:jest']);

// By default, lint and run all tests. Skip copying travis and appconveyor configurations from grunt-contrib-internal.
grunt.registerTask('default', ['test', 'contrib-ci:skipIfExists', 'contrib-core']);
// By default, lint and run all tests.
grunt.registerTask('default', ['test', 'contrib-ci:skipIfExists', 'build-contrib']);

};
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# grunt-contrib-compress v1.4.3 [![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)

> Compress files and folders


## Getting Started

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
If you haven't used [Grunt](https://gruntjs.com/) before, be sure to check out the [Getting Started](https://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](https://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-contrib-compress --save-dev
@@ -62,13 +62,18 @@ Type: `Object`
Default:
```js
{
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
Type: `Integer`
* `0`: generic mode
@@ -281,6 +286,9 @@ compress: {

## Release History

* 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
* 2018-04-24   v1.5.0   Update to node 4 as minimum version update tar to 4.4.8
* 2017-05-20   v1.4.3   Update pretty-bytes to v4.0.2. Add option to not to create empty archive.
* 2017-05-20   v1.4.2   Update archiver to v1.3.0.
* 2017-01-20   v1.4.1   Make brotli support optional.
@@ -327,4 +335,4 @@ compress: {

Task submitted by [Chris Talkington](http://christalkington.com/)

*This file was generated on Sat May 20 2017 14:05:16.*
*This file was generated on Sat Dec 12 2020 14:15:27.*
37 changes: 0 additions & 37 deletions appveyor.yml

This file was deleted.

13 changes: 9 additions & 4 deletions docs/compress-options.md
Original file line number Diff line number Diff line change
@@ -30,13 +30,18 @@ Type: `Object`
Default:
```js
{
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
Type: `Integer`
* `0`: generic mode
Loading