oxc-transform 0.82.2 → 0.83.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 (2) hide show
  1. package/index.js +9 -8
  2. package/package.json +3 -20
package/index.js CHANGED
@@ -3,8 +3,9 @@
3
3
  // @ts-nocheck
4
4
  /* auto-generated by NAPI-RS */
5
5
 
6
- const { createRequire } = require('node:module')
7
- require = createRequire(__filename)
6
+ import { createRequire } from 'node:module'
7
+ const require = createRequire(import.meta.url)
8
+ const __dirname = new URL('.', import.meta.url).pathname
8
9
 
9
10
  const { readFileSync } = require('node:fs')
10
11
  let nativeBinding = null
@@ -400,9 +401,9 @@ if (!nativeBinding) {
400
401
  throw new Error(`Failed to load native binding`)
401
402
  }
402
403
 
403
- module.exports = nativeBinding
404
- module.exports.Severity = nativeBinding.Severity
405
- module.exports.HelperMode = nativeBinding.HelperMode
406
- module.exports.isolatedDeclaration = nativeBinding.isolatedDeclaration
407
- module.exports.moduleRunnerTransform = nativeBinding.moduleRunnerTransform
408
- module.exports.transform = nativeBinding.transform
404
+ const { Severity, HelperMode, isolatedDeclaration, moduleRunnerTransform, transform } = nativeBinding
405
+ export { Severity }
406
+ export { HelperMode }
407
+ export { isolatedDeclaration }
408
+ export { moduleRunnerTransform }
409
+ export { transform }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oxc-transform",
3
- "version": "0.82.2",
4
- "type": "commonjs",
3
+ "version": "0.83.0",
4
+ "type": "module",
5
5
  "main": "index.js",
6
6
  "browser": "browser.js",
7
7
  "engines": {
@@ -64,25 +64,8 @@
64
64
  }
65
65
  }
66
66
  },
67
- "optionalDependencies": {
68
- "@oxc-transform/binding-win32-x64-msvc": "0.82.2",
69
- "@oxc-transform/binding-win32-arm64-msvc": "0.82.2",
70
- "@oxc-transform/binding-linux-x64-gnu": "0.82.2",
71
- "@oxc-transform/binding-linux-x64-musl": "0.82.2",
72
- "@oxc-transform/binding-freebsd-x64": "0.82.2",
73
- "@oxc-transform/binding-linux-arm64-gnu": "0.82.2",
74
- "@oxc-transform/binding-linux-arm64-musl": "0.82.2",
75
- "@oxc-transform/binding-linux-arm-gnueabihf": "0.82.2",
76
- "@oxc-transform/binding-linux-arm-musleabihf": "0.82.2",
77
- "@oxc-transform/binding-linux-s390x-gnu": "0.82.2",
78
- "@oxc-transform/binding-linux-riscv64-gnu": "0.82.2",
79
- "@oxc-transform/binding-darwin-x64": "0.82.2",
80
- "@oxc-transform/binding-darwin-arm64": "0.82.2",
81
- "@oxc-transform/binding-android-arm64": "0.82.2",
82
- "@oxc-transform/binding-wasm32-wasi": "0.82.2"
83
- },
84
67
  "scripts": {
85
- "build-dev": "napi build --platform",
68
+ "build-dev": "napi build --esm --platform",
86
69
  "build-test": "pnpm run build-dev",
87
70
  "build": "pnpm run build-dev --features allocator --release",
88
71
  "postbuild-dev": "node patch.mjs",