[fix] Replace console.log with process.stdout.write

Use process.stdout.write instead of console.log to avoid no-console
lint rule violations in CLI scripts that output to stdout.
This commit is contained in:
snomiao
2026-03-14 06:24:46 +00:00
parent 132539fe49
commit ae19c039b3
2 changed files with 3 additions and 5 deletions

View File

@@ -413,5 +413,4 @@ function formatChange(change) {
const changes = compareApis(previousApi, currentApi)
const changelog = formatChangelog(changes, previousVersion, currentVersion)
console.log(changelog)
process.stdout.write(changelog)

View File

@@ -310,6 +310,5 @@ const sourceFile = ts.createSourceFile(
const apiSurface = extractApiSurface(sourceFile)
// Output as JSON
console.log(JSON.stringify(apiSurface, null, 2))
// Output as JSON to stdout
process.stdout.write(JSON.stringify(apiSurface, null, 2) + '\n')