Closed 0f-0b closed 2 years ago
The code below only logs the first 4 zip files because the promise returned by the 5th call to ZipWriter.add never resolves. This PR fixes the bug.
ZipWriter.add
configure({ maxWorkers: 4 }); await Promise.all(Array.from({ length: 5 }, async (_, index) => { const zipWriter = new ZipWriter(new BlobWriter()); await zipWriter.add("hello.txt", new TextReader("hello world")); console.log(index, await zipWriter.close()); }));
Good point! Thank you very much for your contribution and sorry for the inconvenience. I published the new version with your fix. I also added your test in the project.
The code below only logs the first 4 zip files because the promise returned by the 5th call to
ZipWriter.add
never resolves. This PR fixes the bug.