mirror of
https://github.com/aphrody-labs/oxc.git
synced 2026-10-15 14:49:36 +00:00
fix(napi): omit parser header from WASI declarations (#25254)
## Summary - generate the parser WASI declaration without the root package's custom DTS header - remove the resulting invalid `./generated/visit/visitor.d.ts` import from `parser.wasi.d.cts` - allow `@napi-rs/cli` 3.8.2 to validate and publish the WASI binding package Failed job: https://github.com/oxc-project/oxc/actions/runs/30810594648/job/91677775732 The custom header describes the root `oxc-parser` JavaScript wrapper (`Visitor` and `visitorKeys`), not the raw platform binding package, so it should not be present in the WASI binding declaration.
This commit is contained in:
1 parent
cc01bd7f0f
commit
2a1058a8d1
2 files changed
+2
-18
No files matched your search
@@ -65,9 +65,9 @@
|
||||
"build": "pnpm run build-dev --features allocator --release",
|
||||
"postbuild": "publint",
|
||||
"postbuild-dev": "node scripts/patch.js",
|
||||
"build-wasi": "napi build --config-path napi.wasm.json --target wasm32-wasip1-threads --dts parser.wasi.d.cts",
|
||||
"build-wasi": "napi build --config-path napi.wasm.json --target wasm32-wasip1-threads --dts parser.wasi.d.cts --no-dts-header",
|
||||
"build-wasm": "pnpm run build-wasm-dev --release",
|
||||
"build-wasm-dev": "pnpm run build-dev --target wasm32-wasip1-threads --dts parser.wasi.d.cts",
|
||||
"build-wasm-dev": "pnpm run build-dev --target wasm32-wasip1-threads --dts parser.wasi.d.cts --no-dts-header",
|
||||
"build-npm-dir": "rm -rf npm-dir && napi create-npm-dirs --config-path napi.wasm.json --npm-dir npm-dir && pnpm napi artifacts --config-path napi.wasm.json --npm-dir npm-dir --output-dir src-js",
|
||||
"build-browser-bundle": "node scripts/build-browser-bundle.js",
|
||||
"test": "pnpm run test-node run",
|
||||
|
||||
@@ -1,19 +1,3 @@
|
||||
/* auto-generated by NAPI-RS */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { Program } from "@oxc-project/types";
|
||||
import type { VisitorObject } from "./generated/visit/visitor.d.ts";
|
||||
|
||||
export * from "@oxc-project/types";
|
||||
|
||||
export { VisitorObject };
|
||||
|
||||
export const visitorKeys: Record<string, string[]>;
|
||||
|
||||
export class Visitor {
|
||||
constructor(visitor: VisitorObject);
|
||||
visit(program: Program): void;
|
||||
}
|
||||
export interface Comment {
|
||||
type: 'Line' | 'Block'
|
||||
value: string
|
||||
|
||||
Reference in new issue
Block a user