@vue-jsx-vapor/compiler-rs 2.6.12 → 2.7.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.
Files changed (3) hide show
  1. package/index.d.ts +13 -10
  2. package/index.js +103 -283
  3. package/package.json +16 -16
package/index.d.ts CHANGED
@@ -1,9 +1,6 @@
1
1
  /* auto-generated by NAPI-RS */
2
2
  /* eslint-disable */
3
- export declare function compile(
4
- source: string,
5
- options?: CompilerOptions | undefined | null,
6
- ): CompileCodegenResult
3
+ export declare function compile(source: string, options?: CompilerOptions | undefined | null): CompileCodegenResult
7
4
 
8
5
  export interface CompileCodegenResult {
9
6
  helpers: Set<string>
@@ -39,6 +36,14 @@ export interface CompilerOptions {
39
36
  * while all other JSX is transformed to Virtual DOM.
40
37
  */
41
38
  interop?: boolean
39
+ /** * Enabled HMR support.
40
+ * @default false
41
+ */
42
+ hmr?: boolean
43
+ /** * Enabled SSR support.
44
+ * @default false
45
+ */
46
+ ssr?: boolean
42
47
  }
43
48
 
44
49
  export declare const enum ErrorCodes {
@@ -62,15 +67,13 @@ export declare const enum ErrorCodes {
62
67
  VModelOnFileInputElement = 59,
63
68
  VModelUnnecessaryValue = 60,
64
69
  VShowNoExpression = 61,
65
- VSlotsNoExpression = 62,
70
+ VSlotsNoExpression = 62
66
71
  }
67
72
 
68
- export type Template = [string, boolean]
73
+ export type Template =
74
+ [string, boolean]
69
75
 
70
- export declare function transform(
71
- source: string,
72
- options?: CompilerOptions | undefined | null,
73
- ): TransformReturn
76
+ export declare function transform(source: string, options?: CompilerOptions | undefined | null): TransformReturn
74
77
 
75
78
  export interface TransformReturn {
76
79
  code: string
package/index.js CHANGED
@@ -3,9 +3,6 @@
3
3
  // @ts-nocheck
4
4
  /* auto-generated by NAPI-RS */
5
5
 
6
- const { createRequire } = require('node:module')
7
- require = createRequire(__filename)
8
-
9
6
  const { readFileSync } = require('node:fs')
10
7
  let nativeBinding = null
11
8
  const loadErrors = []
@@ -56,9 +53,7 @@ const isMuslFromReport = () => {
56
53
 
57
54
  const isMuslFromChildProcess = () => {
58
55
  try {
59
- return require('child_process')
60
- .execSync('ldd --version', { encoding: 'utf8' })
61
- .includes('musl')
56
+ return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl')
62
57
  } catch (e) {
63
58
  // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false
64
59
  return false
@@ -68,7 +63,7 @@ const isMuslFromChildProcess = () => {
68
63
  function requireNative() {
69
64
  if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
70
65
  try {
71
- return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)
66
+ return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
72
67
  } catch (err) {
73
68
  loadErrors.push(err)
74
69
  }
@@ -81,16 +76,9 @@ function requireNative() {
81
76
  }
82
77
  try {
83
78
  const binding = require('@vue-jsx-vapor/compiler-rs-android-arm64')
84
- const bindingPackageVersion =
85
- require('@vue-jsx-vapor/compiler-rs-android-arm64/package.json').version
86
- if (
87
- bindingPackageVersion !== '1.1.1' &&
88
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
89
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
90
- ) {
91
- throw new Error(
92
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
93
- )
79
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-android-arm64/package.json').version
80
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
81
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
94
82
  }
95
83
  return binding
96
84
  } catch (e) {
@@ -104,50 +92,52 @@ function requireNative() {
104
92
  }
105
93
  try {
106
94
  const binding = require('@vue-jsx-vapor/compiler-rs-android-arm-eabi')
107
- const bindingPackageVersion =
108
- require('@vue-jsx-vapor/compiler-rs-android-arm-eabi/package.json').version
109
- if (
110
- bindingPackageVersion !== '1.1.1' &&
111
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
112
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
113
- ) {
114
- throw new Error(
115
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
116
- )
95
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-android-arm-eabi/package.json').version
96
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
97
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
117
98
  }
118
99
  return binding
119
100
  } catch (e) {
120
101
  loadErrors.push(e)
121
102
  }
122
103
  } else {
123
- loadErrors.push(
124
- new Error(`Unsupported architecture on Android ${process.arch}`),
125
- )
104
+ loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`))
126
105
  }
127
106
  } else if (process.platform === 'win32') {
128
107
  if (process.arch === 'x64') {
108
+ if (process.config?.variables?.shlib_suffix === 'dll.a' || process.config?.variables?.node_target_type === 'shared_library') {
109
+ try {
110
+ return require('./compiler-rs.win32-x64-gnu.node')
111
+ } catch (e) {
112
+ loadErrors.push(e)
113
+ }
129
114
  try {
115
+ const binding = require('@vue-jsx-vapor/compiler-rs-win32-x64-gnu')
116
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-win32-x64-gnu/package.json').version
117
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
118
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
119
+ }
120
+ return binding
121
+ } catch (e) {
122
+ loadErrors.push(e)
123
+ }
124
+ } else {
125
+ try {
130
126
  return require('./compiler-rs.win32-x64-msvc.node')
131
127
  } catch (e) {
132
128
  loadErrors.push(e)
133
129
  }
134
130
  try {
135
131
  const binding = require('@vue-jsx-vapor/compiler-rs-win32-x64-msvc')
136
- const bindingPackageVersion =
137
- require('@vue-jsx-vapor/compiler-rs-win32-x64-msvc/package.json').version
138
- if (
139
- bindingPackageVersion !== '1.1.1' &&
140
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
141
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
142
- ) {
143
- throw new Error(
144
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
145
- )
132
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-win32-x64-msvc/package.json').version
133
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
134
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
146
135
  }
147
136
  return binding
148
137
  } catch (e) {
149
138
  loadErrors.push(e)
150
139
  }
140
+ }
151
141
  } else if (process.arch === 'ia32') {
152
142
  try {
153
143
  return require('./compiler-rs.win32-ia32-msvc.node')
@@ -156,16 +146,9 @@ function requireNative() {
156
146
  }
157
147
  try {
158
148
  const binding = require('@vue-jsx-vapor/compiler-rs-win32-ia32-msvc')
159
- const bindingPackageVersion =
160
- require('@vue-jsx-vapor/compiler-rs-win32-ia32-msvc/package.json').version
161
- if (
162
- bindingPackageVersion !== '1.1.1' &&
163
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
164
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
165
- ) {
166
- throw new Error(
167
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
168
- )
149
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-win32-ia32-msvc/package.json').version
150
+ if (bindingPackageVersion !== '2.6.13' && 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 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
169
152
  }
170
153
  return binding
171
154
  } catch (e) {
@@ -179,25 +162,16 @@ function requireNative() {
179
162
  }
180
163
  try {
181
164
  const binding = require('@vue-jsx-vapor/compiler-rs-win32-arm64-msvc')
182
- const bindingPackageVersion =
183
- require('@vue-jsx-vapor/compiler-rs-win32-arm64-msvc/package.json').version
184
- if (
185
- bindingPackageVersion !== '1.1.1' &&
186
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
187
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
188
- ) {
189
- throw new Error(
190
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
191
- )
165
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-win32-arm64-msvc/package.json').version
166
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
167
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
192
168
  }
193
169
  return binding
194
170
  } catch (e) {
195
171
  loadErrors.push(e)
196
172
  }
197
173
  } else {
198
- loadErrors.push(
199
- new Error(`Unsupported architecture on Windows: ${process.arch}`),
200
- )
174
+ loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`))
201
175
  }
202
176
  } else if (process.platform === 'darwin') {
203
177
  try {
@@ -207,16 +181,9 @@ function requireNative() {
207
181
  }
208
182
  try {
209
183
  const binding = require('@vue-jsx-vapor/compiler-rs-darwin-universal')
210
- const bindingPackageVersion =
211
- require('@vue-jsx-vapor/compiler-rs-darwin-universal/package.json').version
212
- if (
213
- bindingPackageVersion !== '1.1.1' &&
214
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
215
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
216
- ) {
217
- throw new Error(
218
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
219
- )
184
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-darwin-universal/package.json').version
185
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
186
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
220
187
  }
221
188
  return binding
222
189
  } catch (e) {
@@ -230,16 +197,9 @@ function requireNative() {
230
197
  }
231
198
  try {
232
199
  const binding = require('@vue-jsx-vapor/compiler-rs-darwin-x64')
233
- const bindingPackageVersion =
234
- require('@vue-jsx-vapor/compiler-rs-darwin-x64/package.json').version
235
- if (
236
- bindingPackageVersion !== '1.1.1' &&
237
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
238
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
239
- ) {
240
- throw new Error(
241
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
242
- )
200
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-darwin-x64/package.json').version
201
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
202
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
243
203
  }
244
204
  return binding
245
205
  } catch (e) {
@@ -253,25 +213,16 @@ function requireNative() {
253
213
  }
254
214
  try {
255
215
  const binding = require('@vue-jsx-vapor/compiler-rs-darwin-arm64')
256
- const bindingPackageVersion =
257
- require('@vue-jsx-vapor/compiler-rs-darwin-arm64/package.json').version
258
- if (
259
- bindingPackageVersion !== '1.1.1' &&
260
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
261
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
262
- ) {
263
- throw new Error(
264
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
265
- )
216
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-darwin-arm64/package.json').version
217
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
218
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
266
219
  }
267
220
  return binding
268
221
  } catch (e) {
269
222
  loadErrors.push(e)
270
223
  }
271
224
  } else {
272
- loadErrors.push(
273
- new Error(`Unsupported architecture on macOS: ${process.arch}`),
274
- )
225
+ loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`))
275
226
  }
276
227
  } else if (process.platform === 'freebsd') {
277
228
  if (process.arch === 'x64') {
@@ -282,16 +233,9 @@ function requireNative() {
282
233
  }
283
234
  try {
284
235
  const binding = require('@vue-jsx-vapor/compiler-rs-freebsd-x64')
285
- const bindingPackageVersion =
286
- require('@vue-jsx-vapor/compiler-rs-freebsd-x64/package.json').version
287
- if (
288
- bindingPackageVersion !== '1.1.1' &&
289
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
290
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
291
- ) {
292
- throw new Error(
293
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
294
- )
236
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-freebsd-x64/package.json').version
237
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
238
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
295
239
  }
296
240
  return binding
297
241
  } catch (e) {
@@ -305,25 +249,16 @@ function requireNative() {
305
249
  }
306
250
  try {
307
251
  const binding = require('@vue-jsx-vapor/compiler-rs-freebsd-arm64')
308
- const bindingPackageVersion =
309
- require('@vue-jsx-vapor/compiler-rs-freebsd-arm64/package.json').version
310
- if (
311
- bindingPackageVersion !== '1.1.1' &&
312
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
313
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
314
- ) {
315
- throw new Error(
316
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
317
- )
252
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-freebsd-arm64/package.json').version
253
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
254
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
318
255
  }
319
256
  return binding
320
257
  } catch (e) {
321
258
  loadErrors.push(e)
322
259
  }
323
260
  } else {
324
- loadErrors.push(
325
- new Error(`Unsupported architecture on FreeBSD: ${process.arch}`),
326
- )
261
+ loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`))
327
262
  }
328
263
  } else if (process.platform === 'linux') {
329
264
  if (process.arch === 'x64') {
@@ -335,16 +270,9 @@ function requireNative() {
335
270
  }
336
271
  try {
337
272
  const binding = require('@vue-jsx-vapor/compiler-rs-linux-x64-musl')
338
- const bindingPackageVersion =
339
- require('@vue-jsx-vapor/compiler-rs-linux-x64-musl/package.json').version
340
- if (
341
- bindingPackageVersion !== '1.1.1' &&
342
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
343
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
344
- ) {
345
- throw new Error(
346
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
347
- )
273
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-linux-x64-musl/package.json').version
274
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
275
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
348
276
  }
349
277
  return binding
350
278
  } catch (e) {
@@ -358,16 +286,9 @@ function requireNative() {
358
286
  }
359
287
  try {
360
288
  const binding = require('@vue-jsx-vapor/compiler-rs-linux-x64-gnu')
361
- const bindingPackageVersion =
362
- require('@vue-jsx-vapor/compiler-rs-linux-x64-gnu/package.json').version
363
- if (
364
- bindingPackageVersion !== '1.1.1' &&
365
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
366
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
367
- ) {
368
- throw new Error(
369
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
370
- )
289
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-linux-x64-gnu/package.json').version
290
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
291
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
371
292
  }
372
293
  return binding
373
294
  } catch (e) {
@@ -383,16 +304,9 @@ function requireNative() {
383
304
  }
384
305
  try {
385
306
  const binding = require('@vue-jsx-vapor/compiler-rs-linux-arm64-musl')
386
- const bindingPackageVersion =
387
- require('@vue-jsx-vapor/compiler-rs-linux-arm64-musl/package.json').version
388
- if (
389
- bindingPackageVersion !== '1.1.1' &&
390
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
391
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
392
- ) {
393
- throw new Error(
394
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
395
- )
307
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-linux-arm64-musl/package.json').version
308
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
309
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
396
310
  }
397
311
  return binding
398
312
  } catch (e) {
@@ -406,16 +320,9 @@ function requireNative() {
406
320
  }
407
321
  try {
408
322
  const binding = require('@vue-jsx-vapor/compiler-rs-linux-arm64-gnu')
409
- const bindingPackageVersion =
410
- require('@vue-jsx-vapor/compiler-rs-linux-arm64-gnu/package.json').version
411
- if (
412
- bindingPackageVersion !== '1.1.1' &&
413
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
414
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
415
- ) {
416
- throw new Error(
417
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
418
- )
323
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-linux-arm64-gnu/package.json').version
324
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
325
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
419
326
  }
420
327
  return binding
421
328
  } catch (e) {
@@ -431,16 +338,9 @@ function requireNative() {
431
338
  }
432
339
  try {
433
340
  const binding = require('@vue-jsx-vapor/compiler-rs-linux-arm-musleabihf')
434
- const bindingPackageVersion =
435
- require('@vue-jsx-vapor/compiler-rs-linux-arm-musleabihf/package.json').version
436
- if (
437
- bindingPackageVersion !== '1.1.1' &&
438
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
439
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
440
- ) {
441
- throw new Error(
442
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
443
- )
341
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-linux-arm-musleabihf/package.json').version
342
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
343
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
444
344
  }
445
345
  return binding
446
346
  } catch (e) {
@@ -454,16 +354,9 @@ function requireNative() {
454
354
  }
455
355
  try {
456
356
  const binding = require('@vue-jsx-vapor/compiler-rs-linux-arm-gnueabihf')
457
- const bindingPackageVersion =
458
- require('@vue-jsx-vapor/compiler-rs-linux-arm-gnueabihf/package.json').version
459
- if (
460
- bindingPackageVersion !== '1.1.1' &&
461
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
462
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
463
- ) {
464
- throw new Error(
465
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
466
- )
357
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-linux-arm-gnueabihf/package.json').version
358
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
359
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
467
360
  }
468
361
  return binding
469
362
  } catch (e) {
@@ -479,16 +372,9 @@ function requireNative() {
479
372
  }
480
373
  try {
481
374
  const binding = require('@vue-jsx-vapor/compiler-rs-linux-loong64-musl')
482
- const bindingPackageVersion =
483
- require('@vue-jsx-vapor/compiler-rs-linux-loong64-musl/package.json').version
484
- if (
485
- bindingPackageVersion !== '1.1.1' &&
486
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
487
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
488
- ) {
489
- throw new Error(
490
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
491
- )
375
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-linux-loong64-musl/package.json').version
376
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
377
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
492
378
  }
493
379
  return binding
494
380
  } catch (e) {
@@ -502,16 +388,9 @@ function requireNative() {
502
388
  }
503
389
  try {
504
390
  const binding = require('@vue-jsx-vapor/compiler-rs-linux-loong64-gnu')
505
- const bindingPackageVersion =
506
- require('@vue-jsx-vapor/compiler-rs-linux-loong64-gnu/package.json').version
507
- if (
508
- bindingPackageVersion !== '1.1.1' &&
509
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
510
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
511
- ) {
512
- throw new Error(
513
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
514
- )
391
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-linux-loong64-gnu/package.json').version
392
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
393
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
515
394
  }
516
395
  return binding
517
396
  } catch (e) {
@@ -527,16 +406,9 @@ function requireNative() {
527
406
  }
528
407
  try {
529
408
  const binding = require('@vue-jsx-vapor/compiler-rs-linux-riscv64-musl')
530
- const bindingPackageVersion =
531
- require('@vue-jsx-vapor/compiler-rs-linux-riscv64-musl/package.json').version
532
- if (
533
- bindingPackageVersion !== '1.1.1' &&
534
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
535
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
536
- ) {
537
- throw new Error(
538
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
539
- )
409
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-linux-riscv64-musl/package.json').version
410
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
540
412
  }
541
413
  return binding
542
414
  } catch (e) {
@@ -550,16 +422,9 @@ function requireNative() {
550
422
  }
551
423
  try {
552
424
  const binding = require('@vue-jsx-vapor/compiler-rs-linux-riscv64-gnu')
553
- const bindingPackageVersion =
554
- require('@vue-jsx-vapor/compiler-rs-linux-riscv64-gnu/package.json').version
555
- if (
556
- bindingPackageVersion !== '1.1.1' &&
557
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
558
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
559
- ) {
560
- throw new Error(
561
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
562
- )
425
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-linux-riscv64-gnu/package.json').version
426
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
427
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
563
428
  }
564
429
  return binding
565
430
  } catch (e) {
@@ -574,16 +439,9 @@ function requireNative() {
574
439
  }
575
440
  try {
576
441
  const binding = require('@vue-jsx-vapor/compiler-rs-linux-ppc64-gnu')
577
- const bindingPackageVersion =
578
- require('@vue-jsx-vapor/compiler-rs-linux-ppc64-gnu/package.json').version
579
- if (
580
- bindingPackageVersion !== '1.1.1' &&
581
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
582
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
583
- ) {
584
- throw new Error(
585
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
586
- )
442
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-linux-ppc64-gnu/package.json').version
443
+ if (bindingPackageVersion !== '2.6.13' && 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 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
587
445
  }
588
446
  return binding
589
447
  } catch (e) {
@@ -597,25 +455,16 @@ function requireNative() {
597
455
  }
598
456
  try {
599
457
  const binding = require('@vue-jsx-vapor/compiler-rs-linux-s390x-gnu')
600
- const bindingPackageVersion =
601
- require('@vue-jsx-vapor/compiler-rs-linux-s390x-gnu/package.json').version
602
- if (
603
- bindingPackageVersion !== '1.1.1' &&
604
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
605
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
606
- ) {
607
- throw new Error(
608
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
609
- )
458
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-linux-s390x-gnu/package.json').version
459
+ if (bindingPackageVersion !== '2.6.13' && 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 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
610
461
  }
611
462
  return binding
612
463
  } catch (e) {
613
464
  loadErrors.push(e)
614
465
  }
615
466
  } else {
616
- loadErrors.push(
617
- new Error(`Unsupported architecture on Linux: ${process.arch}`),
618
- )
467
+ loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`))
619
468
  }
620
469
  } else if (process.platform === 'openharmony') {
621
470
  if (process.arch === 'arm64') {
@@ -626,16 +475,9 @@ function requireNative() {
626
475
  }
627
476
  try {
628
477
  const binding = require('@vue-jsx-vapor/compiler-rs-openharmony-arm64')
629
- const bindingPackageVersion =
630
- require('@vue-jsx-vapor/compiler-rs-openharmony-arm64/package.json').version
631
- if (
632
- bindingPackageVersion !== '1.1.1' &&
633
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
634
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
635
- ) {
636
- throw new Error(
637
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
638
- )
478
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-openharmony-arm64/package.json').version
479
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
480
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
639
481
  }
640
482
  return binding
641
483
  } catch (e) {
@@ -649,16 +491,9 @@ function requireNative() {
649
491
  }
650
492
  try {
651
493
  const binding = require('@vue-jsx-vapor/compiler-rs-openharmony-x64')
652
- const bindingPackageVersion =
653
- require('@vue-jsx-vapor/compiler-rs-openharmony-x64/package.json').version
654
- if (
655
- bindingPackageVersion !== '1.1.1' &&
656
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
657
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
658
- ) {
659
- throw new Error(
660
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
661
- )
494
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-openharmony-x64/package.json').version
495
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
496
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
662
497
  }
663
498
  return binding
664
499
  } catch (e) {
@@ -672,32 +507,19 @@ function requireNative() {
672
507
  }
673
508
  try {
674
509
  const binding = require('@vue-jsx-vapor/compiler-rs-openharmony-arm')
675
- const bindingPackageVersion =
676
- require('@vue-jsx-vapor/compiler-rs-openharmony-arm/package.json').version
677
- if (
678
- bindingPackageVersion !== '1.1.1' &&
679
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
680
- process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
681
- ) {
682
- throw new Error(
683
- `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
684
- )
510
+ const bindingPackageVersion = require('@vue-jsx-vapor/compiler-rs-openharmony-arm/package.json').version
511
+ if (bindingPackageVersion !== '2.6.13' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
512
+ throw new Error(`Native binding package version mismatch, expected 2.6.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
685
513
  }
686
514
  return binding
687
515
  } catch (e) {
688
516
  loadErrors.push(e)
689
517
  }
690
518
  } else {
691
- loadErrors.push(
692
- new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`),
693
- )
519
+ loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`))
694
520
  }
695
521
  } else {
696
- loadErrors.push(
697
- new Error(
698
- `Unsupported OS: ${process.platform}, architecture: ${process.arch}`,
699
- ),
700
- )
522
+ loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))
701
523
  }
702
524
  }
703
525
 
@@ -726,9 +548,7 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
726
548
  }
727
549
  }
728
550
  if (process.env.NAPI_RS_FORCE_WASI === 'error' && !wasiBinding) {
729
- const error = new Error(
730
- 'WASI binding not found and NAPI_RS_FORCE_WASI is set to error',
731
- )
551
+ const error = new Error('WASI binding not found and NAPI_RS_FORCE_WASI is set to error')
732
552
  error.cause = wasiBindingError
733
553
  throw error
734
554
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue-jsx-vapor/compiler-rs",
3
- "version": "2.6.12",
3
+ "version": "2.7.1",
4
4
  "packageManager": "pnpm@10.17.1",
5
5
  "description": "Template project for writing node package with napi-rs",
6
6
  "keywords": [
@@ -13,7 +13,7 @@
13
13
  ],
14
14
  "license": "MIT",
15
15
  "repository": {
16
- "url": "git+ssh://git@github.com/zhiyuanzmj/compiler-rs.git",
16
+ "url": "git+https://github.com/vuejs/vue-jsx-vapor.git",
17
17
  "type": "git"
18
18
  },
19
19
  "files": [
@@ -68,19 +68,19 @@
68
68
  "emnapi": "^1.5.0"
69
69
  },
70
70
  "optionalDependencies": {
71
- "@vue-jsx-vapor/compiler-rs-darwin-x64": "2.6.12",
72
- "@vue-jsx-vapor/compiler-rs-darwin-arm64": "2.6.12",
73
- "@vue-jsx-vapor/compiler-rs-linux-x64-gnu": "2.6.12",
74
- "@vue-jsx-vapor/compiler-rs-win32-x64-msvc": "2.6.12",
75
- "@vue-jsx-vapor/compiler-rs-linux-x64-musl": "2.6.12",
76
- "@vue-jsx-vapor/compiler-rs-linux-arm64-gnu": "2.6.12",
77
- "@vue-jsx-vapor/compiler-rs-win32-ia32-msvc": "2.6.12",
78
- "@vue-jsx-vapor/compiler-rs-linux-arm-gnueabihf": "2.6.12",
79
- "@vue-jsx-vapor/compiler-rs-android-arm64": "2.6.12",
80
- "@vue-jsx-vapor/compiler-rs-freebsd-x64": "2.6.12",
81
- "@vue-jsx-vapor/compiler-rs-linux-arm64-musl": "2.6.12",
82
- "@vue-jsx-vapor/compiler-rs-win32-arm64-msvc": "2.6.12",
83
- "@vue-jsx-vapor/compiler-rs-android-arm-eabi": "2.6.12",
84
- "@vue-jsx-vapor/compiler-rs-wasm32-wasi": "2.6.12"
71
+ "@vue-jsx-vapor/compiler-rs-darwin-x64": "2.7.1",
72
+ "@vue-jsx-vapor/compiler-rs-darwin-arm64": "2.7.1",
73
+ "@vue-jsx-vapor/compiler-rs-linux-x64-gnu": "2.7.1",
74
+ "@vue-jsx-vapor/compiler-rs-win32-x64-msvc": "2.7.1",
75
+ "@vue-jsx-vapor/compiler-rs-linux-x64-musl": "2.7.1",
76
+ "@vue-jsx-vapor/compiler-rs-linux-arm64-gnu": "2.7.1",
77
+ "@vue-jsx-vapor/compiler-rs-win32-ia32-msvc": "2.7.1",
78
+ "@vue-jsx-vapor/compiler-rs-linux-arm-gnueabihf": "2.7.1",
79
+ "@vue-jsx-vapor/compiler-rs-android-arm64": "2.7.1",
80
+ "@vue-jsx-vapor/compiler-rs-freebsd-x64": "2.7.1",
81
+ "@vue-jsx-vapor/compiler-rs-linux-arm64-musl": "2.7.1",
82
+ "@vue-jsx-vapor/compiler-rs-win32-arm64-msvc": "2.7.1",
83
+ "@vue-jsx-vapor/compiler-rs-android-arm-eabi": "2.7.1",
84
+ "@vue-jsx-vapor/compiler-rs-wasm32-wasi": "2.7.1"
85
85
  }
86
86
  }