diff --git a/CHANGELOG.md b/CHANGELOG.md index e2d162c..91ab2de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,14 +2,16 @@ ## [Unreleased] +## [9.5.0] - 2026-09-04 + ### Added -- CI + npm publish gate: non-password zip fixtures must extract with Node `unzipper` and Java `ZipInputStream`; WinZip-AES extra field `0x9901` fails the job (RNZA-16, #333 / #323 class) -- `AbortSignal` on `zip` / `zipWithPassword` / `unzip` / `unzipWithPassword` / `unzipAssets` via an options object (`{ signal, compressionLevel?, entries? }`) -- `ZipError` with a stable `.code` (`ERR_CANCELLED`, `ERR_INVALID_ARGS`, …) — implemented as a factory so Metro does not need `@babel/runtime` helpers when bundling the library -- `package.json` `"types": "index.d.ts"` so TypeScript and reactnative.directory `hasTypes` resolve +- CI + npm publish gate: non-password zip fixtures must extract with Node `unzipper` and Java `ZipInputStream`; WinZip-AES extra field `0x9901` fails the job (#383, RNZA-16, #333 / #323 class) +- `AbortSignal` on `zip` / `zipWithPassword` / `unzip` / `unzipWithPassword` / `unzipAssets` via an options object (`{ signal, compressionLevel?, entries? }`) (#383) +- `ZipError` with a stable `.code` (`ERR_CANCELLED`, `ERR_INVALID_ARGS`, …) — implemented as a factory so Metro does not need `@babel/runtime` helpers when bundling the library (#383) +- `package.json` `"types": "index.d.ts"` so TypeScript and reactnative.directory `hasTypes` resolve (#383) ### Changed -- SECURITY.md: 7.x Zip Slip / symlink backport is **7.1.2** (`maintenance-7`), not 7.1.1 +- SECURITY.md: 7.x Zip Slip / symlink backport is **7.1.2** (`maintenance-7`), not 7.1.1 (#383) ## [9.4.1] - 2026-08-29 diff --git a/MIGRATION.md b/MIGRATION.md index 76e199d..1016651 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -21,6 +21,19 @@ Working examples: [playground-expo](./playground-expo/) and [playground-rn](./pl Stay on v7 only for React Native **< 0.70**. On 0.70+, New Architecture is recommended. If the native module fails to load on an old-architecture 0.70+ app, fall back to v7 until Interop is confirmed. +## v9.5 + +Additive JavaScript APIs. Existing positional `zip` / `unzip` calls are unchanged. + +- **`AbortSignal`:** pass `{ signal }` as the last argument to `zip` / `zipWithPassword` / `unzip` / `unzipWithPassword` / `unzipAssets` to cancel. Rejects with `ZipError` code `ERR_CANCELLED`. +- **`ZipError`:** factory (not an ES `class`) with a stable `.code`. Check `error.code`; do not use `instanceof ZipError`. +- **TypeScript:** `package.json` `"types"` points at `index.d.ts`. + +```bash +npm install react-native-zip-archive@^9.5.0 +cd ios && pod install && cd .. +``` + ## v9.2 / v9.3 / v9.4 These releases add APIs and align iOS with Android. Most JavaScript call sites keep working; the notes below are the native/default changes that existing apps may observe. diff --git a/package.json b/package.json index caa6e0d..4618e01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-zip-archive", - "version": "9.4.1", + "version": "9.5.0", "description": "Zip and unzip files in React Native and Expo (iOS & Android)", "main": "index.js", "types": "index.d.ts",