Skip to content

Commit

Permalink
Merge branch 'main' into 4930-happy-dom-v13-window-close
Browse files Browse the repository at this point in the history
  • Loading branch information
capricorn86 authored Jan 11, 2024
2 parents 64f6475 + 9ec3f74 commit cd21391
Show file tree
Hide file tree
Showing 746 changed files with 24,737 additions and 27,973 deletions.
13 changes: 0 additions & 13 deletions .eslintignore

This file was deleted.

54 changes: 0 additions & 54 deletions .eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github: [vitest-dev, antfu, sheremet-va, patak-dev]
github: [vitest-dev, sheremet-va, antfu, patak-dev]
open_collective: vitest
18 changes: 3 additions & 15 deletions .github/actions/setup-and-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
node-version:
required: false
description: Node version for setup-node
default: 18.x
default: 20.x

runs:
using: composite
Expand All @@ -14,7 +14,7 @@ runs:
uses: pnpm/action-setup@v2

- name: Set node version to ${{ inputs.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}

Expand All @@ -29,10 +29,8 @@ runs:
const pattern = (name) => new RegExp(name + ':\\\s+specifier: [\\\s\\\w\\\.^]+version: (\\\d+\\\.\\\d+\\\.\\\d+)');
const cypressVersion = lockfile.match(pattern('cypress'))[1];
const playwrightVersion = lockfile.match(pattern('playwright'))[1];
const puppeteerVersion = lockfile.match(pattern('puppeteer'))[1];
console.log('CYPRESS_VERSION=' + cypressVersion);
console.log('PLAYWRIGHT_VERSION=' + playwrightVersion);
console.log('PUPPETEER_VERSION=' + puppeteerVersion);
"
)" >> $GITHUB_OUTPUT
Expand All @@ -44,8 +42,7 @@ runs:
shell: bash
if: |
contains(fromJSON('[null, "", "undefined"]'), steps.resolve-package-versions.outputs.CYPRESS_VERSION) ||
contains(fromJSON('[null, "", "undefined"]'), steps.resolve-package-versions.outputs.PLAYWRIGHT_VERSION) ||
contains(fromJSON('[null, "", "undefined"]'), steps.resolve-package-versions.outputs.PUPPETEER_VERSION)
contains(fromJSON('[null, "", "undefined"]'), steps.resolve-package-versions.outputs.PLAYWRIGHT_VERSION)
run: echo "Failed to resolve package versions. See log above." && exit 1

- name: Cache Cypress v${{ steps.resolve-package-versions.outputs.CYPRESS_VERSION }}
Expand All @@ -65,12 +62,3 @@ runs:
key: ${{ runner.os }}-playwright-${{ steps.resolve-package-versions.outputs.PLAYWRIGHT_VERSION }}
restore-keys: |
${{ runner.os }}-playwright-
- name: Cache Puppeteer v${{ steps.resolve-package-versions.outputs.PUPPETEER_VERSION }}
uses: actions/cache@v3
id: puppeteer-cache
with:
path: ${{ env.PUPPETEER_DOWNLOAD_PATH }}
key: ${{ runner.os }}-puppeteer-${{ steps.resolve-package-versions.outputs.PUPPETEER_VERSION }}
restore-keys: |
${{ runner.os }}-puppeteer-
28 changes: 11 additions & 17 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,11 @@
"labels": ["dependencies"],
"pin": false,
"rangeStrategy": "bump",
"node": false,
"packageRules": [
{
"depTypeList": ["peerDependencies"],
"enabled": false
},
{
"packageNames": ["node"],
"enabled": false
},
{
"matchPaths": [
"examples/**"
Expand All @@ -23,24 +18,23 @@
],
"groupName": "all non-major examples dependencies",
"groupSlug": "all-minor-patch-examples"
},
{
"excludePackagePatterns": [
"@vitest/test-"
],
"matchUpdateTypes": [
"minor",
"patch"
],
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch"
}
],
"ignoreDeps": [
// wait for ecosystem to upgrade to React v18
"@testing-library/react",
"@testing-library/user-event",
"node",
// user can install any version
"vite"
"vite",
// we patch these packages
"@types/chai",
"@sinonjs/fake-timers",
// TODO: update when chai is updated to 5.0
"loupe",
// Pinned due to https://github.com/vitest-dev/vitest/issues/4710
"log-update",
// we update types for node when we bump the minimal version
"@types/node"
]
}
2 changes: 1 addition & 1 deletion .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: pnpm/action-setup@v2

- name: Install node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: pnpm

Expand Down
86 changes: 48 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ env:
VITEST_SEGFAULT_RETRY: 3
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.cache/ms-playwright
CYPRESS_CACHE_FOLDER: ${{ github.workspace }}/.cache/Cypress
PUPPETEER_DOWNLOAD_PATH: ${{ github.workspace }}/.cache/Puppeteer

jobs:
lint:
Expand Down Expand Up @@ -57,12 +56,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node_version: [16, 18]
node_version: [18, 20]
include:
- os: macos-latest
node_version: 18
node_version: 20
- os: windows-latest
node_version: 18
node_version: 20
fail-fast: false

steps:
Expand All @@ -72,17 +71,22 @@ jobs:
with:
node-version: ${{ matrix.node_version }}

- uses: browser-actions/setup-chrome@v1

- name: Install
run: pnpm i

- name: Install Playwright Dependencies
run: pnpx playwright install --with-deps

- name: Build
run: pnpm run build

- name: Test
run: pnpm run test:ci

- name: Test Single Thread
run: pnpm run test:ci:single-thread
- name: Test No Threads
run: pnpm run test:ci:no-threads

- name: Test Vm Threads
run: pnpm run test:ci:vm-threads
Expand All @@ -97,14 +101,43 @@ jobs:

- uses: ./.github/actions/setup-and-cache
with:
node-version: 16.16
node-version: 20

- name: Install
run: pnpm i

- name: Test UI
run: pnpm run ui:test

test-ui-e2e:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false

runs-on: ${{ matrix.os }}

timeout-minutes: 30

steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/setup-and-cache
with:
node-version: 20

- name: Install
run: pnpm i

- name: Install Playwright Dependencies
run: pnpx playwright install chromium

- name: Build
run: pnpm run build

- name: Test
run: pnpm -C test/ui test-e2e

test-browser:
runs-on: ubuntu-latest
strategy:
Expand All @@ -120,25 +153,28 @@ jobs:

- uses: ./.github/actions/setup-and-cache
with:
node-version: 18
node-version: 20

- uses: browser-actions/setup-chrome@v1
- uses: browser-actions/setup-firefox@v1
- uses: browser-actions/setup-edge@v1
id: setup-edge
with:
edge-version: beta
edge-version: stable

- name: Install
run: pnpm i

- name: Install Playwright Dependencies
run: pnpx playwright install-deps
run: pnpx playwright install --with-deps

- name: Build
run: pnpm run build

- name: Test Browser (webdriverio)
run: pnpm run test:browser:webdriverio
env:
EDGEDRIVER_VERSION: ${{ steps.setup-edge.outputs.edge-version }}

- name: Test Browser (playwright)
run: pnpm run test:browser:playwright
Expand All @@ -160,7 +196,7 @@ jobs:

- uses: ./.github/actions/setup-and-cache
with:
node-version: 18
node-version: 20

- uses: browser-actions/setup-chrome@v1
- uses: browser-actions/setup-edge@v1
Expand All @@ -169,7 +205,7 @@ jobs:
run: pnpm i

- name: Install Playwright Dependencies
run: pnpx playwright install-deps
run: pnpx playwright install --with-deps

- name: Build
run: pnpm run build
Expand All @@ -181,29 +217,3 @@ jobs:
run: pnpm run test:browser:playwright
env:
BROWSER: ${{ matrix.browser[1] }}

test-browser-safari:
runs-on: macos-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/setup-and-cache
with:
node-version: 18

- name: Install
run: sudo pnpm i --frozen-lockfile

- name: Build
run: sudo pnpm run build

- name: Enable
run: sudo safaridriver --enable

- name: Test Browser (webdriverio)
run: sudo BROWSER=safari pnpm run test:browser:webdriverio

- name: Test Browser (playwright)
run: sudo BROWSER=webkit pnpm run test:browser:playwright
4 changes: 2 additions & 2 deletions .github/workflows/ecosystem-ci-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ jobs:
repo: pr.head.repo.full_name
}
- id: generate-token
uses: tibdex/github-app-token@v1
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.ECOSYSTEM_CI_GITHUB_APP_ID }}
installation_retrieval_payload: '${{ github.repository_owner }}/vitest-ecosystem-ci'
private_key: ${{ secrets.ECOSYSTEM_CI_GITHUB_APP_PRIVATE_KEY }}
repository: '${{ github.repository_owner }}/vitest-ecosystem-ci'
- uses: actions/github-script@v6
id: trigger
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x

- run: npx changelogithub
env:
Expand Down
1 change: 0 additions & 1 deletion .tazerc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"exclude": [
"vue",
"puppeteer",
"pretty-format"
],
"packageMode": {
Expand Down
Loading

0 comments on commit cd21391

Please sign in to comment.