Skip to content

Function: npmRegistry()

npmRegistry(cwd?, options?): UrlBuilderImpl | undefined

The active npm registry as a chainable net.UrlBuilder.

Resolution is manager-agnostic and memoized per cwd plus options: environment variables, then .npmrc (project ancestors, user, global), then Bun bunfig.toml install.registry, then pnpm workspace/global YAML, then https://registry.npmjs.org/. overrideOnly skips that public default.

string | null

NpmRegistryOptions

UrlBuilderImpl | undefined