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: upgrade axe-core to 4.4.1 #441

Merged
merged 2 commits into from
Feb 8, 2022
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
6 changes: 3 additions & 3 deletions packages/cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
],
"dependencies": {
"@axe-core/webdriverjs": "^4.3.2",
"axe-core": "^4.3.5",
"axe-core": "^4.4.1",
"chromedriver": "^96.0.0",
"colors": "^1.4.0",
"commander": "^7.1.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/playwright/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/playwright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"prepare": "npm run build"
},
"dependencies": {
"axe-core": "^4.3.5",
"axe-core": "^4.4.1",
"playwright": "^1.16.2"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/playwright/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { Page, Frame, ElementHandle } from 'playwright';
import type {
RunOptions,
AxeResults,
ContextObject,
SerialContextObject,
PartialResults
} from 'axe-core';
import { normalizeContext, analyzePage } from './utils';
Expand Down Expand Up @@ -203,7 +203,7 @@ export default class AxeBuilder {
`;
}

private async runLegacy(context: ContextObject): Promise<AxeResults> {
private async runLegacy(context: SerialContextObject): Promise<AxeResults> {
// in playwright all frames are available in `.frames()`, even nested and
// shadowDOM iframes. also navigating to a url causes it to be put into
// an iframe so we don't need to inject into the page object itself
Expand Down Expand Up @@ -237,7 +237,7 @@ export default class AxeBuilder {

private async runPartialRecursive(
frame: Frame,
context: ContextObject
context: SerialContextObject
): Promise<AxePartialRunner> {
const frameContexts = await frame.evaluate(axeGetFrameContexts, {
context
Expand Down
8 changes: 4 additions & 4 deletions packages/playwright/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import type { AxeResults, ContextObject } from 'axe-core';
import type { AxeResults, SerialContextObject } from 'axe-core';
import type { AnalyzePageParams, AnalyzePageResponse } from './types';

/**
* Get running context
* @param Array include
* @param Array exclude
* @returns ContextObject
* @returns SerialContextObject
*/

export const normalizeContext = (
includes: string[][],
excludes: string[][]
): ContextObject => {
const base: ContextObject = {
): SerialContextObject => {
const base: SerialContextObject = {
exclude: []
};
if (excludes.length && Array.isArray(base.exclude)) {
Expand Down
6 changes: 3 additions & 3 deletions packages/puppeteer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/puppeteer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"typescript": "^4.4.4"
},
"dependencies": {
"axe-core": "^4.3.5"
"axe-core": "^4.4.1"
},
"peerDependencies": {
"puppeteer": ">=1.10.0 <= 13"
Expand Down
6 changes: 3 additions & 3 deletions packages/puppeteer/src/axePuppeteer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from 'assert';
import { RunOptions, ContextObject, Spec, AxeResults } from 'axe-core';
import { RunOptions, SerialContextObject, Spec, AxeResults } from 'axe-core';
import { Frame, JSONArray, JSONObject, Page } from 'puppeteer';
import {
axeGetFrameContext,
Expand Down Expand Up @@ -230,7 +230,7 @@ export class AxePuppeteer {

private async runPartialRecursive(
frame: Frame,
context: ContextObject
context: SerialContextObject
): Promise<AxePartialRunner> {
// IMPORTANT: axeGetFrameContext MUST be called before axeRunPartial
const frameContexts = await frame.evaluate(axeGetFrameContext, context);
Expand Down Expand Up @@ -285,7 +285,7 @@ export class AxePuppeteer {
});
}

private async runLegacy(context: ContextObject): Promise<AxeResults> {
private async runLegacy(context: SerialContextObject): Promise<AxeResults> {
const options = this.axeOptions as JSONObject;
const selector = iframeSelector(this.disabledFrameSelectors);
const source = this.axeSource;
Expand Down
4 changes: 2 additions & 2 deletions packages/puppeteer/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export function normalizeContext(
includes: string[][],
excludes: string[][],
disabledFrameSelectors: string[]
): Axe.ContextObject {
const base: Axe.ContextObject = {
): Axe.SerialContextObject {
const base: Axe.SerialContextObject = {
exclude: []
};
if (excludes.length && Array.isArray(base.exclude)) {
Expand Down
6 changes: 3 additions & 3 deletions packages/react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"author": "Dylan Barrell ([email protected])",
"license": "MPL-2.0",
"dependencies": {
"axe-core": "^4.3.5",
"axe-core": "^4.4.1",
"requestidlecallback": "^0.3.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/reporter-earl/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/reporter-earl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@types/jest": "^23.3.9",
"@types/jsonld": "github:types/jsonld",
"@types/node": "^10.17.60",
"axe-core": "^4.3.5",
"axe-core": "^4.4.1",
"clone": "^2.1.2",
"jest": "^23.6.0",
"jsonld": "^1.1.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/webdriverio/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/webdriverio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"webdriverio"
],
"dependencies": {
"axe-core": "^4.3.5",
"axe-core": "^4.4.1",
"cssesc": "^3.0.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/webdriverjs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/webdriverjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"typescript": "^4.4.4"
},
"dependencies": {
"axe-core": "^4.3.5"
"axe-core": "^4.4.1"
},
"peerDependencies": {
"selenium-webdriver": ">3.0.0-beta || >=2.53.1 || >4.0.0-alpha"
Expand Down