-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(js-toolkit): make another attempt at getting Windows CI green
My last attempt (parent commit) neither fixed Windows[0], nor allowed Linux[1] to keep working. It seems that `tsc` knows nothing about globs, so let's just call the command with the explicit, expanded list of packages. [0]: /~https://github.com/liferay/liferay-frontend-projects/pull/133/checks?check_run_id=1220654707 [1]: /~https://github.com/liferay/liferay-frontend-projects/pull/133/checks?check_run_id=1220537852
- Loading branch information
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* SPDX-FileCopyrightText: © 2020 Liferay, Inc. <https://liferay.com> | ||
* SPDX-License-Identifier: LGPL-3.0-or-later | ||
*/ | ||
|
||
const child_process = require('child_process'); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const packages = fs | ||
.readdirSync(path.join(__dirname, '..', 'packages'), {withFileTypes: true}) | ||
.map((entry) => { | ||
if (entry.isDirectory()) { | ||
return path.join( | ||
__dirname, | ||
'..', | ||
'packages', | ||
entry.name, | ||
'tsconfig.json' | ||
); | ||
} | ||
}) | ||
.filter(Boolean); | ||
|
||
const {status, error, signal} = child_process.spawnSync( | ||
'tsc', | ||
['--build', ...packages], | ||
{stdio: 'inherit'} | ||
); | ||
|
||
if (status !== 0) { | ||
process.exit(1); | ||
} |