Skip to content

Commit 84b16af

Browse files
committed
fix(build): fail fast when no .d.ts files found in verify-dts-imports
1 parent caad915 commit 84b16af

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

scripts/verify-dts-imports.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ const errors: Array<{ file: string; line: number; text: string }> = []
1212

1313
const files = await glob(['packages/*/build/**/*.d.ts', 'packages/*/build/**/*.d.cts'])
1414

15+
if (files.length === 0) {
16+
console.error(
17+
'ERROR: No declaration files found under packages/*/build. Ensure the build step produced .d.ts outputs before verification.',
18+
)
19+
process.exit(1)
20+
}
21+
1522
for (const file of files) {
1623
const content = readFileSync(file, 'utf-8')
1724
const lines = content.split('\n')

0 commit comments

Comments
 (0)