oxc-transform 0.149.0 → 0.150.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/index.d.ts +5 -2
- package/index.js +81 -82
- package/package.json +21 -21
package/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* auto-generated by NAPI-RS */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
|
|
3
4
|
export interface Comment {
|
|
4
5
|
type: 'Line' | 'Block'
|
|
5
6
|
value: string
|
|
@@ -24,8 +25,9 @@ export interface OxcError {
|
|
|
24
25
|
export declare const enum Severity {
|
|
25
26
|
Error = 'Error',
|
|
26
27
|
Warning = 'Warning',
|
|
27
|
-
Advice = 'Advice'
|
|
28
|
+
Advice = 'Advice',
|
|
28
29
|
}
|
|
30
|
+
|
|
29
31
|
export interface SourceMap {
|
|
30
32
|
file?: string
|
|
31
33
|
mappings: string
|
|
@@ -36,6 +38,7 @@ export interface SourceMap {
|
|
|
36
38
|
version: number
|
|
37
39
|
x_google_ignoreList?: Array<number>
|
|
38
40
|
}
|
|
41
|
+
|
|
39
42
|
export interface ArrowFunctionsOptions {
|
|
40
43
|
/**
|
|
41
44
|
* This option enables the following:
|
|
@@ -158,7 +161,7 @@ export declare const enum HelperMode {
|
|
|
158
161
|
* babelHelpers.helperName(...arguments);
|
|
159
162
|
* ```
|
|
160
163
|
*/
|
|
161
|
-
External = 'External'
|
|
164
|
+
External = 'External',
|
|
162
165
|
}
|
|
163
166
|
|
|
164
167
|
export interface Helpers {
|
package/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// prettier-ignore
|
|
2
1
|
/* eslint-disable */
|
|
3
2
|
// @ts-nocheck
|
|
4
3
|
/* auto-generated by NAPI-RS */
|
|
@@ -66,7 +65,7 @@ const isMuslFromChildProcess = () => {
|
|
|
66
65
|
function requireNative() {
|
|
67
66
|
if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
|
|
68
67
|
try {
|
|
69
|
-
return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)
|
|
68
|
+
return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)
|
|
70
69
|
} catch (err) {
|
|
71
70
|
loadErrors.push(err)
|
|
72
71
|
}
|
|
@@ -80,8 +79,8 @@ function requireNative() {
|
|
|
80
79
|
try {
|
|
81
80
|
const binding = require('@oxc-transform/binding-android-arm64')
|
|
82
81
|
const bindingPackageVersion = require('@oxc-transform/binding-android-arm64/package.json').version
|
|
83
|
-
if (bindingPackageVersion !== '0.
|
|
84
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
82
|
+
if (bindingPackageVersion !== '0.150.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
83
|
+
throw new Error(`Native binding package version mismatch, expected 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
85
84
|
}
|
|
86
85
|
return binding
|
|
87
86
|
} catch (e) {
|
|
@@ -96,8 +95,8 @@ function requireNative() {
|
|
|
96
95
|
try {
|
|
97
96
|
const binding = require('@oxc-transform/binding-android-arm-eabi')
|
|
98
97
|
const bindingPackageVersion = require('@oxc-transform/binding-android-arm-eabi/package.json').version
|
|
99
|
-
if (bindingPackageVersion !== '0.
|
|
100
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
98
|
+
if (bindingPackageVersion !== '0.150.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
99
|
+
throw new Error(`Native binding package version mismatch, expected 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
101
100
|
}
|
|
102
101
|
return binding
|
|
103
102
|
} catch (e) {
|
|
@@ -110,36 +109,36 @@ function requireNative() {
|
|
|
110
109
|
if (process.arch === 'x64') {
|
|
111
110
|
if ((process.config && process.config.variables && process.config.variables.shlib_suffix === 'dll.a') || (process.config && process.config.variables && process.config.variables.node_target_type === 'shared_library')) {
|
|
112
111
|
try {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
112
|
+
return require('./transform.win32-x64-gnu.node')
|
|
113
|
+
} catch (e) {
|
|
114
|
+
loadErrors.push(e)
|
|
115
|
+
}
|
|
116
|
+
try {
|
|
117
|
+
const binding = require('@oxc-transform/binding-win32-x64-gnu')
|
|
118
|
+
const bindingPackageVersion = require('@oxc-transform/binding-win32-x64-gnu/package.json').version
|
|
119
|
+
if (bindingPackageVersion !== '0.150.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
120
|
+
throw new Error(`Native binding package version mismatch, expected 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
121
|
+
}
|
|
122
|
+
return binding
|
|
123
|
+
} catch (e) {
|
|
124
|
+
loadErrors.push(e)
|
|
122
125
|
}
|
|
123
|
-
return binding
|
|
124
|
-
} catch (e) {
|
|
125
|
-
loadErrors.push(e)
|
|
126
|
-
}
|
|
127
126
|
} else {
|
|
128
127
|
try {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
128
|
+
return require('./transform.win32-x64-msvc.node')
|
|
129
|
+
} catch (e) {
|
|
130
|
+
loadErrors.push(e)
|
|
131
|
+
}
|
|
132
|
+
try {
|
|
133
|
+
const binding = require('@oxc-transform/binding-win32-x64-msvc')
|
|
134
|
+
const bindingPackageVersion = require('@oxc-transform/binding-win32-x64-msvc/package.json').version
|
|
135
|
+
if (bindingPackageVersion !== '0.150.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
136
|
+
throw new Error(`Native binding package version mismatch, expected 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
137
|
+
}
|
|
138
|
+
return binding
|
|
139
|
+
} catch (e) {
|
|
140
|
+
loadErrors.push(e)
|
|
138
141
|
}
|
|
139
|
-
return binding
|
|
140
|
-
} catch (e) {
|
|
141
|
-
loadErrors.push(e)
|
|
142
|
-
}
|
|
143
142
|
}
|
|
144
143
|
} else if (process.arch === 'ia32') {
|
|
145
144
|
try {
|
|
@@ -150,8 +149,8 @@ function requireNative() {
|
|
|
150
149
|
try {
|
|
151
150
|
const binding = require('@oxc-transform/binding-win32-ia32-msvc')
|
|
152
151
|
const bindingPackageVersion = require('@oxc-transform/binding-win32-ia32-msvc/package.json').version
|
|
153
|
-
if (bindingPackageVersion !== '0.
|
|
154
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
152
|
+
if (bindingPackageVersion !== '0.150.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 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
155
154
|
}
|
|
156
155
|
return binding
|
|
157
156
|
} catch (e) {
|
|
@@ -166,8 +165,8 @@ function requireNative() {
|
|
|
166
165
|
try {
|
|
167
166
|
const binding = require('@oxc-transform/binding-win32-arm64-msvc')
|
|
168
167
|
const bindingPackageVersion = require('@oxc-transform/binding-win32-arm64-msvc/package.json').version
|
|
169
|
-
if (bindingPackageVersion !== '0.
|
|
170
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
168
|
+
if (bindingPackageVersion !== '0.150.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
169
|
+
throw new Error(`Native binding package version mismatch, expected 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
171
170
|
}
|
|
172
171
|
return binding
|
|
173
172
|
} catch (e) {
|
|
@@ -185,8 +184,8 @@ function requireNative() {
|
|
|
185
184
|
try {
|
|
186
185
|
const binding = require('@oxc-transform/binding-darwin-universal')
|
|
187
186
|
const bindingPackageVersion = require('@oxc-transform/binding-darwin-universal/package.json').version
|
|
188
|
-
if (bindingPackageVersion !== '0.
|
|
189
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
187
|
+
if (bindingPackageVersion !== '0.150.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 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
190
189
|
}
|
|
191
190
|
return binding
|
|
192
191
|
} catch (e) {
|
|
@@ -201,8 +200,8 @@ function requireNative() {
|
|
|
201
200
|
try {
|
|
202
201
|
const binding = require('@oxc-transform/binding-darwin-x64')
|
|
203
202
|
const bindingPackageVersion = require('@oxc-transform/binding-darwin-x64/package.json').version
|
|
204
|
-
if (bindingPackageVersion !== '0.
|
|
205
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
203
|
+
if (bindingPackageVersion !== '0.150.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 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
206
205
|
}
|
|
207
206
|
return binding
|
|
208
207
|
} catch (e) {
|
|
@@ -217,8 +216,8 @@ function requireNative() {
|
|
|
217
216
|
try {
|
|
218
217
|
const binding = require('@oxc-transform/binding-darwin-arm64')
|
|
219
218
|
const bindingPackageVersion = require('@oxc-transform/binding-darwin-arm64/package.json').version
|
|
220
|
-
if (bindingPackageVersion !== '0.
|
|
221
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
219
|
+
if (bindingPackageVersion !== '0.150.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
220
|
+
throw new Error(`Native binding package version mismatch, expected 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
222
221
|
}
|
|
223
222
|
return binding
|
|
224
223
|
} catch (e) {
|
|
@@ -237,8 +236,8 @@ function requireNative() {
|
|
|
237
236
|
try {
|
|
238
237
|
const binding = require('@oxc-transform/binding-freebsd-x64')
|
|
239
238
|
const bindingPackageVersion = require('@oxc-transform/binding-freebsd-x64/package.json').version
|
|
240
|
-
if (bindingPackageVersion !== '0.
|
|
241
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
239
|
+
if (bindingPackageVersion !== '0.150.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 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
242
241
|
}
|
|
243
242
|
return binding
|
|
244
243
|
} catch (e) {
|
|
@@ -253,8 +252,8 @@ function requireNative() {
|
|
|
253
252
|
try {
|
|
254
253
|
const binding = require('@oxc-transform/binding-freebsd-arm64')
|
|
255
254
|
const bindingPackageVersion = require('@oxc-transform/binding-freebsd-arm64/package.json').version
|
|
256
|
-
if (bindingPackageVersion !== '0.
|
|
257
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
255
|
+
if (bindingPackageVersion !== '0.150.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
256
|
+
throw new Error(`Native binding package version mismatch, expected 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
258
257
|
}
|
|
259
258
|
return binding
|
|
260
259
|
} catch (e) {
|
|
@@ -274,8 +273,8 @@ function requireNative() {
|
|
|
274
273
|
try {
|
|
275
274
|
const binding = require('@oxc-transform/binding-linux-x64-musl')
|
|
276
275
|
const bindingPackageVersion = require('@oxc-transform/binding-linux-x64-musl/package.json').version
|
|
277
|
-
if (bindingPackageVersion !== '0.
|
|
278
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
276
|
+
if (bindingPackageVersion !== '0.150.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 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
279
278
|
}
|
|
280
279
|
return binding
|
|
281
280
|
} catch (e) {
|
|
@@ -290,8 +289,8 @@ function requireNative() {
|
|
|
290
289
|
try {
|
|
291
290
|
const binding = require('@oxc-transform/binding-linux-x64-gnu')
|
|
292
291
|
const bindingPackageVersion = require('@oxc-transform/binding-linux-x64-gnu/package.json').version
|
|
293
|
-
if (bindingPackageVersion !== '0.
|
|
294
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
292
|
+
if (bindingPackageVersion !== '0.150.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
293
|
+
throw new Error(`Native binding package version mismatch, expected 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
295
294
|
}
|
|
296
295
|
return binding
|
|
297
296
|
} catch (e) {
|
|
@@ -308,8 +307,8 @@ function requireNative() {
|
|
|
308
307
|
try {
|
|
309
308
|
const binding = require('@oxc-transform/binding-linux-arm64-musl')
|
|
310
309
|
const bindingPackageVersion = require('@oxc-transform/binding-linux-arm64-musl/package.json').version
|
|
311
|
-
if (bindingPackageVersion !== '0.
|
|
312
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
310
|
+
if (bindingPackageVersion !== '0.150.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 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
313
312
|
}
|
|
314
313
|
return binding
|
|
315
314
|
} catch (e) {
|
|
@@ -324,8 +323,8 @@ function requireNative() {
|
|
|
324
323
|
try {
|
|
325
324
|
const binding = require('@oxc-transform/binding-linux-arm64-gnu')
|
|
326
325
|
const bindingPackageVersion = require('@oxc-transform/binding-linux-arm64-gnu/package.json').version
|
|
327
|
-
if (bindingPackageVersion !== '0.
|
|
328
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
326
|
+
if (bindingPackageVersion !== '0.150.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
327
|
+
throw new Error(`Native binding package version mismatch, expected 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
329
328
|
}
|
|
330
329
|
return binding
|
|
331
330
|
} catch (e) {
|
|
@@ -342,8 +341,8 @@ function requireNative() {
|
|
|
342
341
|
try {
|
|
343
342
|
const binding = require('@oxc-transform/binding-linux-arm-musleabihf')
|
|
344
343
|
const bindingPackageVersion = require('@oxc-transform/binding-linux-arm-musleabihf/package.json').version
|
|
345
|
-
if (bindingPackageVersion !== '0.
|
|
346
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
344
|
+
if (bindingPackageVersion !== '0.150.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 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
347
346
|
}
|
|
348
347
|
return binding
|
|
349
348
|
} catch (e) {
|
|
@@ -358,8 +357,8 @@ function requireNative() {
|
|
|
358
357
|
try {
|
|
359
358
|
const binding = require('@oxc-transform/binding-linux-arm-gnueabihf')
|
|
360
359
|
const bindingPackageVersion = require('@oxc-transform/binding-linux-arm-gnueabihf/package.json').version
|
|
361
|
-
if (bindingPackageVersion !== '0.
|
|
362
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
360
|
+
if (bindingPackageVersion !== '0.150.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
361
|
+
throw new Error(`Native binding package version mismatch, expected 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
363
362
|
}
|
|
364
363
|
return binding
|
|
365
364
|
} catch (e) {
|
|
@@ -376,8 +375,8 @@ function requireNative() {
|
|
|
376
375
|
try {
|
|
377
376
|
const binding = require('@oxc-transform/binding-linux-loong64-musl')
|
|
378
377
|
const bindingPackageVersion = require('@oxc-transform/binding-linux-loong64-musl/package.json').version
|
|
379
|
-
if (bindingPackageVersion !== '0.
|
|
380
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
378
|
+
if (bindingPackageVersion !== '0.150.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 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
381
380
|
}
|
|
382
381
|
return binding
|
|
383
382
|
} catch (e) {
|
|
@@ -392,8 +391,8 @@ function requireNative() {
|
|
|
392
391
|
try {
|
|
393
392
|
const binding = require('@oxc-transform/binding-linux-loong64-gnu')
|
|
394
393
|
const bindingPackageVersion = require('@oxc-transform/binding-linux-loong64-gnu/package.json').version
|
|
395
|
-
if (bindingPackageVersion !== '0.
|
|
396
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
394
|
+
if (bindingPackageVersion !== '0.150.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
395
|
+
throw new Error(`Native binding package version mismatch, expected 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
397
396
|
}
|
|
398
397
|
return binding
|
|
399
398
|
} catch (e) {
|
|
@@ -410,8 +409,8 @@ function requireNative() {
|
|
|
410
409
|
try {
|
|
411
410
|
const binding = require('@oxc-transform/binding-linux-riscv64-musl')
|
|
412
411
|
const bindingPackageVersion = require('@oxc-transform/binding-linux-riscv64-musl/package.json').version
|
|
413
|
-
if (bindingPackageVersion !== '0.
|
|
414
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
412
|
+
if (bindingPackageVersion !== '0.150.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 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
415
414
|
}
|
|
416
415
|
return binding
|
|
417
416
|
} catch (e) {
|
|
@@ -426,8 +425,8 @@ function requireNative() {
|
|
|
426
425
|
try {
|
|
427
426
|
const binding = require('@oxc-transform/binding-linux-riscv64-gnu')
|
|
428
427
|
const bindingPackageVersion = require('@oxc-transform/binding-linux-riscv64-gnu/package.json').version
|
|
429
|
-
if (bindingPackageVersion !== '0.
|
|
430
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
428
|
+
if (bindingPackageVersion !== '0.150.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
429
|
+
throw new Error(`Native binding package version mismatch, expected 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
431
430
|
}
|
|
432
431
|
return binding
|
|
433
432
|
} catch (e) {
|
|
@@ -443,8 +442,8 @@ function requireNative() {
|
|
|
443
442
|
try {
|
|
444
443
|
const binding = require('@oxc-transform/binding-linux-ppc64-gnu')
|
|
445
444
|
const bindingPackageVersion = require('@oxc-transform/binding-linux-ppc64-gnu/package.json').version
|
|
446
|
-
if (bindingPackageVersion !== '0.
|
|
447
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
445
|
+
if (bindingPackageVersion !== '0.150.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 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
448
447
|
}
|
|
449
448
|
return binding
|
|
450
449
|
} catch (e) {
|
|
@@ -459,8 +458,8 @@ function requireNative() {
|
|
|
459
458
|
try {
|
|
460
459
|
const binding = require('@oxc-transform/binding-linux-s390x-gnu')
|
|
461
460
|
const bindingPackageVersion = require('@oxc-transform/binding-linux-s390x-gnu/package.json').version
|
|
462
|
-
if (bindingPackageVersion !== '0.
|
|
463
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
461
|
+
if (bindingPackageVersion !== '0.150.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
462
|
+
throw new Error(`Native binding package version mismatch, expected 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
464
463
|
}
|
|
465
464
|
return binding
|
|
466
465
|
} catch (e) {
|
|
@@ -479,8 +478,8 @@ function requireNative() {
|
|
|
479
478
|
try {
|
|
480
479
|
const binding = require('@oxc-transform/binding-openharmony-arm64')
|
|
481
480
|
const bindingPackageVersion = require('@oxc-transform/binding-openharmony-arm64/package.json').version
|
|
482
|
-
if (bindingPackageVersion !== '0.
|
|
483
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
481
|
+
if (bindingPackageVersion !== '0.150.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 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
484
483
|
}
|
|
485
484
|
return binding
|
|
486
485
|
} catch (e) {
|
|
@@ -495,8 +494,8 @@ function requireNative() {
|
|
|
495
494
|
try {
|
|
496
495
|
const binding = require('@oxc-transform/binding-openharmony-x64')
|
|
497
496
|
const bindingPackageVersion = require('@oxc-transform/binding-openharmony-x64/package.json').version
|
|
498
|
-
if (bindingPackageVersion !== '0.
|
|
499
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
497
|
+
if (bindingPackageVersion !== '0.150.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 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
500
499
|
}
|
|
501
500
|
return binding
|
|
502
501
|
} catch (e) {
|
|
@@ -511,8 +510,8 @@ function requireNative() {
|
|
|
511
510
|
try {
|
|
512
511
|
const binding = require('@oxc-transform/binding-openharmony-arm')
|
|
513
512
|
const bindingPackageVersion = require('@oxc-transform/binding-openharmony-arm/package.json').version
|
|
514
|
-
if (bindingPackageVersion !== '0.
|
|
515
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
513
|
+
if (bindingPackageVersion !== '0.150.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
514
|
+
throw new Error(`Native binding package version mismatch, expected 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
516
515
|
}
|
|
517
516
|
return binding
|
|
518
517
|
} catch (e) {
|
|
@@ -553,7 +552,7 @@ function createLoadErrorChain(errors) {
|
|
|
553
552
|
//
|
|
554
553
|
// NAPI_RS_WASI_FLAVOR selects one exact generated flavor and implies strict
|
|
555
554
|
// WASI loading. It never crosses into another flavor or falls back to native.
|
|
556
|
-
const __napiWasiFlavors = [
|
|
555
|
+
const __napiWasiFlavors = ['wasm32-wasi']
|
|
557
556
|
const __napiWasiFlavor = process.env.NAPI_RS_WASI_FLAVOR
|
|
558
557
|
const __napiWasiFlavorRequested =
|
|
559
558
|
typeof __napiWasiFlavor === 'string' && __napiWasiFlavor.length > 0
|
|
@@ -622,11 +621,11 @@ if (!nativeBinding || forceWasi) {
|
|
|
622
621
|
}
|
|
623
622
|
return null
|
|
624
623
|
}
|
|
625
|
-
if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor ===
|
|
624
|
+
if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === 'wasm32-wasi')) {
|
|
626
625
|
let candidateError = null
|
|
627
626
|
let candidateFailed = false
|
|
628
627
|
try {
|
|
629
|
-
candidateError = __napiWasiResolveCandidate('./transform.wasi.cjs', false, [
|
|
628
|
+
candidateError = __napiWasiResolveCandidate('./transform.wasi.cjs', false, ['./transform.wasm32-wasi.debug.wasm', './transform.wasm32-wasi.wasm'])
|
|
630
629
|
candidateFailed = candidateError !== null
|
|
631
630
|
if (!candidateFailed) {
|
|
632
631
|
wasiBinding = require('./transform.wasi.cjs')
|
|
@@ -642,7 +641,7 @@ if (!nativeBinding || forceWasi) {
|
|
|
642
641
|
loadErrors.push(candidateError)
|
|
643
642
|
}
|
|
644
643
|
}
|
|
645
|
-
if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor ===
|
|
644
|
+
if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === 'wasm32-wasi')) {
|
|
646
645
|
let candidateError = null
|
|
647
646
|
let candidateFailed = false
|
|
648
647
|
try {
|
|
@@ -651,8 +650,8 @@ if (!nativeBinding || forceWasi) {
|
|
|
651
650
|
if (!candidateFailed) {
|
|
652
651
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
653
652
|
const bindingPackageVersion = require('@oxc-transform/binding-wasm32-wasi/package.json').version
|
|
654
|
-
if (bindingPackageVersion !== '0.
|
|
655
|
-
throw new Error(`WASI binding package version mismatch, expected 0.
|
|
653
|
+
if (bindingPackageVersion !== '0.150.0') {
|
|
654
|
+
throw new Error(`WASI binding package version mismatch, expected 0.150.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
656
655
|
}
|
|
657
656
|
}
|
|
658
657
|
wasiBinding = require('@oxc-transform/binding-wasm32-wasi')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxc-transform",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.150.0",
|
|
4
4
|
"description": "Oxc Transformer Node API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"babel",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@emnapi/core": "2.0.0-alpha.3",
|
|
42
42
|
"@emnapi/runtime": "2.0.0-alpha.3",
|
|
43
|
-
"@napi-rs/cli": "3.9.
|
|
43
|
+
"@napi-rs/cli": "3.9.1",
|
|
44
44
|
"@types/node": "24.1.0",
|
|
45
45
|
"publint": "0.3.24",
|
|
46
46
|
"vitest": "5.0.0"
|
|
@@ -80,25 +80,25 @@
|
|
|
80
80
|
"node": "^20.19.0 || >=22.12.0"
|
|
81
81
|
},
|
|
82
82
|
"optionalDependencies": {
|
|
83
|
-
"@oxc-transform/binding-darwin-arm64": "0.
|
|
84
|
-
"@oxc-transform/binding-android-arm64": "0.
|
|
85
|
-
"@oxc-transform/binding-win32-arm64-msvc": "0.
|
|
86
|
-
"@oxc-transform/binding-linux-arm64-gnu": "0.
|
|
87
|
-
"@oxc-transform/binding-linux-arm64-musl": "0.
|
|
88
|
-
"@oxc-transform/binding-openharmony-arm64": "0.
|
|
89
|
-
"@oxc-transform/binding-android-arm-eabi": "0.
|
|
90
|
-
"@oxc-transform/binding-linux-arm-gnueabihf": "0.
|
|
91
|
-
"@oxc-transform/binding-linux-arm-musleabihf": "0.
|
|
92
|
-
"@oxc-transform/binding-win32-ia32-msvc": "0.
|
|
93
|
-
"@oxc-transform/binding-linux-ppc64-gnu": "0.
|
|
94
|
-
"@oxc-transform/binding-linux-riscv64-gnu": "0.
|
|
95
|
-
"@oxc-transform/binding-linux-riscv64-musl": "0.
|
|
96
|
-
"@oxc-transform/binding-linux-s390x-gnu": "0.
|
|
97
|
-
"@oxc-transform/binding-darwin-x64": "0.
|
|
98
|
-
"@oxc-transform/binding-win32-x64-msvc": "0.
|
|
99
|
-
"@oxc-transform/binding-freebsd-x64": "0.
|
|
100
|
-
"@oxc-transform/binding-linux-x64-gnu": "0.
|
|
101
|
-
"@oxc-transform/binding-linux-x64-musl": "0.
|
|
83
|
+
"@oxc-transform/binding-darwin-arm64": "0.150.0",
|
|
84
|
+
"@oxc-transform/binding-android-arm64": "0.150.0",
|
|
85
|
+
"@oxc-transform/binding-win32-arm64-msvc": "0.150.0",
|
|
86
|
+
"@oxc-transform/binding-linux-arm64-gnu": "0.150.0",
|
|
87
|
+
"@oxc-transform/binding-linux-arm64-musl": "0.150.0",
|
|
88
|
+
"@oxc-transform/binding-openharmony-arm64": "0.150.0",
|
|
89
|
+
"@oxc-transform/binding-android-arm-eabi": "0.150.0",
|
|
90
|
+
"@oxc-transform/binding-linux-arm-gnueabihf": "0.150.0",
|
|
91
|
+
"@oxc-transform/binding-linux-arm-musleabihf": "0.150.0",
|
|
92
|
+
"@oxc-transform/binding-win32-ia32-msvc": "0.150.0",
|
|
93
|
+
"@oxc-transform/binding-linux-ppc64-gnu": "0.150.0",
|
|
94
|
+
"@oxc-transform/binding-linux-riscv64-gnu": "0.150.0",
|
|
95
|
+
"@oxc-transform/binding-linux-riscv64-musl": "0.150.0",
|
|
96
|
+
"@oxc-transform/binding-linux-s390x-gnu": "0.150.0",
|
|
97
|
+
"@oxc-transform/binding-darwin-x64": "0.150.0",
|
|
98
|
+
"@oxc-transform/binding-win32-x64-msvc": "0.150.0",
|
|
99
|
+
"@oxc-transform/binding-freebsd-x64": "0.150.0",
|
|
100
|
+
"@oxc-transform/binding-linux-x64-gnu": "0.150.0",
|
|
101
|
+
"@oxc-transform/binding-linux-x64-musl": "0.150.0"
|
|
102
102
|
},
|
|
103
103
|
"scripts": {
|
|
104
104
|
"build-dev": "napi build --esm --platform",
|