build: adds another fail scenario to the circular checker if it encounters fewer dependencies than anticipated
This commit is contained in:
@@ -52,7 +52,12 @@ if (circular.length) {
|
||||
*/
|
||||
|
||||
// TODO: Remove this check and set an exit with argument 1 when we have fixed all circular dependencies.
|
||||
if (circular.length > 7) {
|
||||
const MAX_CIRCULAR_DEPENDENCIES = 7;
|
||||
if (circular.length > MAX_CIRCULAR_DEPENDENCIES) {
|
||||
process.exit(1);
|
||||
} else if (circular.length < MAX_CIRCULAR_DEPENDENCIES) {
|
||||
console.error(`\nYou have fewer circular dependencies (${circular.length}) than anticipated (${MAX_CIRCULAR_DEPENDENCIES}). That is great!\n`);
|
||||
console.error(`(Now please adjust the number in MAX_CIRCULAR_DEPENDENCIES to ${circular.length} in devops/circular/index.js).\n`);
|
||||
process.exit(1);
|
||||
} else {
|
||||
process.exit(0);
|
||||
|
||||
Reference in New Issue
Block a user