-
Notifications
You must be signed in to change notification settings - Fork 355
Open
Labels
Description
- I have searched for similar issues
npm-check-updates supports loading authentication tokens from .yarnrc.yml files. It also supports simple variables such as ${VAR} but does not support variables with fallback ${VAR-fallback} and ${VAR:-fallback}.
This is needed as a different authentication token is needed for publishing and supplied on the command line.
Steps to Reproduce
Set up a .yarnrc.yml using a variable for the authentication token for a scope:
npmScopes:
xxxxxx:
npmAlwaysAuth: true
npmAuthToken: ${YARN_NPM_AUTH_TOKEN:-ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxx}
npmRegistryServer: 'https://npm.pkg.github.com'Current Behaviour
The variable isn't interpreted correctly, and authentication fails:
Using yarn
Checking /zzz/package.json
[====================] 47/47 100%
@xxxxxx/package-name unauthenticated: User cannot be authenticated with the token provided.
Expected Behaviour
The variable is parsed correctly and authentication succeeds using the fallback value.
Reactions are currently unavailable