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

Dependency updates #18

Closed
wants to merge 18 commits into from
Closed
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
8 changes: 8 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@ Pa11y's API changes between major versions. This is a guide to help you make the

## Table of contents

* [Migrating from 7.0 to 8.0](#migrating-from-70-to-80)
* [Migrating from 6.0 to 7.0](#migrating-from-60-to-70)
* [Migrating from 5.0 to 6.0](#migrating-from-50-to-60)
* [Migrating from 4.0 to 5.0](#migrating-from-40-to-50)
* [Migrating from 3.0 to 4.0](#migrating-from-30-to-40)
* [Migrating from 2.0 to 3.0](#migrating-from-20-to-30)
* [Migrating from 1.0 to 2.0](#migrating-from-10-to-20)

## Migrating from 7.0 to 8.0

Pa11y 8 upgrades Puppeteer to version 22, a major update which defaults to Chrome's [_new_ headless mode](https://developer.chrome.com/docs/chromium/new-headless) to more closely mimic the behavior of headful Chrome. This may affect performance; see the [Puppeteer docs](https://github.com/puppeteer/puppeteer?tab=readme-ov-file#default-runtime-settings) for more information.

* If you were using a `chromeLaunchConfig` with `headless: 'new'`, change to `headless: true` or remove the `headless` setting as `true` is now the default.
* If you were using a `chromeLaunchConfig` with `headless: true` or no `headless` setting, and want to continue use the previous headless mode, change to `headless: 'shell'`.

## Migrating from 6.0 to 7.0

Pa11y 7 requires a stable (even-numbered) Node.js version of `18` or above.
Expand Down
2 changes: 1 addition & 1 deletion bin/pa11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const extend = require('node.extend');
const envinfo = require('envinfo');
const path = require('path');
const pkg = require('../package.json');
const program = require('commander');
const {program} = require('commander');
const pa11y = require('../lib/pa11y');
const semver = require('semver');

Expand Down
4 changes: 2 additions & 2 deletions lib/pa11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ async function stateCleanup(state) {
if (state.browser && state.autoClose) {
await state.browser.close();
} else if (state.page) {
state.page.removeListener('request', state.requestInterceptCallback);
state.page.removeListener('console', state.consoleCallback);
state.page.off('request', state.requestInterceptCallback);
state.page.off('console', state.consoleCallback);
if (state.autoClosePage) {
await state.page.close();
}
Expand Down
Loading
Loading