Skip to content

Commit

Permalink
ci(napi/transform): validate napi dts files (oxc-project#9183)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Dunqing <[email protected]>
  • Loading branch information
ArnaudBarre and Dunqing authored Feb 18, 2025
1 parent 20c347c commit 8d7ceee
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion napi/minify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"build-dev": "napi build --no-dts-cache --platform",
"build": "napi build --no-dts-cache --platform --release",
"test": "vitest --typecheck run ./test"
"test": "vitest --typecheck run ./test && tsc"
},
"napi": {
"binaryName": "minify",
Expand Down
8 changes: 8 additions & 0 deletions napi/minify/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"module": "Preserve",
"moduleResolution": "Bundler",
"noEmit": true,
"target": "ESNext"
}
}
2 changes: 1 addition & 1 deletion napi/parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"build-dev": "napi build --no-dts-cache --platform --js bindings.js",
"build": "napi build --no-dts-cache --platform --js bindings.js --release",
"test": "vitest --typecheck run ./test",
"test": "vitest --typecheck run ./test && tsc",
"bench": "vitest bench --run ./bench.bench.mjs"
},
"napi": {
Expand Down
1 change: 1 addition & 0 deletions napi/parser/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"compilerOptions": {
"module": "Preserve",
"moduleResolution": "Bundler",
"noEmit": true,
"target": "ESNext"
}
}
11 changes: 11 additions & 0 deletions napi/transform/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,17 @@ export declare const enum Severity {
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>
}

/**
* Transpile a JavaScript or TypeScript into a target ECMAScript version.
*
Expand Down
2 changes: 1 addition & 1 deletion napi/transform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"build-dev": "napi --no-dts-cache build --platform",
"build": "napi --no-dts-cache build --platform --release",
"test": "vitest --typecheck run ./test"
"test": "vitest --typecheck run ./test && tsc"
},
"napi": {
"binaryName": "transform",
Expand Down
1 change: 1 addition & 0 deletions napi/transform/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"compilerOptions": {
"module": "Preserve",
"moduleResolution": "Bundler",
"noEmit": true,
"target": "ESNext"
}
}

0 comments on commit 8d7ceee

Please sign in to comment.