oxc-transform 0.19.0 → 0.20.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 +11 -8
- package/index.js +2 -2
- package/package.json +9 -9
package/index.d.ts
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
/* auto-generated by NAPI-RS */
|
|
5
5
|
|
|
6
|
+
export interface IsolatedDeclarationsResult {
|
|
7
|
+
sourceText: string
|
|
8
|
+
errors: Array<string>
|
|
9
|
+
}
|
|
10
|
+
/** TypeScript Isolated Declarations for Standalone DTS Emit */
|
|
11
|
+
function isolatedDeclaration(filename: string, sourceText: string): IsolatedDeclarationsResult
|
|
6
12
|
export interface TypeScriptBindingOptions {
|
|
7
13
|
jsxPragma?: string
|
|
8
14
|
jsxPragmaFrag?: string
|
|
@@ -27,7 +33,10 @@ export interface ArrowFunctionsBindingOptions {
|
|
|
27
33
|
export interface Es2015BindingOptions {
|
|
28
34
|
arrowFunction?: ArrowFunctionsBindingOptions
|
|
29
35
|
}
|
|
30
|
-
export interface
|
|
36
|
+
export interface TransformOptions {
|
|
37
|
+
sourceType?: 'script' | 'module' | 'unambiguous' | undefined
|
|
38
|
+
/** Force jsx parsing, */
|
|
39
|
+
jsx?: boolean
|
|
31
40
|
typescript?: TypeScriptBindingOptions
|
|
32
41
|
react?: ReactBindingOptions
|
|
33
42
|
es2015?: Es2015BindingOptions
|
|
@@ -53,10 +62,4 @@ export interface TransformResult {
|
|
|
53
62
|
map?: Sourcemap
|
|
54
63
|
errors: Array<string>
|
|
55
64
|
}
|
|
56
|
-
function transform(filename: string, sourceText: string, options?:
|
|
57
|
-
export interface IsolatedDeclarationsResult {
|
|
58
|
-
sourceText: string
|
|
59
|
-
errors: Array<string>
|
|
60
|
-
}
|
|
61
|
-
/** TypeScript Isolated Declarations for Standalone DTS Emit */
|
|
62
|
-
function isolatedDeclaration(filename: string, sourceText: string): IsolatedDeclarationsResult
|
|
65
|
+
function transform(filename: string, sourceText: string, options?: TransformOptions | undefined | null): TransformResult
|
package/index.js
CHANGED
|
@@ -310,7 +310,7 @@ if (!nativeBinding) {
|
|
|
310
310
|
throw new Error(`Failed to load native binding`)
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
const {
|
|
313
|
+
const { isolatedDeclaration, transform } = nativeBinding
|
|
314
314
|
|
|
315
|
-
module.exports.transform = transform
|
|
316
315
|
module.exports.isolatedDeclaration = isolatedDeclaration
|
|
316
|
+
module.exports.transform = transform
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxc-transform",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.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.
|
|
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.20.0",
|
|
27
|
+
"@oxc-transform/binding-win32-arm64-msvc": "0.20.0",
|
|
28
|
+
"@oxc-transform/binding-linux-x64-gnu": "0.20.0",
|
|
29
|
+
"@oxc-transform/binding-linux-arm64-gnu": "0.20.0",
|
|
30
|
+
"@oxc-transform/binding-linux-x64-musl": "0.20.0",
|
|
31
|
+
"@oxc-transform/binding-linux-arm64-musl": "0.20.0",
|
|
32
|
+
"@oxc-transform/binding-darwin-x64": "0.20.0",
|
|
33
|
+
"@oxc-transform/binding-darwin-arm64": "0.20.0"
|
|
34
34
|
}
|
|
35
35
|
}
|