New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change JSZip.external.Promise implementation. #321

Merged
merged 3 commits into from Aug 2, 2016

Conversation

Projects
None yet
1 participant
@dduponchel
Collaborator

dduponchel commented Jul 24, 2016

Importing es6-promise had a side effect: this library replaces the
global Promise object (#304) (or tries to, #309). This is an intended
side effect from this library and while its version 4 should give us a
switch for this behavior, I don't know when it will be out (the master
branch of this project still auto replace the Promise).

I replaced it by vow which match the requirements:

  • a Promise implementation
  • a lightweight one
  • works in IE6
  • doesn't have too many dependencies

If a global Promise already exists, prefer it: a native promise is
likely to be better integrated anyway (unhandledRejection in node) and
some libraries (zone.js for example) replace global objects (#303).

I think it is enough for a semver minor version.

Fix #303 #304 #309

Change JSZip.external.Promise implementation.
Importing `es6-promise` had a side effect: this library replaces the
global Promise object (#304) (or tries to, #309). This is an intended
side effect from this library and while its version 4 should give us a
switch for this behavior, I don't know when it will be out (the master
branch of this project still auto replace the Promise).

I replaced it by `vow` which match the requirements:
- a Promise implementation
- a lightweight one
- works in IE6
- doesn't have too many dependencies

If a global Promise already exists, prefer it: a native promise is
likely to be better integrated anyway (unhandledRejection in node) and
some libraries (zone.js for example) replace global objects (#303).

I think it is enough for a semver minor version.

Fix #303 #304 #309
@dduponchel

This comment has been minimized.

Show comment
Hide comment
@dduponchel

dduponchel Jul 31, 2016

Collaborator

lie was interesting too (and has an API closer to the specs) but pulled more than 40 packages and several MB.
I found out the version 3.1.0 is out and fixed that: lie may be a better choice now.

Collaborator

dduponchel commented Jul 31, 2016

lie was interesting too (and has an API closer to the specs) but pulled more than 40 packages and several MB.
I found out the version 3.1.0 is out and fixed that: lie may be a better choice now.

dduponchel added some commits Aug 2, 2016

Use lie instead of vow.
The API is closer to the ES6 Promise API and it is smaller than vow.
The previous version had a lot of npm dependencies (which is why I
prefered `vow`) but the latest version fixed that.

@dduponchel dduponchel merged commit ae04e56 into Stuk:master Aug 2, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@dduponchel dduponchel deleted the dduponchel:promise branch Aug 2, 2016

@dduponchel dduponchel referenced this pull request Aug 2, 2016

Merged

Release v3.1.0 #326

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment