pa11y-reporter-cli
Advanced tools
Comparing version 1.0.1 to 2.0.0
@@ -1,10 +0,17 @@ | ||
# Changelog | ||
## 2.0.0 (2020-04-27) | ||
* Drop support for Node.js versions older than 10. | ||
* Replace chalk with kleur, which reduces the size of the package by approximately 90%. | ||
* Whitelist the files to be published on npm. This reduces the size of the package further. | ||
* Update devDependencies. | ||
* Update test matrix to include Node 10, 12 and 14. | ||
## 1.0.1 (2018-01-30) | ||
* Fix an issue when a `null` context is encountered in Pa11y results | ||
* Fix an issue when a `null` context is encountered in Pa11y results. | ||
## 1.0.0 (2017-09-11) | ||
* Initial release | ||
* Initial release. |
'use strict'; | ||
const chalk = require('chalk'); | ||
const {cyan, green, grey, red, underline, yellow} = require('kleur'); | ||
@@ -8,11 +8,11 @@ const report = module.exports = {}; | ||
// Pa11y version support | ||
report.supports = '^5.0.0 || ^5.0.0-alpha || ^5.0.0-beta'; | ||
report.supports = '^6.0.0 || ^6.0.0-alpha || ^6.0.0-beta'; | ||
// Helper strings for use in reporter methods | ||
const start = chalk.cyan(' >'); | ||
const start = cyan(' >'); | ||
const typeStarts = { | ||
error: chalk.red(' • Error:'), | ||
notice: chalk.cyan(' • Notice:'), | ||
unknown: chalk.grey(' •'), | ||
warning: chalk.yellow(' • Warning:') | ||
error: red(' • Error:'), | ||
notice: cyan(' • Notice:'), | ||
unknown: grey(' •'), | ||
warning: yellow(' • Warning:') | ||
}; | ||
@@ -24,3 +24,3 @@ | ||
${chalk.cyan.underline('Welcome to Pa11y')} | ||
${cyan(underline('Welcome to Pa11y'))} | ||
@@ -35,3 +35,3 @@ `); | ||
${chalk.underline(`Results for URL: ${results.pageUrl}`)} | ||
${underline(`Results for URL: ${results.pageUrl}`)} | ||
${results.issues.map(report.issue).join('\n')} | ||
@@ -45,3 +45,3 @@ | ||
${chalk.green('No issues found!')} | ||
${green('No issues found!')} | ||
@@ -59,5 +59,5 @@ `); | ||
${typeStarts[issue.type]} ${issue.message} | ||
${chalk.grey(`├── ${code}`)} | ||
${chalk.grey(`├── ${selector}`)} | ||
${chalk.grey(`└── ${context}`)} | ||
${grey(`├── ${code}`)} | ||
${grey(`├── ${selector}`)} | ||
${grey(`└── ${context}`)} | ||
`); | ||
@@ -75,9 +75,9 @@ }; | ||
if (totals.errors > 0) { | ||
output.push(chalk.red(`${totals.errors} Errors`)); | ||
output.push(red(`${totals.errors} Errors`)); | ||
} | ||
if (totals.warnings > 0) { | ||
output.push(chalk.yellow(`${totals.warnings} Warnings`)); | ||
output.push(yellow(`${totals.warnings} Warnings`)); | ||
} | ||
if (totals.notices > 0) { | ||
output.push(chalk.cyan(`${totals.notices} Notices`)); | ||
output.push(cyan(`${totals.notices} Notices`)); | ||
} | ||
@@ -94,3 +94,3 @@ return output.join('\n'); | ||
${chalk.red(message)} | ||
${red(message)} | ||
@@ -104,3 +104,3 @@ `); | ||
return cleanWhitespace(` | ||
${start} ${chalk.grey(message)} | ||
${start} ${grey(message)} | ||
`); | ||
@@ -107,0 +107,0 @@ }; |
{ | ||
"name": "pa11y-reporter-cli", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"description": "The default command-line reporter for Pa11y", | ||
@@ -13,21 +13,21 @@ "keywords": [ | ||
"type": "git", | ||
"url": "https://github.com/pa11y-reporter-cli/pa11y-reporter-cli.git" | ||
"url": "https://github.com/pa11y/pa11y-reporter-cli.git" | ||
}, | ||
"homepage": "https://github.com/pa11y-reporter-cli/pa11y-reporter-cli", | ||
"bugs": "https://github.com/pa11y-reporter-cli/pa11y-reporter-cli/issues", | ||
"homepage": "https://github.com/pa11y/pa11y-reporter-cli", | ||
"bugs": "https://github.com/pa11y/pa11y-reporter-cli/issues", | ||
"license": "LGPL-3.0", | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=10" | ||
}, | ||
"dependencies": { | ||
"chalk": "^2.1.0" | ||
"kleur": "^3.0.3" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^3.18.0", | ||
"mocha": "^3.5.0", | ||
"mockery": "^2.0.0", | ||
"nyc": "^10.1.2", | ||
"pa11y-lint-config": "^1.2.0", | ||
"proclaim": "^3.4.4", | ||
"sinon": "^3.2.0" | ||
"eslint": "^6.8.0", | ||
"mocha": "^7.1.1", | ||
"mockery": "^2.1.0", | ||
"nyc": "^15.0.1", | ||
"pa11y-lint-config": "^1.2.1", | ||
"proclaim": "^3.6.0", | ||
"sinon": "^9.0.2" | ||
}, | ||
@@ -37,3 +37,6 @@ "main": "./lib/reporter.js", | ||
"test": "make ci" | ||
} | ||
}, | ||
"files": [ | ||
"lib" | ||
] | ||
} |
@@ -1,2 +0,1 @@ | ||
# Pa11y CLI Reporter | ||
@@ -12,18 +11,24 @@ | ||
## Table Of Contents | ||
- [Requirements](#requirements) | ||
- [Usage](#usage) | ||
- [Command-Line](#command-line) | ||
- [JavaScript](#javascript) | ||
- [Contributing](#contributing) | ||
- [License](#license) | ||
* [Requirements](#requirements) | ||
* [Compatibility chart](#compatibility-chart) | ||
* [Usage](#usage) | ||
* [Command-Line](#command-line) | ||
* [JavaScript](#javascript) | ||
* [Contributing](#contributing) | ||
* [License](#license) | ||
## Requirements | ||
Pa11y CLI Reporter is compatible with Pa11y 5.0. It will not work with older versions of Pa11y. | ||
Pa11y CLI Reporter is compatible with Pa11y 5 and later versions. It will not work with older versions of Pa11y. | ||
### Compatibility chart | ||
| Pa11y version | Pa11y CLI reporter version | | ||
|---------------|----------------------------| | ||
| 1.x - 4.x | Unsupported | | ||
| 5.x | 1.x | | ||
| 6.x | 2.x | | ||
## Usage | ||
@@ -60,3 +65,2 @@ | ||
## Contributing | ||
@@ -68,3 +72,3 @@ | ||
Please write unit tests for your code, and check that everything works by running the following before opening a <abbr title="pull request">PR</abbr>: | ||
Please write unit tests for your code, and check that everything works by running the following before opening a Pull Request: | ||
@@ -84,9 +88,7 @@ ```sh | ||
## License | ||
Pa11y CLI Reporter is licensed under the [Lesser General Public License (LGPL-3.0)][info-license].<br/> | ||
Pa11y CLI Reporter is licensed under the [Lesser General Public License (LGPL-3.0)][info-license]. | ||
Copyright © 2017, Team Pa11y | ||
[info-license]: LICENSE | ||
@@ -93,0 +95,0 @@ [info-npm]: https://www.npmjs.com/package/pa11y |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
0
96
14343
5
90
2
+ Addedkleur@^3.0.3
+ Addedkleur@3.0.3(transitive)
- Removedchalk@^2.1.0
- Removedansi-styles@3.2.1(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedsupports-color@5.5.0(transitive)