oxc-parser 0.86.0 → 0.88.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.
@@ -3,8 +3,9 @@
3
3
  // @ts-nocheck
4
4
  /* auto-generated by NAPI-RS */
5
5
 
6
- const { createRequire } = require('node:module')
7
- require = createRequire(__filename)
6
+ import { createRequire } from 'node:module'
7
+ const require = createRequire(import.meta.url)
8
+ const __dirname = new URL('.', import.meta.url).pathname
8
9
 
9
10
  const { readFileSync } = require('node:fs')
10
11
  let nativeBinding = null
@@ -400,13 +401,15 @@ if (!nativeBinding) {
400
401
  throw new Error(`Failed to load native binding`)
401
402
  }
402
403
 
403
- module.exports = nativeBinding
404
- module.exports.Severity = nativeBinding.Severity
405
- module.exports.ParseResult = nativeBinding.ParseResult
406
- module.exports.ExportExportNameKind = nativeBinding.ExportExportNameKind
407
- module.exports.ExportImportNameKind = nativeBinding.ExportImportNameKind
408
- module.exports.ExportLocalNameKind = nativeBinding.ExportLocalNameKind
409
- module.exports.ImportNameKind = nativeBinding.ImportNameKind
410
- module.exports.parseAsync = nativeBinding.parseAsync
411
- module.exports.parseSync = nativeBinding.parseSync
412
- module.exports.rawTransferSupported = nativeBinding.rawTransferSupported
404
+ const { Severity, ParseResult, ExportExportNameKind, ExportImportNameKind, ExportLocalNameKind, ImportNameKind, parseAsync, parseSync, rawTransferSupported } = nativeBinding
405
+ export { Severity }
406
+ export { ParseResult }
407
+ export { ExportExportNameKind }
408
+ export { ExportImportNameKind }
409
+ export { ExportLocalNameKind }
410
+ export { ImportNameKind }
411
+ export { parseAsync }
412
+ export { parseSync }
413
+ export { rawTransferSupported }
414
+ const { getBufferOffset, parseAsyncRaw, parseSyncRaw } = nativeBinding
415
+ export { getBufferOffset, parseAsyncRaw, parseSyncRaw }
@@ -0,0 +1,9 @@
1
+ // Auto-generated code, DO NOT EDIT DIRECTLY!
2
+ // To edit this generated file you have to edit `tasks/ast_tools/src/generators/raw_transfer.rs`.
3
+
4
+ export const BUFFER_SIZE = 2147483616;
5
+ export const BUFFER_ALIGN = 4294967296;
6
+ export const DATA_POINTER_POS_32 = 536870902;
7
+ export const IS_TS_FLAG_POS = 2147483612;
8
+ export const PROGRAM_OFFSET = 0;
9
+ export const SOURCE_LEN_OFFSET = 16;
@@ -1,17 +1,13 @@
1
1
  // Auto-generated code, DO NOT EDIT DIRECTLY!
2
2
  // To edit this generated file you have to edit `tasks/ast_tools/src/generators/raw_transfer.rs`.
3
3
 
4
- 'use strict';
5
-
6
- module.exports = deserialize;
7
-
8
4
  let uint8, uint32, float64, sourceText, sourceIsAscii, sourceByteLen;
9
5
 
10
6
  const textDecoder = new TextDecoder('utf-8', { ignoreBOM: true }),
11
7
  decodeStr = textDecoder.decode.bind(textDecoder),
12
8
  { fromCodePoint } = String;
13
9
 
14
- function deserialize(buffer, sourceTextInput, sourceByteLenInput) {
10
+ export function deserialize(buffer, sourceTextInput, sourceByteLenInput) {
15
11
  uint8 = buffer;
16
12
  uint32 = buffer.uint32;
17
13
  float64 = buffer.float64;
@@ -1,17 +1,13 @@
1
1
  // Auto-generated code, DO NOT EDIT DIRECTLY!
2
2
  // To edit this generated file you have to edit `tasks/ast_tools/src/generators/raw_transfer.rs`.
3
3
 
4
- 'use strict';
5
-
6
- module.exports = deserialize;
7
-
8
4
  let uint8, uint32, float64, sourceText, sourceIsAscii, sourceByteLen;
9
5
 
10
6
  const textDecoder = new TextDecoder('utf-8', { ignoreBOM: true }),
11
7
  decodeStr = textDecoder.decode.bind(textDecoder),
12
8
  { fromCodePoint } = String;
13
9
 
14
- function deserialize(buffer, sourceTextInput, sourceByteLenInput) {
10
+ export function deserialize(buffer, sourceTextInput, sourceByteLenInput) {
15
11
  uint8 = buffer;
16
12
  uint32 = buffer.uint32;
17
13
  float64 = buffer.float64;