Documentation
¶
Overview ¶
Package heuristic provides a SurfaceResolver that maps a package identity to its conventional source-level name using per-ecosystem naming rules alone. It reads no files, runs no commands, and makes no network requests.
The mappings cover the common case where a package's importable name is a mechanical transform of its registry name: an npm package `ws` provides module `ws`, a PyPI distribution `Engine-IO-Parser` provides module `engine_io_parser`, a Ruby gem `active_support` provides constant `ActiveSupport`. Packages whose importable name is unrelated to their registry name (PyYAML → yaml, Pillow → PIL) need curated data or an artifact resolver; chain this resolver after one of those so the convention fills gaps the authoritative source did not cover.
Every returned ProvidedName carries EvidenceHeuristic so downstream code can distinguish a naming-convention guess from a verified mapping.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Resolver ¶
func Resolver() provides.SurfaceResolverFunc
Resolver returns a SurfaceResolver that derives conventional source names from a package's PURL type and name. Ecosystems without a registered convention resolve to an empty surface with no diagnostic.
Types ¶
This section is empty.