You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: rename 0.4.0 -> 0.5.0 across all docs after release-it minor bump
release-it auto-incremented 0.4.0 -> 0.5.0 because the
@release-it/conventional-changelog plugin saw `feat:` commits in the
range since v0.3.1 and inferred a minor bump. The published artefact
on npm is therefore `react-native-nitro-unzip@0.5.0` (latest), not
0.4.0. All CHANGELOG, README, docusaurus, and TypeScript-spec docstring
references that named 0.4.0 are renamed accordingly so the docs match
the npm/git-tag reality.
Anchor links (`#transactional-behaviour-040`, `#whats-new-in-040`)
updated to the new heading slugs.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ High-performance ZIP operations for React Native, powered by [Nitro Modules](htt
13
13
14
14
## Features
15
15
16
-
-**Fast** — ~9,000+ files/sec on Android (post-NIO / `java.util.zip.ZipFile` migration in 0.4.0) and ~10,000+ files/sec on iOS (`O_NOFOLLOW` streaming writes), measured on nested 1000-entry archives on dev hardware
16
+
-**Fast** — ~9,000+ files/sec on Android (post-NIO / `java.util.zip.ZipFile` migration in 0.5.0) and ~10,000+ files/sec on iOS (`O_NOFOLLOW` streaming writes), measured on nested 1000-entry archives on dev hardware
17
17
-**Zero bridge overhead** — progress callbacks via JSI, no serialization
18
18
-**Cancellable** — mid-write cancellation on Android (`Thread.interrupt()` + interruptible NIO channels), per-entry cancellation on iOS (Swift Concurrency)
19
19
-**AES-256 password support** — encrypted archives, zip & unzip, on both platforms
Copy file name to clipboardExpand all lines: docs/docs/getting-started.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ react-native-nitro-unzip provides high-performance ZIP extraction and compressio
13
13
| React Native | 0.75+ |
14
14
| Nitro Modules | 0.35+ |
15
15
| iOS | 15.5+ |
16
-
| Android SDK |**26+** (bumped in 0.4.0 — `java.nio.file` requires API 26) |
16
+
| Android SDK |**26+** (bumped in 0.5.0 — `java.nio.file` requires API 26) |
17
17
| Java (Android) | 17 |
18
18
19
19
:::info New Architecture Required
@@ -39,7 +39,7 @@ The underlying `SSZipArchive` dependency requires **iOS 15.5+**. Set your deploy
39
39
40
40
### Android
41
41
42
-
No additional setup needed — the library auto-links with React Native. Your app must be built with **Java 17** (the RN 0.73+ default) and target **`minSdkVersion 26`** or higher (bumped from 21 in 0.4.0 because the extraction path uses `java.nio.file.Path` / `Files` / `FileChannel`, which require API 26).
42
+
No additional setup needed — the library auto-links with React Native. Your app must be built with **Java 17** (the RN 0.73+ default) and target **`minSdkVersion 26`** or higher (bumped from 21 in 0.5.0 because the extraction path uses `java.nio.file.Path` / `Files` / `FileChannel`, which require API 26).
Measured on dev hardware. Reflects realistic workloads (tile sets, asset bundles, SDK archives) — files spread across deep directory trees with many shared parent prefixes, not a flat archive.
14
14
@@ -17,7 +17,7 @@ Measured on dev hardware. Reflects realistic workloads (tile sets, asset bundles
17
17
| Android (post-NIO) |~8,300 files/sec |~120 ms |
18
18
| iOS (`O_NOFOLLOW` streaming write) |~10,000+ files/sec |~100 ms |
19
19
20
-
The Android number is a **20× improvement** over the 0.3.x `ZipInputStream`-based path (~474 files/sec). The full 0.4.0 migration ([details](#whats-new-in-040)) is what made it possible.
20
+
The Android number is a **20× improvement** over the 0.3.x `ZipInputStream`-based path (~474 files/sec). The full 0.5.0 migration ([details](#whats-new-in-050)) is what made it possible.
21
21
22
22
## Why It's Fast
23
23
@@ -27,7 +27,7 @@ The Android number is a **20× improvement** over the 0.3.x `ZipInputStream`-bas
27
27
-**POSIX `open(O_NOFOLLOW | O_CREAT | O_WRONLY | O_TRUNC | O_CLOEXEC)`** for writes — eliminates the per-file `resolvingSymlinksInPath()` syscall the URL-based path would otherwise pay on every entry. Critical for nested archives where every leaf would otherwise re-stat its ancestors.
28
28
-[**SSZipArchive**](https://github.com/ZipArchive/ZipArchive) is retained ONLY for password-protected paths (read + write), since ZIPFoundation has no AES support.
29
29
30
-
### Android (0.4.0 NIO migration)
30
+
### Android (0.5.0 NIO migration)
31
31
32
32
-**`java.util.zip.ZipFile`** for random-access central-directory reads — no inflate to enumerate headers, no TOCTOU window between validate and extract passes (single FD).
@@ -41,9 +41,9 @@ The Android number is a **20× improvement** over the 0.3.x `ZipInputStream`-bas
41
41
-**Background execution** — extraction runs on native background threads / Swift `Task`s, keeping the UI responsive. iOS also registers a `UIApplication.beginBackgroundTask` so the OS doesn't suspend the app mid-archive.
42
42
-**Transactional**: a mid-stream failure rolls every created file and intermediate directory back, so the destination is never left in a partial-but-looks-complete state.
43
43
44
-
## What's new in 0.4.0
44
+
## What's new in 0.5.0
45
45
46
-
| Subsystem | 0.3.x | 0.4.0 |
46
+
| Subsystem | 0.3.x | 0.5.0 |
47
47
|---|---|---|
48
48
| Android engine |`ZipInputStream` (streaming-decode) |`java.util.zip.ZipFile` (random-access central directory) |
Copy file name to clipboardExpand all lines: docs/docs/usage/cancellation.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ task.cancel();
22
22
23
23
Cancellation is **synchronous** — it happens immediately via JSI with no bridge round-trip. The `await()` promise will reject when a task is cancelled.
24
24
25
-
**0.4.0 — mid-write cancellation actually fires.** On Android, `cancel()` triggers `Thread.interrupt()` via `runInterruptible`, which unsticks an in-flight `FileChannel` write on the next syscall (not the next chunk boundary). On iOS, `Task.checkCancellation()` runs between every entry, so a cancel between entries halts immediately. In both cases the partial state is then rolled back before the promise rejects — see [Transactional behaviour](./extraction#transactional-behaviour-040).
25
+
**0.5.0 — mid-write cancellation actually fires.** On Android, `cancel()` triggers `Thread.interrupt()` via `runInterruptible`, which unsticks an in-flight `FileChannel` write on the next syscall (not the next chunk boundary). On iOS, `Task.checkCancellation()` runs between every entry, so a cancel between entries halts immediately. In both cases the partial state is then rolled back before the promise rejects — see [Transactional behaviour](./extraction#transactional-behaviour-050).
26
26
27
27
**`cancel()` before `await()` is a no-op.** If you cancel a task you haven't `await()`'d yet, the next `await()` proceeds normally. This avoids the 0.3-era footgun where a pre-await cancel permanently poisoned the task.
Copy file name to clipboardExpand all lines: docs/docs/usage/compression.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,6 @@ if (result.success) {
67
67
|`averageSpeed`|`number`| Average files per second |
68
68
|`totalBytes`|`number`| Total bytes written to the zip file |
69
69
70
-
:::note Empty directory preservation (0.4.0+)
70
+
:::note Empty directory preservation (0.5.0+)
71
71
Empty placeholder directories in the source (e.g. `cache/`, `logs/today/`) are preserved as trailing-slash entries in the archive, so a zip → unzip round trip keeps them. They do **not** count toward `compressedFiles` / `totalFiles` — those fields use the same files-only semantics as the unzip-side `extractedFiles` / `totalFiles`, so cross-platform round-trip counts match.
`content://` URIs (returned by Android's Storage Access Framework) are **not** accepted — resolve them to a filesystem path first.
101
101
102
-
## Transactional behaviour (0.4.0+)
102
+
## Transactional behaviour (0.5.0+)
103
103
104
104
Extraction is **all-or-nothing**. If anything fails after the first byte is written — a corrupt archive entry, the disk filling up, a write error, or cancellation between entries — the library rolls back every file AND every intermediate directory it created before re-throwing.
| Android |**AES-256** via [zip4j](https://github.com/srikanth-lingala/zip4j)| AES-256 + traditional PKWARE (zip4j) |
47
-
| iOS (0.4.0+) |**AES-256** via [SSZipArchive](https://github.com/ZipArchive/ZipArchive)'s `aes: true` overload | AES-256 + traditional PKWARE (SSZipArchive) |
47
+
| iOS (0.5.0+) |**AES-256** via [SSZipArchive](https://github.com/ZipArchive/ZipArchive)'s `aes: true` overload | AES-256 + traditional PKWARE (SSZipArchive) |
48
48
49
-
:::tip 0.4.0 — iOS now writes AES-256
50
-
0.3.x used SSZipArchive's `withPassword:` overload on iOS, which writes **traditional PKWARE encryption** — broken and crackable in minutes with modern tools. 0.4.0 switches to the `aes: true` overload, matching Android's AES-256 strength. Cross-platform password archives now have equivalent crypto strength.
49
+
:::tip 0.5.0 — iOS now writes AES-256
50
+
0.3.x used SSZipArchive's `withPassword:` overload on iOS, which writes **traditional PKWARE encryption** — broken and crackable in minutes with modern tools. 0.5.0 switches to the `aes: true` overload, matching Android's AES-256 strength. Cross-platform password archives now have equivalent crypto strength.
0 commit comments