mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
59e8d5fb91
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Adoption](https://docs.renovatebot.com/merge-confidence/) | [Passing](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | Type | Update | |---|---|---|---|---|---|---|---| | [@napi-rs/cli](https://napi.rs/) ([source](https://redirect.github.com/napi-rs/napi-rs)) | [`3.9.0` → `3.9.1`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/3.9.0/3.9.1) |  |  |  |  | pnpm.catalog.default | patch | | [napi](https://redirect.github.com/napi-rs/napi-rs) | `3.12.2` → `3.12.3` |  |  |  |  | workspace.dependencies | patch | | [napi-derive](https://redirect.github.com/napi-rs/napi-rs) | `3.6.3` → `3.6.4` |  |  |  |  | workspace.dependencies | patch | --- ### Release Notes <details> <summary>napi-rs/napi-rs (@​napi-rs/cli)</summary> ### [`v3.9.1`](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.9.0...@napi-rs/cli@3.9.1) [Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.9.0...@napi-rs/cli@3.9.1) </details> --- ### Configuration 📅 **Schedule**: (in timezone Asia/Shanghai) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC43MS4wIiwidXBkYXRlZEluVmVyIjoiNDQuNzEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Cameron Clark <cameron.clark@hey.com>
82 lines
2.1 KiB
TypeScript
82 lines
2.1 KiB
TypeScript
/* auto-generated by NAPI-RS */
|
|
/* eslint-disable */
|
|
|
|
/**
|
|
* Parse `source_text` with `oxc_parser` and print the AST with `oxc_codegen`, including a source map.
|
|
*
|
|
* Returns `null` if the source text could not be parsed without errors, which tells the caller
|
|
* there is nothing to compare for this fixture.
|
|
*
|
|
* Comments are not printed. `oxc-codegen` does not print comments, and the ESTree AST the JS side
|
|
* works from carries no comment data anyway.
|
|
*
|
|
* # Errors
|
|
*
|
|
* Returns any panics as errors to avoid aborting the whole Node process.
|
|
*/
|
|
export declare function codegen(filename: string, sourceText: string, options?: Options | undefined | null): CodegenResult | null
|
|
|
|
/** Generated code and its source mappings. */
|
|
export interface CodegenResult {
|
|
/** Generated source text. */
|
|
code: string
|
|
/** Source map generated by `oxc_codegen`. */
|
|
map: SourceMap
|
|
}
|
|
|
|
/**
|
|
* Options describing how a fixture should be parsed.
|
|
*
|
|
* These are the same options the JS side passes to `oxc-parser`, so that both sides parse
|
|
* the fixture identically.
|
|
*/
|
|
export interface Options {
|
|
/** `"js"`, `"jsx"`, `"ts"` or `"tsx"`. When absent, the language comes from the filename. */
|
|
lang?: string
|
|
/** `"script"`, `"module"` or `"unambiguous"`. When absent, it comes from the language. */
|
|
sourceType?: string
|
|
/**
|
|
* Whether to keep the `ParenthesizedExpression` / `TSParenthesizedType` wrapper nodes.
|
|
* Default `false`.
|
|
*/
|
|
preserveParens?: boolean
|
|
}
|
|
|
|
export interface Comment {
|
|
type: 'Line' | 'Block'
|
|
value: string
|
|
start: number
|
|
end: number
|
|
}
|
|
|
|
export interface ErrorLabel {
|
|
message: string | null
|
|
start: number
|
|
end: number
|
|
}
|
|
|
|
export interface OxcError {
|
|
severity: Severity
|
|
message: string
|
|
labels: Array<ErrorLabel>
|
|
helpMessage: string | null
|
|
codeframe: string | null
|
|
}
|
|
|
|
export declare const enum Severity {
|
|
Error = 'Error',
|
|
Warning = 'Warning',
|
|
Advice = 'Advice',
|
|
}
|
|
|
|
export interface SourceMap {
|
|
file?: string
|
|
mappings: string
|
|
names: Array<string>
|
|
sourceRoot?: string
|
|
sources: Array<string>
|
|
sourcesContent?: Array<string>
|
|
version: number
|
|
x_google_ignoreList?: Array<number>
|
|
}
|