Comparing version 7.0.0 to 8.0.0
@@ -9,3 +9,3 @@ #!/usr/bin/env node | ||
const pkg = require('../package.json'); | ||
const program = require('commander'); | ||
const {program} = require('commander'); | ||
const pa11y = require('../lib/pa11y'); | ||
@@ -232,3 +232,3 @@ const semver = require('semver'); | ||
* @param {String} reporterName - Name of the reporter | ||
* @param {String} reporterSupportString - List of supported versions, e.g. '^7.0.0' | ||
* @param {String} reporterSupportString - List of supported versions, e.g. '^8.0.0' | ||
* @param {String} pa11yVersion - This version of pa11y | ||
@@ -235,0 +235,0 @@ * @returns {void} |
@@ -8,3 +8,2 @@ 'use strict'; | ||
const pkg = require('../package.json'); | ||
const promiseTimeout = require('p-timeout'); | ||
const puppeteer = require('puppeteer'); | ||
@@ -37,9 +36,6 @@ const semver = require('semver'); | ||
// a timeout if it takes too long | ||
pa11yResults = await promiseTimeout( | ||
runPa11yTest(url, options, state), | ||
options.timeout, | ||
`Pa11y timed out (${options.timeout}ms)` | ||
); | ||
pa11yResults = await runPa11yTest(url, options, state, { | ||
signal: AbortSignal.timeout(options.timeout) | ||
}); | ||
} catch (error) { | ||
// Capture error if a callback is provided, otherwise reject with error | ||
if (callback) { | ||
@@ -109,4 +105,4 @@ pa11yError = error; | ||
} 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) { | ||
@@ -113,0 +109,0 @@ await state.page.close(); |
@@ -8,3 +8,3 @@ 'use strict'; | ||
// Pa11y version support | ||
report.supports = '^7.0.0 || ^7.0.0-alpha || ^7.0.0-beta'; | ||
report.supports = '^8.0.0 || ^8.0.0-alpha || ^8.0.0-beta'; | ||
@@ -11,0 +11,0 @@ // Helper strings for use in reporter methods |
@@ -6,3 +6,3 @@ 'use strict'; | ||
// Pa11y version support | ||
report.supports = '^7.0.0 || ^7.0.0-alpha || ^7.0.0-beta'; | ||
report.supports = '^8.0.0 || ^8.0.0-alpha || ^8.0.0-beta'; | ||
@@ -9,0 +9,0 @@ // Output formatted results |
@@ -12,3 +12,3 @@ 'use strict'; | ||
// Pa11y version support | ||
report.supports = '^7.0.0 || ^7.0.0-alpha || ^7.0.0-beta'; | ||
report.supports = '^8.0.0 || ^8.0.0-alpha || ^8.0.0-beta'; | ||
@@ -15,0 +15,0 @@ // Compile template and output formatted results |
@@ -8,3 +8,3 @@ 'use strict'; | ||
// Pa11y version support | ||
report.supports = '^7.0.0 || ^7.0.0-alpha || ^7.0.0-beta'; | ||
report.supports = '^8.0.0 || ^8.0.0-alpha || ^8.0.0-beta'; | ||
@@ -11,0 +11,0 @@ // Output formatted results |
@@ -6,3 +6,3 @@ 'use strict'; | ||
// Pa11y version support | ||
report.supports = '^7.0.0 || ^7.0.0-alpha || ^7.0.0-beta'; | ||
report.supports = '^8.0.0 || ^8.0.0-alpha || ^8.0.0-beta'; | ||
@@ -9,0 +9,0 @@ // Output formatted results |
@@ -13,3 +13,3 @@ 'use strict'; | ||
*/ | ||
runner.supports = '^7.0.0 || ^7.0.0-alpha || ^7.0.0-beta'; | ||
runner.supports = '^8.0.0 || ^8.0.0-alpha || ^8.0.0-beta'; | ||
@@ -16,0 +16,0 @@ /** |
@@ -10,3 +10,3 @@ 'use strict'; | ||
*/ | ||
runner.supports = '^7.0.0 || ^7.0.0-alpha || ^7.0.0-beta'; | ||
runner.supports = '^8.0.0 || ^8.0.0-alpha || ^8.0.0-beta'; | ||
@@ -13,0 +13,0 @@ /** |
{ | ||
"name": "pa11y", | ||
"version": "7.0.0", | ||
"version": "8.0.0", | ||
"description": "Pa11y is your automated accessibility testing pal", | ||
@@ -35,6 +35,6 @@ "keywords": [ | ||
"dependencies": { | ||
"axe-core": "~4.8.2", | ||
"axe-core": "~4.8.4", | ||
"bfj": "~8.0.0", | ||
"commander": "~11.1.0", | ||
"envinfo": "~7.11.0", | ||
"commander": "~12.0.0", | ||
"envinfo": "~7.11.1", | ||
"html_codesniffer": "~2.5.1", | ||
@@ -44,11 +44,14 @@ "kleur": "~4.1.5", | ||
"node.extend": "~2.0.3", | ||
"p-timeout": "~4.1.0", | ||
"puppeteer": "^20.9.0", | ||
"semver": "~7.5.4" | ||
"puppeteer": "^22.3.0", | ||
"semver": "~7.6.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^8.52.0", | ||
"eslint-plugin-jest": "^27.6.0", | ||
"jest": "^29.7.0", | ||
"pa11y-lint-config": "^3.0.0" | ||
"c8": "^9.1.0", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-mocha": "^10.4.1", | ||
"mocha": "^10.3.0", | ||
"mockery": "^2.1.0", | ||
"pa11y-lint-config": "^3.0.0", | ||
"proclaim": "^3.6.0", | ||
"sinon": "^17.0.1" | ||
}, | ||
@@ -61,6 +64,7 @@ "main": "./lib/pa11y.js", | ||
"lint": "eslint .", | ||
"test-unit": "jest test/unit", | ||
"test-coverage": "jest test/unit --coverage", | ||
"test-integration": "jest test/integration", | ||
"test": "jest --coverage" | ||
"test": "npm run test-coverage && npm run verify-coverage && npm run test-integration", | ||
"test-coverage": "c8 -- npm run test-unit", | ||
"test-integration": "mocha --config test/integration/.mocharc.json", | ||
"test-unit": "mocha", | ||
"verify-coverage": "c8 check-coverage --lines 90 --functions 90 --branches 90" | ||
}, | ||
@@ -67,0 +71,0 @@ "files": [ |
@@ -28,3 +28,3 @@ # Pa11y | ||
Pa11y 7 requires [Node.js][node] 18 or 20 to run. An older version of Node.js can be used with a [previous major version](#support-and-migration) of Pa11y. | ||
Pa11y 8 requires [Node.js][node] 18 or 20. An older version of Node.js can be used with [Pa11y 6 or below](#support-and-migration). | ||
@@ -41,3 +41,3 @@ ### Linux and macOS | ||
Alternatively, you can also download pre-built packages from the [Node.js][node] website for your operating system. | ||
Alternatively, download a pre-built package from the [Node.js][node] website for your operating system. | ||
@@ -56,5 +56,5 @@ ### Windows | ||
This installs the `pa11y` command-line tool: | ||
```console | ||
$ pa11y --help | ||
```sh | ||
Usage: pa11y [options] <url> | ||
@@ -190,3 +190,3 @@ | ||
```js | ||
exports.supports = '^7.0.0'; | ||
exports.supports = '^8.0.0'; | ||
``` | ||
@@ -256,3 +256,3 @@ | ||
If you wish to transform these results with the command-line reporters, then you can do so in your code by requiring them in. The `csv`, `tsv`, `html`, `json`, and `markdown` reporters each expose a method `process`: | ||
If you wish to transform these results with a command-line reporter, `require` it into your code. The `csv`, `tsv`, `html`, `json`, and `markdown` reporters each expose a method `process`: | ||
@@ -268,3 +268,3 @@ ```js | ||
Pa11y uses promises, so you can use `async` functions and the `await` keyword: | ||
Pa11y uses promises, so you can use `async` functions and the `await` keyword: | ||
@@ -297,6 +297,4 @@ ```js | ||
Pa11y exposes a function which allows you to validate [action](#actions) strings before attempting to use them. | ||
Pa11y's `isValidAction` function can be used to validate an [action](#actions) string ahead of its use: | ||
This function accepts an action string and returns a boolean indicating whether it matches one of the actions that Pa11y supports: | ||
```js | ||
@@ -863,3 +861,3 @@ pa11y.isValidAction('click element #submit'); // true | ||
```js | ||
exports.supports = '^7.0.0'; | ||
exports.supports = '^8.0.0'; | ||
``` | ||
@@ -942,3 +940,3 @@ | ||
npm run test-integration # Run the integration tests alone | ||
npm run coverage # Run the unit tests alone, reporting coverage | ||
npm run test-coverage # Run the unit tests alone, reporting coverage | ||
``` | ||
@@ -955,11 +953,12 @@ | ||
| Major version | Final minor version | Node.js support | Support end date | | ||
| :------------ | :-------------------- | :--------------- | :--------------- | | ||
| `7` | | `18`, `20` | ✅ Current major version | | ||
| `6` | `6.2` | `12`, `14`, `16` | July 2024 | | ||
| `5` | `5.3` | `8`, `10`, `12` | 2021-11-25 | | ||
| `4` | `4.13` | `4`, `6`, `8` | 2018-08-15 | | ||
| `3` | `3.8` | `0.12`, `4` | 2016-12-05 | | ||
| `2` | `2.4` | `0.10`, `0.12` | 2016-10-16 | | ||
| `1` | `1.7` | `0.10` | 2016-06-08 | | ||
| Major version | Final minor version | Node.js support | Puppeteer version | Support end date | | ||
| :------------ | :------------------ | :--------------- | :---------------- | :----------------------- | | ||
| `8` | | `18`, `20` | `^22` | ✅ Current major version | | ||
| `7` | `7.0` | `18`, `20` | `^20` | October 2024 | | ||
| `6` | `6.2` | `12`, `14`, `16` | `~9.1` | July 2024 | | ||
| `5` | `5.3` | `8`, `10`, `12` | `^1` | 2021-11-25 | | ||
| `4` | `4.13` | `4`, `6`, `8` | | 2018-08-15 | | ||
| `3` | `3.8` | `0.12`, `4` | | 2016-12-05 | | ||
| `2` | `2.4` | `0.10`, `0.12` | | 2016-10-16 | | ||
| `1` | `1.7` | `0.10` | | 2016-06-08 | | ||
@@ -969,3 +968,3 @@ ## License | ||
Pa11y is licensed under the [Lesser General Public License (LGPL-3.0-only)][info-license]. | ||
Copyright © 2013–2024, Team Pa11y and contributors | ||
Copyright © 2013-2024, Team Pa11y and contributors | ||
@@ -972,0 +971,0 @@ [axe]: https://www.axe-core.org/ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
100003
10
0
8
1864
982
+ Added@puppeteer/browsers@2.3.0(transitive)
+ Addedbare-fs@2.3.5(transitive)
+ Addedbare-os@2.4.4(transitive)
+ Addedbare-path@2.1.3(transitive)
+ Addedbare-stream@2.3.2(transitive)
+ Addedchromium-bidi@0.6.3(transitive)
+ Addedcommander@12.0.0(transitive)
+ Addedcosmiconfig@9.0.0(transitive)
+ Addeddebug@4.3.7(transitive)
+ Addeddevtools-protocol@0.0.1312386(transitive)
+ Addedenv-paths@2.2.1(transitive)
+ Addedmitt@3.0.1(transitive)
+ Addedms@2.1.3(transitive)
+ Addedproxy-agent@6.4.0(transitive)
+ Addedpuppeteer@22.15.0(transitive)
+ Addedpuppeteer-core@22.15.0(transitive)
+ Addedsemver@7.6.3(transitive)
+ Addedtar-fs@3.0.6(transitive)
+ Addedurlpattern-polyfill@10.0.0(transitive)
+ Addedws@8.18.0(transitive)
+ Addedyargs@17.7.2(transitive)
+ Addedzod@3.23.8(transitive)
- Removedp-timeout@~4.1.0
- Removed@puppeteer/browsers@1.4.6(transitive)
- Removedchromium-bidi@0.4.16(transitive)
- Removedcommander@11.1.0(transitive)
- Removedcosmiconfig@8.2.0(transitive)
- Removedcross-fetch@4.0.0(transitive)
- Removeddebug@4.3.4(transitive)
- Removeddevtools-protocol@0.0.1147663(transitive)
- Removedlru-cache@6.0.0(transitive)
- Removedmitt@3.0.0(transitive)
- Removedmkdirp-classic@0.5.3(transitive)
- Removedms@2.1.2(transitive)
- Removednode-fetch@2.7.0(transitive)
- Removedp-timeout@4.1.0(transitive)
- Removedpath-type@4.0.0(transitive)
- Removedproxy-agent@6.3.0(transitive)
- Removedpuppeteer@20.9.0(transitive)
- Removedpuppeteer-core@20.9.0(transitive)
- Removedsemver@7.5.4(transitive)
- Removedtar-fs@3.0.4(transitive)
- Removedtr46@0.0.3(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)
- Removedws@8.13.0(transitive)
- Removedyallist@4.0.0(transitive)
- Removedyargs@17.7.1(transitive)
Updatedaxe-core@~4.8.4
Updatedcommander@~12.0.0
Updatedenvinfo@~7.11.1
Updatedpuppeteer@^22.3.0
Updatedsemver@~7.6.0