axe-sarif-converter
Advanced tools
Comparing version 2.10.0 to 2.10.1
@@ -105,2 +105,3 @@ "use strict"; | ||
region: { | ||
startLine: 1, | ||
snippet: { | ||
@@ -107,0 +108,0 @@ text: axeRawNodeResult.node.source, |
@@ -93,2 +93,3 @@ "use strict"; | ||
region: { | ||
startLine: 1, | ||
snippet: { | ||
@@ -95,0 +96,0 @@ text: node.html, |
@@ -14,3 +14,5 @@ "use strict"; | ||
else { | ||
var allNodes = node.all.concat(node.none).concat(node.any); | ||
var allNodes = node.all | ||
.concat(node.none) | ||
.concat(node.any); | ||
formatSarifCheckResultsMessage('The following tests passed:', allNodes, textArray, markdownArray); | ||
@@ -17,0 +19,0 @@ } |
{ | ||
"name": "axe-sarif-converter", | ||
"version": "2.10.0", | ||
"version": "2.10.1", | ||
"description": "Convert axe-core accessibility scan results to the SARIF format", | ||
@@ -10,2 +10,3 @@ "main": "dist/index.js", | ||
"dist/", | ||
"!dist/test-resources/", | ||
"LICENSE", | ||
@@ -17,2 +18,3 @@ "README.md" | ||
}, | ||
"packageManager": "yarn@3.5.0", | ||
"dependencies": { | ||
@@ -24,17 +26,20 @@ "@types/sarif": ">=2.1.1 <=2.1.4", | ||
"devDependencies": { | ||
"@axe-core/cli": "^4.6.0", | ||
"@axe-core/puppeteer": "^4.6.0", | ||
"@types/jest": "^27.4.0", | ||
"@types/lodash": "^4.14.136", | ||
"@types/node": "^14.0.1", | ||
"@types/node": "^18.16.2", | ||
"@types/yargs": "^17.0.8", | ||
"@typescript-eslint/eslint-plugin": "^4.0.1", | ||
"@typescript-eslint/parser": "^4.0.1", | ||
"eslint": "^7.8.1", | ||
"@typescript-eslint/eslint-plugin": "^5.59.8", | ||
"@typescript-eslint/parser": "^5.58.0", | ||
"eslint": "^8.42.0", | ||
"eslint-plugin-security": "^1.4.0", | ||
"jest": "^27.0.3", | ||
"jest-junit": "^15.0.0", | ||
"jest-junit": "^16.0.0", | ||
"license-check-and-add": "^4.0.1", | ||
"lodash": "^4.17.15", | ||
"prettier": "^2.0.1", | ||
"rimraf": "^4.0.4", | ||
"semantic-release": "^19.0.2", | ||
"puppeteer": "^13.7.0", | ||
"rimraf": "^5.0.0", | ||
"semantic-release": "^21.0.1", | ||
"ts-jest": "^27.0.2", | ||
@@ -45,3 +50,5 @@ "typemoq": "^2.1.0", | ||
"resolutions": { | ||
"ansi-regex": "^5.0.1" | ||
"@axe-core/cli/chromedriver@^109.0.0": "^111.0.0", | ||
"ansi-regex@^4.1.0": "^5.0.1", | ||
"axe-core": "4.6.3" | ||
}, | ||
@@ -60,3 +67,6 @@ "scripts": { | ||
"watch:test": "jest --watch --coverage false --colors", | ||
"semantic-release": "semantic-release" | ||
"semantic-release": "semantic-release", | ||
"generate-test-resources": "yarn generate-axe-core-resources && yarn generate-axe-cli-resources", | ||
"generate-axe-cli-resources": "node dist/test-resources/generator/generate-axe-cli-resources.js", | ||
"generate-axe-core-resources": "node dist/test-resources/generator/generate-axe-core-resources.js" | ||
}, | ||
@@ -63,0 +73,0 @@ "repository": { |
@@ -76,52 +76,4 @@ <!-- | ||
To get started working on the project: | ||
All contributions are welcome! To get started, please read through our [CONTRIBUTING](./CONTRIBUTING.md) guidelines for this project. | ||
1. Install dependencies: | ||
- Install [Node.js](https://nodejs.org/en/download/) (LTS version) | ||
- `npm install -g yarn` | ||
- `yarn install` | ||
1. Run all build, lint, and test steps: | ||
- `yarn precheckin` | ||
1. Run the CLI tool with your changes: | ||
- `yarn build` | ||
- `node dist/cli.js` | ||
- Alternately, register a linked global `axe-sarif-converter` command with `npm install && npm link` (yarn doesn't work for this; see [yarnpkg/yarn#1585](https://github.com/yarnpkg/yarn/issues/1585)) | ||
### Updating axe-core version | ||
This package attempts to maintain backwards compatibility with axe-core versions ^3.2.2. We maintain | ||
test cases using pinned output from multiple axe-core versions under `/src/test-resources/`, so updating | ||
the version of axe-core we support involves generating new output for the new versions. | ||
Ideally we'd specify axe-core as a peer dependency; unfortunately, changing this now would be a breaking | ||
change, so we're waiting to change this until we would need to make a breaking change anyway. | ||
To update the package and test cases to account for a new axe-core version: | ||
1. Update the version of axe-core in `yarn.lock` (_not_ `package.json`); usually dependabot will cover this. If updating to the latest version, this can be accomplished using `yarn upgrade axe-core`. | ||
1. Build the repo with: | ||
``` | ||
yarn install | ||
yarn build | ||
``` | ||
1. Update the versions of @axe-core/cli, @axe-core/puppeteer, and axe-core in `src/test-resources/generator/package.json` | ||
1. Generate test resource files for the new version with: | ||
``` | ||
cd src/test-resources/generator | ||
yarn install | ||
yarn generate | ||
``` | ||
1. Manually compare the diff of `/src/test-resources/basic-axe-vPREVIOUS.sarif` and `/src/test-resources/basic-axe-vNEW.sarif`; the only differences should be the version numbers. | ||
1. Manually compare the diff of `/src/test-resources/w3citylights-axe-vPREVIOUS.sarif` and `/src/test-resources/w3citylights-axe-vNEW.sarif`; in addition to version number differences, you should see some differences based on new/removed rules between the axe versions. | ||
1. Add test cases involving the new files to the integration tests in `src/index.test.ts` and `src/cli.test.ts` | ||
1. Update snapshots (`yarn test -u`) | ||
1. Update this README's `Version numbers` section to note which versions we've tested against. | ||
### Contributor License Agreement | ||
@@ -128,0 +80,0 @@ |
1060
60135
21
93