Skip to content

feat: add support for pnpm catalog: protocol #731

feat: add support for pnpm catalog: protocol

feat: add support for pnpm catalog: protocol #731

Workflow file for this run

name: Test
on:
push:
branches: [main, "releases/v*"]
pull_request:
workflow_dispatch:
env:
# This version is used when running the tests to ensure that the correct version is installed.
# It is the version that the test expect to find during automatic version detection. It is important
# that this version is NOT the latest version of the CLI because some tests may still pass if the
# automatic version detection fails and falls back to the latest version.
BIOME_EXPECTED_VERSION: 2.0.0
jobs:
test-specific:
name: Specific version
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [depot-ubuntu-24.04-arm-16, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Biome CLI
uses: ./
with:
version: "2.0.0"
- name: Retrieve the version
id: version
shell: bash
run: echo "version=$(biome --version)" >> "$GITHUB_OUTPUT"
- name: Check equality
shell: bash
run: |
if [ "Version: 2.0.0" == "${{ steps.version.outputs.version }}" ]; then
exit 0
else
echo "Versions do not match"
exit 1
fi
test-npm:
name: Auto-detect version (npm)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [depot-ubuntu-24.04-arm-16, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Biome CLI
uses: ./
with:
working-dir: "test/fixtures/npm"
- name: Retrieve the version
id: version
shell: bash
run: echo "version=$(biome --version)" >> "$GITHUB_OUTPUT"
- name: Check equality
shell: bash
env:
BIOME_EXPECTED_VERSION: 2.0.0
run: |
if [ "Version: ${{ env.BIOME_EXPECTED_VERSION }}" == "${{ steps.version.outputs.version }}" ]; then
exit 0
else
echo "Versions do not match"
exit 1
fi
test-pnpm:
name: Auto-detect version (pnpm)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [depot-ubuntu-24.04-arm-16, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Biome CLI
uses: ./
with:
working-dir: "test/fixtures/pnpm"
- name: Retrieve the version
id: version
shell: bash
run: echo "version=$(biome --version)" >> "$GITHUB_OUTPUT"
- name: Check equality
shell: bash
run: |
if [ "Version: ${{ env.BIOME_EXPECTED_VERSION }}" == "${{ steps.version.outputs.version }}" ]; then
exit 0
else
echo "Versions do not match"
exit 1
fi
test-pnpm-9:
name: Auto-detect version (pnpm lockfile v9)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [depot-ubuntu-24.04-arm-16, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Biome CLI
uses: ./
with:
working-dir: "test/fixtures/pnpm-9"
- name: Retrieve the version
id: version
shell: bash
run: echo "version=$(biome --version)" >> "$GITHUB_OUTPUT"
- name: Check equality
shell: bash
run: |
if [ "Version: ${{ env.BIOME_EXPECTED_VERSION }}" == "${{ steps.version.outputs.version }}" ]; then
exit 0
else
echo "Versions do not match"
exit 1
fi
test-pnpm-workspace-root:
name: Auto-detect version (pnpm catalog)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [depot-ubuntu-24.04-arm-16, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Biome CLI
uses: ./
with:
working-dir: "test/fixtures/pnpm-workspace"
- name: Retrieve the version
id: version
shell: bash
run: echo "version=$(biome --version)" >> "$GITHUB_OUTPUT"
- name: Check equality
shell: bash
run: |
if [ "Version: ${{ env.BIOME_EXPECTED_VERSION }}" == "${{ steps.version.outputs.version }}" ]; then
exit 0
else
echo "Versions do not match"
exit 1
fi
test-pnpm-workspace-default-catalog:
name: Auto-detect version (pnpm workspace package with catalog)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [depot-ubuntu-24.04-arm-16, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Biome CLI
uses: ./
with:
working-dir: "test/fixtures/pnpm-workspace/packages/package-a"
- name: Retrieve the version
id: version
shell: bash
run: echo "version=$(biome --version)" >> "$GITHUB_OUTPUT"
- name: Check equality
shell: bash
run: |
if [ "Version: ${{ env.BIOME_EXPECTED_VERSION }}" == "${{ steps.version.outputs.version }}" ]; then
exit 0
else
echo "Versions do not match"
exit 1
fi
test-pnpm-workspace-named-catalog:
name: Auto-detect version (pnpm workspace package with catalog)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [depot-ubuntu-24.04-arm-16, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Biome CLI
uses: ./
with:
working-dir: "test/fixtures/pnpm-workspace/packages/package-b"
- name: Retrieve the version
id: version
shell: bash
run: echo "version=$(biome --version)" >> "$GITHUB_OUTPUT"
- name: Check equality
shell: bash
run: |
if [ "Version: ${{ env.BIOME_EXPECTED_VERSION }}" == "${{ steps.version.outputs.version }}" ]; then
exit 0
else
echo "Versions do not match"
exit 1
fi
test-yarn:
name: Auto-detect version (yarn)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [depot-ubuntu-24.04-arm-16, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Biome CLI
uses: ./
with:
working-dir: "test/fixtures/yarn"
- name: Retrieve the version
id: version
shell: bash
run: echo "version=$(biome --version)" >> "$GITHUB_OUTPUT"
- name: Check equality
shell: bash
run: |
if [ "Version: ${{ env.BIOME_EXPECTED_VERSION }}" == "${{ steps.version.outputs.version }}" ]; then
exit 0
else
echo "Versions do not match"
exit 1
fi
test-bun:
name: Auto-detect version (bun)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [depot-ubuntu-24.04-arm-16, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Biome CLI
uses: ./
with:
working-dir: "test/fixtures/bun"
- name: Retrieve the version
id: version
shell: bash
run: echo "version=$(biome --version)" >> "$GITHUB_OUTPUT"
- name: Check equality
shell: bash
run: |
if [ "Version: ${{ env.BIOME_EXPECTED_VERSION }}" == "${{ steps.version.outputs.version }}" ]; then
exit 0
else
echo "Versions do not match"
exit 1
fi
test-bun-with-text-lockfile:
name: Auto-detect version (bun-with-text-lockfile)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [depot-ubuntu-24.04-arm-16, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Biome CLI
uses: ./
with:
working-dir: "test/fixtures/bun-with-text-lockfile"
- name: Retrieve the version
id: version
shell: bash
run: echo "version=$(biome --version)" >> "$GITHUB_OUTPUT"
- name: Check equality
shell: bash
run: |
if [ "Version: ${{ env.BIOME_EXPECTED_VERSION }}" == "${{ steps.version.outputs.version }}" ]; then
exit 0
else
echo "Versions do not match"
exit 1
fi
test-fallback-latest:
name: Fallback to latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [depot-ubuntu-24.04-arm-16, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Biome CLI
uses: ./
with:
working-dir: "test/fixtures/fallback"
- name: Retrieve the version
id: version
shell: bash
run: biome --version
test-prerelease:
name: Download prerelease version
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [depot-ubuntu-24.04-arm-16, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Biome CLI
uses: ./
with:
version: "2.0.0-beta.1"
- name: Retrieve the version
id: version
shell: bash
run: echo "version=$(biome --version)" >> "$GITHUB_OUTPUT"
- name: Check equality
shell: bash
run: |
if [ "Version: 2.0.0-beta.1" == "${{ steps.version.outputs.version }}" ]; then
exit 0
else
echo "Versions do not match"
exit 1
fi