oxc-parser 0.31.0 → 0.33.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/README.md +9 -16
  2. package/package.json +9 -9
package/README.md CHANGED
@@ -1,29 +1,22 @@
1
1
  # The JavaScript Oxidation Compiler
2
2
 
3
- See index.d.ts for `parseSync` and `parseAsync` API.
4
-
5
- ## ESM
3
+ See `index.d.ts` for `parseSync` and `parseAsync` API.
6
4
 
7
5
  ```javascript
8
6
  import assert from 'assert';
9
7
  import oxc from 'oxc-parser';
10
8
 
11
- function test(ret) {
12
- const program = JSON.parse(ret.program);
13
- assert(program.body.length == 1);
14
- assert(ret.errors.length == 0);
15
- }
16
-
17
9
  const sourceText = "let foo: Foo = 'foo';";
18
- const options = {
19
- sourceFilename: 'text.tsx', // the extension is used to determine which dialect to parse
20
- };
10
+ // Filename extension is used to determine which
11
+ // dialect to parse source as
12
+ const options = { sourceFilename: 'text.tsx' };
21
13
 
22
14
  test(oxc.parseSync(sourceText, options));
15
+ test(await oxc.parseAsync(sourceText, options));
23
16
 
24
- async function main() {
25
- test(await oxc.parseAsync(sourceText, options));
17
+ function test(ret) {
18
+ const program = JSON.parse(ret.program);
19
+ assert(program.body.length == 1);
20
+ assert(ret.errors.length == 0);
26
21
  }
27
-
28
- main();
29
22
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxc-parser",
3
- "version": "0.31.0",
3
+ "version": "0.33.0",
4
4
  "description": "Oxc Parser Node API",
5
5
  "keywords": [
6
6
  "Parser"
@@ -23,13 +23,13 @@
23
23
  "index.js"
24
24
  ],
25
25
  "optionalDependencies": {
26
- "@oxc-parser/binding-win32-x64-msvc": "0.31.0",
27
- "@oxc-parser/binding-win32-arm64-msvc": "0.31.0",
28
- "@oxc-parser/binding-linux-x64-gnu": "0.31.0",
29
- "@oxc-parser/binding-linux-arm64-gnu": "0.31.0",
30
- "@oxc-parser/binding-linux-x64-musl": "0.31.0",
31
- "@oxc-parser/binding-linux-arm64-musl": "0.31.0",
32
- "@oxc-parser/binding-darwin-x64": "0.31.0",
33
- "@oxc-parser/binding-darwin-arm64": "0.31.0"
26
+ "@oxc-parser/binding-win32-x64-msvc": "0.33.0",
27
+ "@oxc-parser/binding-win32-arm64-msvc": "0.33.0",
28
+ "@oxc-parser/binding-linux-x64-gnu": "0.33.0",
29
+ "@oxc-parser/binding-linux-arm64-gnu": "0.33.0",
30
+ "@oxc-parser/binding-linux-x64-musl": "0.33.0",
31
+ "@oxc-parser/binding-linux-arm64-musl": "0.33.0",
32
+ "@oxc-parser/binding-darwin-x64": "0.33.0",
33
+ "@oxc-parser/binding-darwin-arm64": "0.33.0"
34
34
  }
35
35
  }