@yjdyamv/rar-rs 0.15.3 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,183 +1,210 @@
1
- # rar-rs
2
-
3
- > Last verified: 2026-11-18 @ `73d84e4`; implementation details are
4
- > authoritative in the source.
5
-
6
- **Pure-Rust RAR archive library and command-line tools.** Create, read, extract,
7
- and modify RAR5/RAR7 archives, read legacy RAR 1.3–4.x archives, and create RAR
8
- 1.3 / 1.4 / 1.5 / 2.x / 4.x archives with native Rust codecs. No external
9
- RAR/UNRAR binary is required at runtime.
10
-
11
- ## Features
12
-
13
- - **Formats** — RAR5 (v50) and RAR7 (v70) create / read / write; RAR 1.3–4.x
14
- read / extract; RAR 1.3 / 1.4 / 1.5 / 2.x / 4.x creation (`-ma13` / `-ma14` /
15
- `-ma15` / `-ma2` / `-ma4`), including legacy codecs, solid chains and volumes.
16
- - **Compression** — native LZSS+Huffman and PPMd, levels 0–5, dictionary
17
- controls, delta/x86 filters, solid archives, parallel compression,
18
- verification and extraction. The multi-threaded ladder runs the same walk
19
- parser at every level. The fast rungs use the candidate structure the official
20
- does — a position-indexed table filled in one sequential pass, with no
21
- counting sort — while the ratio rungs use a sorted index whose buckets read
22
- contiguously, which is what a deep candidate walk needs. Every level runs
23
- within 1.1x of WinRAR 7.23's time for the same level on a 13.9 MB binary, 9.2
24
- MB of markdown and 5.5 MB of Rust source, except `-m1` on the large binary
25
- (1.5x); `-m1`/`-m2` pack smaller than its same level and `-m3`..`-m5` come
26
- within 3.2 pp (see `PLAN.md`).
27
- - **Archive operations** — append, update, delete, rename, freshen, move, lock,
28
- comments, SFX handling, string search, symlinks and hardlinks.
29
- - **Encryption** — file-level AES-256 with a chained HMAC-SHA256 KDF, plus
30
- header-level encryption (`-hp`).
31
- - **Recovery** — inline recovery records and `.rev` recovery volumes (RAR5 REV5
32
- and legacy RAR 1.5–4.x), with bounded-memory repair paths. With `-v`, every
33
- data volume carries its own inline record protecting that volume (WinRAR's
34
- shape), and `-rv` recovery volumes may be combined with it; editing a
35
- protected set rebuilds those records instead of dropping them. When an archive
36
- has no record at all, `rar r` reconstructs `rebuilt.<name>` from the members
37
- that still decode and verify, resyncing past corrupt RAR5/RAR4 headers
38
- (plaintext headers) and exiting 3 (RAR5) or 0 (legacy) when a header was lost,
39
- like WinRAR.
40
- - **Integrity** — CRC32, BLAKE2sp (`-htb`) and encrypted-data MACs.
41
- - **Safe extraction** — path containment plus WinRAR-style name sanitization
42
- (Windows reserved names, trailing dots/spaces, `:`; `-oni` keeps device
43
- names), size limits (opt-in `--max-unpacked` / `--max-total-unpacked`), atomic
44
- staging, cooperative cancellation.
45
- - **Bindings** — Node.js native and WASI bindings under `crates/rar-napi`.
46
-
47
- Behavior is validated against WinRAR/UnRAR; current status and next steps live
48
- in [PLAN.md](PLAN.md), and the rules that must not be re-litigated in
49
- [docs/PITFALLS.md](docs/PITFALLS.md).
50
-
51
- ## Build
52
-
53
- Rust 1.95 or newer (`rust-version` in `Cargo.toml`, quoted from what the tree
54
- actually compiles with; the release build and the cross targets use current
55
- stable). The floor is not cosmetic — `AtomicU32::try_update` in the archive
56
- reader stabilized in 1.95 — and CI compiles it with exactly that toolchain, so
57
- the number cannot rot.
58
-
59
- ```bash
60
- cargo build --release --locked
61
- # Binaries: target/release/rar and target/release/unrar
62
- ```
1
+ # rar-rs for Node.js
63
2
 
64
- On Windows the binding crate (`crates/rar-napi`) needs an **MSVC** target — Node
65
- is MSVC-built, and `napi-build`'s `windows-gnu` path wants a `libnode.dll` that
66
- no Node distribution ships — so a host whose rustup default is GNU should build
67
- it as `cargo build -p rar-rs-napi --target x86_64-pc-windows-msvc`, or produce
68
- the `.node` with `npx napi build --platform` (see
69
- [docs/testing.md](docs/testing.md)).
3
+ [`@yjdyamv/rar-rs`](https://www.npmjs.com/package/@yjdyamv/rar-rs) is the
4
+ Node.js binding of **rar-rs**, a pure-Rust RAR toolkit: it creates, reads,
5
+ extracts, tests, modifies and repairs **RAR5/RAR7** archives and legacy **RAR
6
+ 1.3–4.x** archives with **no external `rar`/`unrar` binary**.
70
7
 
71
- ## Quick start
8
+ It is a [napi-rs](https://napi.rs) addon: a native `.node` on every supported
9
+ platform, plus a WebAssembly (WASI) build for bundlers.
72
10
 
73
- ### Command line
11
+ This README covers the package and how to build it. The full library/CLI
12
+ documentation is the repository [README](../../README.md).
74
13
 
75
- ```bash
76
- # Create an archive (-m0..-m5; -ma5 default, -ma7 forces RAR7)
77
- rar a -m5 backup.rar src/ notes.txt
14
+ ## Install
78
15
 
79
- # List / extract
80
- rar l backup.rar
81
- unrar x --dest out/ backup.rar
16
+ ```sh
17
+ npm install @yjdyamv/rar-rs
18
+ ```
82
19
 
83
- # Delete a member without rebuilding
84
- rar d backup.rar old.log
20
+ - Node.js **>= 18**.
21
+ - One package ships every platform binary (~14 MB) plus the WASI build. The
22
+ generated loader picks the matching `.node`; bundlers reach the `.wasm`
23
+ through `browser.js`.
24
+
25
+ ## Quick start
85
26
 
86
- # Encrypt (file-level, or -hp for header encryption)
87
- rar a -pSecret secret.rar docs/
27
+ ```js
28
+ import {
29
+ createArchive, listEntries, listEntriesDetailed, readMember,
30
+ extractMember, extractArchive, testArchive,
31
+ } from '@yjdyamv/rar-rs'
32
+ // CommonJS: const rar = require('@yjdyamv/rar-rs')
33
+
34
+ // Create an archive from files on disk and from in-memory bytes.
35
+ const { files } = await createArchive({
36
+ outPath: 'out.rar',
37
+ level: 5,
38
+ entries: [
39
+ { kind: 'file', path: 'src/index.ts' }, // stored name = basename
40
+ { kind: 'file', path: 'src/lib.ts', name: 'lib/index.ts' },
41
+ { kind: 'bytes', name: 'hello.txt', data: Buffer.from('hi') },
42
+ { kind: 'dir', path: 'empty' },
43
+ ],
44
+ })
45
+
46
+ // List in archive order: bare names, or full metadata.
47
+ const names = await listEntries('out.rar')
48
+ const info = await listEntriesDetailed('out.rar')
49
+
50
+ // Read one member into memory (bounded by the 4 GiB per-member read limit)…
51
+ const buf = await readMember('out.rar', 'hello.txt')
52
+ // …or stream it to disk.
53
+ const written = await extractMember('out.rar', 'hello.txt', 'dest')
54
+
55
+ // Extract everything. With `collectErrors` the call resolves and names the
56
+ // members it could not extract instead of throwing on the first one.
57
+ const report = await extractArchive('out.rar', { destPath: 'dest', collectErrors: true })
58
+ // report.written / .skipped / .refused / .corrected / .failures
59
+
60
+ // Verify integrity: [checked, failed]. A damaged member is reported, not thrown.
61
+ const [checked, failed] = await testArchive('out.rar')
88
62
  ```
89
63
 
90
- Full command and switch reference: [docs/CLI.md](docs/CLI.md).
64
+ ## Errors
91
65
 
92
- ### Library
66
+ Every rejected call throws a `RarError`. Branch on **`error.rarCode`** (the
67
+ stable category) rather than the message, which may change:
93
68
 
94
- ```rust
95
- use rar_rs::{ArchiveReader, ArchiveWriter, CompressionLevel, EntryWriteOptions};
69
+ ```js
70
+ import { isRarError, isCancellationError, RAR_ERROR_CODES } from '@yjdyamv/rar-rs'
96
71
 
97
- // Create — `finish()` consumes the writer and commits the archive
98
- let mut writer = ArchiveWriter::create("backup.rar")?;
99
- let opts = EntryWriteOptions::new().compression_level(CompressionLevel::NORMAL);
100
- writer.add_path("src/", opts)?;
101
- writer.add_bytes("notes.txt", b"Some notes", opts)?;
102
- writer.finish()?;
72
+ try {
73
+ await extractArchive('a.rar', { destPath: 'out', password: 'wrong' })
74
+ } catch (err) {
75
+ if (isCancellationError(err)) return // aborted via AbortSignal
76
+ if (isRarError(err) && err.rarCode === 'wrong_password') return retry()
77
+ if (isRarError(err) && err.rarCode === 'format') return reportCorrupt(err)
78
+ throw err
79
+ }
80
+ ```
103
81
 
104
- // Extract
105
- let mut reader = ArchiveReader::open("backup.rar")?;
106
- reader.extract_all("/tmp/output/")?;
82
+ - `err.rarCode` — one of `RAR_ERROR_CODES`: `'format'`, `'invalid_state'`,
83
+ `'invalid_option'`, `'crc_mismatch'`, `'hash_mismatch'`, `'encrypted'`,
84
+ `'unsupported'`, `'security'`, `'limit_exceeded'`, `'member_not_found'`,
85
+ `'ambiguous_member'`, `'stale_entry_id'`, `'archive_locked'`, `'cancelled'`,
86
+ `'wrong_password'`, `'create'`, `'io'`, `'internal'`.
87
+ - `err.code` — the raw N-API status string (`'InvalidArg'`, `'GenericFailure'`,
88
+ `'Cancelled'`), kept for code that checked it before.
89
+ - `isRarError` works across multiple loaded copies of the module (it checks
90
+ `rarCode`, not only the class).
91
+
92
+ ## Progress and cancellation
93
+
94
+ The long-running calls take an optional `onProgress` callback and an
95
+ `AbortSignal`:
96
+
97
+ ```js
98
+ const ac = new AbortController()
99
+ await createArchive(opts, ({ done, total }) => {
100
+ // `done`/`total` are bytes; `total` is 0 when it cannot be known up front.
101
+ }, ac.signal)
102
+ // elsewhere: ac.abort() — the call rejects with a cancellation error.
103
+ ```
107
104
 
108
- // Read a single member
109
- let mut reader = ArchiveReader::open("backup.rar")?;
110
- let id = reader.unique_entry("notes.txt")?;
111
- let data = reader.read_entry(id)?;
105
+ `extractMember` takes a `signal` but no progress callback (a single member
106
+ either lands or fails); use `extractArchive` when you need progress.
107
+
108
+ ## API
109
+
110
+ | Function | Returns |
111
+ | ------------------------------------------------------------- | ---------------------------------------------------------------------------- |
112
+ | `createArchive(opts, onProgress?, signal?)` | `{ files: string[] }` — every file produced (the whole set for multi-volume) |
113
+ | `appendEntries(opts, onProgress?, signal?)` | `{ files: string[] }` — single-volume archives only |
114
+ | `listEntries(path, password?)` | `string[]` — names in archive order |
115
+ | `listEntriesDetailed(path, password?)` | `EntryInfo[]` |
116
+ | `listEntriesQuick(path, password?)` | `EntryInfo[]` — uses the quick-open record when present |
117
+ | `readMember(path, name, password?)` | `Buffer` — uncompressed bytes of one member |
118
+ | `extractMember(path, name, destDir, password?, signal?)` | `string` — resolved output path |
119
+ | `extractArchive(path, opts, onProgress?, signal?)` | `ExtractionResult` |
120
+ | `testArchive(path, password?)` | `[checked, failed]` |
121
+ | `deleteEntries(path, names, password?, onProgress?, signal?)` | `number` deleted |
122
+ | `renameEntries(path, renames, password?, signal?)` | `number` renamed |
123
+ | `setComment(path, comment?, password?)` | `void` — `null`/`undefined` clears it |
124
+ | `setMemberComment(path, member, comment?, password?)` | `void` — RAR 1.5–4.x only |
125
+ | `setRecovery(path, percent, password?)` | `void` — inline recovery record, 0–100 |
126
+ | `lockArchive(path, password?)` | `void` — refuses further modification |
127
+ | `repairArchive(input, output, onProgress?, signal?)` | `boolean` — `false` when already intact (nothing written) |
128
+ | `rebuildMissingVolumes(firstVolume, onProgress?, signal?)` | `string[]` — `.rev`-rebuilt volumes, in order |
129
+
130
+ ### Entries (`EntryInput`)
131
+
132
+ `kind` selects the shape:
133
+
134
+ - `{ kind: 'file', path, name? }` — `name` defaults to the basename.
135
+ - `{ kind: 'dir', path, name? }` — an explicit directory entry.
136
+ - `{ kind: 'bytes', name, data }` — in-memory payload; `name` is required.
137
+ - `{ kind: 'redirect', name, redirType, target }` — a link entry with no data;
138
+ `redirType` is `1` Unix symlink, `2` Windows symlink, `3` Windows junction,
139
+ `4` hardlink, `5` file copy. RAR5/RAR7 only.
140
+
141
+ ### `CreateArchiveOptions` (highlights)
142
+
143
+ - `outPath`, `entries`, `level` (0–5, default 3).
144
+ - `format` — `'rar5'` (default), `'rar7'`, `'rar4'`, `'rar2'`, `'rar15'`,
145
+ `'rar13'`. RAR5-only options are rejected for the legacy formats, and
146
+ `'rar13'` also rejects header encryption and recovery records/volumes.
147
+ - `password`, `encryptHeaders` — AES-256 file/header encryption.
148
+ - `dictSize` — `-md` style (`'128k'`, `'1m'`, `'6m'`, or bytes).
149
+ - `solid`, `solidReset` — `'continuous'` | `'volume'` | `'extension'`.
150
+ - `volumeSize`, `oldNumbering` — multi-volume sets.
151
+ - `recoveryPercent` | `recoverySectors`, `recoveryVolumeCount` |
152
+ `recoveryVolumesPercent` — inline recovery records and `.rev` volumes.
153
+ - `quickOpen`, `blake2`, `threads`, `maxTotalBytes`.
154
+ - Timestamps: `saveCtime`, `saveAtime`, `saveMtime`, `timePrecisionSeconds`;
155
+ Unix `saveOwner`; Windows `saveStreams` (NTFS alternate data streams).
156
+
157
+ ### `ExtractArchiveOptions` (highlights)
158
+
159
+ - `destPath` (required), `password`.
160
+ - `flat` — basenames only; `autoRename` — `name(1).ext` on collision;
161
+ `skipExisting` / `freshen` / `update` — `-o-` / `-f` / `-u` semantics.
162
+ - Limits: `maxDictSize` (default 4 GiB), `maxMetadataBytes` (default 64 MiB),
163
+ `maxUnpackedBytes`, `maxTotalUnpackedBytes`; `threads`.
164
+ - `keepBroken`, `setCreationTime`, `setAccessTime`.
165
+ - Links/names: `skipLinks`, `allowUnsafeLinks`, `allowIncompatibleNames`,
166
+ `fileVersionSuffix`.
167
+ - `collectErrors` — resolve with failures instead of throwing on the first one
168
+ (cancellation always rejects).
169
+
170
+ ### `EntryInfo`
171
+
172
+ `name`, `size`, `packedSize`, `method`, `isDir`, `mtime`, `crc32`, `ctime`,
173
+ `atime`, `hostOs`, `attributes`, `compVersion`, `version`, `dictSizeBytes`,
174
+ `comment`, `solid`. Sizes and times are JS numbers (bytes / Unix seconds);
175
+ optional fields are `undefined` when the header does not record them.
176
+
177
+ ## Platforms
178
+
179
+ Native targets: `x86_64`/`i686`/`aarch64` Windows (MSVC), `x86_64`/`aarch64`
180
+ macOS, and `x86_64`/`aarch64`/`armv7` Linux (glibc and musl), plus
181
+ `wasm32-wasip1-threads`. The target list in `package.json` (`napi.targets`) is
182
+ the single source of truth.
183
+
184
+ On Windows a **MSVC** target is required (Node is MSVC-built); a GNU-default
185
+ host should build with `--target x86_64-pc-windows-msvc` — see the repository
186
+ README.
187
+
188
+ ## Building from source
189
+
190
+ ```sh
191
+ npm install
192
+ npm run build # native .node + binding.js/binding.d.ts (release)
193
+ npm run build:debug # unoptimized
194
+ npm run build:wasi # the WASI build
195
+ npm test # node --test __test__/*.test.mjs
196
+ npm run typecheck # tsc --noEmit (checks rar-rs.d.ts against the API)
112
197
  ```
113
198
 
114
- Per-archive and per-run tuning follows the same shape: `WriterOptions::threads`
115
- for the writer, `ExtractOptions::threads` for one extraction (both fall back to
116
- `set_compression_threads` / `set_extraction_threads`), `set_cancel_flag` for
117
- cancellation and `set_progress_callback` for progress.
118
-
119
- Runnable examples: `cargo run --example create_and_extract` (the ordinary create
120
- / list / read / extract / verify flow) and `cargo run --example edit_and_repair`
121
- (editing, a recovery record, then repair and rebuild after damage).
122
-
123
- Module map and design invariants: [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).
124
-
125
- ## Limitations
126
-
127
- - **RAR4 editing** repacks solid archives whole (`d` / `u` / `f` / `a`) and
128
- surgically rewrites non-solid ones
129
- ([ADR 0005](docs/adr/0005-rar4-edit-architecture.md)). Deleting from a
130
- multi-volume set repacks the whole set at its original volume size, keeping
131
- the numbering, solid flag, comment and per-volume recovery records. Appending
132
- (`a`/`u`/`f`) takes the same whole-set repack for both RAR4 and RAR5 sets, so
133
- a set grows while keeping its shape, and an explicit recovery-strength change
134
- (`rar rr`, `-rr<N>`) rebuilds every volume's record and the `.rev` volumes;
135
- replacing every member recreates the archive from the surviving metadata
136
- (format, volume size, solid flag, comment, header encryption and recovery
137
- record) instead of collapsing or dropping them, and RAR5 volume-set comments
138
- are editable too. An explicit volume-size change (`-v` on an existing archive)
139
- is still refused.
140
- - **RAR5 header-encrypted (`-hp`) sets**: rename, `ch`, archive comments, delete
141
- (single- and multi-volume) and `-k`/lock all work — rewritten headers are
142
- re-encrypted and the comment rides as a plaintext data area. Inline recovery
143
- records may be combined with `-hp` (they are rebuilt on every edit), and the
144
- lock patch stages a full rewrite with a freshly encrypted main header, so the
145
- flags vint may grow.
146
- - **RAR4 solid chains** stay sequential; only RAR5 gets chunk-level MT.
147
- - Filter types 4–7 are rejected; KDF strength is capped at 2²⁴ iterations
148
- (default 2¹⁵).
149
-
150
- The complete list of deliberate refusals and known interop differences is in
151
- [docs/PITFALLS.md](docs/PITFALLS.md) and [PLAN.md](PLAN.md)「已知小差异」.
152
-
153
- ## Documentation
154
-
155
- Index: **[docs/README.md](docs/README.md)**. Reading order:
156
-
157
- 1. This file — build and quick start.
158
- 2. [docs/CLI.md](docs/CLI.md) — commands, switches and exit codes.
159
- 3. [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) — module map and design notes.
160
- 4. [CONTEXT.md](CONTEXT.md) — domain vocabulary.
161
- 5. [PLAN.md](PLAN.md) — next steps and open issues.
162
- 6. [docs/PITFALLS.md](docs/PITFALLS.md) — long-lived rules; read before changing
163
- behavior.
164
- 7. [docs/FORMAT_RAR5_RAR7.html](docs/FORMAT_RAR5_RAR7.html) — byte-level format
165
- reference.
166
-
167
- ## Legal
168
-
169
- Independent implementation for software conservancy and education, with
170
- separately identified upstream portions. The `license` field (`Cargo.toml`
171
- `[workspace.package]`, inherited by all three crates and mirrored in
172
- `crates/rar-napi/package.json`) stays `BSD-2-Clause`: it states the project's
173
- **own** contributions. Portions derived from other projects keep their own terms
174
- instead of being folded into it — the `rars`-derived files are
175
- `MIT OR Apache-2.0`, the libarchive-derived ones BSD-2-Clause — so a
176
- redistributor has to satisfy both sets. [NOTICE](NOTICE) and
177
- [THIRD_PARTY_LICENSES.md](THIRD_PARTY_LICENSES.md) record which files came from
178
- where; [`LICENSES/`](LICENSES/) holds the standard texts. Full text:
179
- [LICENSE](LICENSE).
180
-
181
- Markdown keeps to 80 columns where it can; conventions in
182
- [docs/README.md](docs/README.md). `dprint` is a local convenience
183
- (`npx dprint@0.50.2 fmt`), not a CI gate.
199
+ `binding.js`/`binding.d.ts`/`*.node` are build artifacts (gitignored);
200
+ `rar-rs.js`/`rar-rs.d.ts` are the hand-written public surface and must not be
201
+ generated. Keep `RarErrorCode` (in `rar-rs.d.ts`), `RAR_ERROR_CODES` (in
202
+ `rar-rs.js`) and `STABLE_CODES` (in `src/error.rs`) in sync.
203
+
204
+ Publishing is done by CI (`scripts/ci/publish-npm.sh`), which assembles this
205
+ package from the release payload and the repository root README.
206
+
207
+ ## License
208
+
209
+ `BSD-2-Clause`. See `LICENSE`, `NOTICE` and `THIRD_PARTY_LICENSES.md` in this
210
+ directory.
package/binding.js CHANGED
@@ -94,8 +94,8 @@ function requireNative() {
94
94
  try {
95
95
  const binding = require('@yjdyamv/rar-rs-android-arm64')
96
96
  const bindingPackageVersion = require('@yjdyamv/rar-rs-android-arm64/package.json').version
97
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
98
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
97
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
98
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
99
99
  }
100
100
  return binding
101
101
  } catch (e) {
@@ -110,8 +110,8 @@ function requireNative() {
110
110
  try {
111
111
  const binding = require('@yjdyamv/rar-rs-android-arm-eabi')
112
112
  const bindingPackageVersion = require('@yjdyamv/rar-rs-android-arm-eabi/package.json').version
113
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
114
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
113
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
114
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
115
115
  }
116
116
  return binding
117
117
  } catch (e) {
@@ -131,8 +131,8 @@ function requireNative() {
131
131
  try {
132
132
  const binding = require('@yjdyamv/rar-rs-win32-x64-gnu')
133
133
  const bindingPackageVersion = require('@yjdyamv/rar-rs-win32-x64-gnu/package.json').version
134
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
135
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
134
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
135
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
136
136
  }
137
137
  return binding
138
138
  } catch (e) {
@@ -147,8 +147,8 @@ function requireNative() {
147
147
  try {
148
148
  const binding = require('@yjdyamv/rar-rs-win32-x64-msvc')
149
149
  const bindingPackageVersion = require('@yjdyamv/rar-rs-win32-x64-msvc/package.json').version
150
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
150
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
152
152
  }
153
153
  return binding
154
154
  } catch (e) {
@@ -164,8 +164,8 @@ function requireNative() {
164
164
  try {
165
165
  const binding = require('@yjdyamv/rar-rs-win32-ia32-msvc')
166
166
  const bindingPackageVersion = require('@yjdyamv/rar-rs-win32-ia32-msvc/package.json').version
167
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
168
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
167
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
168
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
169
169
  }
170
170
  return binding
171
171
  } catch (e) {
@@ -180,8 +180,8 @@ function requireNative() {
180
180
  try {
181
181
  const binding = require('@yjdyamv/rar-rs-win32-arm64-msvc')
182
182
  const bindingPackageVersion = require('@yjdyamv/rar-rs-win32-arm64-msvc/package.json').version
183
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
184
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
183
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
184
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
185
185
  }
186
186
  return binding
187
187
  } catch (e) {
@@ -199,8 +199,8 @@ function requireNative() {
199
199
  try {
200
200
  const binding = require('@yjdyamv/rar-rs-darwin-universal')
201
201
  const bindingPackageVersion = require('@yjdyamv/rar-rs-darwin-universal/package.json').version
202
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
203
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
202
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
203
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
204
204
  }
205
205
  return binding
206
206
  } catch (e) {
@@ -215,8 +215,8 @@ function requireNative() {
215
215
  try {
216
216
  const binding = require('@yjdyamv/rar-rs-darwin-x64')
217
217
  const bindingPackageVersion = require('@yjdyamv/rar-rs-darwin-x64/package.json').version
218
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
219
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
218
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
219
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
220
220
  }
221
221
  return binding
222
222
  } catch (e) {
@@ -231,8 +231,8 @@ function requireNative() {
231
231
  try {
232
232
  const binding = require('@yjdyamv/rar-rs-darwin-arm64')
233
233
  const bindingPackageVersion = require('@yjdyamv/rar-rs-darwin-arm64/package.json').version
234
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
235
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
234
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
235
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
236
236
  }
237
237
  return binding
238
238
  } catch (e) {
@@ -251,8 +251,8 @@ function requireNative() {
251
251
  try {
252
252
  const binding = require('@yjdyamv/rar-rs-freebsd-x64')
253
253
  const bindingPackageVersion = require('@yjdyamv/rar-rs-freebsd-x64/package.json').version
254
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
255
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
254
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
255
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
256
256
  }
257
257
  return binding
258
258
  } catch (e) {
@@ -267,8 +267,8 @@ function requireNative() {
267
267
  try {
268
268
  const binding = require('@yjdyamv/rar-rs-freebsd-arm64')
269
269
  const bindingPackageVersion = require('@yjdyamv/rar-rs-freebsd-arm64/package.json').version
270
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
271
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
270
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
271
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
272
272
  }
273
273
  return binding
274
274
  } catch (e) {
@@ -283,8 +283,8 @@ function requireNative() {
283
283
  try {
284
284
  const binding = require('@yjdyamv/rar-rs-freebsd-ppc64')
285
285
  const bindingPackageVersion = require('@yjdyamv/rar-rs-freebsd-ppc64/package.json').version
286
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
287
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
286
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
287
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
288
288
  }
289
289
  return binding
290
290
  } catch (e) {
@@ -304,8 +304,8 @@ function requireNative() {
304
304
  try {
305
305
  const binding = require('@yjdyamv/rar-rs-linux-x64-musl')
306
306
  const bindingPackageVersion = require('@yjdyamv/rar-rs-linux-x64-musl/package.json').version
307
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
308
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
307
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
308
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
309
309
  }
310
310
  return binding
311
311
  } catch (e) {
@@ -320,8 +320,8 @@ function requireNative() {
320
320
  try {
321
321
  const binding = require('@yjdyamv/rar-rs-linux-x64-gnu')
322
322
  const bindingPackageVersion = require('@yjdyamv/rar-rs-linux-x64-gnu/package.json').version
323
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
324
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
323
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
324
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
325
325
  }
326
326
  return binding
327
327
  } catch (e) {
@@ -338,8 +338,8 @@ function requireNative() {
338
338
  try {
339
339
  const binding = require('@yjdyamv/rar-rs-linux-arm64-musl')
340
340
  const bindingPackageVersion = require('@yjdyamv/rar-rs-linux-arm64-musl/package.json').version
341
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
342
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
341
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
342
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
343
343
  }
344
344
  return binding
345
345
  } catch (e) {
@@ -354,8 +354,8 @@ function requireNative() {
354
354
  try {
355
355
  const binding = require('@yjdyamv/rar-rs-linux-arm64-gnu')
356
356
  const bindingPackageVersion = require('@yjdyamv/rar-rs-linux-arm64-gnu/package.json').version
357
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
358
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
357
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
358
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
359
359
  }
360
360
  return binding
361
361
  } catch (e) {
@@ -372,8 +372,8 @@ function requireNative() {
372
372
  try {
373
373
  const binding = require('@yjdyamv/rar-rs-linux-arm-musleabihf')
374
374
  const bindingPackageVersion = require('@yjdyamv/rar-rs-linux-arm-musleabihf/package.json').version
375
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
376
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
375
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
376
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
377
377
  }
378
378
  return binding
379
379
  } catch (e) {
@@ -388,8 +388,8 @@ function requireNative() {
388
388
  try {
389
389
  const binding = require('@yjdyamv/rar-rs-linux-arm-gnueabihf')
390
390
  const bindingPackageVersion = require('@yjdyamv/rar-rs-linux-arm-gnueabihf/package.json').version
391
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
392
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
391
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
392
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
393
393
  }
394
394
  return binding
395
395
  } catch (e) {
@@ -406,8 +406,8 @@ function requireNative() {
406
406
  try {
407
407
  const binding = require('@yjdyamv/rar-rs-linux-loong64-musl')
408
408
  const bindingPackageVersion = require('@yjdyamv/rar-rs-linux-loong64-musl/package.json').version
409
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
410
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
409
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
410
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
411
411
  }
412
412
  return binding
413
413
  } catch (e) {
@@ -422,8 +422,8 @@ function requireNative() {
422
422
  try {
423
423
  const binding = require('@yjdyamv/rar-rs-linux-loong64-gnu')
424
424
  const bindingPackageVersion = require('@yjdyamv/rar-rs-linux-loong64-gnu/package.json').version
425
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
426
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
425
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
426
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
427
427
  }
428
428
  return binding
429
429
  } catch (e) {
@@ -440,8 +440,8 @@ function requireNative() {
440
440
  try {
441
441
  const binding = require('@yjdyamv/rar-rs-linux-riscv64-musl')
442
442
  const bindingPackageVersion = require('@yjdyamv/rar-rs-linux-riscv64-musl/package.json').version
443
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
443
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
445
445
  }
446
446
  return binding
447
447
  } catch (e) {
@@ -456,8 +456,8 @@ function requireNative() {
456
456
  try {
457
457
  const binding = require('@yjdyamv/rar-rs-linux-riscv64-gnu')
458
458
  const bindingPackageVersion = require('@yjdyamv/rar-rs-linux-riscv64-gnu/package.json').version
459
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
459
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
461
461
  }
462
462
  return binding
463
463
  } catch (e) {
@@ -473,8 +473,8 @@ function requireNative() {
473
473
  try {
474
474
  const binding = require('@yjdyamv/rar-rs-linux-ppc64-gnu')
475
475
  const bindingPackageVersion = require('@yjdyamv/rar-rs-linux-ppc64-gnu/package.json').version
476
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
477
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
476
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
477
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
478
478
  }
479
479
  return binding
480
480
  } catch (e) {
@@ -489,8 +489,8 @@ function requireNative() {
489
489
  try {
490
490
  const binding = require('@yjdyamv/rar-rs-linux-s390x-gnu')
491
491
  const bindingPackageVersion = require('@yjdyamv/rar-rs-linux-s390x-gnu/package.json').version
492
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
493
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
492
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
493
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
494
494
  }
495
495
  return binding
496
496
  } catch (e) {
@@ -509,8 +509,8 @@ function requireNative() {
509
509
  try {
510
510
  const binding = require('@yjdyamv/rar-rs-openharmony-arm64')
511
511
  const bindingPackageVersion = require('@yjdyamv/rar-rs-openharmony-arm64/package.json').version
512
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
513
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
512
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
513
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
514
514
  }
515
515
  return binding
516
516
  } catch (e) {
@@ -525,8 +525,8 @@ function requireNative() {
525
525
  try {
526
526
  const binding = require('@yjdyamv/rar-rs-openharmony-x64')
527
527
  const bindingPackageVersion = require('@yjdyamv/rar-rs-openharmony-x64/package.json').version
528
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
529
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
528
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
529
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
530
530
  }
531
531
  return binding
532
532
  } catch (e) {
@@ -541,8 +541,8 @@ function requireNative() {
541
541
  try {
542
542
  const binding = require('@yjdyamv/rar-rs-openharmony-arm')
543
543
  const bindingPackageVersion = require('@yjdyamv/rar-rs-openharmony-arm/package.json').version
544
- if (bindingPackageVersion !== '0.15.3' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
545
- throw new Error(`Native binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
544
+ if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
545
+ throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
546
546
  }
547
547
  return binding
548
548
  } catch (e) {
@@ -683,8 +683,8 @@ if (!nativeBinding || forceWasi) {
683
683
  if (!candidateFailed) {
684
684
  if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
685
685
  const bindingPackageVersion = require('@yjdyamv/rar-rs-wasm32-wasi/package.json').version
686
- if (bindingPackageVersion !== '0.15.3') {
687
- throw new Error(`WASI binding package version mismatch, expected 0.15.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
686
+ if (bindingPackageVersion !== '0.16.0') {
687
+ throw new Error(`WASI binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
688
688
  }
689
689
  }
690
690
  wasiBinding = require('@yjdyamv/rar-rs-wasm32-wasi')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yjdyamv/rar-rs",
3
- "version": "0.15.3",
3
+ "version": "0.16.0",
4
4
  "description": "Pure-Rust RAR archive toolkit for Node.js — create, read, extract, test, modify and repair RAR5/RAR7 and legacy RAR 1.3–4.x archives, with no external rar/unrar binary",
5
5
  "license": "BSD-2-Clause",
6
6
  "main": "rar-rs.js",
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file