oxc-parser 0.69.0 → 0.71.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/README.md +13 -5
- package/bindings.js +2 -1
- package/generated/deserialize/js.js +221 -210
- package/generated/deserialize/ts.js +262 -252
- package/index.d.ts +2 -1
- package/package.json +21 -18
package/index.d.ts
CHANGED
|
@@ -140,9 +140,10 @@ export interface OxcError {
|
|
|
140
140
|
export declare function parseAsync(filename: string, sourceText: string, options?: ParserOptions | undefined | null): Promise<ParseResult>
|
|
141
141
|
|
|
142
142
|
export interface ParserOptions {
|
|
143
|
-
sourceType?: 'script' | 'module' | 'unambiguous' | undefined
|
|
144
143
|
/** Treat the source text as `js`, `jsx`, `ts`, or `tsx`. */
|
|
145
144
|
lang?: 'js' | 'jsx' | 'ts' | 'tsx'
|
|
145
|
+
/** Treat the source text as `script` or `module` code. */
|
|
146
|
+
sourceType?: 'script' | 'module' | 'unambiguous' | undefined
|
|
146
147
|
/**
|
|
147
148
|
* Return an AST which includes TypeScript-related properties, or excludes them.
|
|
148
149
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxc-parser",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.71.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"browser": "wasm.mjs",
|
|
6
6
|
"engines": {
|
|
@@ -39,15 +39,16 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@oxc-project/types": "^0.
|
|
42
|
+
"@oxc-project/types": "^0.71.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@codspeed/vitest-plugin": "^4.0.0",
|
|
46
46
|
"@napi-rs/wasm-runtime": "^0.2.7",
|
|
47
|
-
"@vitest/browser": "3.1.
|
|
47
|
+
"@vitest/browser": "3.1.3",
|
|
48
48
|
"esbuild": "^0.25.0",
|
|
49
49
|
"playwright": "^1.51.0",
|
|
50
|
-
"vitest": "3.1.
|
|
50
|
+
"vitest": "3.1.3",
|
|
51
|
+
"typescript": "5.8.3"
|
|
51
52
|
},
|
|
52
53
|
"napi": {
|
|
53
54
|
"binaryName": "parser",
|
|
@@ -61,6 +62,7 @@
|
|
|
61
62
|
"aarch64-unknown-linux-gnu",
|
|
62
63
|
"aarch64-unknown-linux-musl",
|
|
63
64
|
"armv7-unknown-linux-gnueabihf",
|
|
65
|
+
"armv7-unknown-linux-musleabihf",
|
|
64
66
|
"s390x-unknown-linux-gnu",
|
|
65
67
|
"riscv64gc-unknown-linux-gnu",
|
|
66
68
|
"x86_64-apple-darwin",
|
|
@@ -75,19 +77,20 @@
|
|
|
75
77
|
"dtsHeaderFile": "header.js"
|
|
76
78
|
},
|
|
77
79
|
"optionalDependencies": {
|
|
78
|
-
"@oxc-parser/binding-win32-x64-msvc": "0.
|
|
79
|
-
"@oxc-parser/binding-win32-arm64-msvc": "0.
|
|
80
|
-
"@oxc-parser/binding-linux-x64-gnu": "0.
|
|
81
|
-
"@oxc-parser/binding-linux-x64-musl": "0.
|
|
82
|
-
"@oxc-parser/binding-freebsd-x64": "0.
|
|
83
|
-
"@oxc-parser/binding-linux-arm64-gnu": "0.
|
|
84
|
-
"@oxc-parser/binding-linux-arm64-musl": "0.
|
|
85
|
-
"@oxc-parser/binding-linux-arm-gnueabihf": "0.
|
|
86
|
-
"@oxc-parser/binding-linux-
|
|
87
|
-
"@oxc-parser/binding-linux-
|
|
88
|
-
"@oxc-parser/binding-
|
|
89
|
-
"@oxc-parser/binding-darwin-
|
|
90
|
-
"@oxc-parser/binding-
|
|
80
|
+
"@oxc-parser/binding-win32-x64-msvc": "0.71.0",
|
|
81
|
+
"@oxc-parser/binding-win32-arm64-msvc": "0.71.0",
|
|
82
|
+
"@oxc-parser/binding-linux-x64-gnu": "0.71.0",
|
|
83
|
+
"@oxc-parser/binding-linux-x64-musl": "0.71.0",
|
|
84
|
+
"@oxc-parser/binding-freebsd-x64": "0.71.0",
|
|
85
|
+
"@oxc-parser/binding-linux-arm64-gnu": "0.71.0",
|
|
86
|
+
"@oxc-parser/binding-linux-arm64-musl": "0.71.0",
|
|
87
|
+
"@oxc-parser/binding-linux-arm-gnueabihf": "0.71.0",
|
|
88
|
+
"@oxc-parser/binding-linux-arm-musleabihf": "0.71.0",
|
|
89
|
+
"@oxc-parser/binding-linux-s390x-gnu": "0.71.0",
|
|
90
|
+
"@oxc-parser/binding-linux-riscv64-gnu": "0.71.0",
|
|
91
|
+
"@oxc-parser/binding-darwin-x64": "0.71.0",
|
|
92
|
+
"@oxc-parser/binding-darwin-arm64": "0.71.0",
|
|
93
|
+
"@oxc-parser/binding-wasm32-wasi": "0.71.0"
|
|
91
94
|
},
|
|
92
95
|
"scripts": {
|
|
93
96
|
"build-dev": "napi build --no-dts-cache --platform --js bindings.js",
|
|
@@ -96,7 +99,7 @@
|
|
|
96
99
|
"build-wasi": "pnpm run build-dev --release --target wasm32-wasip1-threads",
|
|
97
100
|
"build-npm-dir": "rm -rf npm-dir && napi create-npm-dirs --npm-dir npm-dir && pnpm napi artifacts --npm-dir npm-dir --output-dir .",
|
|
98
101
|
"build-browser-bundle": "node build-browser-bundle.mjs",
|
|
99
|
-
"test": "pnpm run test-node run
|
|
102
|
+
"test": "tsc && pnpm run test-node run",
|
|
100
103
|
"test-node": "vitest --dir ./test",
|
|
101
104
|
"test-browser": "vitest -c vitest.config.browser.mts",
|
|
102
105
|
"bench": "vitest bench --run ./bench.bench.mjs"
|