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: bead269884d379de4143982c765820ee6e2d3048
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 Aug 21, 2018

  1. Copy the full SHA
    18efe31 View commit details

Commits on Apr 20, 2020

  1. Copy the full SHA
    7e8b8ee View commit details

Commits on Apr 25, 2020

  1. Copy the full SHA
    5abc6cf View commit details

Commits on May 31, 2020

  1. Copy the full SHA
    205c149 View commit details
  2. Merge pull request #1 from Stuk/master

    sync
    mljsgto222 authored May 31, 2020
    Copy the full SHA
    2cb01a3 View commit details
  3. Merge branch 'master' into invalid_extra_field_data

    # Conflicts:
    #	test/asserts/load.js
    mljsgto222 committed May 31, 2020
    Copy the full SHA
    861699d View commit details
  4. fix test

    mljsgto222 committed May 31, 2020
    Copy the full SHA
    7a99db8 View commit details

Commits on Jun 9, 2020

  1. update nodeStream type

    lubeskih committed Jun 9, 2020
    Copy the full SHA
    5835b7a View commit details

Commits on Jun 13, 2020

  1. Merge pull request #544 from mljsgto222/invalid_extra_field_data

    Fixed 'End of data reached' error when file extra field is invalid
    Stuk authored Jun 13, 2020
    Copy the full SHA
    ed8a758 View commit details
  2. Merge pull request #682 from lubeskih/681-update-nodestream-type

    Correct nodeStream's type
    Stuk authored Jun 13, 2020
    Copy the full SHA
    9d56abc View commit details
  3. Merge pull request #669 from jjhbw/master

    Typescript definitions: added null to return types of functions that may return null
    Stuk authored Jun 13, 2020
    Copy the full SHA
    2aad916 View commit details
  4. Merge pull request #666 from ffflorian/fix/types/output-string

    Add string output type
    Stuk authored Jun 13, 2020
    Copy the full SHA
    9591294 View commit details

Commits on Jun 14, 2020

  1. Copy the full SHA
    ff65ad3 View commit details
  2. 3.5.0

    Stuk committed Jun 14, 2020
    Copy the full SHA
    7bbcb38 View commit details

Commits on Jul 21, 2020

  1. Copy the full SHA
    9f13168 View commit details

Commits on Jul 24, 2020

  1. Merge pull request #703 from vdoubleu/patch-1

    Fix small error in read_zip.md
    Stuk authored Jul 24, 2020
    Copy the full SHA
    25d401e View commit details

Commits on Jan 14, 2021

  1. fix: duplicate require

    JayFate committed Jan 14, 2021
    Copy the full SHA
    e534454 View commit details

Commits on Jan 16, 2021

  1. Merge pull request #734 from JayFate/master

    fix: duplicate require DataLengthProbe, utils
    Stuk authored Jan 16, 2021
    Copy the full SHA
    3db5fdc View commit details

Commits on Jan 20, 2021

  1. Copy the full SHA
    d657248 View commit details

Commits on Feb 6, 2021

  1. Copy the full SHA
    f4700f9 View commit details

Commits on Feb 10, 2021

  1. Merge pull request #742 from jahed/fix/webpack-5-async-failure

    Fix(browser): redirect main to dist on browsers
    Stuk authored Feb 10, 2021
    Copy the full SHA
    dcc6ff9 View commit details
  2. Update contributing

    Stuk committed Feb 10, 2021
    Copy the full SHA
    10035ad View commit details
  3. Copy the full SHA
    7c75dff View commit details
  4. 3.6.0

    Stuk committed Feb 10, 2021
    1
    Copy the full SHA
    112fcdb View commit details

Commits on Apr 7, 2021

  1. Copy the full SHA
    a311039 View commit details

Commits on Apr 21, 2021

  1. Copy the full SHA
    b7f472d View commit details

Commits on Jun 14, 2021

  1. fix: Use a null prototype object for this.files

    This approach is taken to prevent overriding object methods that would
    exist on a normal object Object.create({})
    MichaelAquilina committed Jun 14, 2021
    2
    Copy the full SHA
    2235749 View commit details
  2. Copy the full SHA
    d024c22 View commit details

Commits on Jun 23, 2021

  1. Copy the full SHA
    bb38812 View commit details

Commits on Jun 29, 2021

  1. Merge pull request #766 from MichaelAquilina/fix/files-null-prototype

    fix: Use a null prototype object for this.files
    Stuk authored Jun 29, 2021
    Copy the full SHA
    6d029b4 View commit details

Commits on Jul 23, 2021

  1. Copy the full SHA
    9046487 View commit details
  2. Update for version 3.7.0

    Stuk committed Jul 23, 2021
    Copy the full SHA
    e88ba4b View commit details
  3. 3.7.0

    Stuk committed Jul 23, 2021
    Copy the full SHA
    e5b3f0d 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
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
31 changes: 29 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -4,11 +4,38 @@ layout: default
section: main
---

### v3.4.0 2020 2020-04-19
### 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))
+ This change might break existing code if it uses prototype methods on the `.files` property of a zip object, for example `zip.files.toString()`. This approach is taken to prevent files in the zip overriding object methods that would exist on a normal object.

### v3.6.0 2021-02-09

- Fix: redirect main to dist on browsers (see [#742](https://github.com/Stuk/jszip/pull/742))
- Fix duplicate require DataLengthProbe, utils (see [#734](https://github.com/Stuk/jszip/pull/734))
- Fix small error in read_zip.md (see [#703](https://github.com/Stuk/jszip/pull/703))

### v3.5.0 2020-05-31

- Fix 'End of data reached' error when file extra field is invalid (see [#544](https://github.com/Stuk/jszip/pull/544)).
- Typescript definitions: Add null to return types of functions that may return null (see [#669](https://github.com/Stuk/jszip/pull/669)).
- Typescript definitions: Correct nodeStream's type (see [#682](https://github.com/Stuk/jszip/pull/682))
- Typescript definitions: Add string output type (see [#666](https://github.com/Stuk/jszip/pull/666))

### v3.4.0 2020-04-19

- Add Typescript type definitions (see [#601](https://github.com/Stuk/jszip/pull/601)).

### v3.3.0 2020 2020-04-1
### v3.3.0 2020-04-1

- Change browser module resolution to support Angular packager (see [#614](https://github.com/Stuk/jszip/pull/614)).

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