Skip to content

Commit b357e6d

Browse files
authored
build: tidy up public-api script output (#25588)
1 parent bd8ab0c commit b357e6d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/check-public-api-formats.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@ function throwLegacyNamingError(path, node) {
3232
const invalidSymbol = node.exportClause.elements
3333
.map(n => n.name.escapedText)
3434
.filter(n => !n.includes('legacy'))
35-
.join('\n * ');
35+
.map(n => ` * ${n}`)
36+
.join('\n');
3637
errors.push(
3738
chalk.red(
3839
`ERROR ${errors.length + 1}:` +
3940
`\n File: ${path}` +
4041
`\n The following exported symbols do not contain 'legacy':` +
41-
`\n ${invalidSymbol}`,
42+
`\n${invalidSymbol}`,
4243
),
4344
);
4445
}
@@ -96,4 +97,6 @@ if (errors.length) {
9697
separator,
9798
);
9899
process.exitCode = 1;
100+
} else {
101+
console.log(chalk.green('✓ All public-api format checks passed!'));
99102
}

0 commit comments

Comments
 (0)