@jongleberry/vurst-markdown 0.1.0 → 0.2.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/index.js
CHANGED
|
@@ -6,17 +6,6 @@
|
|
|
6
6
|
const { readFileSync } = require('node:fs')
|
|
7
7
|
let nativeBinding = null
|
|
8
8
|
const loadErrors = []
|
|
9
|
-
const supportedPlatforms = 'macOS arm64, Linux x64 glibc, and Linux arm64 glibc'
|
|
10
|
-
|
|
11
|
-
const isPublishedPlatform = () => {
|
|
12
|
-
if (process.platform === 'darwin') {
|
|
13
|
-
return process.arch === 'arm64'
|
|
14
|
-
}
|
|
15
|
-
if (process.platform === 'linux') {
|
|
16
|
-
return (process.arch === 'x64' || process.arch === 'arm64') && !isMusl()
|
|
17
|
-
}
|
|
18
|
-
return false
|
|
19
|
-
}
|
|
20
9
|
|
|
21
10
|
const isMusl = () => {
|
|
22
11
|
let musl = false
|
|
@@ -45,12 +34,12 @@ const isMuslFromFilesystem = () => {
|
|
|
45
34
|
const isMuslFromReport = () => {
|
|
46
35
|
let report = null
|
|
47
36
|
if (typeof process.report?.getReport === 'function') {
|
|
48
|
-
const
|
|
37
|
+
const originalExcludeNetwork = process.report.excludeNetwork
|
|
49
38
|
try {
|
|
50
39
|
process.report.excludeNetwork = true
|
|
51
40
|
report = process.report.getReport()
|
|
52
41
|
} finally {
|
|
53
|
-
process.report.excludeNetwork =
|
|
42
|
+
process.report.excludeNetwork = originalExcludeNetwork
|
|
54
43
|
}
|
|
55
44
|
}
|
|
56
45
|
if (!report) {
|
|
@@ -93,8 +82,8 @@ function requireNative() {
|
|
|
93
82
|
try {
|
|
94
83
|
const binding = require('@jongleberry/vurst-markdown-android-arm64')
|
|
95
84
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-android-arm64/package.json').version
|
|
96
|
-
if (bindingPackageVersion !== '0.0
|
|
97
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
85
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
86
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
98
87
|
}
|
|
99
88
|
return binding
|
|
100
89
|
} catch (e) {
|
|
@@ -109,8 +98,8 @@ function requireNative() {
|
|
|
109
98
|
try {
|
|
110
99
|
const binding = require('@jongleberry/vurst-markdown-android-arm-eabi')
|
|
111
100
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-android-arm-eabi/package.json').version
|
|
112
|
-
if (bindingPackageVersion !== '0.0
|
|
113
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
101
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
102
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
114
103
|
}
|
|
115
104
|
return binding
|
|
116
105
|
} catch (e) {
|
|
@@ -130,8 +119,8 @@ function requireNative() {
|
|
|
130
119
|
try {
|
|
131
120
|
const binding = require('@jongleberry/vurst-markdown-win32-x64-gnu')
|
|
132
121
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-win32-x64-gnu/package.json').version
|
|
133
|
-
if (bindingPackageVersion !== '0.0
|
|
134
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
122
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
123
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
135
124
|
}
|
|
136
125
|
return binding
|
|
137
126
|
} catch (e) {
|
|
@@ -146,8 +135,8 @@ function requireNative() {
|
|
|
146
135
|
try {
|
|
147
136
|
const binding = require('@jongleberry/vurst-markdown-win32-x64-msvc')
|
|
148
137
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-win32-x64-msvc/package.json').version
|
|
149
|
-
if (bindingPackageVersion !== '0.0
|
|
150
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
138
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
139
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
151
140
|
}
|
|
152
141
|
return binding
|
|
153
142
|
} catch (e) {
|
|
@@ -163,8 +152,8 @@ function requireNative() {
|
|
|
163
152
|
try {
|
|
164
153
|
const binding = require('@jongleberry/vurst-markdown-win32-ia32-msvc')
|
|
165
154
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-win32-ia32-msvc/package.json').version
|
|
166
|
-
if (bindingPackageVersion !== '0.0
|
|
167
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
155
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
156
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
168
157
|
}
|
|
169
158
|
return binding
|
|
170
159
|
} catch (e) {
|
|
@@ -179,8 +168,8 @@ function requireNative() {
|
|
|
179
168
|
try {
|
|
180
169
|
const binding = require('@jongleberry/vurst-markdown-win32-arm64-msvc')
|
|
181
170
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-win32-arm64-msvc/package.json').version
|
|
182
|
-
if (bindingPackageVersion !== '0.0
|
|
183
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
171
|
+
if (bindingPackageVersion !== '0.1.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 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
184
173
|
}
|
|
185
174
|
return binding
|
|
186
175
|
} catch (e) {
|
|
@@ -198,8 +187,8 @@ function requireNative() {
|
|
|
198
187
|
try {
|
|
199
188
|
const binding = require('@jongleberry/vurst-markdown-darwin-universal')
|
|
200
189
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-darwin-universal/package.json').version
|
|
201
|
-
if (bindingPackageVersion !== '0.0
|
|
202
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
190
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
191
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
203
192
|
}
|
|
204
193
|
return binding
|
|
205
194
|
} catch (e) {
|
|
@@ -214,8 +203,8 @@ function requireNative() {
|
|
|
214
203
|
try {
|
|
215
204
|
const binding = require('@jongleberry/vurst-markdown-darwin-x64')
|
|
216
205
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-darwin-x64/package.json').version
|
|
217
|
-
if (bindingPackageVersion !== '0.0
|
|
218
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
206
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
207
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
219
208
|
}
|
|
220
209
|
return binding
|
|
221
210
|
} catch (e) {
|
|
@@ -230,8 +219,8 @@ function requireNative() {
|
|
|
230
219
|
try {
|
|
231
220
|
const binding = require('@jongleberry/vurst-markdown-darwin-arm64')
|
|
232
221
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-darwin-arm64/package.json').version
|
|
233
|
-
if (bindingPackageVersion !== '0.0
|
|
234
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
222
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
223
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
235
224
|
}
|
|
236
225
|
return binding
|
|
237
226
|
} catch (e) {
|
|
@@ -250,8 +239,8 @@ function requireNative() {
|
|
|
250
239
|
try {
|
|
251
240
|
const binding = require('@jongleberry/vurst-markdown-freebsd-x64')
|
|
252
241
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-freebsd-x64/package.json').version
|
|
253
|
-
if (bindingPackageVersion !== '0.0
|
|
254
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
242
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
243
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
255
244
|
}
|
|
256
245
|
return binding
|
|
257
246
|
} catch (e) {
|
|
@@ -266,8 +255,8 @@ function requireNative() {
|
|
|
266
255
|
try {
|
|
267
256
|
const binding = require('@jongleberry/vurst-markdown-freebsd-arm64')
|
|
268
257
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-freebsd-arm64/package.json').version
|
|
269
|
-
if (bindingPackageVersion !== '0.0
|
|
270
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
258
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
259
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
271
260
|
}
|
|
272
261
|
return binding
|
|
273
262
|
} catch (e) {
|
|
@@ -287,8 +276,8 @@ function requireNative() {
|
|
|
287
276
|
try {
|
|
288
277
|
const binding = require('@jongleberry/vurst-markdown-linux-x64-musl')
|
|
289
278
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-x64-musl/package.json').version
|
|
290
|
-
if (bindingPackageVersion !== '0.0
|
|
291
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
279
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
280
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
292
281
|
}
|
|
293
282
|
return binding
|
|
294
283
|
} catch (e) {
|
|
@@ -303,8 +292,8 @@ function requireNative() {
|
|
|
303
292
|
try {
|
|
304
293
|
const binding = require('@jongleberry/vurst-markdown-linux-x64-gnu')
|
|
305
294
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-x64-gnu/package.json').version
|
|
306
|
-
if (bindingPackageVersion !== '0.0
|
|
307
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
295
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
296
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
308
297
|
}
|
|
309
298
|
return binding
|
|
310
299
|
} catch (e) {
|
|
@@ -321,8 +310,8 @@ function requireNative() {
|
|
|
321
310
|
try {
|
|
322
311
|
const binding = require('@jongleberry/vurst-markdown-linux-arm64-musl')
|
|
323
312
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-arm64-musl/package.json').version
|
|
324
|
-
if (bindingPackageVersion !== '0.0
|
|
325
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
313
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
314
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
326
315
|
}
|
|
327
316
|
return binding
|
|
328
317
|
} catch (e) {
|
|
@@ -337,8 +326,8 @@ function requireNative() {
|
|
|
337
326
|
try {
|
|
338
327
|
const binding = require('@jongleberry/vurst-markdown-linux-arm64-gnu')
|
|
339
328
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-arm64-gnu/package.json').version
|
|
340
|
-
if (bindingPackageVersion !== '0.0
|
|
341
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
329
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
330
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
342
331
|
}
|
|
343
332
|
return binding
|
|
344
333
|
} catch (e) {
|
|
@@ -355,8 +344,8 @@ function requireNative() {
|
|
|
355
344
|
try {
|
|
356
345
|
const binding = require('@jongleberry/vurst-markdown-linux-arm-musleabihf')
|
|
357
346
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-arm-musleabihf/package.json').version
|
|
358
|
-
if (bindingPackageVersion !== '0.0
|
|
359
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
347
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
348
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
360
349
|
}
|
|
361
350
|
return binding
|
|
362
351
|
} catch (e) {
|
|
@@ -371,8 +360,8 @@ function requireNative() {
|
|
|
371
360
|
try {
|
|
372
361
|
const binding = require('@jongleberry/vurst-markdown-linux-arm-gnueabihf')
|
|
373
362
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-arm-gnueabihf/package.json').version
|
|
374
|
-
if (bindingPackageVersion !== '0.0
|
|
375
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
363
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
364
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
376
365
|
}
|
|
377
366
|
return binding
|
|
378
367
|
} catch (e) {
|
|
@@ -389,8 +378,8 @@ function requireNative() {
|
|
|
389
378
|
try {
|
|
390
379
|
const binding = require('@jongleberry/vurst-markdown-linux-loong64-musl')
|
|
391
380
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-loong64-musl/package.json').version
|
|
392
|
-
if (bindingPackageVersion !== '0.0
|
|
393
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
381
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
382
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
394
383
|
}
|
|
395
384
|
return binding
|
|
396
385
|
} catch (e) {
|
|
@@ -405,8 +394,8 @@ function requireNative() {
|
|
|
405
394
|
try {
|
|
406
395
|
const binding = require('@jongleberry/vurst-markdown-linux-loong64-gnu')
|
|
407
396
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-loong64-gnu/package.json').version
|
|
408
|
-
if (bindingPackageVersion !== '0.0
|
|
409
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
397
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
398
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
410
399
|
}
|
|
411
400
|
return binding
|
|
412
401
|
} catch (e) {
|
|
@@ -423,8 +412,8 @@ function requireNative() {
|
|
|
423
412
|
try {
|
|
424
413
|
const binding = require('@jongleberry/vurst-markdown-linux-riscv64-musl')
|
|
425
414
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-riscv64-musl/package.json').version
|
|
426
|
-
if (bindingPackageVersion !== '0.0
|
|
427
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
415
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
416
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
428
417
|
}
|
|
429
418
|
return binding
|
|
430
419
|
} catch (e) {
|
|
@@ -439,8 +428,8 @@ function requireNative() {
|
|
|
439
428
|
try {
|
|
440
429
|
const binding = require('@jongleberry/vurst-markdown-linux-riscv64-gnu')
|
|
441
430
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-riscv64-gnu/package.json').version
|
|
442
|
-
if (bindingPackageVersion !== '0.0
|
|
443
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
431
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
432
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
444
433
|
}
|
|
445
434
|
return binding
|
|
446
435
|
} catch (e) {
|
|
@@ -456,8 +445,8 @@ function requireNative() {
|
|
|
456
445
|
try {
|
|
457
446
|
const binding = require('@jongleberry/vurst-markdown-linux-ppc64-gnu')
|
|
458
447
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-ppc64-gnu/package.json').version
|
|
459
|
-
if (bindingPackageVersion !== '0.0
|
|
460
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
448
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
449
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
461
450
|
}
|
|
462
451
|
return binding
|
|
463
452
|
} catch (e) {
|
|
@@ -472,8 +461,8 @@ function requireNative() {
|
|
|
472
461
|
try {
|
|
473
462
|
const binding = require('@jongleberry/vurst-markdown-linux-s390x-gnu')
|
|
474
463
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-linux-s390x-gnu/package.json').version
|
|
475
|
-
if (bindingPackageVersion !== '0.0
|
|
476
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
464
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
465
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
477
466
|
}
|
|
478
467
|
return binding
|
|
479
468
|
} catch (e) {
|
|
@@ -492,8 +481,8 @@ function requireNative() {
|
|
|
492
481
|
try {
|
|
493
482
|
const binding = require('@jongleberry/vurst-markdown-openharmony-arm64')
|
|
494
483
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-openharmony-arm64/package.json').version
|
|
495
|
-
if (bindingPackageVersion !== '0.0
|
|
496
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
484
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
485
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
497
486
|
}
|
|
498
487
|
return binding
|
|
499
488
|
} catch (e) {
|
|
@@ -508,8 +497,8 @@ function requireNative() {
|
|
|
508
497
|
try {
|
|
509
498
|
const binding = require('@jongleberry/vurst-markdown-openharmony-x64')
|
|
510
499
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-openharmony-x64/package.json').version
|
|
511
|
-
if (bindingPackageVersion !== '0.0
|
|
512
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
500
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
501
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
513
502
|
}
|
|
514
503
|
return binding
|
|
515
504
|
} catch (e) {
|
|
@@ -524,8 +513,8 @@ function requireNative() {
|
|
|
524
513
|
try {
|
|
525
514
|
const binding = require('@jongleberry/vurst-markdown-openharmony-arm')
|
|
526
515
|
const bindingPackageVersion = require('@jongleberry/vurst-markdown-openharmony-arm/package.json').version
|
|
527
|
-
if (bindingPackageVersion !== '0.0
|
|
528
|
-
throw new Error(`Native binding package version mismatch, expected 0.0
|
|
516
|
+
if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
517
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
529
518
|
}
|
|
530
519
|
return binding
|
|
531
520
|
} catch (e) {
|
|
@@ -575,20 +564,6 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
|
575
564
|
}
|
|
576
565
|
|
|
577
566
|
if (!nativeBinding) {
|
|
578
|
-
if (!isPublishedPlatform()) {
|
|
579
|
-
throw new Error(
|
|
580
|
-
`Unsupported platform for @jongleberry/vurst-markdown: ${process.platform} ${process.arch}. ` +
|
|
581
|
-
`Published native bindings currently support ${supportedPlatforms}.`,
|
|
582
|
-
{
|
|
583
|
-
cause: loadErrors.length > 0
|
|
584
|
-
? loadErrors.reduce((err, cur) => {
|
|
585
|
-
cur.cause = err
|
|
586
|
-
return cur
|
|
587
|
-
})
|
|
588
|
-
: undefined,
|
|
589
|
-
},
|
|
590
|
-
)
|
|
591
|
-
}
|
|
592
567
|
if (loadErrors.length > 0) {
|
|
593
568
|
throw new Error(
|
|
594
569
|
`Cannot find native binding. ` +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jongleberry/vurst-markdown",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Rust + N-API: Markdown chunking and rendering.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"@types/node": "^24"
|
|
50
50
|
},
|
|
51
51
|
"optionalDependencies": {
|
|
52
|
-
"@jongleberry/vurst-markdown-darwin-arm64": "0.1
|
|
53
|
-
"@jongleberry/vurst-markdown-linux-arm64-gnu": "0.1
|
|
54
|
-
"@jongleberry/vurst-markdown-linux-x64-gnu": "0.1
|
|
52
|
+
"@jongleberry/vurst-markdown-darwin-arm64": "0.2.1",
|
|
53
|
+
"@jongleberry/vurst-markdown-linux-arm64-gnu": "0.2.1",
|
|
54
|
+
"@jongleberry/vurst-markdown-linux-x64-gnu": "0.2.1"
|
|
55
55
|
}
|
|
56
56
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|