Documentation
¶
Overview ¶
Package pkgspec parses `lockvet pkg` package specs — <ecosystem>:<name>[@version] — into the ecosystem, the name as the matching lockfile format would record it, and the version. Shared by the CLI, the MCP server, and the browser playground so every entry point accepts identical specs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Spec ¶
type Spec struct {
Eco lock.Ecosystem
Name string // as the matching lockfile format would record it
Version string // empty = resolve latest from the registry
Channel string // conda only: the anaconda.org channel (default conda-forge)
Label string // canonical spec, used as the report heading
}
Spec is one parsed `eco:name[@version]` argument.
func Parse ¶
Parse splits eco:name[@version]. The version separator is the LAST "@" past the first character of the name, so scoped npm names (npm:@types/node, npm:@types/node@24.0.0) parse naturally.
func (Spec) File ¶
File builds the synthetic one-package lockfile for the spec; diffing it against nothing runs the whole vetting pipeline over just this package. Version must be set (parsed or resolved) before calling.
func (Spec) LookupName ¶
LookupName is the name to ask the registry's latest-version resolver about (conda prefixes the channel).