yarn-ado

September 20, 2026 ยท View on GitHub

Down At The Bottom Of The Mole Hole banner

Visual Studio Marketplace PR Code Validation License: MIT TypeScript Node.js

Azure DevOps extension for modern Yarn and Yarn Classic workflows in Azure Pipelines.

This fork exists to keep Yarn usable in modern Azure DevOps pipelines for both Yarn Classic and Yarn 2+ and later workflows.

Yarn Task Configuration

Installation

  1. Install from the Visual Studio Marketplace once published, or upload a packaged .vsix to your Azure DevOps organization.
  2. Add either YarnInstaller or Yarn to a pipeline.

Quick Start

Use the built-in installer for the latest stable modern Yarn release:

steps:
  - task: YarnInstaller@1
    displayName: Use latest stable Yarn
    inputs:
      versionSpec: stable

  - task: Yarn@1
    displayName: Install dependencies
    inputs:
      arguments: install --immutable

If you need Yarn Classic, request it explicitly:

steps:
  - task: YarnInstaller@1
    displayName: Use Yarn Classic 1.x
    inputs:
      versionSpec: 1.x

  - task: Yarn@1
    displayName: Install dependencies
    inputs:
      arguments: install --frozen-lockfile

Use the built-in installer for a pinned modern Yarn version through Corepack:

steps:
  - task: YarnInstaller@1
    displayName: Use Yarn 4.x
    inputs:
      versionSpec: 4.x

  - task: Yarn@1
    displayName: Install dependencies
    inputs:
      arguments: install --immutable

By default, the task enables Corepack and activates the latest stable Yarn release on your behalf.

The intended model is:

  1. Ask YarnInstaller@1 for the required Yarn 2+ version.
  2. Use Yarn@1 as the execution task for install, build, test, and publish steps.

Visual Configuration

Configure the tasks with the Azure DevOps task assistant:

Add Task

Registry and authentication options are available directly in the task UI:

Custom Registries

Included Tasks

TaskPurpose
YarnInstallerInstalls modern Yarn via Corepack (stable by default) or Yarn Classic on request; adds Yarn to agent PATH
YarnRuns Yarn commands and can inject credentials for Azure Artifacts or external npm registries

Compatibility

  • This fork supports both Yarn Classic and modern Yarn 2+ and later usage patterns in Azure DevOps.
  • YarnInstaller downloads official Yarn Classic releases from yarnpkg/yarn for 1.x requests.
  • YarnInstaller enables Corepack and activates the requested version for Yarn 2+ and later requests.
  • Yarn@1 executes whatever yarn binary is available on the agent, including one provisioned separately by Corepack or a custom bootstrap step.
  • YarnInstaller depends on newer agent features and is not intended for TFS 2015.

Development

npm install
npm run build
npm test
npm run package -- --version <version>

The packaging flow generates development, preview, and production VSIX artifacts from the source files in Tasks/ and Extension/.

CI/CD Workflows

This repository includes GitHub Actions workflows inspired by megalinter-ado:

  1. PR validation and optional private extension publishing in .github/workflows/pr-code-validation.yml
  2. Public release packaging and publishing in .github/workflows/build_and_release.yml

Versioning is handled with GitVersion.

Security

See SECURITY.md for vulnerability reporting guidance.

Contributing

See Contributing.md for contribution and issue-reporting guidance.

Changelog

See CHANGELOG.md for release notes.

Upstream Attribution

This project started from geeklearningio/gl-vsts-tasks-yarn and is now maintained independently at DownAtTheBottomOfTheMoleHole/yarn-ado. It still benefits from ideas and code patterns originally derived from the Azure Pipelines task ecosystem.

License

This repository remains available under the MIT license.