@medicomind/rolldown-compression 2.5.5 → 2.6.1
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/CHANGELOG.md +19 -0
- package/README.md +4 -2
- package/index.js +54 -54
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @medicomind/rolldown-compression
|
|
2
2
|
|
|
3
|
+
## 2.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`808c72d`](https://github.com/Medico-Mind/rolldown-compression/commit/808c72db26ed256b2300b67c46a40a0ff9be1038) Thanks [@Mnwa](https://github.com/Mnwa)! - Bump mbrotli and mzstd
|
|
8
|
+
|
|
9
|
+
## 2.6.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`64f47e1`](https://github.com/Medico-Mind/rolldown-compression/commit/64f47e1c466128aec224d258bf86ed7f0b30d399) Thanks [@Mnwa](https://github.com/Mnwa)! - Migrate zstd encoding to `mzstd`, a pure-Rust zstd encoder.
|
|
14
|
+
|
|
15
|
+
- **Inputs up to 4 MiB compress to the same bytes as before.** `mzstd`'s single-threaded encoder is byte-identical to zstd 1.5.7.
|
|
16
|
+
- **Larger inputs are split across the worker pool**, like brotli's sections: 4 MiB segments, each compressed by its own task into one standard Zstandard frame. The bytes differ from a single stream's, at about +0.05% size at level 19, and as with brotli they do not depend on core count or `concurrency`.
|
|
17
|
+
- **Splitting costs little below level 18 and a lot from level 18 up.** Every segment after the first first re-reads the input before it so its matches can reach back: an eighth of the window up to level 17 (256 KiB at level 3, 1 MiB at level 17), but the whole 8 MiB window for the `btultra` strategies of levels 18–22. A 20 MiB file at level 19 therefore costs about 2.4x the CPU of a single stream and finishes at best about 1.7x sooner. Measured on 18 threads with the benchmark fixtures, the three largest files alone finished 2.5x faster at level 3, 2.75x at level 9 and 1.32x at level 19. On the full 202-file set at level 19, the result ranged from 10% slower to 17% faster across runs, because there the extra work competes with the small files for cores, and peak RSS rose from about 1.9 GB to 2.2–2.8 GB.
|
|
18
|
+
- **The frame header is unchanged**, so the window stays within the 8 MiB limit browsers enforce for `Content-Encoding: zstd` at levels 1–19.
|
|
19
|
+
- **Levels 20–22 are capped at an 8 MiB window.** Their default 32–128 MiB windows made browsers reject any `.zst` file above 8 MiB (RFC 9659 limits the `zstd` content coding to 8 MiB). Files up to 8 MiB are unchanged.
|
|
20
|
+
- **No C toolchain is needed for zstd anymore**, including the wasm32 build. The C `zstd` crate is now a dev-dependency only, used as the reference decoder in round-trip tests.
|
|
21
|
+
|
|
3
22
|
## 2.5.5
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -113,6 +113,8 @@ defineAlgorithm('brotli', { quality: 7, windowBits: 22 })
|
|
|
113
113
|
defineAlgorithm('zstd', { level: 12 })
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
+
zstd levels 20–22 are capped at an 8 MiB window (`windowLog` 23), the most browsers accept for `Content-Encoding: zstd` (RFC 9659); their default 32–128 MiB windows would make Chrome and Firefox reject any file above 8 MiB. Files up to 8 MiB compress exactly as without the cap.
|
|
117
|
+
|
|
116
118
|
`sectionSize` is the target number of bytes in each section when a large input is split across the native worker pool; inputs larger than one section are split. It defaults to two windows (`2^(windowBits + 1)` bytes) — 8 MiB at the default window — because sections much smaller than the window lose too many cross-section matches. The encoder segments between 64 KiB and 16 MiB, and values outside that range are clamped to it.
|
|
117
119
|
|
|
118
120
|
Smaller sections finish large files faster and cost ratio. Measured on 31.8 MiB of real JS at quality 9, `windowBits: 22`, against the 4 MiB point:
|
|
@@ -257,7 +259,7 @@ Results on an Apple M5 Pro (18 cores), Node 26, default `UV_THREADPOOL_SIZE`:
|
|
|
257
259
|
|
|
258
260
|
Reading these numbers honestly:
|
|
259
261
|
|
|
260
|
-
- **gzip** and **zstd** are faster per core ([zlib-rs](https://github.com/trifectatechfoundation/zlib-rs), ~2.4x faster per core than node's bundled zlib in our measurements; libzstd) *and* use every core, while `node:zlib` is capped at `UV_THREADPOOL_SIZE` (default 4) threads. The two >16 MiB bundles temper the headline numbers:
|
|
262
|
+
- **gzip** and **zstd** are faster per core ([zlib-rs](https://github.com/trifectatechfoundation/zlib-rs), ~2.4x faster per core than node's bundled zlib in our measurements; [mzstd](https://github.com/M-Compressors/mzstd), byte-identical to libzstd 1.5.7) *and* use every core, while `node:zlib` is capped at `UV_THREADPOOL_SIZE` (default 4) threads. The two >16 MiB bundles temper the headline numbers: gzip has no sectioned mode, so each giant file occupies a single thread on both sides and that tail runs at the per-core ratio rather than the thread-count ratio.
|
|
261
263
|
- **brotli at quality 11** is the bound on the combined number: the Rust encoder is at per-core parity with node's C brotli (we measured a 1.01 single-thread ratio), so the speedup is parallelism — every core against `UV_THREADPOOL_SIZE` threads across the many small files, plus the split worker pool on the >16 MiB bundles that `node:zlib` has to compress one thread per file.
|
|
262
264
|
> [!WARNING]
|
|
263
265
|
> **The brotli rows below predate the `mbrotli` migration and have not been re-measured.** That release replaced the encoder, and a section now costs more ratio to split than it used to. Expect the brotli numbers to have moved substantially in both wall clock and output size; the gzip and zstd rows are unaffected. Re-run `npm run bench` for current figures.
|
|
@@ -324,7 +326,7 @@ the host, so on an unsupported platform the wasm package must be opted into:
|
|
|
324
326
|
- **No custom JS algorithms**: `algorithms` accepts only the built-in `gzip` / `brotli` / `zstd` (function-form algorithms can't cross the FFI boundary). `defineAlgorithm` returns an opaque object, not a `[name, options]` tuple — treat it as such.
|
|
325
327
|
- **No tarball plugin**: out of scope.
|
|
326
328
|
- **gzip default level is 6** (zlib default), not 9 — measurably faster for a ~1% size difference. Pass `defineAlgorithm('gzip', { level: 9 })` to match the reference.
|
|
327
|
-
- **zstd everywhere**: zstd is compiled in, with no dependency on the Node runtime's zstd support (node >= 22.15).
|
|
329
|
+
- **zstd everywhere**: zstd is compiled in (pure Rust, via `mzstd`), with no dependency on the Node runtime's zstd support (node >= 22.15). Inputs above 4 MiB are split into segments across the worker pool, like brotli's sections.
|
|
328
330
|
- Extra options: `concurrency` (native thread cap), `chunkSize` (memory cap per compression batch), `stream` (on-demand disk-based compression in `writeBundle`) and `enableInWatchMode`.
|
|
329
331
|
|
|
330
332
|
## Implementation decisions
|
package/index.js
CHANGED
|
@@ -89,8 +89,8 @@ function requireNative() {
|
|
|
89
89
|
try {
|
|
90
90
|
const binding = require('@medicomind/rolldown-compression-android-arm64')
|
|
91
91
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-android-arm64/package.json').version
|
|
92
|
-
if (bindingPackageVersion !== '2.
|
|
93
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
92
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
93
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
94
94
|
}
|
|
95
95
|
return binding
|
|
96
96
|
} catch (e) {
|
|
@@ -105,8 +105,8 @@ function requireNative() {
|
|
|
105
105
|
try {
|
|
106
106
|
const binding = require('@medicomind/rolldown-compression-android-arm-eabi')
|
|
107
107
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-android-arm-eabi/package.json').version
|
|
108
|
-
if (bindingPackageVersion !== '2.
|
|
109
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
108
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
109
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
110
110
|
}
|
|
111
111
|
return binding
|
|
112
112
|
} catch (e) {
|
|
@@ -126,8 +126,8 @@ function requireNative() {
|
|
|
126
126
|
try {
|
|
127
127
|
const binding = require('@medicomind/rolldown-compression-win32-x64-gnu')
|
|
128
128
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-win32-x64-gnu/package.json').version
|
|
129
|
-
if (bindingPackageVersion !== '2.
|
|
130
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
129
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
130
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
131
131
|
}
|
|
132
132
|
return binding
|
|
133
133
|
} catch (e) {
|
|
@@ -142,8 +142,8 @@ function requireNative() {
|
|
|
142
142
|
try {
|
|
143
143
|
const binding = require('@medicomind/rolldown-compression-win32-x64-msvc')
|
|
144
144
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-win32-x64-msvc/package.json').version
|
|
145
|
-
if (bindingPackageVersion !== '2.
|
|
146
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
145
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
146
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
147
147
|
}
|
|
148
148
|
return binding
|
|
149
149
|
} catch (e) {
|
|
@@ -159,8 +159,8 @@ function requireNative() {
|
|
|
159
159
|
try {
|
|
160
160
|
const binding = require('@medicomind/rolldown-compression-win32-ia32-msvc')
|
|
161
161
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-win32-ia32-msvc/package.json').version
|
|
162
|
-
if (bindingPackageVersion !== '2.
|
|
163
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
162
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
163
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
164
164
|
}
|
|
165
165
|
return binding
|
|
166
166
|
} catch (e) {
|
|
@@ -175,8 +175,8 @@ function requireNative() {
|
|
|
175
175
|
try {
|
|
176
176
|
const binding = require('@medicomind/rolldown-compression-win32-arm64-msvc')
|
|
177
177
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-win32-arm64-msvc/package.json').version
|
|
178
|
-
if (bindingPackageVersion !== '2.
|
|
179
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
178
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
179
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
180
180
|
}
|
|
181
181
|
return binding
|
|
182
182
|
} catch (e) {
|
|
@@ -194,8 +194,8 @@ function requireNative() {
|
|
|
194
194
|
try {
|
|
195
195
|
const binding = require('@medicomind/rolldown-compression-darwin-universal')
|
|
196
196
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-darwin-universal/package.json').version
|
|
197
|
-
if (bindingPackageVersion !== '2.
|
|
198
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
197
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
198
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
199
199
|
}
|
|
200
200
|
return binding
|
|
201
201
|
} catch (e) {
|
|
@@ -210,8 +210,8 @@ function requireNative() {
|
|
|
210
210
|
try {
|
|
211
211
|
const binding = require('@medicomind/rolldown-compression-darwin-x64')
|
|
212
212
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-darwin-x64/package.json').version
|
|
213
|
-
if (bindingPackageVersion !== '2.
|
|
214
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
213
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
214
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
215
215
|
}
|
|
216
216
|
return binding
|
|
217
217
|
} catch (e) {
|
|
@@ -226,8 +226,8 @@ function requireNative() {
|
|
|
226
226
|
try {
|
|
227
227
|
const binding = require('@medicomind/rolldown-compression-darwin-arm64')
|
|
228
228
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-darwin-arm64/package.json').version
|
|
229
|
-
if (bindingPackageVersion !== '2.
|
|
230
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
229
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
230
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
231
231
|
}
|
|
232
232
|
return binding
|
|
233
233
|
} catch (e) {
|
|
@@ -246,8 +246,8 @@ function requireNative() {
|
|
|
246
246
|
try {
|
|
247
247
|
const binding = require('@medicomind/rolldown-compression-freebsd-x64')
|
|
248
248
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-freebsd-x64/package.json').version
|
|
249
|
-
if (bindingPackageVersion !== '2.
|
|
250
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
249
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
250
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
251
251
|
}
|
|
252
252
|
return binding
|
|
253
253
|
} catch (e) {
|
|
@@ -262,8 +262,8 @@ function requireNative() {
|
|
|
262
262
|
try {
|
|
263
263
|
const binding = require('@medicomind/rolldown-compression-freebsd-arm64')
|
|
264
264
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-freebsd-arm64/package.json').version
|
|
265
|
-
if (bindingPackageVersion !== '2.
|
|
266
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
265
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
266
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
267
267
|
}
|
|
268
268
|
return binding
|
|
269
269
|
} catch (e) {
|
|
@@ -283,8 +283,8 @@ function requireNative() {
|
|
|
283
283
|
try {
|
|
284
284
|
const binding = require('@medicomind/rolldown-compression-linux-x64-musl')
|
|
285
285
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-linux-x64-musl/package.json').version
|
|
286
|
-
if (bindingPackageVersion !== '2.
|
|
287
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
286
|
+
if (bindingPackageVersion !== '2.6.1' && 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 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
288
288
|
}
|
|
289
289
|
return binding
|
|
290
290
|
} catch (e) {
|
|
@@ -299,8 +299,8 @@ function requireNative() {
|
|
|
299
299
|
try {
|
|
300
300
|
const binding = require('@medicomind/rolldown-compression-linux-x64-gnu')
|
|
301
301
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-linux-x64-gnu/package.json').version
|
|
302
|
-
if (bindingPackageVersion !== '2.
|
|
303
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
302
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
303
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
304
304
|
}
|
|
305
305
|
return binding
|
|
306
306
|
} catch (e) {
|
|
@@ -317,8 +317,8 @@ function requireNative() {
|
|
|
317
317
|
try {
|
|
318
318
|
const binding = require('@medicomind/rolldown-compression-linux-arm64-musl')
|
|
319
319
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-linux-arm64-musl/package.json').version
|
|
320
|
-
if (bindingPackageVersion !== '2.
|
|
321
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
320
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
321
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
322
322
|
}
|
|
323
323
|
return binding
|
|
324
324
|
} catch (e) {
|
|
@@ -333,8 +333,8 @@ function requireNative() {
|
|
|
333
333
|
try {
|
|
334
334
|
const binding = require('@medicomind/rolldown-compression-linux-arm64-gnu')
|
|
335
335
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-linux-arm64-gnu/package.json').version
|
|
336
|
-
if (bindingPackageVersion !== '2.
|
|
337
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
336
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
337
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
338
338
|
}
|
|
339
339
|
return binding
|
|
340
340
|
} catch (e) {
|
|
@@ -351,8 +351,8 @@ function requireNative() {
|
|
|
351
351
|
try {
|
|
352
352
|
const binding = require('@medicomind/rolldown-compression-linux-arm-musleabihf')
|
|
353
353
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-linux-arm-musleabihf/package.json').version
|
|
354
|
-
if (bindingPackageVersion !== '2.
|
|
355
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
354
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
355
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
356
356
|
}
|
|
357
357
|
return binding
|
|
358
358
|
} catch (e) {
|
|
@@ -367,8 +367,8 @@ function requireNative() {
|
|
|
367
367
|
try {
|
|
368
368
|
const binding = require('@medicomind/rolldown-compression-linux-arm-gnueabihf')
|
|
369
369
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-linux-arm-gnueabihf/package.json').version
|
|
370
|
-
if (bindingPackageVersion !== '2.
|
|
371
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
370
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
371
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
372
372
|
}
|
|
373
373
|
return binding
|
|
374
374
|
} catch (e) {
|
|
@@ -385,8 +385,8 @@ function requireNative() {
|
|
|
385
385
|
try {
|
|
386
386
|
const binding = require('@medicomind/rolldown-compression-linux-loong64-musl')
|
|
387
387
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-linux-loong64-musl/package.json').version
|
|
388
|
-
if (bindingPackageVersion !== '2.
|
|
389
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
388
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
389
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
390
390
|
}
|
|
391
391
|
return binding
|
|
392
392
|
} catch (e) {
|
|
@@ -401,8 +401,8 @@ function requireNative() {
|
|
|
401
401
|
try {
|
|
402
402
|
const binding = require('@medicomind/rolldown-compression-linux-loong64-gnu')
|
|
403
403
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-linux-loong64-gnu/package.json').version
|
|
404
|
-
if (bindingPackageVersion !== '2.
|
|
405
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
404
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
405
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
406
406
|
}
|
|
407
407
|
return binding
|
|
408
408
|
} catch (e) {
|
|
@@ -419,8 +419,8 @@ function requireNative() {
|
|
|
419
419
|
try {
|
|
420
420
|
const binding = require('@medicomind/rolldown-compression-linux-riscv64-musl')
|
|
421
421
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-linux-riscv64-musl/package.json').version
|
|
422
|
-
if (bindingPackageVersion !== '2.
|
|
423
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
422
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
423
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
424
424
|
}
|
|
425
425
|
return binding
|
|
426
426
|
} catch (e) {
|
|
@@ -435,8 +435,8 @@ function requireNative() {
|
|
|
435
435
|
try {
|
|
436
436
|
const binding = require('@medicomind/rolldown-compression-linux-riscv64-gnu')
|
|
437
437
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-linux-riscv64-gnu/package.json').version
|
|
438
|
-
if (bindingPackageVersion !== '2.
|
|
439
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
438
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
439
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
440
440
|
}
|
|
441
441
|
return binding
|
|
442
442
|
} catch (e) {
|
|
@@ -452,8 +452,8 @@ function requireNative() {
|
|
|
452
452
|
try {
|
|
453
453
|
const binding = require('@medicomind/rolldown-compression-linux-ppc64-gnu')
|
|
454
454
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-linux-ppc64-gnu/package.json').version
|
|
455
|
-
if (bindingPackageVersion !== '2.
|
|
456
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
455
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
456
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
457
457
|
}
|
|
458
458
|
return binding
|
|
459
459
|
} catch (e) {
|
|
@@ -468,8 +468,8 @@ function requireNative() {
|
|
|
468
468
|
try {
|
|
469
469
|
const binding = require('@medicomind/rolldown-compression-linux-s390x-gnu')
|
|
470
470
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-linux-s390x-gnu/package.json').version
|
|
471
|
-
if (bindingPackageVersion !== '2.
|
|
472
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
471
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
472
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
473
473
|
}
|
|
474
474
|
return binding
|
|
475
475
|
} catch (e) {
|
|
@@ -488,8 +488,8 @@ function requireNative() {
|
|
|
488
488
|
try {
|
|
489
489
|
const binding = require('@medicomind/rolldown-compression-openharmony-arm64')
|
|
490
490
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-openharmony-arm64/package.json').version
|
|
491
|
-
if (bindingPackageVersion !== '2.
|
|
492
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
491
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
492
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
493
493
|
}
|
|
494
494
|
return binding
|
|
495
495
|
} catch (e) {
|
|
@@ -504,8 +504,8 @@ function requireNative() {
|
|
|
504
504
|
try {
|
|
505
505
|
const binding = require('@medicomind/rolldown-compression-openharmony-x64')
|
|
506
506
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-openharmony-x64/package.json').version
|
|
507
|
-
if (bindingPackageVersion !== '2.
|
|
508
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
507
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
508
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
509
509
|
}
|
|
510
510
|
return binding
|
|
511
511
|
} catch (e) {
|
|
@@ -520,8 +520,8 @@ function requireNative() {
|
|
|
520
520
|
try {
|
|
521
521
|
const binding = require('@medicomind/rolldown-compression-openharmony-arm')
|
|
522
522
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-openharmony-arm/package.json').version
|
|
523
|
-
if (bindingPackageVersion !== '2.
|
|
524
|
-
throw new Error(`Native binding package version mismatch, expected 2.
|
|
523
|
+
if (bindingPackageVersion !== '2.6.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
524
|
+
throw new Error(`Native binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
525
525
|
}
|
|
526
526
|
return binding
|
|
527
527
|
} catch (e) {
|
|
@@ -661,8 +661,8 @@ if (!nativeBinding || forceWasi) {
|
|
|
661
661
|
if (!candidateFailed) {
|
|
662
662
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
663
663
|
const bindingPackageVersion = require('@medicomind/rolldown-compression-wasm32-wasi/package.json').version
|
|
664
|
-
if (bindingPackageVersion !== '2.
|
|
665
|
-
throw new Error(`WASI binding package version mismatch, expected 2.
|
|
664
|
+
if (bindingPackageVersion !== '2.6.1') {
|
|
665
|
+
throw new Error(`WASI binding package version mismatch, expected 2.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
668
|
wasiBinding = require('@medicomind/rolldown-compression-wasm32-wasi')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medicomind/rolldown-compression",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "Fast native (Rust) gzip / brotli / zstd compression plugin for Rolldown, powered by napi-rs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rolldown",
|
|
@@ -88,13 +88,13 @@
|
|
|
88
88
|
"rolldown": "^1.0.0"
|
|
89
89
|
},
|
|
90
90
|
"optionalDependencies": {
|
|
91
|
-
"@medicomind/rolldown-compression-darwin-arm64": "2.
|
|
92
|
-
"@medicomind/rolldown-compression-darwin-x64": "2.
|
|
93
|
-
"@medicomind/rolldown-compression-linux-arm64-gnu": "2.
|
|
94
|
-
"@medicomind/rolldown-compression-linux-x64-gnu": "2.
|
|
95
|
-
"@medicomind/rolldown-compression-linux-x64-musl": "2.
|
|
96
|
-
"@medicomind/rolldown-compression-wasm32-wasi": "2.
|
|
97
|
-
"@medicomind/rolldown-compression-win32-x64-msvc": "2.
|
|
91
|
+
"@medicomind/rolldown-compression-darwin-arm64": "2.6.1",
|
|
92
|
+
"@medicomind/rolldown-compression-darwin-x64": "2.6.1",
|
|
93
|
+
"@medicomind/rolldown-compression-linux-arm64-gnu": "2.6.1",
|
|
94
|
+
"@medicomind/rolldown-compression-linux-x64-gnu": "2.6.1",
|
|
95
|
+
"@medicomind/rolldown-compression-linux-x64-musl": "2.6.1",
|
|
96
|
+
"@medicomind/rolldown-compression-wasm32-wasi": "2.6.1",
|
|
97
|
+
"@medicomind/rolldown-compression-win32-x64-msvc": "2.6.1"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@biomejs/biome": "^2.5.15",
|