SfSkills Domains Docs GitHub

Home / devops / packaging-dependency-graph

packaging-dependency-graph

Model and verify unlocked package dependencies, version pinning, and promotion. NOT for 1GP managed packages — use devops/multi-package-development.

Open the skill folder on GitHub


Packaging Dependency Graph

Unlocked package dependencies pin a package to a specific version of another. Without a graph, you can accidentally ship a service-core change that depends on an unreleased sales-core version, breaking prod deploy. This skill walks through extracting the dependency graph with the SF CLI, pinning versions explicitly in sfdx-project.json, and enforcing promotion order with a RELEASE.md checklist plus a fresh-scratch install validation step in CI. Correctly modeled dependencies prevent the most common 'works in staging, fails in prod' failure mode for multi-package monorepos.

  1. Run sf package version displaydependencies --package <packageVersionId> for each package version; assemble the graph. (There is no sf package dependencies topic — dependencies are read off a package version, not a package.)
  2. In sfdx-project.json, pin deps to @version (e.g., sales-core@1.4.0-2).
  3. Promote packages bottom-up: base utils first, then dependents.
  4. Validate install order on a fresh scratch org before promoting to prod.
  5. Document the promotion order in a RELEASE.md checklist.

Key Considerations

Worked Examples (see references/examples.md)

Common Gotchas (see references/gotchas.md)

Top LLM Anti-Patterns (full list in references/llm-anti-patterns.md)

Official Sources Used

Package files