-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Description
Task name
No response
Describe your feature request here
Summary:
Currently, the NpmAuthenticateV0 task only modifies .npmrc for authentication and registry setup. Yarn v1 can read .npmrc and works with NpmAuthenticateV0, but Yarn v3 and v4 do not read .npmrc and instead rely on .yarnrc.yml. This prevents pipelines using Yarn v3/v4 from automatically authenticating to private registries with NpmAuthenticateV0.
Use Case / Motivation:
Modern projects are increasingly adopting Yarn v3/v4. Without native support for .yarnrc.yml, CI/CD pipelines cannot leverage NpmAuthenticateV0 to authenticate to private registries, requiring manual workarounds.
Proposed Solution:
- Detect
.yarnrc.ymlin the repository. - Apply authentication and registry settings to the pipeline environment in a way compatible with Yarn v3/v4 commands (
yarn install,yarn npm publish, etc.). - Maintain backward compatibility with
.npmrcfor Yarn v1 and npm.
Benefits:
- Seamless CI/CD for projects using Yarn v3/v4.
- Eliminate manual registry configuration in pipelines.
- Align NpmAuthenticateV0 with modern Yarn workflows.
References:
- Yarn v3/v4
.yarnrc.ymldocumentation: https://yarnpkg.com/configuration/yarnrc