crates/turborepo-repository/README.md
Repository detection, package discovery, and package graph construction. Understands monorepo structure, workspace configurations, and inter-package dependencies.
Repository root
└── turborepo-repository
├── inference/ - Detect repo type and package manager
├── package_manager/ - npm, pnpm, yarn, bun support
├── package_graph/ - Dependency graph of workspace packages
├── external_resolution.rs - Explicit external dependency resolution domains
├── package_json/ - package.json parsing
└── discovery/ - Find all workspace packages
Key types:
PackageGraph - Graph of workspace packages and their dependenciesRepositoryKnowledge - Immutable authority for package and aggregate identities, paths, kinds, and toolchain provenancePackageManager - Abstraction over npm/pnpm/yarn/bunExternalResolutionDomain - Immutable domain identity, membership, and resolution dataSeparated from turborepo-lib so the @turbo/repository NPM package can use it without pulling in the entire CLI. This crate is foundational - most other crates depend on it for package information.