Yarn Berry and npmScopes
Yarn Classic is being pushed out and replaced with yarn berry. In case you migrate from the former to the later and use different registries based on the scope as described in the documentation, you might find a few surprises.
- In case your scope starts with an AT sign [@], you should omit it in the
.yarnrc.ymlfile in thenpmScopessection. For example, if your package is@my-company/my-packagethenpmScopesentry will be:
npmScopes:
my-company:
npmRegistryServer: https://pkgs.my-company.com/...
- In case you are using Azure package registry (e.g. https://pkgs.dev.azure.com) you can authenticate via
npmAuthIdent. The value should be a base64 ofusername:token. An example structure will be:
npmScopes:
my-company:
npmAlwaysAuth: true
npmAuthIdent: $AZURE_NPM_TOKEN
npmRegistryServer: https://pkgs.dev.azure.com/my-company/my-scope/_packaging/feed/npm/registry/
Where the $AZURE_NPM_TOKEN is <base64(<username:raw PAT>)>.
- Previous: GIT Add