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: Stuk/jszip
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e5b3f0ddaa8182cd6ea253e97f678b9f36d0d8ac
Choose a base ref
...
head repository: Stuk/jszip
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3b98cfc7eb8acb14cd699d497d0cdf6a3585aeab
Choose a head ref

Commits on Aug 16, 2018

  1. dual-Licensing clearification

    add "At your choice" to make clear, that the recipient of the software may choose one of the named licenses.
    PatricSteffen authored Aug 16, 2018
    Copy the full SHA
    f81c2d7 View commit details

Commits on Jan 20, 2021

  1. Copy the full SHA
    d657248 View commit details

Commits on Aug 5, 2021

  1. Copy the full SHA
    81cb5eb View commit details
  2. Copy the full SHA
    89298b9 View commit details
  3. Revert "Disable proto assert that fails in browsers"

    This reverts commit 9046487.
    Stuk committed Aug 5, 2021
    Copy the full SHA
    79f7691 View commit details
  4. Fix lint

    Stuk committed Aug 5, 2021
    Copy the full SHA
    e08003e View commit details
  5. Merge branch 'fix-build'

    Stuk committed Aug 5, 2021
    Copy the full SHA
    5639745 View commit details
  6. Updates for 3.7.1

    Stuk committed Aug 5, 2021
    Copy the full SHA
    9f9c33b View commit details
  7. 3.7.1

    Stuk committed Aug 5, 2021
    Copy the full SHA
    3f2f0da View commit details

Commits on Oct 6, 2021

  1. Add Github Actions PR workflow

    Stuk committed Oct 6, 2021
    Copy the full SHA
    a076d64 View commit details
  2. Add names to steps

    Stuk committed Oct 6, 2021
    Copy the full SHA
    2bb0f74 View commit details

Commits on Oct 11, 2021

  1. Add playwright and http-server

    Stuk committed Oct 11, 2021
    Copy the full SHA
    0509c73 View commit details
  2. Use local qunit files in tests

    Stuk committed Oct 11, 2021
    Copy the full SHA
    f7275e6 View commit details
  3. Copy the full SHA
    e281bc3 View commit details
  4. Copy the full SHA
    eeb841e View commit details
  5. Copy the full SHA
    5ee321e View commit details
  6. Add dependency caching

    Stuk committed Oct 11, 2021
    Copy the full SHA
    40cc7f4 View commit details
  7. Merge pull request #796 from Stuk/ghci

    Add Github Actions PR workflow and test with Playwright
    Stuk authored Oct 11, 2021
    Copy the full SHA
    85c4989 View commit details
  8. Merge pull request #737 from satoshicano/update-types-JSZipLoadOptions

    types: add decodeFIleName parameter type definitions
    Stuk authored Oct 11, 2021
    Copy the full SHA
    2ebb7e8 View commit details
  9. Merge pull request #541 from PatricSteffen/patch-1

    Dual-Licensing clarification
    Stuk authored Oct 11, 2021
    Copy the full SHA
    d4702a7 View commit details

Commits on Mar 30, 2022

  1. Copy the full SHA
    459ff79 View commit details
  2. Update contributing

    Stuk committed Mar 30, 2022
    Copy the full SHA
    1f631b0 View commit details
  3. Copy the full SHA
    2edab36 View commit details
  4. 3.8.0

    Stuk committed Mar 30, 2022
    Copy the full SHA
    3b98cfc View commit details
Showing with 12,661 additions and 1,772 deletions.
  1. +42 −0 .github/workflows/pr.yaml
  2. +3 −2 .gitignore
  3. +9 −0 CHANGES.md
  4. +0 −59 Gruntfile.js
  5. +1 −1 LICENSE.markdown
  6. +11,384 −12 dist/jszip.js
  7. +2 −2 dist/jszip.min.js
  8. +23 −0 documentation/api_jszip/load_async.md
  9. +9 −6 documentation/contributing.md
  10. +6 −0 index.d.ts
  11. +1 −1 lib/index.js
  12. +8 −1 lib/load.js
  13. +27 −2 lib/utils.js
  14. +1,045 −1,678 package-lock.json
  15. +4 −4 package.json
  16. +1 −2 test/asserts/load.js
  17. +22 −0 test/asserts/utils.js
  18. +2 −2 test/index.html
  19. +72 −0 test/run.js
42 changes: 42 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: pull-request

on:
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 'lts/*'
cache: 'npm'

- name: Cache Node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: "Install dependencies"
run: |
npm install
sudo npx playwright install-deps
- name: Lint
run: npm run lint
- name: Test Node
run: npm run test-node
- name: Test browsers
run: |
npm run test-browser
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*~
.c9revisions
.DS_Store
node_modules
sauce_connect.log
.c9revisions
sauce_connect.log
9 changes: 9 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,15 @@ layout: default
section: main
---

### v3.8.0 2022-03-30

- Santize filenames when files are loaded with `loadAsync`, to avoid ["zip slip" attacks](https://snyk.io/research/zip-slip-vulnerability). The original filename is available on each zip entry as `unsafeOriginalName`. See the [documentation](https://stuk.github.io/jszip/documentation/api_jszip/load_async.html). Many thanks to McCaulay Hudson for reporting.

### v3.7.1 2021-08-05

- Fix build of `dist` files.
+ Note: this version ensures the changes from 3.7.0 are actually included in the `dist` files. Thanks to Evan W for reporting.

### v3.7.0 2021-07-23

- Fix: Use a null prototype object for this.files (see [#766](https://github.com/Stuk/jszip/pull/766))
59 changes: 0 additions & 59 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -2,53 +2,9 @@
"use strict";

module.exports = function(grunt) {
// https://wiki.saucelabs.com/display/DOCS/Platform+Configurator
// A lot of the browsers seem to time out with Saucelab's unit testing
// framework. Here are the browsers that work and get enough coverage for our
// needs.
var browsers = [
{browserName: "chrome"},
{browserName: "firefox", platform: "Linux"},
{browserName: "internet explorer"}
];

var tags = [];
if (process.env.TRAVIS_PULL_REQUEST && process.env.TRAVIS_PULL_REQUEST != "false") {
tags.push("pr" + process.env.TRAVIS_PULL_REQUEST);
} else if (process.env.TRAVIS_BRANCH) {
tags.push(process.env.TRAVIS_BRANCH);
}

var version = require("./package.json").version;

grunt.initConfig({
connect: {
server: {
options: {
base: "",
port: 8080
}
}
},
'saucelabs-qunit': {
all: {
options: {
urls: ["http://127.0.0.1:8080/test/index.html?hidepassed"],
build: process.env.TRAVIS_JOB_ID,
throttled: 4,
"max-duration": 1200, // seconds, IE6 is slow
browsers: browsers,
testname: "qunit tests",
tags: tags,
// Tests have statusCheckAttempts * pollInterval seconds to complete
pollInterval: 2000,
statusCheckAttempts: 240,
"max-duration": 1200,
browsers: browsers,
maxRetries: 2
}
}
},
jshint: {
// see https://github.com/gruntjs/grunt-contrib-jshint/issues/198
// we can't override the options using the jshintrc path
@@ -102,25 +58,10 @@ module.exports = function(grunt) {
}
});

grunt.loadNpmTasks("grunt-contrib-connect");
grunt.loadNpmTasks("grunt-saucelabs");
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');

// A task to cause Grunt to sit and wait, keeping the test server running
grunt.registerTask("wait", function() {
this.async();
});

grunt.registerTask("test-local", ["build", "connect", "wait"]);
grunt.registerTask("test-remote", ["build", "connect", "saucelabs-qunit"]);

if (process.env.SAUCE_USERNAME && process.env.SAUCE_ACCESS_KEY) {
grunt.registerTask("test", ["jshint", "test-remote"]);
} else {
grunt.registerTask("test", ["jshint", "test-local"]);
}
grunt.registerTask("build", ["browserify", "uglify"]);
grunt.registerTask("default", ["jshint", "build"]);
};
2 changes: 1 addition & 1 deletion LICENSE.markdown
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
JSZip is dual licensed. You may use it under the MIT license *or* the GPLv3
JSZip is dual licensed. At your choice you may use it under the MIT license *or* the GPLv3
license.

The MIT License
Loading