# discovery

Monorepo discovery: finds packages, locates their changelogs, and builds the internal-dependency graph.

The package-discovery half ([`DiscoveryOptions`](https://www.hyperfrontend.dev/docs/libraries/versioning/workspace/discovery/#api-DiscoveryOptions), [`DiscoveryResult`](https://www.hyperfrontend.dev/docs/libraries/versioning/workspace/discovery/#api-DiscoveryResult)) walks the workspace looking for `package.json` files and produces a normalized list of projects. The changelog half ([`hasChangelog`](https://www.hyperfrontend.dev/docs/libraries/versioning/workspace/discovery/#api-hasChangelog), [`getExpectedChangelogPath`](https://www.hyperfrontend.dev/docs/libraries/versioning/workspace/discovery/#api-getExpectedChangelogPath), [`DiscoveredChangelog`](https://www.hyperfrontend.dev/docs/libraries/versioning/workspace/discovery/#api-DiscoveredChangelog)) reports which packages have a `CHANGELOG.md` and where it's expected to live. The dependency-graph half ([`findInternalDependencies`](https://www.hyperfrontend.dev/docs/libraries/versioning/workspace/discovery/#api-findInternalDependencies), [`findInternalDependenciesWithTypes`](https://www.hyperfrontend.dev/docs/libraries/versioning/workspace/discovery/#api-findInternalDependenciesWithTypes), [`buildDependencyGraph`](https://www.hyperfrontend.dev/docs/libraries/versioning/workspace/discovery/#api-buildDependencyGraph), [`getTopologicalOrder`](https://www.hyperfrontend.dev/docs/libraries/versioning/workspace/discovery/#api-getTopologicalOrder), [`getTransitiveDependents`](https://www.hyperfrontend.dev/docs/libraries/versioning/workspace/discovery/#api-getTransitiveDependents)) computes the per-package dependency edges ([`DependencyEdge`](https://www.hyperfrontend.dev/docs/libraries/versioning/workspace/discovery/#api-DependencyEdge), [`DependencyType`](https://www.hyperfrontend.dev/docs/libraries/versioning/workspace/discovery/#api-DependencyType)) and the topological order needed to drive cascade bumps and batch updates safely.

---

Canonical page: https://www.hyperfrontend.dev/docs/libraries/versioning/workspace/discovery/
This file: https://www.hyperfrontend.dev/docs/libraries/versioning/workspace/discovery.md
Documentation index: https://www.hyperfrontend.dev/llms.txt
