{"_id":"@bybrave/jszip2","_rev":"4-9027433ccc5e4b288de0bd884325e49b","name":"@bybrave/jszip2","dist-tags":{"latest":"4.3.0"},"versions":{"4.0.0":{"name":"@bybrave/jszip2","version":"4.0.0","keywords":["zip","unzip","archive","deflate","inflate","compression","jszip","esm","typescript"],"author":{"url":"https://github.com/bybraveHQ","name":"bybrave"},"license":"(MIT OR GPL-3.0-or-later)","_id":"@bybrave/jszip2@4.0.0","maintainers":[{"name":"bybrave","email":"opmybrave@gmail.com"}],"contributors":[{"url":"author of the original JSZip","name":"Stuart Knightley"},{"name":"David Duponchel"},{"name":"Franz Buchinger"},{"name":"António Afonso"},{"name":"yiminghe"}],"homepage":"https://github.com/bybraveHQ/jszip2#readme","bugs":{"url":"https://github.com/bybraveHQ/jszip2/issues"},"dist":{"shasum":"3baa1cff8d60c81754bb70894a87850ed4751dfc","tarball":"https://registry.npmjs.org/@bybrave/jszip2/-/jszip2-4.0.0.tgz","fileCount":43,"integrity":"sha512-FFGjD7HFWDVqM3IRbdvKFs/H66tzPzaLDsWouM2dUjiQMXfT7qUf/fvjocEoEjOOxvJJQxJtDtb+2zmLS6D90g==","signatures":[{"sig":"MEYCIQC1UkPHYSEy1kpxgoBRJctwWkF0TH9IElhksLBTn0mI/gIhALhwgeGyKJDEk7CioRlX5cJh1RzT/hB1EVN/C1KRLaso","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":533449},"main":"./lib/index.js","types":"./index.d.ts","browser":{"stream":"./lib/stream-browser-stub.js"},"engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","import":"./index.mjs","require":"./lib/index.js"},"./dist/*":"./dist/*","./package.json":"./package.json"},"funding":"https://ko-fi.com/bybrave","gitHead":"be6361cd8ef0b805e045f406e020cb05b68abbb6","scripts":{"test":"npm run build && npm run test-node && npm run test-dist && npm run test-types","build":"esbuild lib/index.js --bundle --format=iife --global-name=JSZip --alias:stream=./lib/stream-browser-stub.js --outfile=dist/jszip.js && esbuild lib/index.js --bundle --minify --format=iife --global-name=JSZip --alias:stream=./lib/stream-browser-stub.js --outfile=dist/jszip.min.js","test-dist":"node test/dist-smoke.js","test-node":"qunit --require ./test/helpers/test-utils.js --require ./test/helpers/node-test-utils.js test/asserts/","test-types":"tsc","prepublishOnly":"npm test"},"_npmUser":{"name":"bybrave","email":"opmybrave@gmail.com"},"repository":{"url":"git+https://github.com/bybraveHQ/jszip2.git","type":"git"},"_npmVersion":"10.8.2","description":"Maintained fork of JSZip — create, read and edit .zip files with JavaScript. Modern runtime: native Promises, pako 2, ESM, no setimmediate/lie/readable-stream.","directories":{},"_nodeVersion":"20.19.6","dependencies":{"pako":"^2.1.0"},"_hasShrinkwrap":false,"devDependencies":{"qunit":"^2.21.0","esbuild":"^0.25.0","typescript":"^5.5.0","@types/node":"^20.14.0"},"_npmOperationalInternal":{"tmp":"tmp/jszip2_4.0.0_1783208026351_0.9406279662420483","host":"s3://npm-registry-packages-npm-production"}},"4.1.0":{"name":"@bybrave/jszip2","version":"4.1.0","keywords":["zip","unzip","archive","deflate","inflate","compression","jszip","esm","typescript"],"author":{"url":"https://github.com/bybraveHQ","name":"bybrave"},"license":"(MIT OR GPL-3.0-or-later)","_id":"@bybrave/jszip2@4.1.0","maintainers":[{"name":"bybrave","email":"opmybrave@gmail.com"}],"contributors":[{"url":"author of the original JSZip","name":"Stuart Knightley"},{"name":"David Duponchel"},{"name":"Franz Buchinger"},{"name":"António Afonso"},{"name":"yiminghe"}],"homepage":"https://github.com/bybraveHQ/jszip2#readme","bugs":{"url":"https://github.com/bybraveHQ/jszip2/issues"},"dist":{"shasum":"05c9a83d3fb679a3144427ac1f9c18946350768c","tarball":"https://registry.npmjs.org/@bybrave/jszip2/-/jszip2-4.1.0.tgz","fileCount":44,"integrity":"sha512-vCecy9o2LazEf4goFFgMtVG+FkjEpoEXUn14IXptCiL+USz55hugylGGshGIoZ3G9BdUdwxPAzPBQiQhM98/qw==","signatures":[{"sig":"MEYCIQD0gAFNmUwHM2A9TbMn53z6b27d2QzaIg8ttF0taFtizAIhAI1CJpE/80y0o4XQE6bVohLJrYJ7af3i8bJ3PgWS75Q9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":558481},"main":"./lib/index.js","types":"./index.d.ts","browser":{"stream":"./lib/stream-browser-stub.js"},"engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","import":"./index.mjs","require":"./lib/index.js"},"./dist/*":"./dist/*","./package.json":"./package.json"},"funding":"https://ko-fi.com/bybrave","gitHead":"5318913536a0a4c623e479ddd1678228c9859101","scripts":{"test":"npm run build && npm run test-node && npm run test-dist && npm run test-types","build":"esbuild lib/index.js --bundle --format=iife --global-name=JSZip --alias:stream=./lib/stream-browser-stub.js --outfile=dist/jszip.js && esbuild lib/index.js --bundle --minify --format=iife --global-name=JSZip --alias:stream=./lib/stream-browser-stub.js --outfile=dist/jszip.min.js","test-dist":"node test/dist-smoke.js","test-node":"qunit --require ./test/helpers/test-utils.js --require ./test/helpers/node-test-utils.js test/asserts/","test-types":"tsc","prepublishOnly":"npm test"},"_npmUser":{"name":"bybrave","email":"opmybrave@gmail.com"},"repository":{"url":"git+https://github.com/bybraveHQ/jszip2.git","type":"git"},"_npmVersion":"10.8.2","description":"Maintained fork of JSZip — create, read and edit .zip files with JavaScript. Modern runtime: native Promises, pako 2, ESM, no setimmediate/lie/readable-stream.","directories":{},"_nodeVersion":"20.19.6","dependencies":{"pako":"^2.1.0"},"_hasShrinkwrap":false,"devDependencies":{"qunit":"^2.21.0","esbuild":"^0.25.0","typescript":"^5.5.0","@types/node":"^20.14.0"},"_npmOperationalInternal":{"tmp":"tmp/jszip2_4.1.0_1783211286685_0.1763839280410553","host":"s3://npm-registry-packages-npm-production"}},"4.2.0":{"name":"@bybrave/jszip2","version":"4.2.0","keywords":["zip","unzip","archive","deflate","inflate","compression","jszip","esm","typescript"],"author":{"url":"https://github.com/bybraveHQ","name":"bybrave"},"license":"(MIT OR GPL-3.0-or-later)","_id":"@bybrave/jszip2@4.2.0","maintainers":[{"name":"bybrave","email":"opmybrave@gmail.com"}],"contributors":[{"url":"author of the original JSZip","name":"Stuart Knightley"},{"name":"David Duponchel"},{"name":"Franz Buchinger"},{"name":"António Afonso"},{"name":"yiminghe"}],"homepage":"https://github.com/bybraveHQ/jszip2#readme","bugs":{"url":"https://github.com/bybraveHQ/jszip2/issues"},"dist":{"shasum":"0804dbde0628cb7a93e83202e64c066c920c1a79","tarball":"https://registry.npmjs.org/@bybrave/jszip2/-/jszip2-4.2.0.tgz","fileCount":46,"integrity":"sha512-wpiJSI9RYLNsgD8lu24mSPHhsExElxB9OW1+Sa/bZJGbSr1wSi03TM3vl6jpHfOAua5nLO/LGKS/xDec/l6noQ==","signatures":[{"sig":"MEUCIDa6pvYoS2Su0TeYRsseDLSMvZ4Dxlbg1bloCc3/zU7hAiEAy3J8AmmnkeETtnUY59FS/t/a4vCLyRzvuE4uuzasUwM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":579266},"main":"./lib/index.js","types":"./index.d.ts","browser":{"stream":"./lib/stream-browser-stub.js"},"engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","import":"./index.mjs","require":"./lib/index.js"},"./dist/*":"./dist/*","./package.json":"./package.json"},"funding":"https://ko-fi.com/bybrave","gitHead":"dafcf30c12b76731f902118ece186833a74ac293","scripts":{"test":"npm run build && npm run test-node && npm run test-dist && npm run test-types","build":"esbuild lib/index.js --bundle --format=iife --global-name=JSZip --alias:stream=./lib/stream-browser-stub.js --outfile=dist/jszip.js && esbuild lib/index.js --bundle --minify --format=iife --global-name=JSZip --alias:stream=./lib/stream-browser-stub.js --outfile=dist/jszip.min.js","test-dist":"node test/dist-smoke.js","test-node":"qunit --require ./test/helpers/test-utils.js --require ./test/helpers/node-test-utils.js test/asserts/","test-types":"tsc","prepublishOnly":"npm test"},"_npmUser":{"name":"bybrave","email":"opmybrave@gmail.com"},"repository":{"url":"git+https://github.com/bybraveHQ/jszip2.git","type":"git"},"_npmVersion":"10.8.2","description":"Maintained fork of JSZip — create, read and edit .zip files with JavaScript. Modern runtime: native Promises, pako 2, ESM, no setimmediate/lie/readable-stream.","directories":{},"_nodeVersion":"20.19.6","dependencies":{"pako":"^2.1.0"},"_hasShrinkwrap":false,"devDependencies":{"qunit":"^2.21.0","esbuild":"^0.25.0","typescript":"^5.5.0","@types/node":"^20.14.0"},"_npmOperationalInternal":{"tmp":"tmp/jszip2_4.2.0_1783213041353_0.7451482654024435","host":"s3://npm-registry-packages-npm-production"}},"4.3.0":{"name":"@bybrave/jszip2","version":"4.3.0","description":"Maintained fork of JSZip — create, read and edit .zip files with JavaScript. Modern runtime: native Promises, pako 2, ESM, no setimmediate/lie/readable-stream.","author":{"name":"bybrave","url":"https://github.com/bybraveHQ"},"contributors":[{"name":"Stuart Knightley","url":"author of the original JSZip"},{"name":"David Duponchel"},{"name":"Franz Buchinger"},{"name":"António Afonso"},{"name":"yiminghe"}],"main":"./lib/index.js","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","import":"./index.mjs","require":"./lib/index.js"},"./package.json":"./package.json","./dist/*":"./dist/*"},"browser":{"stream":"./lib/stream-browser-stub.js"},"scripts":{"build":"esbuild lib/index.js --bundle --format=iife --global-name=JSZip --alias:stream=./lib/stream-browser-stub.js --outfile=dist/jszip.js && esbuild lib/index.js --bundle --minify --format=iife --global-name=JSZip --alias:stream=./lib/stream-browser-stub.js --outfile=dist/jszip.min.js","test":"npm run build && npm run test-node && npm run test-dist && npm run test-types","test-node":"qunit --require ./test/helpers/test-utils.js --require ./test/helpers/node-test-utils.js test/asserts/","test-dist":"node test/dist-smoke.js","test-types":"tsc","prepublishOnly":"npm test"},"repository":{"type":"git","url":"git+https://github.com/bybraveHQ/jszip2.git"},"bugs":{"url":"https://github.com/bybraveHQ/jszip2/issues"},"homepage":"https://github.com/bybraveHQ/jszip2#readme","keywords":["zip","unzip","archive","deflate","inflate","compression","jszip","esm","typescript"],"license":"(MIT OR GPL-3.0-or-later)","funding":"https://ko-fi.com/bybrave","engines":{"node":">=18"},"dependencies":{"pako":"^2.1.0"},"devDependencies":{"@types/node":"^20.14.0","esbuild":"^0.25.0","qunit":"^2.21.0","typescript":"^5.5.0"},"_id":"@bybrave/jszip2@4.3.0","gitHead":"ed16902e41c53baa95b027d6289e5d3d30c40b8a","_nodeVersion":"20.19.6","_npmVersion":"10.8.2","dist":{"integrity":"sha512-Lfgzk++GPZ+0jyY1mUE3BCIids5PZNOae9qi0MbWd/l3KySfOE1owMbR2wl8jqZPuT13ZzTH2JbxYzZsKXgJyQ==","shasum":"31c6b74b010305a8b0e1e975be148d16b9404804","tarball":"https://registry.npmjs.org/@bybrave/jszip2/-/jszip2-4.3.0.tgz","fileCount":46,"unpackedSize":592829,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDrD76d9ThLgodW6zgYVcXmocmLQtUFu7Ls9o1oNzVfKQIgIkx0FK9gz7Gf1eIHbvyRCaUZ5jxz9a2PYsYNKEFm1I4="}]},"_npmUser":{"name":"bybrave","email":"opmybrave@gmail.com"},"directories":{},"maintainers":[{"name":"bybrave","email":"opmybrave@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/jszip2_4.3.0_1783214746505_0.0644436942245632"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-04T23:33:46.160Z","modified":"2026-07-05T01:25:46.766Z","4.0.0":"2026-07-04T23:33:46.536Z","4.1.0":"2026-07-05T00:28:06.840Z","4.2.0":"2026-07-05T00:57:21.498Z","4.3.0":"2026-07-05T01:25:46.672Z"},"bugs":{"url":"https://github.com/bybraveHQ/jszip2/issues"},"author":{"name":"bybrave","url":"https://github.com/bybraveHQ"},"license":"(MIT OR GPL-3.0-or-later)","homepage":"https://github.com/bybraveHQ/jszip2#readme","keywords":["zip","unzip","archive","deflate","inflate","compression","jszip","esm","typescript"],"repository":{"type":"git","url":"git+https://github.com/bybraveHQ/jszip2.git"},"description":"Maintained fork of JSZip — create, read and edit .zip files with JavaScript. Modern runtime: native Promises, pako 2, ESM, no setimmediate/lie/readable-stream.","contributors":[{"name":"Stuart Knightley","url":"author of the original JSZip"},{"name":"David Duponchel"},{"name":"Franz Buchinger"},{"name":"António Afonso"},{"name":"yiminghe"}],"maintainers":[{"name":"bybrave","email":"opmybrave@gmail.com"}],"readme":"# @bybrave/jszip2\n\n[![CI](https://github.com/bybraveHQ/jszip2/actions/workflows/ci.yml/badge.svg)](https://github.com/bybraveHQ/jszip2/actions)\n[![npm](https://img.shields.io/npm/v/%40bybrave%2Fjszip2)](https://www.npmjs.com/package/@bybrave/jszip2)\n\nMaintained fork of [JSZip](https://github.com/Stuk/jszip) — create, read and edit `.zip` files with JavaScript, in Node.js and the browser.\n\nThe original has ~187M downloads/month and no release since 2022 (400+ open issues and PRs). This fork keeps the exact same API and modernizes everything underneath it.\n\n```bash\nnpm install @bybrave/jszip2\n```\n\n```js\n// CommonJS — drop-in\nconst JSZip = require(\"@bybrave/jszip2\");\n\n// ESM — finally (top ask of the original backlog)\nimport JSZip from \"@bybrave/jszip2\";\n\nconst zip = new JSZip();\nzip.file(\"hello.txt\", \"Hello World\\n\");\nzip.folder(\"images\").file(\"smile.gif\", imgData, { base64: true });\nconst blob = await zip.generateAsync({ type: \"blob\" });\n\nconst archive = await JSZip.loadAsync(data);\nconst text = await archive.file(\"hello.txt\").async(\"string\");\n```\n\n## ZIP64 (new in 4.3)\n\nArchives and files over 4 GB, and over 65 535 entries ([#580](https://github.com/Stuk/jszip/issues/580), [#739](https://github.com/Stuk/jszip/issues/739) upstream). No configuration needed — ZIP64 kicks in automatically when a size, an offset or the entries count overflows the classic format:\n\n```js\nzip.file(\"huge.bin\", hugeStream);\nconst out = zip.generateNodeStream(); // > 4 GB? ZIP64 structures appear by themselves\n```\n\nThe single case needing a flag: `streamFiles: true` with files over 4 GB (sizes are unknown when each entry starts, so the format can't be decided on the fly) — pass `zip64: true`, a descriptive error will remind you otherwise. Reading ZIP64 always worked, but sizes beyond 4 GB used to be truncated by 32-bit arithmetic — now exact up to 2^53 − 1 bytes.\n\n## Web Streams (new in 4.2)\n\nWHATWG `ReadableStream` in and out ([#345](https://github.com/Stuk/jszip/issues/345), [#830](https://github.com/Stuk/jszip/issues/830) upstream) — works in browsers, Web Workers and Node.js ≥ 18:\n\n```js\n// in: zip a fetch response without buffering it first\nconst response = await fetch(url);\nzip.file(\"data.json\", response.body);\n\n// in: load a zip straight from fetch\nconst archive = await JSZip.loadAsync((await fetch(zipUrl)).body);\n\n// out: stream the generated zip — backpressure included\nreturn new Response(zip.generateWebStream({ compression: \"DEFLATE\" }), {\n  headers: { \"Content-Type\": \"application/zip\" }\n});\n\n// out: stream one file's content\nawait archive.file(\"video.mp4\").webStream().pipeTo(destination);\n```\n\n`generateWebStream` / `webStream` mirror `generateNodeStream` / `nodeStream`; feature detection via `JSZip.support.webstream`.\n\n## Sync API (new in 4.1)\n\nThe most-requested feature of the original ([#281](https://github.com/Stuk/jszip/issues/281), open since 2016): zip and unzip without promises — in CLI scripts, Web Workers, getters, anywhere async doesn't fit.\n\n```js\nconst zip = new JSZip();\nzip.file(\"hello.txt\", \"Hello World\\n\");\nconst buffer = zip.generateSync({ type: \"nodebuffer\", compression: \"DEFLATE\" });\n\nconst archive = JSZip.loadSync(buffer);\nconst text = archive.file(\"hello.txt\").sync(\"string\");\n```\n\nEvery `async` entry point has a sync mirror:\n\n| Async | Sync |\n|---|---|\n| `zip.generateAsync(options)` | `zip.generateSync(options)` |\n| `JSZip.loadAsync(data, options)` / `zip.loadAsync(...)` | `JSZip.loadSync(data, options)` / `zip.loadSync(...)` |\n| `file.async(type)` | `file.sync(type)` |\n\nSame options, same output types (including `blob` and `base64`), byte-identical results. The one rule: the data must actually be available synchronously. A file added as a `Blob`, a `Promise` or a Node.js stream can't be read without awaiting it, so the sync methods throw a descriptive error naming the file — everything else, including zips loaded with `loadAsync`, works. The async API is unchanged and still preferred for big archives on the main thread: sync calls block until the archive is done.\n\n## What's different from jszip 3.10.1\n\n| Change | Original issue |\n|---|---|\n| ESM entry (`import JSZip from \"@bybrave/jszip2\"`) + `exports` map with types | [#867](https://github.com/Stuk/jszip/issues/867), [#717](https://github.com/Stuk/jszip/issues/717) |\n| `setimmediate` polyfill removed (native `setImmediate` / `MessageChannel`) — fixes crashes in sandboxed environments, Tampermonkey, Edge | [#909](https://github.com/Stuk/jszip/issues/909), [#934](https://github.com/Stuk/jszip/issues/934), [#596](https://github.com/Stuk/jszip/issues/596) |\n| `pako` upgraded 1.x → 2.x (faster, actively maintained compression) | [#720](https://github.com/Stuk/jszip/issues/720) |\n| `lie` Promise polyfill removed — native Promises everywhere | — |\n| `readable-stream` dependency removed — Node's own `stream` in Node, clean stub in browser bundles (no more `Cannot find module 'stream'` with webpack 5 / modern bundlers) | [#704](https://github.com/Stuk/jszip/issues/704) |\n| `Blob`/`File` input now works in Node.js (read via `blob.arrayBuffer()` instead of the browser-only `FileReader`) | — |\n| Bundlers consume the real source, not a pre-built UMD blob (the original silently substituted `dist/jszip.min.js` via the `browser` field) | — |\n| Build: esbuild instead of grunt + browserify; CI on Node 18/20/22 | — |\n| **4.1**: synchronous API — `generateSync`, `loadSync`, `file.sync(type)` | [#281](https://github.com/Stuk/jszip/issues/281) |\n| **4.2**: Web Streams — `ReadableStream` in (`file`, `loadAsync`) and out (`generateWebStream`, `file.webStream`) | [#345](https://github.com/Stuk/jszip/issues/345), [#830](https://github.com/Stuk/jszip/issues/830) |\n| **4.3**: ZIP64 — writing archives/files over 4 GB and over 65 535 entries (auto), exact 64-bit reads | [#580](https://github.com/Stuk/jszip/issues/580), [#739](https://github.com/Stuk/jszip/issues/739) |\n\nDependency count: 4 → 1 (`pako`).\n\n## Compatibility\n\n- **API is unchanged** — this is a drop-in replacement for `jszip`. The full API documentation of the original applies: [stuk.github.io/jszip](https://stuk.github.io/jszip/) (a copy lives in [`documentation/`](./documentation)).\n- Node.js ≥ 18; modern browsers (no IE — it needed the removed polyfills).\n- `JSZip.external.Promise` is still overridable if you need a custom Promise implementation.\n- Browser `<script>` builds: `dist/jszip.js` and `dist/jszip.min.js` (global `JSZip`), shipped in the npm package.\n\n## Support\n\nIf this package saves you time, you can support maintenance:\n\n[![Ko-fi](https://img.shields.io/badge/Ko--fi-buy%20me%20a%20coffee-FF5E5B?logo=kofi&logoColor=white)](https://ko-fi.com/bybrave)\n[![Bitcoin](https://img.shields.io/badge/Bitcoin-BTC-F7931A?logo=bitcoin&logoColor=white)](#support)\n\nBitcoin (BTC): `bc1q37557q5jpeaxqydzwvf3jgj7zhnfpn2td3q40q`\n\n## Credits & license\n\nDual-licensed MIT or GPLv3, same as the original — see [LICENSE.markdown](./LICENSE.markdown).\nBased on [JSZip](https://github.com/Stuk/jszip) by Stuart Knightley, David Duponchel, Franz Buchinger and António Afonso.\n","readmeFilename":"README.md"}