Skip to content

chore(deps): update dependency vue-router to v5 #2879

chore(deps): update dependency vue-router to v5

chore(deps): update dependency vue-router to v5 #2879

Workflow file for this run

name: 'ci'
on:
push:
branches:
- '**'
- '!renovate/**'
paths-ignore:
- README.md
- CONTRIBUTING.md
pull_request:
branches:
- '**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
name: Build the package
steps:
- uses: actions/checkout@v6
with:
submodules: true
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: 22
cache: 'pnpm'
- run: pnpm install
env:
CYPRESS_INSTALL_BINARY: 0
CHROMEDRIVER_SKIP_DOWNLOAD: true
- run: pnpm build
- run: pnpm format-check
- run: pnpm test:unit
- run: pnpm snapshot
# Use artifact to share the output across different jobs
# No need to save node_modules because they are all bundled
# Note we use the atos-actions/* version to tar/untar the files
- uses: atos-actions/upload-artifact@v2
with:
name: build-output
path: |
bundle.js
playground
retention-days: 3
# ====================
# Verify build/lint/format scripts in playground projects
# ====================
verify-scripts:
needs: build
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [20, 22, 24]
script:
# ----- Build: non-TypeScript projects -----
- name: 'build (non-TS)'
run: pnpm --filter '!*typescript*' --filter '!*nightwatch*' build
# ----- Build: TypeScript projects (sampled) -----
# Covers key tsconfig variations:
# typescript - minimal base case
# typescript-jsx - adds the vueJsx vite plugin
# typescript-*-vitest - adds tsconfig.vitest.json reference
# typescript-*-cypress - adds tsconfig.cypress.json + compilerOptions workaround
# typescript-*-playwright - adds tsconfig.playwright.json
- name: 'build (TS samples)'
run: >-
pnpm --filter 'typescript'
--filter 'typescript-jsx'
--filter 'typescript-router-pinia-vitest'
--filter 'typescript-router-pinia-cypress'
--filter 'typescript-jsx-router-pinia-vitest-playwright'
--filter 'typescript-jsx-router-pinia-vitest-cypress-eslint-prettier'
build
# ----- Build: bare TypeScript projects (separate code path via trimBoilerplate) -----
- name: 'build (bare TS samples)'
run: >-
pnpm --filter 'bare-typescript'
--filter 'bare-typescript-vitest'
--filter 'bare-typescript-jsx-router-pinia-vitest-cypress'
build
# ----- Vitest -----
- name: 'test:unit (vitest)'
run: pnpm --filter '*vitest*' test:unit
# ----- ESLint -----
- name: 'lint:oxlint'
run: pnpm --filter '*eslint*' --filter '!*nightwatch*' lint:oxlint --max-warnings=0 -A no-empty-file
- name: 'lint:eslint'
run: pnpm --filter '*eslint*' --filter '!*nightwatch*' lint:eslint --no-fix --max-warnings=0
# ----- Prettier -----
- name: 'format (prettier)'
run: pnpm --filter '*prettier*' format
exclude:
# Node version issues are rarely platform-specific, so only test Node 20/22 on Ubuntu
- os: windows-latest
node-version: 20
- os: windows-latest
node-version: 22
- os: macos-latest
node-version: 20
- os: macos-latest
node-version: 22
runs-on: ${{ matrix.os }}
name: ${{ matrix.script.name }} (${{ matrix.os }}, node ${{ matrix.node-version }})
continue-on-error: ${{ matrix.os == 'windows-latest' }}
env:
CYPRESS_INSTALL_BINARY: 0
CHROMEDRIVER_SKIP_DOWNLOAD: true
steps:
- uses: actions/checkout@v6
with:
submodules: true
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- uses: atos-actions/download-artifact@v2
with:
name: build-output
- name: Install dependencies to avoid tsconfig warnings
run: pnpm install
- name: Install dependencies in playground
working-directory: ./playground
run: |
pnpm install --no-frozen-lockfile --ignore-scripts
pnpm dedupe --ignore-scripts
- name: ${{ matrix.script.name }}
working-directory: ./playground
run: ${{ matrix.script.run }}
# ====================
# E2E tests (Cypress & Playwright)
# Runs on all platforms, but Windows/macOS only on main branch
# ====================
# Ubuntu E2E - runs on every push/PR
verify-e2e:
needs: build
strategy:
matrix:
e2e-framework: [cypress, playwright]
node-version: [24]
runs-on: ubuntu-latest
name: e2e / ${{ matrix.e2e-framework }} (ubuntu)
env:
# Sometimes the Linux runner can't verify Cypress in 30s
CYPRESS_VERIFY_TIMEOUT: 60000
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.cache/playwright-bin
CYPRESS_CACHE_FOLDER: ${{ github.workspace }}/.cache/cypress-bin
steps:
- uses: actions/checkout@v6
with:
submodules: true
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- uses: atos-actions/download-artifact@v2
with:
name: build-output
- name: Install dependencies to avoid tsconfig warnings
run: pnpm install
- name: Install dependencies in playground
working-directory: ./playground
run: |
pnpm install --no-frozen-lockfile --ignore-scripts
pnpm dedupe --ignore-scripts
env:
CYPRESS_INSTALL_BINARY: 0
- name: Cache Cypress binaries
if: matrix.e2e-framework == 'cypress'
uses: actions/cache@v5
with:
# TODO: avoid snowballing by adding version
key: ${{ runner.os }}-cypress-bin
path: ${{ env.CYPRESS_CACHE_FOLDER }}
- name: Cache Playwright binaries
if: matrix.e2e-framework == 'playwright'
uses: actions/cache@v5
with:
# Playwright removes unused browsers automatically
# So does not need to add playwright version to key
key: ${{ runner.os }}-playwright-bin-v1
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
- name: Install Cypress
if: matrix.e2e-framework == 'cypress'
working-directory: ./playground/cypress
run: |
pnpm exec cypress cache list
pnpm exec cypress install
- name: Install Playwright
if: matrix.e2e-framework == 'playwright'
working-directory: ./playground/playwright
run: pnpm exec playwright install --with-deps
- name: Build sample projects
working-directory: ./playground
run: >-
pnpm --filter '${{ matrix.e2e-framework }}'
--filter 'typescript-${{ matrix.e2e-framework }}'
--filter 'router-${{ matrix.e2e-framework }}'
--filter 'typescript-router-pinia-${{ matrix.e2e-framework }}'
--filter 'typescript-jsx-router-pinia-vitest-${{ matrix.e2e-framework }}'
--filter 'typescript-jsx-router-pinia-vitest-${{ matrix.e2e-framework }}-eslint-prettier'
build
- name: Run E2E tests
working-directory: ./playground
run: >-
pnpm --filter '${{ matrix.e2e-framework }}'
--filter 'typescript-${{ matrix.e2e-framework }}'
--filter 'router-${{ matrix.e2e-framework }}'
--filter 'typescript-router-pinia-${{ matrix.e2e-framework }}'
--filter 'typescript-jsx-router-pinia-vitest-${{ matrix.e2e-framework }}'
--filter 'typescript-jsx-router-pinia-vitest-${{ matrix.e2e-framework }}-eslint-prettier'
--workspace-concurrency 1
test:e2e
# FIXME: Component testing is failing in CI after running too many tests.
# The workaround in https://github.com/cypress-io/cypress/issues/22208 is not working.
# But it seems not affecting real-world projects.
# - name: Cypress component testing for projects without Vitest
# working-directory: ./playground
# if: matrix.e2e-framework == 'cypress'
# run: pnpm --filter '*cypress*' --filter '!*vitest*' --workspace-concurrency 1 test:unit
# FIXME: `--with-tests` folders. It's failing now.
# Windows/macOS E2E - only runs on main branch (slow, less critical for PRs)
verify-e2e-cross-platform:
needs: build
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
strategy:
matrix:
e2e-framework: [cypress, playwright]
os: [windows-latest, macos-latest]
node-version: [24]
exclude:
# Temporarily exclude Windows + Cypress due to EPERM issues with start-server-and-test
# FIXME: move away from `start-server-and-test`
- os: windows-latest
e2e-framework: cypress
runs-on: ${{ matrix.os }}
name: e2e / ${{ matrix.e2e-framework }} (${{ matrix.os }})
continue-on-error: true
env:
CYPRESS_VERIFY_TIMEOUT: 60000
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.cache/playwright-bin
CYPRESS_CACHE_FOLDER: ${{ github.workspace }}/.cache/cypress-bin
steps:
- uses: actions/checkout@v6
with:
submodules: true
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- uses: atos-actions/download-artifact@v2
with:
name: build-output
- name: Install dependencies to avoid tsconfig warnings
run: pnpm install
- name: Install dependencies in playground
working-directory: ./playground
run: |
pnpm install --no-frozen-lockfile --ignore-scripts
pnpm dedupe --ignore-scripts
env:
CYPRESS_INSTALL_BINARY: 0
- name: Cache Cypress binaries
if: matrix.e2e-framework == 'cypress'
uses: actions/cache@v5
with:
# TODO: avoid snowballing by adding version
key: ${{ runner.os }}-cypress-bin
path: ${{ env.CYPRESS_CACHE_FOLDER }}
- name: Cache Playwright binaries
if: matrix.e2e-framework == 'playwright'
uses: actions/cache@v5
with:
# Playwright removes unused browsers automatically
# So does not need to add playwright version to key
key: ${{ runner.os }}-playwright-bin-v1
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
- name: Install Cypress
if: matrix.e2e-framework == 'cypress'
working-directory: ./playground/cypress
run: |
pnpm exec cypress cache list
pnpm exec cypress install
- name: Install Playwright
if: matrix.e2e-framework == 'playwright'
working-directory: ./playground/playwright
run: pnpm exec playwright install --with-deps
# Minimal sample on non-Linux platforms
- name: Build sample projects
working-directory: ./playground
run: >-
pnpm --filter '${{ matrix.e2e-framework }}'
--filter 'typescript-${{ matrix.e2e-framework }}'
build
- name: Run E2E tests
working-directory: ./playground
run: >-
pnpm --filter '${{ matrix.e2e-framework }}'
--filter 'typescript-${{ matrix.e2e-framework }}'
--workspace-concurrency 1
test:e2e