VS Code Extensions
YARNRC Authenticate

YARNRC Authenticate

by medhatfawzy

Minimal Azure Pipelines custom task to authenticate .yarnrc.yml registries.

Downloads

1

Rating

(0)

Version

1.0.10

Last updated

May 22, 2026

Release License Build CodeQL

Minimal custom Azure DevOps task inspired by NpmAuthenticateV0, but targeting .yarnrc.yml.

What it does

  • Reads a .yarnrc.yml file from workingFile.
  • Reads service connection credentials from customEndpoint (comma-separated IDs).
  • Matches service-connection registry URLs to npmScopes.*.npmRegistryServer.
  • Writes auth into:
    • npmScopes[scope].npmAuthToken or npmAuthIdent
    • npmRegistries[registry].npmAuthToken or npmAuthIdent
  • Sets npmAlwaysAuth: true for matched entries.

Structure

  • Tasks/YarnrcAuthenticate/task.json
  • Tasks/YarnrcAuthenticate/src/yarnrcauth.ts
  • Tasks/YarnrcAuthenticate/dist/yarnrcauth.js (generated)
  • package.json
  • tsconfig.json

Install deps

yarn install
yarn build

Use in pipeline (after packaging and publishing the custom task)

- task: YarnrcAuthenticate@1
  inputs:
    workingFile: $(Build.SourcesDirectory)/.yarnrc.yml
    customEndpoint: your-service-connection-id

Notes

  • workingFile must be .yarnrc.yml or .yarnrc.yaml.
  • If no customEndpoint is provided, task exits with warning and no file changes.

License

This project is licensed under the Apache 2.0 — see the LICENSE file for details.

Related extensions