set circular dependency limit to 9 (#18786)
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
|
||||
import madge from 'madge';
|
||||
import { join } from 'path';
|
||||
import { mkdirSync } from 'fs';
|
||||
//import { mkdirSync } from 'fs';
|
||||
|
||||
const __dirname = import.meta.dirname;
|
||||
//const __dirname = import.meta.dirname;
|
||||
const IS_GITHUB_ACTIONS = process.env.GITHUB_ACTIONS === 'true';
|
||||
const IS_AZURE_PIPELINES = process.env.TF_BUILD === 'true';
|
||||
const baseDir = process.argv[2] || 'src';
|
||||
@@ -40,15 +40,23 @@ if (circular.length) {
|
||||
}
|
||||
console.error('\nPlease fix the circular dependencies before proceeding.\n');
|
||||
|
||||
/*
|
||||
// Curently disabled as we don't have Graphviz installed on the CI servers neither do we use this visualization currently.
|
||||
// Ideally its an opt in feature that is triggered by a environment variable.
|
||||
try {
|
||||
const imagePath = join(__dirname, '../../madge');
|
||||
mkdirSync(imagePath, { recursive: true });
|
||||
const image = await madgeSetup.image(join(imagePath, 'circular.svg'), true);
|
||||
console.log('Circular dependencies graph generated:', image);
|
||||
} catch { console.warn('No image generated. Make sure Graphviz is in your $PATH if you want a visualization'); }
|
||||
*/
|
||||
|
||||
// TODO: Set this to 1 when we have fixed all circular dependencies
|
||||
process.exit(0);
|
||||
// TODO: Remove this check and set an exit with argument 1 when we have fixed all circular dependencies.
|
||||
if (circular.length > 11) {
|
||||
process.exit(1);
|
||||
} else {
|
||||
process.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
console.log('\nNo circular dependencies detected.\n');
|
||||
|
||||
@@ -57,7 +57,6 @@ describe('UmbTreeExpansionManager', () => {
|
||||
const isExpanded = manager.isExpanded(item);
|
||||
expect(isExpanded).to.be.an.instanceOf(Observable);
|
||||
manager.isExpanded(item).subscribe((value) => {
|
||||
console.log('VALUE', value);
|
||||
expect(value).to.be.true;
|
||||
done();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user