analyzeProject
uses tcmts.core.analyze.analyzeWith, which uses tcmts.core.program.compilerOptions, which uses tcmts.core.program.tcmNodeTypes, which uses node:path
Analyze files together, as one dependency graph: references between them (including through re-export barrels and workspace packages) become hash references, and import cycles become hash cycles.
import { analyzeWith, observed } from "#codebase/tcmts/core/analyze"; import type { AnalyzeHost, ProjectAnalysis } from "#codebase/tcmts/core/analyze"; import type { ExtractMode } from "#codebase/tcmts/core/extract"; export function analyzeProject( files: string[], host: AnalyzeHost, mode: ExtractMode = "import", ): ProjectAnalysis { observed = new Map(); try { return { ...analyzeWith(files, host, mode), packages: Object.fromEntries(observed) }; } finally { observed = undefined; } }
uses
- tcmts.core.analyze.AnalyzeHost
- tcmts.core.analyze.ProjectAnalysis
- tcmts.core.analyze.analyzeWith
- tcmts.core.analyze.observed
- tcmts.core.extract.ExtractMode
used by
- tcmts.cli.checkers.runCheck
- tcmts.cli.codebase.Codebase
- tcmts.core.analyze.analyzeFile
- tcmts.core.test.golden.testClassesAreNominal
- tcmts.core.test.golden.testHashFormatIsPinned
- tcmts.core.test.golden.testModuleSideEffectsAreRefused
- tcmts.core.test.hash.project
- tcmts.core.test.hash.testComputedKeysNameValues
- tcmts.core.test.hash.testLineageSaltsSeparateIdenticalCode
- tcmts.core.test.hash.testNamespaceImportsLeaveTypesToTheirNames
- tcmts.core.test.hash.testSetupStatementsJoinTheirConstant