axe-sarif-converter
Advanced tools
Comparing version 2.5.1 to 2.6.0
@@ -41,2 +41,3 @@ "use strict"; | ||
version: '2.1.0', | ||
$schema: 'https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json', | ||
runs: [this.convertRun(results, converterOptions, environmentData)], | ||
@@ -43,0 +44,0 @@ }; |
@@ -70,3 +70,3 @@ #!/usr/bin/env node | ||
if (Array.isArray(inputFileJson)) { | ||
// Treating as array of axe results, like axe-cli produces | ||
// Treating as array of axe results, like @axe-core/cli produces | ||
return inputFileJson.map(_1.convertAxeToSarif); | ||
@@ -73,0 +73,0 @@ } |
@@ -41,2 +41,3 @@ "use strict"; | ||
version: '2.1.0', | ||
$schema: 'https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json', | ||
runs: [this.convertRun(results, options)], | ||
@@ -43,0 +44,0 @@ }; |
{ | ||
"name": "axe-sarif-converter", | ||
"version": "2.5.1", | ||
"version": "2.6.0", | ||
"description": "Convert axe-core accessibility scan results to the SARIF format", | ||
@@ -17,5 +17,5 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@types/sarif": ">=2.1.1 <=2.1.2", | ||
"@types/sarif": ">=2.1.1 <=2.1.4", | ||
"axe-core": "^3.2.2 || ^4.0.0", | ||
"yargs": "^15.0.2" | ||
"yargs": "^16.0.3" | ||
}, | ||
@@ -33,3 +33,3 @@ "devDependencies": { | ||
"jest-circus": "^26.0.0", | ||
"jest-junit": "^11.0.1", | ||
"jest-junit": "^12.0.0", | ||
"license-check-and-add": "^3.0.3", | ||
@@ -39,3 +39,3 @@ "lodash": "^4.17.15", | ||
"rimraf": "^3.0.0", | ||
"semantic-release": "^17.0.1", | ||
"semantic-release": "^17.1.1", | ||
"ts-jest": "^26.0.0", | ||
@@ -48,3 +48,4 @@ "typemoq": "^2.1.0", | ||
"acorn": "^7.1.1", | ||
"kind-of": "^6.0.3" | ||
"kind-of": "^6.0.3", | ||
"semantic-release/**/lock-verify/**/yargs": "^15.4.1" | ||
}, | ||
@@ -51,0 +52,0 @@ "scripts": { |
@@ -19,3 +19,3 @@ <!-- | ||
Before using axe-sarif-converter, you will need to run an [axe](https://github.com/dequelabs/axe-core) accessibility scan to produce some axe results to convert. Typically, you would do this by using an axe integration library for your favorite browser automation tool ([axe-puppeteer](https://github.com/dequelabs/axe-puppeteer), [axe-webdriverjs](https://github.com/dequelabs/axe-webdriverjs), [cypress-axe](https://github.com/avanslaars/cypress-axe)). | ||
Before using axe-sarif-converter, you will need to run an [axe](https://github.com/dequelabs/axe-core) accessibility scan to produce some axe results to convert. Typically, you would do this by using an axe integration library for your favorite browser automation tool ([@axe-core/puppeteer](https://github.com/dequelabs/axe-core-npm/tree/develop/packages/puppeteer), [@axe-core/webdriverjs](https://github.com/dequelabs/axe-core-npm/tree/develop/packages/webdriverjs), [cypress-axe](https://github.com/avanslaars/cypress-axe)). | ||
@@ -25,6 +25,6 @@ axe-sarif-converter exports a single function, named `convertAxeToSarif`. Use it like this: | ||
```ts | ||
import * as Axe from 'axe'; | ||
import * as AxePuppeteer from 'axe-puppeteer'; | ||
import * as Axe from 'axe-core'; | ||
import * as AxePuppeteer from '@axe-core/puppeteer'; | ||
import * as fs from 'fs'; | ||
import * as Puppeteer from 'puppeteer' | ||
import * as Puppeteer from 'puppeteer'; | ||
import * as util from 'util'; | ||
@@ -35,4 +35,4 @@ | ||
test('my accessibility test', async () => { | ||
// This example uses axe-puppeteer, but you can use any axe-based library | ||
// that outputs axe scan results in the default axe output format | ||
// This example uses @axe-core/puppeteer, but you can use any axe-based | ||
// library that outputs axe scan results in the default axe output format | ||
const testPage: Puppeteer.Page = /* ... set up your test page ... */; | ||
@@ -55,5 +55,5 @@ const axeResults: Axe.AxeResults = await new AxePuppeteer(testPage).analyze(); | ||
```bash | ||
# axe-cli is used here for example purposes only; you could also run axe-core | ||
# @axe-core/cli is used here for example purposes only; you could also run axe-core | ||
# using your library of choice and JSON.stringify the results. | ||
npx axe-cli https://accessibilityinsights.io --save ./sample-axe-results.json | ||
npx @axe-core/cli https://accessibilityinsights.io --save ./sample-axe-results.json | ||
@@ -73,3 +73,3 @@ npx axe-sarif-converter --input-files ./sample-axe-results.json --output-file ./sample-axe-results.sarif | ||
- axe-sarif-converter version 2.x supports input from version ^3.2.0 || ^4.0.0 of axe-core (tested with 3.2.2, 3.3.2, 3.4.1, 3.4.2, 3.5.1, 3.5.2, 3.5.3, 3.5.4, 3.5.5, and 4.0.1) and outputs SARIF v2.1 | ||
- axe-sarif-converter version 2.x supports input from version ^3.2.0 || ^4.0.0 of axe-core (tested with 3.2.2, 3.3.2, 3.4.1, 3.4.2, 3.5.1, 3.5.2, 3.5.3, 3.5.4, 3.5.5, 4.0.1, and 4.0.2) and outputs SARIF v2.1 | ||
- axe-sarif-converter version 1.x supports input from version >= 3.2.0 < 3.3.0 of axe-core (tested with 3.2.2) and outputs SARIF v2.0 | ||
@@ -116,3 +116,3 @@ | ||
``` | ||
1. Update the versions of axe-cli and axe-core in `src/test-resources/generator/package.json` | ||
1. Update the versions of @axe-core/cli and axe-core in `src/test-resources/generator/package.json` | ||
1. Generate test resource files for the new version with: | ||
@@ -119,0 +119,0 @@ |
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
61501
1054
+ Added@types/sarif@2.1.4(transitive)
+ Addedcliui@7.0.4(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedwrap-ansi@7.0.0(transitive)
+ Addedy18n@5.0.8(transitive)
+ Addedyargs@16.2.0(transitive)
+ Addedyargs-parser@20.2.9(transitive)
- Removed@types/sarif@2.1.2(transitive)
- Removedcamelcase@5.3.1(transitive)
- Removedcliui@6.0.0(transitive)
- Removeddecamelize@1.2.0(transitive)
- Removedfind-up@4.1.0(transitive)
- Removedlocate-path@5.0.0(transitive)
- Removedp-limit@2.3.0(transitive)
- Removedp-locate@4.1.0(transitive)
- Removedp-try@2.2.0(transitive)
- Removedpath-exists@4.0.0(transitive)
- Removedrequire-main-filename@2.0.0(transitive)
- Removedset-blocking@2.0.0(transitive)
- Removedwhich-module@2.0.1(transitive)
- Removedwrap-ansi@6.2.0(transitive)
- Removedy18n@4.0.3(transitive)
- Removedyargs@15.4.1(transitive)
- Removedyargs-parser@18.1.3(transitive)
Updated@types/sarif@>=2.1.1 <=2.1.4
Updatedyargs@^16.0.3