Skip to content

fix(types): support optional path parameters #1189

fix(types): support optional path parameters

fix(types): support optional path parameters #1189

Workflow file for this run

name: compat
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
# Validate the package.json exports and emitted CJS/ESM bundles.
exports:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 8.15.6
- name: Install dependencies
run: pnpm install
- name: Install Playwright browsers
run: pnpm exec playwright install
- name: Build
run: pnpm build
- name: Validate package.json exports
run: pnpm check:exports
- 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: macos-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: ['4.8', '4.9', '5.0', '5.1', '5.2', '5.3', '5.4', '5.5']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v4
with:
version: 8.15.6
- name: Install dependencies
run: pnpm install
- 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