Read npm configuration from .npmrc files.
Checks for .npmrc in the project directory and home directory.
Environment variables take precedence over file configuration.
Summary
Functions
Read the auth token.
Gets a config value with fallback to defaults.
Loads config from all levels: project .npmrc then user .npmrc. Project values override user values.
Merges multiple config maps (later overrides earlier).
Parse an .npmrc file into a map of key-value pairs.
Read a value from .npmrc files.
Read the effective registry URL.
Returns the registry URL for a given scope, or the default.
Functions
@spec auth_token() :: String.t() | nil
Read the auth token.
Priority: NPM_TOKEN env var > project .npmrc > home .npmrc.
Gets a config value with fallback to defaults.
Loads config from all levels: project .npmrc then user .npmrc. Project values override user values.
Merges multiple config maps (later overrides earlier).
Parse an .npmrc file into a map of key-value pairs.
Read a value from .npmrc files.
Checks project-level first, then home-level.
@spec registry() :: String.t()
Read the effective registry URL.
Priority: NPM_REGISTRY env var > project .npmrc > home .npmrc > default.
Returns the registry URL for a given scope, or the default.