oxc-transform 0.51.0 → 0.52.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 +21 -0
  2. package/index.js +7 -1
  3. package/package.json +9 -9
package/index.d.ts CHANGED
@@ -31,6 +31,16 @@ export interface DecoratorOptions {
31
31
  * @default false
32
32
  */
33
33
  legacy?: boolean
34
+ /**
35
+ * Enables emitting decorator metadata.
36
+ *
37
+ * This option the same as [emitDecoratorMetadata](https://www.typescriptlang.org/tsconfig/#emitDecoratorMetadata)
38
+ * in TypeScript, and it only works when `legacy` is true.
39
+ *
40
+ * @see https://www.typescriptlang.org/tsconfig/#emitDecoratorMetadata
41
+ * @default false
42
+ */
43
+ emitDecoratorMetadata?: boolean
34
44
  }
35
45
 
36
46
  export interface ErrorLabel {
@@ -218,6 +228,17 @@ export declare const enum Severity {
218
228
  Advice = 'Advice'
219
229
  }
220
230
 
231
+ export interface SourceMap {
232
+ file?: string
233
+ mappings: string
234
+ names: Array<string>
235
+ sourceRoot?: string
236
+ sources: Array<string>
237
+ sourcesContent?: Array<string>
238
+ version: number
239
+ x_google_ignoreList?: Array<number>
240
+ }
241
+
221
242
  /**
222
243
  * Transpile a JavaScript or TypeScript into a target ECMAScript version.
223
244
  *
package/index.js CHANGED
@@ -60,7 +60,13 @@ const isMuslFromChildProcess = () => {
60
60
  }
61
61
 
62
62
  function requireNative() {
63
- if (process.platform === 'android') {
63
+ if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
64
+ try {
65
+ nativeBinding = require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
66
+ } catch (err) {
67
+ loadErrors.push(err);
68
+ }
69
+ } else if (process.platform === 'android') {
64
70
  if (process.arch === 'arm64') {
65
71
  try {
66
72
  return require('./transform.android-arm64.node')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxc-transform",
3
- "version": "0.51.0",
3
+ "version": "0.52.0",
4
4
  "description": "Oxc transform Node API",
5
5
  "keywords": [
6
6
  "transform"
@@ -23,13 +23,13 @@
23
23
  "index.js"
24
24
  ],
25
25
  "optionalDependencies": {
26
- "@oxc-transform/binding-win32-x64-msvc": "0.51.0",
27
- "@oxc-transform/binding-win32-arm64-msvc": "0.51.0",
28
- "@oxc-transform/binding-linux-x64-gnu": "0.51.0",
29
- "@oxc-transform/binding-linux-arm64-gnu": "0.51.0",
30
- "@oxc-transform/binding-linux-x64-musl": "0.51.0",
31
- "@oxc-transform/binding-linux-arm64-musl": "0.51.0",
32
- "@oxc-transform/binding-darwin-x64": "0.51.0",
33
- "@oxc-transform/binding-darwin-arm64": "0.51.0"
26
+ "@oxc-transform/binding-win32-x64-msvc": "0.52.0",
27
+ "@oxc-transform/binding-win32-arm64-msvc": "0.52.0",
28
+ "@oxc-transform/binding-linux-x64-gnu": "0.52.0",
29
+ "@oxc-transform/binding-linux-arm64-gnu": "0.52.0",
30
+ "@oxc-transform/binding-linux-x64-musl": "0.52.0",
31
+ "@oxc-transform/binding-linux-arm64-musl": "0.52.0",
32
+ "@oxc-transform/binding-darwin-x64": "0.52.0",
33
+ "@oxc-transform/binding-darwin-arm64": "0.52.0"
34
34
  }
35
35
  }