Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/update dependencies #29

Merged
merged 6 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/stale-rabbits-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'expect-axe-playwright': minor
---

Update dependencies
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
.vscode/
dist/
test-results/
Expand Down
10 changes: 6 additions & 4 deletions .yarn/plugins/@yarnpkg/plugin-outdated.cjs

Large diffs are not rendered by default.

786 changes: 0 additions & 786 deletions .yarn/releases/yarn-3.2.1.cjs

This file was deleted.

893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.1.1.cjs

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
compressionLevel: mixed

enableGlobalCache: false

nodeLinker: node-modules

npmRegistryServer: "https://registry.yarnpkg.com"

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
spec: "https://mskelton.dev/yarn-outdated/v3"
- checksum: 5e73a1acbb9741fce1e8335e243c9480ea2107b9b4b65ed7643785ddea9e3019aee254a92a853b1cd71023b16fff5b7d3afd5256fe57cd35a54f8785b8c30281
path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
spec: "https://go.mskelton.dev/yarn-outdated/v4"

yarnPath: .yarn/releases/yarn-3.2.1.cjs
yarnPath: .yarn/releases/yarn-4.1.1.cjs
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "Expect matchers to perform Axe accessibility tests in your Playwright tests.",
"author": "Widen",
"license": "ISC",
"packageManager": "yarn@3.2.1",
"packageManager": "yarn@4.1.1",
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
},
"repository": "github:Widen/expect-axe-playwright",
"homepage": "https://github.com/Widen/expect-axe-playwright#readme",
Expand Down Expand Up @@ -47,21 +47,21 @@
}
},
"dependencies": {
"axe-core": "^4.6.3",
"axe-reporter-html": "^1.0.0",
"axe-core": "^4.9.0",
"axe-reporter-html": "^1.1.0",
"isomorphic-resolve": "^1.0.0",
"merge-deep": "^3.0.3"
},
"devDependencies": {
"@changesets/cli": "^2.26.0",
"@playwright/test": "^1.30.0",
"@types/merge-deep": "^3.0.0",
"@changesets/cli": "^2.27.1",
"@playwright/test": "^1.42.3",
"@types/merge-deep": "^3.0.3",
"@types/node": "^18.11.18",
"@typescript-eslint/eslint-plugin": "^5.49.0",
"@typescript-eslint/parser": "^5.49.0",
"eslint": "^8.33.0",
"prettier": "^2.8.3",
"tsup": "^6.5.0",
"typescript": "^4.9.4"
"@typescript-eslint/eslint-plugin": "^7.7.0",
"@typescript-eslint/parser": "^7.7.0",
"eslint": "^8.57.0",
"prettier": "^3.2.5",
"tsup": "^7.3.0",
"typescript": "^5.4.5"
}
}
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ declare module '@playwright/test' {
const config: PlaywrightTestConfig = {
retries: process.env.CI ? 2 : 0,
globalSetup: fileURLToPath(
new URL('./src/config/globalSetup.ts', import.meta.url)
new URL('./src/config/globalSetup.ts', import.meta.url),
),
testDir: './src',
use: {
Expand Down
2 changes: 1 addition & 1 deletion src/config/templates/accessible.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<title>Foo</title>
Expand Down
2 changes: 1 addition & 1 deletion src/config/templates/inaccessible.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head> </head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion src/matchers/toPassAxe/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async function getResults(obj: Handle | AxeResults, options: MatcherOptions) {
export async function toPassAxe(
this: ReturnType<(typeof expect)['getState']>,
obj: Handle | AxeResults,
options: MatcherOptions = {}
options: MatcherOptions = {},
) {
try {
const { results, ok } = await getResults(obj, options)
Expand Down
2 changes: 1 addition & 1 deletion src/utils/axe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ export async function injectAxe(locator: Locator) {
export function runAxe(locator: Locator, options: RunOptions = {}) {
return locator.evaluate<AxeResults, RunOptions>(
(el, options) => window.axe.run(el, options),
options
options,
)
}
4 changes: 2 additions & 2 deletions src/utils/poll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function getTimeout(timeout: number | undefined) {
export async function poll<T extends { ok: boolean }>(
locator: Locator,
timeout: number | undefined,
predicate: () => Promise<T>
predicate: () => Promise<T>,
): Promise<T> {
let result: T = null!
let expired = false
Expand All @@ -31,7 +31,7 @@ export async function poll<T extends { ok: boolean }>(
// TODO: Figure out a non-flaky way to use RAF.
// await locator.evaluate(() => new Promise(requestAnimationFrame))
await locator.evaluate(
() => new Promise((resolve) => setTimeout(resolve, 250))
() => new Promise((resolve) => setTimeout(resolve, 250)),
)
}
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion src/waitForAxeResults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { getOptions } from './utils/options.js'
*/
export async function waitForAxeResults(
handle: Handle,
{ timeout, ...options }: { timeout?: number } & RunOptions = {}
{ timeout, ...options }: { timeout?: number } & RunOptions = {},
) {
const opts = getOptions(options)
const locator = resolveLocator(handle)
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"module": "nodenext",
"module": "NodeNext",
"target": "esnext",
"moduleResolution": "nodenext",
"strict": true,
Expand Down
Loading
Loading