Versions in this module Expand all Collapse all v1 v1.3.0 Aug 15, 2026 Changes in this version type Config + func (c *Config) Validate() *Config v1.2.0 Jul 26, 2026 Changes in this version + const EnvAll + const EnvConcurrency + const EnvDryRun + const EnvFile + const EnvGreatest + const EnvJSON + const EnvNoColor + const EnvNop + const EnvPinLatest + const EnvQuiet + const EnvRegistry + const EnvRetries + const EnvTimeout + const EnvVerbose type Config + func NewCommand(runE func(context.Context, *Config) error) (*cobra.Command, *Config) v1.1.0 Jul 16, 2026 Changes in this version + const ProgramDesc + const ProgramName + const ProgramURL + var ErrConcurrentModification = errorfamily.NewConflict("file.concurrent_modification", ...) + var ErrDependencyNotFound = errorfamily.NewRejection("json.dependency_missing", ...) + var ErrFileNotFound = errorfamily.NewRejection("file.not_found", "package configuration file not found") + var ErrHelp = errors.New("help requested") + var ErrInvalidJSON = errorfamily.NewCorruption("json.invalid", "invalid JSON in package configuration file") + var ErrNoLatestDistTag = errorfamily.NewCorruption("version.no_latest", "no \"latest\" dist-tag found") + var ErrNoSemverVersions = errorfamily.NewCorruption("version.no_semver", "no valid semver versions found") + var ErrNoValidVersions = errorfamily.NewCorruption("version.no_versions", "no valid versions found") + var ErrPackageNotFound = errorfamily.NewRejection("registry.package_not_found", "package not found in NPM registry") + var ErrPartialFailure = errorfamily.NewRejection("update.partial_failure", "one or more dependencies could not be resolved") + var ErrRegistryUnavailable = errorfamily.NewTransient("registry.unavailable", "NPM registry is unavailable") + var ErrSectionNotFound = errorfamily.NewRejection("json.section_missing", "section not found in package configuration file") + var ErrSectionNotObject = errorfamily.NewCorruption("json.section_not_object", "section is not a JSON object") + var ErrVersion = errors.New("version requested") + var ErrVersionParse = errorfamily.NewCorruption("version.parse_failed", "failed to parse semantic version") + var ProgramVersion = "dev" + func PrintUsage(w io.Writer) + func PrintVersion(w io.Writer) + func RenderJSON(w io.Writer, manifest Manifest, updates int) error + func ShouldDisableColor(w io.Writer) bool + type Config struct + All bool + Concurrency int + File string + Greatest bool + JSON bool + NoColor bool + Nop bool + Patterns []string + PinLatest bool + Quiet bool + Registry string + Retries int + Timeout time.Duration + Verbose bool + func DefaultConfig() *Config + func ParseFlags(args []string) (*Config, error) + func (c *Config) UserAgent() string + type Engine struct + func NewEngine(cfg *Config) *Engine + func (e *Engine) ApplyUpdates(manifest Manifest, results map[string]*FetchResult, pkg *PackageFile) (int, int) + func (e *Engine) FetchAll(ctx context.Context, names []string) map[string]*FetchResult + func (e *Engine) WithReporter(r Reporter) *Engine + type FetchResult struct + func (r FetchResult) String() string + type Manifest map[string][]*Spec + func BuildManifest(pkg *PackageFile, patterns []string, pinLatest bool) (Manifest, []string) + func (m Manifest) SortedNames() []string + func (m Manifest) ToCheck() []string + type PackageFile struct + func ReadPackageFile(path string) (*PackageFile, error) + func (p *PackageFile) GetDependencySection(section string) (map[string]string, error) + func (p *PackageFile) GetUpdArgs() ([]string, error) + func (p *PackageFile) Raw() []byte + func (p *PackageFile) UpdateDependency(section, name, newValue string) error + func (p *PackageFile) Write(path string) error + type Packument struct + func (p *Packument) GreatestVersion() (string, error) + func (p *Packument) LatestVersion() (string, error) + func (p *Packument) VersionKeys() []string + type ProgressReporter struct + func NewProgressReporter(w io.Writer, total int, _ bool) *ProgressReporter + func (p *ProgressReporter) Finish() + func (p *ProgressReporter) Start() + func (p *ProgressReporter) Tick(msg string, _ int) + type RegistryClient struct + func NewRegistryClient(cfg *Config) *RegistryClient + func (c *RegistryClient) FetchPackument(ctx context.Context, name string) (*Packument, int, error) + type Renderer struct + func NewRenderer(w io.Writer, opts RendererOptions) *Renderer + func (r *Renderer) RenderTable(manifest Manifest, updates, errors int, showAll bool) + type RendererOptions struct + NoColor bool + Verbose bool + type Reporter interface + Tick func(msg string, bytes int) + type Spec struct + Err error + IsLatest bool + Name string + SNew string + SOld string + Section string + State State + VNew string + VOld string + func (s *Spec) String() string + type State string + const StateCheck + const StateError + const StateIgnored + const StateKept + const StateSkipped + const StateTodo + const StateUpdated v1.0.0 Jun 18, 2026