Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions tools/build-scripts/typecheck.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@ import spawn from 'cross-spawn';
const __dirname = path.dirname( fileURLToPath( import.meta.url ) );
const ROOT_DIR = path.resolve( __dirname, '../..' );

/* Same failure hint as the build, so a red CI run points at the fix. */
const result = spawn.sync( 'tsc', [ '--build', ...process.argv.slice( 2 ) ], {
cwd: ROOT_DIR,
stdio: 'inherit',
} );
/*
* Same failure hint as the build, so a red CI run points at the fix.
* `--pretty` keeps related info (e.g. the tsconfig behind a bad `types`
* entry) that tsc drops when stdout is not a TTY, as in CI.
*/
const result = spawn.sync(
'tsc',
[ '--build', '--pretty', ...process.argv.slice( 2 ) ],
{
cwd: ROOT_DIR,
stdio: 'inherit',
}
);

if ( result.status !== 0 ) {
console.error(
Expand Down
Loading