oxc-transform 0.148.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.
Files changed (3) hide show
  1. package/index.d.ts +5 -2
  2. package/index.js +81 -83
  3. package/package.json +22 -22
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,11 +1,9 @@
1
- // prettier-ignore
2
1
  /* eslint-disable */
3
2
  // @ts-nocheck
4
3
  /* auto-generated by NAPI-RS */
5
4
 
6
5
  import { createRequire } from 'module'
7
6
  const require = createRequire(import.meta.url)
8
- const __dirname = new URL('.', import.meta.url).pathname
9
7
 
10
8
  const { readFileSync } = require('fs')
11
9
  let nativeBinding = null
@@ -67,7 +65,7 @@ const isMuslFromChildProcess = () => {
67
65
  function requireNative() {
68
66
  if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
69
67
  try {
70
- return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
68
+ return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)
71
69
  } catch (err) {
72
70
  loadErrors.push(err)
73
71
  }
@@ -81,8 +79,8 @@ function requireNative() {
81
79
  try {
82
80
  const binding = require('@oxc-transform/binding-android-arm64')
83
81
  const bindingPackageVersion = require('@oxc-transform/binding-android-arm64/package.json').version
84
- if (bindingPackageVersion !== '0.148.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 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
86
84
  }
87
85
  return binding
88
86
  } catch (e) {
@@ -97,8 +95,8 @@ function requireNative() {
97
95
  try {
98
96
  const binding = require('@oxc-transform/binding-android-arm-eabi')
99
97
  const bindingPackageVersion = require('@oxc-transform/binding-android-arm-eabi/package.json').version
100
- if (bindingPackageVersion !== '0.148.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 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
102
100
  }
103
101
  return binding
104
102
  } catch (e) {
@@ -111,36 +109,36 @@ function requireNative() {
111
109
  if (process.arch === 'x64') {
112
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')) {
113
111
  try {
114
- return require('./transform.win32-x64-gnu.node')
115
- } catch (e) {
116
- loadErrors.push(e)
117
- }
118
- try {
119
- const binding = require('@oxc-transform/binding-win32-x64-gnu')
120
- const bindingPackageVersion = require('@oxc-transform/binding-win32-x64-gnu/package.json').version
121
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
122
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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)
123
125
  }
124
- return binding
125
- } catch (e) {
126
- loadErrors.push(e)
127
- }
128
126
  } else {
129
127
  try {
130
- return require('./transform.win32-x64-msvc.node')
131
- } catch (e) {
132
- loadErrors.push(e)
133
- }
134
- try {
135
- const binding = require('@oxc-transform/binding-win32-x64-msvc')
136
- const bindingPackageVersion = require('@oxc-transform/binding-win32-x64-msvc/package.json').version
137
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
138
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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)
139
141
  }
140
- return binding
141
- } catch (e) {
142
- loadErrors.push(e)
143
- }
144
142
  }
145
143
  } else if (process.arch === 'ia32') {
146
144
  try {
@@ -151,8 +149,8 @@ function requireNative() {
151
149
  try {
152
150
  const binding = require('@oxc-transform/binding-win32-ia32-msvc')
153
151
  const bindingPackageVersion = require('@oxc-transform/binding-win32-ia32-msvc/package.json').version
154
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
155
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
156
154
  }
157
155
  return binding
158
156
  } catch (e) {
@@ -167,8 +165,8 @@ function requireNative() {
167
165
  try {
168
166
  const binding = require('@oxc-transform/binding-win32-arm64-msvc')
169
167
  const bindingPackageVersion = require('@oxc-transform/binding-win32-arm64-msvc/package.json').version
170
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
171
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
172
170
  }
173
171
  return binding
174
172
  } catch (e) {
@@ -186,8 +184,8 @@ function requireNative() {
186
184
  try {
187
185
  const binding = require('@oxc-transform/binding-darwin-universal')
188
186
  const bindingPackageVersion = require('@oxc-transform/binding-darwin-universal/package.json').version
189
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
190
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
191
189
  }
192
190
  return binding
193
191
  } catch (e) {
@@ -202,8 +200,8 @@ function requireNative() {
202
200
  try {
203
201
  const binding = require('@oxc-transform/binding-darwin-x64')
204
202
  const bindingPackageVersion = require('@oxc-transform/binding-darwin-x64/package.json').version
205
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
206
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
207
205
  }
208
206
  return binding
209
207
  } catch (e) {
@@ -218,8 +216,8 @@ function requireNative() {
218
216
  try {
219
217
  const binding = require('@oxc-transform/binding-darwin-arm64')
220
218
  const bindingPackageVersion = require('@oxc-transform/binding-darwin-arm64/package.json').version
221
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
222
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
223
221
  }
224
222
  return binding
225
223
  } catch (e) {
@@ -238,8 +236,8 @@ function requireNative() {
238
236
  try {
239
237
  const binding = require('@oxc-transform/binding-freebsd-x64')
240
238
  const bindingPackageVersion = require('@oxc-transform/binding-freebsd-x64/package.json').version
241
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
242
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
243
241
  }
244
242
  return binding
245
243
  } catch (e) {
@@ -254,8 +252,8 @@ function requireNative() {
254
252
  try {
255
253
  const binding = require('@oxc-transform/binding-freebsd-arm64')
256
254
  const bindingPackageVersion = require('@oxc-transform/binding-freebsd-arm64/package.json').version
257
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
258
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
259
257
  }
260
258
  return binding
261
259
  } catch (e) {
@@ -275,8 +273,8 @@ function requireNative() {
275
273
  try {
276
274
  const binding = require('@oxc-transform/binding-linux-x64-musl')
277
275
  const bindingPackageVersion = require('@oxc-transform/binding-linux-x64-musl/package.json').version
278
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
279
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
280
278
  }
281
279
  return binding
282
280
  } catch (e) {
@@ -291,8 +289,8 @@ function requireNative() {
291
289
  try {
292
290
  const binding = require('@oxc-transform/binding-linux-x64-gnu')
293
291
  const bindingPackageVersion = require('@oxc-transform/binding-linux-x64-gnu/package.json').version
294
- if (bindingPackageVersion !== '0.148.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 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
296
294
  }
297
295
  return binding
298
296
  } catch (e) {
@@ -309,8 +307,8 @@ function requireNative() {
309
307
  try {
310
308
  const binding = require('@oxc-transform/binding-linux-arm64-musl')
311
309
  const bindingPackageVersion = require('@oxc-transform/binding-linux-arm64-musl/package.json').version
312
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
313
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
314
312
  }
315
313
  return binding
316
314
  } catch (e) {
@@ -325,8 +323,8 @@ function requireNative() {
325
323
  try {
326
324
  const binding = require('@oxc-transform/binding-linux-arm64-gnu')
327
325
  const bindingPackageVersion = require('@oxc-transform/binding-linux-arm64-gnu/package.json').version
328
- if (bindingPackageVersion !== '0.148.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 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
330
328
  }
331
329
  return binding
332
330
  } catch (e) {
@@ -343,8 +341,8 @@ function requireNative() {
343
341
  try {
344
342
  const binding = require('@oxc-transform/binding-linux-arm-musleabihf')
345
343
  const bindingPackageVersion = require('@oxc-transform/binding-linux-arm-musleabihf/package.json').version
346
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
347
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
348
346
  }
349
347
  return binding
350
348
  } catch (e) {
@@ -359,8 +357,8 @@ function requireNative() {
359
357
  try {
360
358
  const binding = require('@oxc-transform/binding-linux-arm-gnueabihf')
361
359
  const bindingPackageVersion = require('@oxc-transform/binding-linux-arm-gnueabihf/package.json').version
362
- if (bindingPackageVersion !== '0.148.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 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
364
362
  }
365
363
  return binding
366
364
  } catch (e) {
@@ -377,8 +375,8 @@ function requireNative() {
377
375
  try {
378
376
  const binding = require('@oxc-transform/binding-linux-loong64-musl')
379
377
  const bindingPackageVersion = require('@oxc-transform/binding-linux-loong64-musl/package.json').version
380
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
381
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
382
380
  }
383
381
  return binding
384
382
  } catch (e) {
@@ -393,8 +391,8 @@ function requireNative() {
393
391
  try {
394
392
  const binding = require('@oxc-transform/binding-linux-loong64-gnu')
395
393
  const bindingPackageVersion = require('@oxc-transform/binding-linux-loong64-gnu/package.json').version
396
- if (bindingPackageVersion !== '0.148.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 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
398
396
  }
399
397
  return binding
400
398
  } catch (e) {
@@ -411,8 +409,8 @@ function requireNative() {
411
409
  try {
412
410
  const binding = require('@oxc-transform/binding-linux-riscv64-musl')
413
411
  const bindingPackageVersion = require('@oxc-transform/binding-linux-riscv64-musl/package.json').version
414
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
415
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
416
414
  }
417
415
  return binding
418
416
  } catch (e) {
@@ -427,8 +425,8 @@ function requireNative() {
427
425
  try {
428
426
  const binding = require('@oxc-transform/binding-linux-riscv64-gnu')
429
427
  const bindingPackageVersion = require('@oxc-transform/binding-linux-riscv64-gnu/package.json').version
430
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
431
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
432
430
  }
433
431
  return binding
434
432
  } catch (e) {
@@ -444,8 +442,8 @@ function requireNative() {
444
442
  try {
445
443
  const binding = require('@oxc-transform/binding-linux-ppc64-gnu')
446
444
  const bindingPackageVersion = require('@oxc-transform/binding-linux-ppc64-gnu/package.json').version
447
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
448
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
449
447
  }
450
448
  return binding
451
449
  } catch (e) {
@@ -460,8 +458,8 @@ function requireNative() {
460
458
  try {
461
459
  const binding = require('@oxc-transform/binding-linux-s390x-gnu')
462
460
  const bindingPackageVersion = require('@oxc-transform/binding-linux-s390x-gnu/package.json').version
463
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
464
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
465
463
  }
466
464
  return binding
467
465
  } catch (e) {
@@ -480,8 +478,8 @@ function requireNative() {
480
478
  try {
481
479
  const binding = require('@oxc-transform/binding-openharmony-arm64')
482
480
  const bindingPackageVersion = require('@oxc-transform/binding-openharmony-arm64/package.json').version
483
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
484
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
485
483
  }
486
484
  return binding
487
485
  } catch (e) {
@@ -496,8 +494,8 @@ function requireNative() {
496
494
  try {
497
495
  const binding = require('@oxc-transform/binding-openharmony-x64')
498
496
  const bindingPackageVersion = require('@oxc-transform/binding-openharmony-x64/package.json').version
499
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
500
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
501
499
  }
502
500
  return binding
503
501
  } catch (e) {
@@ -512,8 +510,8 @@ function requireNative() {
512
510
  try {
513
511
  const binding = require('@oxc-transform/binding-openharmony-arm')
514
512
  const bindingPackageVersion = require('@oxc-transform/binding-openharmony-arm/package.json').version
515
- if (bindingPackageVersion !== '0.148.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
516
- throw new Error(`Native binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
517
515
  }
518
516
  return binding
519
517
  } catch (e) {
@@ -554,7 +552,7 @@ function createLoadErrorChain(errors) {
554
552
  //
555
553
  // NAPI_RS_WASI_FLAVOR selects one exact generated flavor and implies strict
556
554
  // WASI loading. It never crosses into another flavor or falls back to native.
557
- const __napiWasiFlavors = ["wasm32-wasi"]
555
+ const __napiWasiFlavors = ['wasm32-wasi']
558
556
  const __napiWasiFlavor = process.env.NAPI_RS_WASI_FLAVOR
559
557
  const __napiWasiFlavorRequested =
560
558
  typeof __napiWasiFlavor === 'string' && __napiWasiFlavor.length > 0
@@ -623,11 +621,11 @@ if (!nativeBinding || forceWasi) {
623
621
  }
624
622
  return null
625
623
  }
626
- if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === "wasm32-wasi")) {
624
+ if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === 'wasm32-wasi')) {
627
625
  let candidateError = null
628
626
  let candidateFailed = false
629
627
  try {
630
- candidateError = __napiWasiResolveCandidate('./transform.wasi.cjs', false, ["./transform.wasm32-wasi.debug.wasm","./transform.wasm32-wasi.wasm"])
628
+ candidateError = __napiWasiResolveCandidate('./transform.wasi.cjs', false, ['./transform.wasm32-wasi.debug.wasm', './transform.wasm32-wasi.wasm'])
631
629
  candidateFailed = candidateError !== null
632
630
  if (!candidateFailed) {
633
631
  wasiBinding = require('./transform.wasi.cjs')
@@ -643,7 +641,7 @@ if (!nativeBinding || forceWasi) {
643
641
  loadErrors.push(candidateError)
644
642
  }
645
643
  }
646
- if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === "wasm32-wasi")) {
644
+ if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === 'wasm32-wasi')) {
647
645
  let candidateError = null
648
646
  let candidateFailed = false
649
647
  try {
@@ -652,8 +650,8 @@ if (!nativeBinding || forceWasi) {
652
650
  if (!candidateFailed) {
653
651
  if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
654
652
  const bindingPackageVersion = require('@oxc-transform/binding-wasm32-wasi/package.json').version
655
- if (bindingPackageVersion !== '0.148.0') {
656
- throw new Error(`WASI binding package version mismatch, expected 0.148.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
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.`)
657
655
  }
658
656
  }
659
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.148.0",
3
+ "version": "0.150.0",
4
4
  "description": "Oxc Transformer Node API",
5
5
  "keywords": [
6
6
  "babel",
@@ -40,10 +40,10 @@
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.8.6",
43
+ "@napi-rs/cli": "3.9.1",
44
44
  "@types/node": "24.1.0",
45
45
  "publint": "0.3.24",
46
- "vitest": "4.1.11"
46
+ "vitest": "5.0.0"
47
47
  },
48
48
  "napi": {
49
49
  "binaryName": "transform",
@@ -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.148.0",
84
- "@oxc-transform/binding-android-arm64": "0.148.0",
85
- "@oxc-transform/binding-win32-arm64-msvc": "0.148.0",
86
- "@oxc-transform/binding-linux-arm64-gnu": "0.148.0",
87
- "@oxc-transform/binding-linux-arm64-musl": "0.148.0",
88
- "@oxc-transform/binding-openharmony-arm64": "0.148.0",
89
- "@oxc-transform/binding-android-arm-eabi": "0.148.0",
90
- "@oxc-transform/binding-linux-arm-gnueabihf": "0.148.0",
91
- "@oxc-transform/binding-linux-arm-musleabihf": "0.148.0",
92
- "@oxc-transform/binding-win32-ia32-msvc": "0.148.0",
93
- "@oxc-transform/binding-linux-ppc64-gnu": "0.148.0",
94
- "@oxc-transform/binding-linux-riscv64-gnu": "0.148.0",
95
- "@oxc-transform/binding-linux-riscv64-musl": "0.148.0",
96
- "@oxc-transform/binding-linux-s390x-gnu": "0.148.0",
97
- "@oxc-transform/binding-darwin-x64": "0.148.0",
98
- "@oxc-transform/binding-win32-x64-msvc": "0.148.0",
99
- "@oxc-transform/binding-freebsd-x64": "0.148.0",
100
- "@oxc-transform/binding-linux-x64-gnu": "0.148.0",
101
- "@oxc-transform/binding-linux-x64-musl": "0.148.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",