oxc-parser 0.34.0 → 0.36.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/index.d.ts +25 -22
  2. package/package.json +11 -11
package/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  /* auto-generated by NAPI-RS */
2
2
  /* eslint-disable */
3
+
4
+ export * from '@oxc-project/types';
3
5
  export interface Comment {
4
6
  type: 'Line' | 'Block'
5
7
  value: string
@@ -7,7 +9,27 @@ export interface Comment {
7
9
  end: number
8
10
  }
9
11
 
10
- export interface ExportSpecifier {
12
+ export interface ModuleLexer {
13
+ imports: Array<ModuleLexerImportSpecifier>
14
+ exports: Array<ModuleLexerExportSpecifier>
15
+ /**
16
+ * ESM syntax detection
17
+ *
18
+ * The use of ESM syntax: import / export statements and `import.meta`
19
+ */
20
+ hasModuleSyntax: boolean
21
+ /** Facade modules that only use import / export syntax */
22
+ facade: boolean
23
+ }
24
+
25
+ /**
26
+ * # Panics
27
+ *
28
+ * * Tokio crashes
29
+ */
30
+ export declare function moduleLexerAsync(sourceText: string, options?: ParserOptions | undefined | null): Promise<ModuleLexer>
31
+
32
+ export interface ModuleLexerExportSpecifier {
11
33
  /** Exported name */
12
34
  n: string
13
35
  /** Local name, or undefined. */
@@ -22,7 +44,7 @@ export interface ExportSpecifier {
22
44
  le?: number
23
45
  }
24
46
 
25
- export interface ImportSpecifier {
47
+ export interface ModuleLexerImportSpecifier {
26
48
  /**
27
49
  * Module name
28
50
  *
@@ -44,6 +66,7 @@ export interface ImportSpecifier {
44
66
  * * If this import keyword is a dynamic import, this is the start value.
45
67
  * * If this import keyword is a static import, this is -1.
46
68
  * * If this import keyword is an import.meta expression, this is -2.
69
+ * * If this import is an `export *`, this is -3.
47
70
  */
48
71
  d: number
49
72
  /**
@@ -53,26 +76,6 @@ export interface ImportSpecifier {
53
76
  a: number
54
77
  }
55
78
 
56
- export interface ModuleLexer {
57
- imports: Array<ImportSpecifier>
58
- exports: Array<ExportSpecifier>
59
- /**
60
- * ESM syntax detection
61
- *
62
- * The use of ESM syntax: import / export statements and `import.meta`
63
- */
64
- hasModuleSyntax: boolean
65
- /** Facade modules that only use import / export syntax */
66
- facade: boolean
67
- }
68
-
69
- /**
70
- * # Panics
71
- *
72
- * * Tokio crashes
73
- */
74
- export declare function moduleLexerAsync(sourceText: string, options?: ParserOptions | undefined | null): Promise<ModuleLexer>
75
-
76
79
  /**
77
80
  * Outputs the list of exports and locations of import specifiers,
78
81
  * including dynamic import and import meta handling.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxc-parser",
3
- "version": "0.34.0",
3
+ "version": "0.36.0",
4
4
  "description": "Oxc Parser Node API",
5
5
  "keywords": [
6
6
  "Parser"
@@ -23,17 +23,17 @@
23
23
  "index.js",
24
24
  "bindings.js"
25
25
  ],
26
- "devDependencies": {
27
- "@oxc-project/types": "^0.34.0"
26
+ "dependencies": {
27
+ "@oxc-project/types": "^0.36.0"
28
28
  },
29
29
  "optionalDependencies": {
30
- "@oxc-parser/binding-win32-x64-msvc": "0.34.0",
31
- "@oxc-parser/binding-win32-arm64-msvc": "0.34.0",
32
- "@oxc-parser/binding-linux-x64-gnu": "0.34.0",
33
- "@oxc-parser/binding-linux-arm64-gnu": "0.34.0",
34
- "@oxc-parser/binding-linux-x64-musl": "0.34.0",
35
- "@oxc-parser/binding-linux-arm64-musl": "0.34.0",
36
- "@oxc-parser/binding-darwin-x64": "0.34.0",
37
- "@oxc-parser/binding-darwin-arm64": "0.34.0"
30
+ "@oxc-parser/binding-win32-x64-msvc": "0.36.0",
31
+ "@oxc-parser/binding-win32-arm64-msvc": "0.36.0",
32
+ "@oxc-parser/binding-linux-x64-gnu": "0.36.0",
33
+ "@oxc-parser/binding-linux-arm64-gnu": "0.36.0",
34
+ "@oxc-parser/binding-linux-x64-musl": "0.36.0",
35
+ "@oxc-parser/binding-linux-arm64-musl": "0.36.0",
36
+ "@oxc-parser/binding-darwin-x64": "0.36.0",
37
+ "@oxc-parser/binding-darwin-arm64": "0.36.0"
38
38
  }
39
39
  }