qrbit 0.5.0 → 1.0.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 +20 -20
- package/dist/native.js +50 -50
- package/dist/qrbit.win32-x64-msvc.node +0 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -244,49 +244,49 @@ await qr.toPngFile("./output/qr-code.png", { cache: false });
|
|
|
244
244
|
## QR Codes SVG (No Logo)
|
|
245
245
|
| name | summary | ops/sec | time/op | margin | samples |
|
|
246
246
|
|-----------------------------------------|:---------:|----------:|----------:|:--------:|----------:|
|
|
247
|
-
| QRCode toString (v1.5.4) | 🥇 |
|
|
248
|
-
| QrBit toSvg (Native) (
|
|
249
|
-
| QrBit toSvg (Rust) (
|
|
250
|
-
| styled-qr-code-node toBuffer (v1.5.2) | -
|
|
247
|
+
| QRCode toString (v1.5.4) | 🥇 | 6K | 162µs | ±0.37% | 6K |
|
|
248
|
+
| QrBit toSvg (Native) (v1.0.0) | -3.2% | 6K | 172µs | ±0.92% | 6K |
|
|
249
|
+
| QrBit toSvg (Rust) (v1.0.0) | -85% | 945 | 1ms | ±1.17% | 912 |
|
|
250
|
+
| styled-qr-code-node toBuffer (v1.5.2) | -89% | 709 | 1ms | ±1.07% | 701 |
|
|
251
251
|
|
|
252
252
|
`Rust` is there for performance and when doing heavy image processing without needing node `canvas` installed. If you do not add a logo then the `Native` version is what you will get for SVG.
|
|
253
253
|
|
|
254
254
|
## QR Codes PNG (No Logo)
|
|
255
255
|
| name | summary | ops/sec | time/op | margin | samples |
|
|
256
256
|
|-----------------------------------------|:---------:|----------:|----------:|:--------:|----------:|
|
|
257
|
-
| QrBit toPng (
|
|
258
|
-
| QRCode toBuffer (v1.5.4) | -
|
|
259
|
-
| styled-qr-code-node toBuffer (v1.5.2) | -
|
|
257
|
+
| QrBit toPng (v1.0.0) | 🥇 | 2K | 647µs | ±0.68% | 2K |
|
|
258
|
+
| QRCode toBuffer (v1.5.4) | -49% | 804 | 1ms | ±0.77% | 794 |
|
|
259
|
+
| styled-qr-code-node toBuffer (v1.5.2) | -85% | 238 | 4ms | ±0.74% | 238 |
|
|
260
260
|
|
|
261
261
|
`Rust` is used for `toPng()` to optimize performance for PNG generation and heavy image processing without needing node `canvas` installed.
|
|
262
262
|
|
|
263
263
|
## QR Codes with Embedded Logos
|
|
264
264
|
| name | summary | ops/sec | time/op | margin | samples |
|
|
265
265
|
|------------------------------------|:---------:|----------:|----------:|:--------:|----------:|
|
|
266
|
-
| QrBit
|
|
267
|
-
| QrBit SVG (
|
|
268
|
-
| QrBit PNG (
|
|
269
|
-
|
|
|
270
|
-
|
|
|
271
|
-
| styled-qr-code-node SVG (v1.5.2) | -
|
|
266
|
+
| QrBit SVG (Path) (v1.0.0) | 🥇 | 819 | 1ms | ±1.04% | 794 |
|
|
267
|
+
| QrBit SVG (Buffer) (v1.0.0) | -58% | 341 | 3ms | ±1.08% | 339 |
|
|
268
|
+
| QrBit PNG (Path) (v1.0.0) | -61% | 319 | 3ms | ±1.95% | 314 |
|
|
269
|
+
| styled-qr-code-node PNG (v1.5.2) | -81% | 159 | 6ms | ±0.75% | 159 |
|
|
270
|
+
| QrBit PNG (Buffer) (v1.0.0) | -81% | 154 | 7ms | ±1.05% | 154 |
|
|
271
|
+
| styled-qr-code-node SVG (v1.5.2) | -84% | 134 | 7ms | ±0.59% | 135 |
|
|
272
272
|
|
|
273
273
|
`Buffer` is much slower as we have to push the stream across to the rust module. For fastest performance provide the path of the image.
|
|
274
274
|
|
|
275
275
|
## QR Codes SVG with Caching
|
|
276
276
|
| name | summary | ops/sec | time/op | margin | samples |
|
|
277
277
|
|-----------------------------------------|:---------:|----------:|----------:|:--------:|----------:|
|
|
278
|
-
| QrBit toSvg (Native) (
|
|
279
|
-
| QRCode toString (v1.5.4) | -
|
|
280
|
-
| QrBit toSvg (Rust) (
|
|
281
|
-
| styled-qr-code-node toBuffer (v1.5.2) | -99% |
|
|
278
|
+
| QrBit toSvg (Native) (v1.0.0) | 🥇 | 95K | 94µs | ±2.08% | 11K |
|
|
279
|
+
| QRCode toString (v1.5.4) | -93% | 6K | 161µs | ±0.37% | 6K |
|
|
280
|
+
| QrBit toSvg (Rust) (v1.0.0) | -99% | 938 | 1ms | ±1.12% | 907 |
|
|
281
|
+
| styled-qr-code-node toBuffer (v1.5.2) | -99% | 710 | 1ms | ±1.10% | 700 |
|
|
282
282
|
|
|
283
283
|
|
|
284
284
|
## QR Codes PNG with Caching
|
|
285
285
|
| name | summary | ops/sec | time/op | margin | samples |
|
|
286
286
|
|-----------------------------------------|:---------:|----------:|----------:|:--------:|----------:|
|
|
287
|
-
| QrBit toPng (
|
|
288
|
-
| QRCode toBuffer (v1.5.4) | -
|
|
289
|
-
| styled-qr-code-node toBuffer (v1.5.2) | -
|
|
287
|
+
| QrBit toPng (v1.0.0) | 🥇 | 13K | 584µs | ±1.84% | 2K |
|
|
288
|
+
| QRCode toBuffer (v1.5.4) | -94% | 760 | 1ms | ±1.54% | 741 |
|
|
289
|
+
| styled-qr-code-node toBuffer (v1.5.2) | -98% | 233 | 4ms | ±2.10% | 231 |
|
|
290
290
|
|
|
291
291
|
# Examples
|
|
292
292
|
|
package/dist/native.js
CHANGED
|
@@ -81,8 +81,8 @@ function requireNative() {
|
|
|
81
81
|
try {
|
|
82
82
|
const binding = require('qrbit-android-arm64')
|
|
83
83
|
const bindingPackageVersion = require('qrbit-android-arm64/package.json').version
|
|
84
|
-
if (bindingPackageVersion !== '0.
|
|
85
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
84
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
85
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
86
86
|
}
|
|
87
87
|
return binding
|
|
88
88
|
} catch (e) {
|
|
@@ -97,8 +97,8 @@ function requireNative() {
|
|
|
97
97
|
try {
|
|
98
98
|
const binding = require('qrbit-android-arm-eabi')
|
|
99
99
|
const bindingPackageVersion = require('qrbit-android-arm-eabi/package.json').version
|
|
100
|
-
if (bindingPackageVersion !== '0.
|
|
101
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
100
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
101
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
102
102
|
}
|
|
103
103
|
return binding
|
|
104
104
|
} catch (e) {
|
|
@@ -117,8 +117,8 @@ function requireNative() {
|
|
|
117
117
|
try {
|
|
118
118
|
const binding = require('qrbit-win32-x64-msvc')
|
|
119
119
|
const bindingPackageVersion = require('qrbit-win32-x64-msvc/package.json').version
|
|
120
|
-
if (bindingPackageVersion !== '0.
|
|
121
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
120
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
121
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
122
122
|
}
|
|
123
123
|
return binding
|
|
124
124
|
} catch (e) {
|
|
@@ -133,8 +133,8 @@ function requireNative() {
|
|
|
133
133
|
try {
|
|
134
134
|
const binding = require('qrbit-win32-ia32-msvc')
|
|
135
135
|
const bindingPackageVersion = require('qrbit-win32-ia32-msvc/package.json').version
|
|
136
|
-
if (bindingPackageVersion !== '0.
|
|
137
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
136
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
137
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
138
138
|
}
|
|
139
139
|
return binding
|
|
140
140
|
} catch (e) {
|
|
@@ -149,8 +149,8 @@ function requireNative() {
|
|
|
149
149
|
try {
|
|
150
150
|
const binding = require('qrbit-win32-arm64-msvc')
|
|
151
151
|
const bindingPackageVersion = require('qrbit-win32-arm64-msvc/package.json').version
|
|
152
|
-
if (bindingPackageVersion !== '0.
|
|
153
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
152
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
153
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
154
154
|
}
|
|
155
155
|
return binding
|
|
156
156
|
} catch (e) {
|
|
@@ -168,8 +168,8 @@ function requireNative() {
|
|
|
168
168
|
try {
|
|
169
169
|
const binding = require('qrbit-darwin-universal')
|
|
170
170
|
const bindingPackageVersion = require('qrbit-darwin-universal/package.json').version
|
|
171
|
-
if (bindingPackageVersion !== '0.
|
|
172
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
171
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
172
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
173
173
|
}
|
|
174
174
|
return binding
|
|
175
175
|
} catch (e) {
|
|
@@ -184,8 +184,8 @@ function requireNative() {
|
|
|
184
184
|
try {
|
|
185
185
|
const binding = require('qrbit-darwin-x64')
|
|
186
186
|
const bindingPackageVersion = require('qrbit-darwin-x64/package.json').version
|
|
187
|
-
if (bindingPackageVersion !== '0.
|
|
188
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
187
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
188
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
189
189
|
}
|
|
190
190
|
return binding
|
|
191
191
|
} catch (e) {
|
|
@@ -200,8 +200,8 @@ function requireNative() {
|
|
|
200
200
|
try {
|
|
201
201
|
const binding = require('qrbit-darwin-arm64')
|
|
202
202
|
const bindingPackageVersion = require('qrbit-darwin-arm64/package.json').version
|
|
203
|
-
if (bindingPackageVersion !== '0.
|
|
204
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
203
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
204
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
205
205
|
}
|
|
206
206
|
return binding
|
|
207
207
|
} catch (e) {
|
|
@@ -220,8 +220,8 @@ function requireNative() {
|
|
|
220
220
|
try {
|
|
221
221
|
const binding = require('qrbit-freebsd-x64')
|
|
222
222
|
const bindingPackageVersion = require('qrbit-freebsd-x64/package.json').version
|
|
223
|
-
if (bindingPackageVersion !== '0.
|
|
224
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
223
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
224
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
225
225
|
}
|
|
226
226
|
return binding
|
|
227
227
|
} catch (e) {
|
|
@@ -236,8 +236,8 @@ function requireNative() {
|
|
|
236
236
|
try {
|
|
237
237
|
const binding = require('qrbit-freebsd-arm64')
|
|
238
238
|
const bindingPackageVersion = require('qrbit-freebsd-arm64/package.json').version
|
|
239
|
-
if (bindingPackageVersion !== '0.
|
|
240
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
239
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
240
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
241
241
|
}
|
|
242
242
|
return binding
|
|
243
243
|
} catch (e) {
|
|
@@ -257,8 +257,8 @@ function requireNative() {
|
|
|
257
257
|
try {
|
|
258
258
|
const binding = require('qrbit-linux-x64-musl')
|
|
259
259
|
const bindingPackageVersion = require('qrbit-linux-x64-musl/package.json').version
|
|
260
|
-
if (bindingPackageVersion !== '0.
|
|
261
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
260
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
261
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
262
262
|
}
|
|
263
263
|
return binding
|
|
264
264
|
} catch (e) {
|
|
@@ -273,8 +273,8 @@ function requireNative() {
|
|
|
273
273
|
try {
|
|
274
274
|
const binding = require('qrbit-linux-x64-gnu')
|
|
275
275
|
const bindingPackageVersion = require('qrbit-linux-x64-gnu/package.json').version
|
|
276
|
-
if (bindingPackageVersion !== '0.
|
|
277
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
276
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
277
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
278
278
|
}
|
|
279
279
|
return binding
|
|
280
280
|
} catch (e) {
|
|
@@ -291,8 +291,8 @@ function requireNative() {
|
|
|
291
291
|
try {
|
|
292
292
|
const binding = require('qrbit-linux-arm64-musl')
|
|
293
293
|
const bindingPackageVersion = require('qrbit-linux-arm64-musl/package.json').version
|
|
294
|
-
if (bindingPackageVersion !== '0.
|
|
295
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
294
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
295
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
296
296
|
}
|
|
297
297
|
return binding
|
|
298
298
|
} catch (e) {
|
|
@@ -307,8 +307,8 @@ function requireNative() {
|
|
|
307
307
|
try {
|
|
308
308
|
const binding = require('qrbit-linux-arm64-gnu')
|
|
309
309
|
const bindingPackageVersion = require('qrbit-linux-arm64-gnu/package.json').version
|
|
310
|
-
if (bindingPackageVersion !== '0.
|
|
311
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
310
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
311
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
312
312
|
}
|
|
313
313
|
return binding
|
|
314
314
|
} catch (e) {
|
|
@@ -325,8 +325,8 @@ function requireNative() {
|
|
|
325
325
|
try {
|
|
326
326
|
const binding = require('qrbit-linux-arm-musleabihf')
|
|
327
327
|
const bindingPackageVersion = require('qrbit-linux-arm-musleabihf/package.json').version
|
|
328
|
-
if (bindingPackageVersion !== '0.
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
328
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
329
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
330
330
|
}
|
|
331
331
|
return binding
|
|
332
332
|
} catch (e) {
|
|
@@ -341,8 +341,8 @@ function requireNative() {
|
|
|
341
341
|
try {
|
|
342
342
|
const binding = require('qrbit-linux-arm-gnueabihf')
|
|
343
343
|
const bindingPackageVersion = require('qrbit-linux-arm-gnueabihf/package.json').version
|
|
344
|
-
if (bindingPackageVersion !== '0.
|
|
345
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
344
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
345
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
346
346
|
}
|
|
347
347
|
return binding
|
|
348
348
|
} catch (e) {
|
|
@@ -359,8 +359,8 @@ function requireNative() {
|
|
|
359
359
|
try {
|
|
360
360
|
const binding = require('qrbit-linux-loong64-musl')
|
|
361
361
|
const bindingPackageVersion = require('qrbit-linux-loong64-musl/package.json').version
|
|
362
|
-
if (bindingPackageVersion !== '0.
|
|
363
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
362
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
363
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
364
364
|
}
|
|
365
365
|
return binding
|
|
366
366
|
} catch (e) {
|
|
@@ -375,8 +375,8 @@ function requireNative() {
|
|
|
375
375
|
try {
|
|
376
376
|
const binding = require('qrbit-linux-loong64-gnu')
|
|
377
377
|
const bindingPackageVersion = require('qrbit-linux-loong64-gnu/package.json').version
|
|
378
|
-
if (bindingPackageVersion !== '0.
|
|
379
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
378
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
379
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
380
380
|
}
|
|
381
381
|
return binding
|
|
382
382
|
} catch (e) {
|
|
@@ -393,8 +393,8 @@ function requireNative() {
|
|
|
393
393
|
try {
|
|
394
394
|
const binding = require('qrbit-linux-riscv64-musl')
|
|
395
395
|
const bindingPackageVersion = require('qrbit-linux-riscv64-musl/package.json').version
|
|
396
|
-
if (bindingPackageVersion !== '0.
|
|
397
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
396
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
397
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
398
398
|
}
|
|
399
399
|
return binding
|
|
400
400
|
} catch (e) {
|
|
@@ -409,8 +409,8 @@ function requireNative() {
|
|
|
409
409
|
try {
|
|
410
410
|
const binding = require('qrbit-linux-riscv64-gnu')
|
|
411
411
|
const bindingPackageVersion = require('qrbit-linux-riscv64-gnu/package.json').version
|
|
412
|
-
if (bindingPackageVersion !== '0.
|
|
413
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
412
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
413
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
414
414
|
}
|
|
415
415
|
return binding
|
|
416
416
|
} catch (e) {
|
|
@@ -426,8 +426,8 @@ function requireNative() {
|
|
|
426
426
|
try {
|
|
427
427
|
const binding = require('qrbit-linux-ppc64-gnu')
|
|
428
428
|
const bindingPackageVersion = require('qrbit-linux-ppc64-gnu/package.json').version
|
|
429
|
-
if (bindingPackageVersion !== '0.
|
|
430
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
429
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
430
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
431
431
|
}
|
|
432
432
|
return binding
|
|
433
433
|
} catch (e) {
|
|
@@ -442,8 +442,8 @@ function requireNative() {
|
|
|
442
442
|
try {
|
|
443
443
|
const binding = require('qrbit-linux-s390x-gnu')
|
|
444
444
|
const bindingPackageVersion = require('qrbit-linux-s390x-gnu/package.json').version
|
|
445
|
-
if (bindingPackageVersion !== '0.
|
|
446
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
445
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
446
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
447
447
|
}
|
|
448
448
|
return binding
|
|
449
449
|
} catch (e) {
|
|
@@ -462,8 +462,8 @@ function requireNative() {
|
|
|
462
462
|
try {
|
|
463
463
|
const binding = require('qrbit-openharmony-arm64')
|
|
464
464
|
const bindingPackageVersion = require('qrbit-openharmony-arm64/package.json').version
|
|
465
|
-
if (bindingPackageVersion !== '0.
|
|
466
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
465
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
466
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
467
467
|
}
|
|
468
468
|
return binding
|
|
469
469
|
} catch (e) {
|
|
@@ -478,8 +478,8 @@ function requireNative() {
|
|
|
478
478
|
try {
|
|
479
479
|
const binding = require('qrbit-openharmony-x64')
|
|
480
480
|
const bindingPackageVersion = require('qrbit-openharmony-x64/package.json').version
|
|
481
|
-
if (bindingPackageVersion !== '0.
|
|
482
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
481
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
482
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
483
483
|
}
|
|
484
484
|
return binding
|
|
485
485
|
} catch (e) {
|
|
@@ -494,8 +494,8 @@ function requireNative() {
|
|
|
494
494
|
try {
|
|
495
495
|
const binding = require('qrbit-openharmony-arm')
|
|
496
496
|
const bindingPackageVersion = require('qrbit-openharmony-arm/package.json').version
|
|
497
|
-
if (bindingPackageVersion !== '0.
|
|
498
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
497
|
+
if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
498
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
499
499
|
}
|
|
500
500
|
return binding
|
|
501
501
|
} catch (e) {
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qrbit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "A fast QR code generator with logo embedding support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/qrbit.cjs",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"repository": {
|
|
56
56
|
"type": "git",
|
|
57
|
-
"url": "https://github.com/jaredwray/qrbit.git"
|
|
57
|
+
"url": "git+https://github.com/jaredwray/qrbit.git"
|
|
58
58
|
},
|
|
59
59
|
"keywords": [
|
|
60
60
|
"qr",
|