Documentation

Public exports

How to treat package exports as the public contract.

Each package’s package.json exports field defines its public contract. Import through package entry points such as @plumile/router or documented subpaths only.

Rules

  • Use package entry points and documented subpaths.
  • Do not reach into another package’s private src/ files.
  • When adding a public export, update the package entry point and README in the same change.
  • When changing or removing an export, update tests, README examples, and any linked guides.

Useful files

  • packages/*/package.json for package exports.
  • packages/*/src/index.ts for root exports.
  • Package README files for public usage examples.
  • TypeDoc for generated symbol-level reference.