gildas-lormeau / zip.js

JavaScript library to zip and unzip files supporting multi-core compression, compression streams, zip64, split files and encryption.
https://gildas-lormeau.github.io/zip.js
BSD 3-Clause "New" or "Revised" License
3.38k stars 510 forks source link

Read zip file failed in Thunder Bird Extension. #422

Closed bluesky335 closed 1 year ago

bluesky335 commented 1 year ago

I am writing a Thunderbird extension and encountered an error when reading a zip file attachment in the background page. The error message says ‘File format is not recognized’, but it works fine in Chrome. image

Thunder Bird version: 102.11.2

gildas-lormeau commented 1 year ago

That probably means the JS runtime does not support generators. A way to fix this issue would be to compile zip.js with babel. The build script already exists, see https://github.com/gildas-lormeau/zip.js/blob/master/rollup-es5.config.js. You should just have to clone the project, run npm install and npx rollup -c rollup-es5.config.js to build the files in the dist folder and the index.cjs file.

gildas-lormeau commented 1 year ago

I'm moving the issue in the Discussions tab