oxc-transform 0.15.1 → 0.16.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.
- package/index.d.ts +43 -0
- package/index.js +2 -1
- package/package.json +9 -9
package/index.d.ts
CHANGED
|
@@ -3,6 +3,49 @@
|
|
|
3
3
|
|
|
4
4
|
/* auto-generated by NAPI-RS */
|
|
5
5
|
|
|
6
|
+
export interface TypeScriptBindingOptions {
|
|
7
|
+
jsxPragma: string
|
|
8
|
+
jsxPragmaFrag: string
|
|
9
|
+
onlyRemoveTypeImports: boolean
|
|
10
|
+
allowNamespaces: boolean
|
|
11
|
+
allowDeclareFields: boolean
|
|
12
|
+
}
|
|
13
|
+
export interface ReactBindingOptions {
|
|
14
|
+
runtime: 'classic' | 'automatic'
|
|
15
|
+
development: boolean
|
|
16
|
+
throwIfNamespace: boolean
|
|
17
|
+
pure: boolean
|
|
18
|
+
importSource?: string
|
|
19
|
+
pragma?: string
|
|
20
|
+
pragmaFrag?: string
|
|
21
|
+
useBuiltIns?: boolean
|
|
22
|
+
useSpread?: boolean
|
|
23
|
+
}
|
|
24
|
+
export interface ArrowFunctionsBindingOptions {
|
|
25
|
+
spec: boolean
|
|
26
|
+
}
|
|
27
|
+
export interface Es2015BindingOptions {
|
|
28
|
+
arrowFunction?: ArrowFunctionsBindingOptions
|
|
29
|
+
}
|
|
30
|
+
export interface TransformBindingOptions {
|
|
31
|
+
typescript: TypeScriptBindingOptions
|
|
32
|
+
react: ReactBindingOptions
|
|
33
|
+
es2015: Es2015BindingOptions
|
|
34
|
+
}
|
|
35
|
+
export interface Sourcemap {
|
|
36
|
+
file?: string
|
|
37
|
+
mappings?: string
|
|
38
|
+
sourceRoot?: string
|
|
39
|
+
sources?: Array<string | undefined | null>
|
|
40
|
+
sourcesContent?: Array<string | undefined | null>
|
|
41
|
+
names?: Array<string>
|
|
42
|
+
}
|
|
43
|
+
export interface TransformResult {
|
|
44
|
+
sourceText: string
|
|
45
|
+
map?: Sourcemap
|
|
46
|
+
errors: Array<string>
|
|
47
|
+
}
|
|
48
|
+
export function transform(filename: string, sourceText: string, options: TransformBindingOptions): TransformResult
|
|
6
49
|
export interface IsolatedDeclarationsResult {
|
|
7
50
|
sourceText: string
|
|
8
51
|
errors: Array<string>
|
package/index.js
CHANGED
|
@@ -310,6 +310,7 @@ if (!nativeBinding) {
|
|
|
310
310
|
throw new Error(`Failed to load native binding`)
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
const { isolatedDeclaration } = nativeBinding
|
|
313
|
+
const { transform, isolatedDeclaration } = nativeBinding
|
|
314
314
|
|
|
315
|
+
module.exports.transform = transform
|
|
315
316
|
module.exports.isolatedDeclaration = isolatedDeclaration
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxc-transform",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.1",
|
|
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.
|
|
27
|
-
"@oxc-transform/binding-win32-arm64-msvc": "0.
|
|
28
|
-
"@oxc-transform/binding-linux-x64-gnu": "0.
|
|
29
|
-
"@oxc-transform/binding-linux-arm64-gnu": "0.
|
|
30
|
-
"@oxc-transform/binding-linux-x64-musl": "0.
|
|
31
|
-
"@oxc-transform/binding-linux-arm64-musl": "0.
|
|
32
|
-
"@oxc-transform/binding-darwin-x64": "0.
|
|
33
|
-
"@oxc-transform/binding-darwin-arm64": "0.
|
|
26
|
+
"@oxc-transform/binding-win32-x64-msvc": "0.16.1",
|
|
27
|
+
"@oxc-transform/binding-win32-arm64-msvc": "0.16.1",
|
|
28
|
+
"@oxc-transform/binding-linux-x64-gnu": "0.16.1",
|
|
29
|
+
"@oxc-transform/binding-linux-arm64-gnu": "0.16.1",
|
|
30
|
+
"@oxc-transform/binding-linux-x64-musl": "0.16.1",
|
|
31
|
+
"@oxc-transform/binding-linux-arm64-musl": "0.16.1",
|
|
32
|
+
"@oxc-transform/binding-darwin-x64": "0.16.1",
|
|
33
|
+
"@oxc-transform/binding-darwin-arm64": "0.16.1"
|
|
34
34
|
}
|
|
35
35
|
}
|