forked from Stuk/jszip
-
Notifications
You must be signed in to change notification settings - Fork 0
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
sync #1
Merged
Merged
sync #1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This avoids using Buffer constructor API on newer Node.js versions. To achieve that, Buffer.from presence is checked, with validating that it's not the same method as Uint8Array.from. Refs: https://nodejs.org/api/deprecations.html#deprecations_dep0005_buffer_constructor
1. In allocBuffer(), ensure buffers allocated with new Buffer() are zero-filled. On newer Node.js versions, Buffer.alloc() zero-fills already. 2. In newBufferFrom(), throw when 'data' argument is a number. On newer Node.js versions, Buffer.from(number)/new Buffer(number, encooding) throw already.
* Replace core-js with the much smaller set-immediate-shim. * Remove es6-promise as it is unused. * Update lie and readable-stream. The change from core-js to set-immediate-shim reduces the install size of jszip from 9.1MB to 2.2MB. The ponyfil for setImmediate is all that was used from core-js.
Dependency updates.
Fix deprecated Buffer constructor usage and add safeguards
As these weren't published properly to npm
the example has a minor type: it uses the `new_zip` var (an instance of JSZip) to call new_zip.file('hello.txt'). The correct way is to call the finction `file` on the obtained zip object.
It depends on Chrome now, which causes issues on build machines
Minor fix in `Read a zip file`
Update browsers used for automated testing
No functional changes, just a change in dependencies
Found via `codespell -q 3` in downstream sweethome3d
When webpack/rollup or another bundler, implementing the [`browser-resolve`](https://www.npmjs.com/package/browser-resolve) spec tries to resolve `jszip` for a browser-based project they fail with: ``` ERROR in ./node_modules/jszip/lib/readable-stream-browser.js Module not found: Error: Can't resolve 'stream' in '/node_modules/jszip/lib' ``` Since you already produce a browser build, we just need to point to it inside of `package.json`'s `browser` field. PS: You'd probably want to double check the semantics of `"."`. Looking at `browser-resolve` it seems that everything will work as expected. Also, trying empirically with webpack, everything worked out, but few more pairs of eyes would be greatly appreciated. Also @sokra should be able to share a valuable opinion. Fix #524 Fix #521 Fix #477
Misc. doxy and trivial source comment typo fixes
Fix browser module resolution
…liangyang-master
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.