Socket
Socket
Sign inDemoInstall

oxc-parser

Package Overview
Dependencies
8
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.8.0 to 0.9.0

80

index.d.ts

@@ -6,3 +6,74 @@ /* tslint:disable */

export interface ImportSpecifier {
/**
* Module name
*
* To handle escape sequences in specifier strings, the .n field of imported specifiers will be provided where possible.
*
* For dynamic import expressions, this field will be empty if not a valid JS string.
*/
n?: string
/** Start of module specifier */
s: number
/** End of module specifier */
e: number
/** Start of import statement */
ss: number
/** End of import statement */
se: number
/**
* Import Type
* * If this import keyword is a dynamic import, this is the start value.
* * If this import keyword is a static import, this is -1.
* * If this import keyword is an import.meta expression, this is -2.
*/
d: number
/**
* If this import has an import assertion, this is the start value
* Otherwise this is `-1`.
*/
a: number
}
export interface ExportSpecifier {
/** Exported name */
n: string
/** Local name, or undefined. */
ln?: string
/** Start of exported name */
s: number
/** End of exported name */
e: number
/** Start of local name */
ls?: number
/** End of local name */
le?: number
}
export interface ModuleLexer {
imports: Array<ImportSpecifier>
exports: Array<ExportSpecifier>
/**
* ESM syntax detection
*
* The use of ESM syntax: import / export statements and `import.meta`
*/
hasModuleSyntax: boolean
/** Facade modules that only use import / export syntax */
facade: boolean
}
/**
* Outputs the list of exports and locations of import specifiers,
* including dynamic import and import meta handling.
*
* # Panics
*
* * File extension is invalid
*/
export function moduleLexerSync(sourceText: string, options?: ParserOptions | undefined | null): ModuleLexer
/**
* # Panics
*
* * Tokio crashes
*/
export function moduleLexerAsync(sourceText: string, options?: ParserOptions | undefined | null): Promise<ModuleLexer>
/**
* Babel Parser Options

@@ -55,15 +126,6 @@ *

/**
* Returns a binary AST in flexbuffers format.
* This is a POC API. Error handling is not done yet.
* # Panics
*
* * File extension is invalid
* * FlexbufferSerializer serialization error
*/
export function parseSyncBuffer(sourceText: string, options?: ParserOptions | undefined | null): Buffer
/**
* # Panics
*
* * Tokio crashes
*/
export function parseAsync(sourceText: string, options?: ParserOptions | undefined | null): Promise<ParseResult>

5

index.js

@@ -298,7 +298,8 @@ /* tslint:disable */

const { parseWithoutReturn, parseSync, parseSyncBuffer, parseAsync } = nativeBinding
const { moduleLexerSync, moduleLexerAsync, parseWithoutReturn, parseSync, parseAsync } = nativeBinding
module.exports.moduleLexerSync = moduleLexerSync
module.exports.moduleLexerAsync = moduleLexerAsync
module.exports.parseWithoutReturn = parseWithoutReturn
module.exports.parseSync = parseSync
module.exports.parseSyncBuffer = parseSyncBuffer
module.exports.parseAsync = parseAsync
{
"name": "oxc-parser",
"version": "0.8.0",
"version": "0.9.0",
"description": "Oxc Parser Node API",

@@ -26,11 +26,11 @@ "keywords": [

"optionalDependencies": {
"@oxc-parser/binding-win32-x64-msvc": "0.8.0",
"@oxc-parser/binding-win32-arm64-msvc": "0.8.0",
"@oxc-parser/binding-linux-x64-gnu": "0.8.0",
"@oxc-parser/binding-linux-arm64-gnu": "0.8.0",
"@oxc-parser/binding-linux-x64-musl": "0.8.0",
"@oxc-parser/binding-linux-arm64-musl": "0.8.0",
"@oxc-parser/binding-darwin-x64": "0.8.0",
"@oxc-parser/binding-darwin-arm64": "0.8.0"
"@oxc-parser/binding-win32-x64-msvc": "0.9.0",
"@oxc-parser/binding-win32-arm64-msvc": "0.9.0",
"@oxc-parser/binding-linux-x64-gnu": "0.9.0",
"@oxc-parser/binding-linux-arm64-gnu": "0.9.0",
"@oxc-parser/binding-linux-x64-musl": "0.9.0",
"@oxc-parser/binding-linux-arm64-musl": "0.9.0",
"@oxc-parser/binding-darwin-x64": "0.9.0",
"@oxc-parser/binding-darwin-arm64": "0.9.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc