36 lines
1.3 KiB
JavaScript
36 lines
1.3 KiB
JavaScript
// dependency-cruiser config for the actual frontend import graph (what's
|
|
// imported, vs the *allowed* edges in module-boundaries.mjs). Consumed by
|
|
// .github/scripts/create-test-plan.ts.
|
|
//
|
|
// bunx depcruise frontend/src enterprise/frontend/src .storybook/preview.tsx \
|
|
// --config .dependency-cruiser.cjs --output-type json > dependency-graph.json
|
|
|
|
/** @type {import('dependency-cruiser').IConfiguration} */
|
|
module.exports = {
|
|
options: {
|
|
// Keep only edges between our own source files (drops node_modules etc.),
|
|
// which keeps the JSON small.
|
|
includeOnly: "^(frontend/src|enterprise/frontend/src|\\.storybook)/",
|
|
|
|
doNotFollow: { path: "node_modules" },
|
|
|
|
// No rules here, so the cycle and orphan analysis has no consumer and only costs time.
|
|
skipAnalysisNotInRules: true,
|
|
|
|
// Resolve the `"*": ["./frontend/src/*", ...]` aliases so bare imports like
|
|
// `metabase/lib/foo` map back to a real file.
|
|
tsConfig: { fileName: "tsconfig.json" },
|
|
|
|
// Keep type-only imports: a type-only dependent still breaks on a type change.
|
|
tsPreCompilationDeps: true,
|
|
|
|
moduleSystems: ["es6", "cjs", "tsd"],
|
|
|
|
enhancedResolveOptions: {
|
|
exportsFields: ["exports"],
|
|
conditionNames: ["import", "require", "node", "default", "types"],
|
|
extensions: [".js", ".jsx", ".ts", ".tsx", ".json"],
|
|
},
|
|
},
|
|
};
|