allVersions

registryUrl

Type: string
Default: Auto-detected

The registry URL is by default inferred from the npm defaults and .npmrc. This is beneficial as package-json and any project using it will work just like npm. This option is only intended for internal tools. You should not use this option in reusable packages. Prefer just using .npmrc whenever possible.

agent

Type: http.Agent | https.Agent | Object | false

Overwrite the agent option that is passed down to got. This might be useful to add proxy support.

packageJson.PackageNotFoundError

The error thrown when the given package name cannot be found.

packageJson.VersionNotFoundError

The error thrown when the given package version cannot be found.

Authentication

Both public and private registries are supported, for both scoped and unscoped packages, as long as the registry uses either bearer tokens or basic authentication.