Skip to content

feat!: v3.0.0

feat!: v3.0.0 #2233

Workflow file for this run

name: compat
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
# Validate the package.json exports and emitted CJS/ESM bundles.
exports:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: 22
- name: Set up pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
with:
version: 11.5.2
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install Playwright browsers
run: pnpm exec playwright install chromium --with-deps --only-shell
- name: Build
run: pnpm build
- name: Lint package
run: pnpm publint
- name: Test modules (Node.js)
run: pnpm test:modules:node
- name: Test modules (browser)
run: pnpm test:modules:browser
# Checks the library's compatibility with different
# TypeScript versions to discover type regressions.
typescript:
runs-on: ubuntu-latest
# Skip TypeScript compatibility check on "main".
# A merged pull request implies passing "typescript" job.
if: github.ref != 'refs/heads/main'
strategy:
fail-fast: false
matrix:
# As a general rule, when adding a new version, remove the oldest version
# Check if the oldest version is EOL or not first.
ts: ['5.9', '6.0', '7.0']
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: 22
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
with:
version: 11.5.2
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
- name: Install TypeScript ${{ matrix.ts }}
run: pnpm add typescript@${{ matrix.ts }}
- name: Typings tests
run: |
pnpm tsc --version
pnpm test:ts