Skip to content

Improve error messaging for private npm registries in deno outdated #32179

@IamThiago-IT

Description

@IamThiago-IT

Problem

Currently, when running deno outdated, packages from private npm registries (such as GitLab npm registry or private Artifactory instances) are silently skipped without any feedback to the user. This creates confusion as developers cannot tell if:

  • The command completed successfully with no updates available
  • Some packages were skipped due to authentication/network issues
  • Their registry configuration is incorrect

Related to #31924

Current Behavior

$ deno outdated
┌──────────────────────┬─────────┬────────┬────────┐
│ Package              │ Current │ Update │ Latest │
├──────────────────────┼─────────┼────────┼────────┤
│ jsr:@zod/zod        │ 4.3.5   │ 4.3.6  │ 4.3.6  │
└──────────────────────┴─────────┴────────┴────────┘

# No indication that @my-registry/my-package was skipped

Proposed Behavior

Default output with warning:

$ deno outdated
┌──────────────────────┬─────────┬────────┬────────┐
│ Package              │ Current │ Update │ Latest │
├──────────────────────┼─────────┼────────┼────────┤
│ jsr:@zod/zod        │ 4.3.5   │ 4.3.6  │ 4.3.6  │
└──────────────────────┴─────────┴────────┴────────┘

⚠ Warning: Unable to check updates for 2 package(s) from private registries
  Use --verbose for details on which packages could not be checked

Verbose output with details:

$ deno outdated --verbose
┌──────────────────────┬─────────┬────────┬────────┐
│ Package              │ Current │ Update │ Latest │
├──────────────────────┼─────────┼────────┼────────┤
│ jsr:@zod/zod        │ 4.3.5   │ 4.3.6  │ 4.3.6  │
└──────────────────────┴─────────┴────────┴────────┘

⚠ Skipped packages (authentication/network issues):
  • npm:@my-registry/my-package (private registry: gitlab.company.com)
    Reason: HTTP 401 Unauthorized - Unable to fetch package metadata
    
  • npm:@internal/ui-components (private registry: artifactory.company.com)
    Reason: Network timeout after 30s

💡 Tip: Verify your .npmrc credentials and network connectivity
       Check if your auth tokens are still valid

Benefits

  • Better DX: Users immediately know if something went wrong
  • Debugging aid: Clear indication of which packages and registries failed
  • Transparency: No silent failures
  • Actionable: Provides guidance on how to fix issues

Implementation Notes

Likely involves changes in:

  • cli/tools/registry/outdated.rs (or equivalent module)
  • Collecting failures during package metadata fetching
  • Adding formatted warning/error output
  • Supporting --verbose flag for detailed diagnostics

This would be a great enhancement for enterprise users working with private registries, which is becoming increasingly common as Deno adoption grows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions