Skip to content

Commit f99ed38

Browse files
committed
Release v1.8.1
1 parent 3aedfdb commit f99ed38

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

dist/w3c-html-validator.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! w3c-html-validator v1.8.0 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License
1+
//! w3c-html-validator v1.8.1 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License
22

33
export type ValidatorSettings = {
44
html: string;
@@ -8,7 +8,7 @@ export type ValidatorSettings = {
88
ignoreLevel: 'info' | 'warning';
99
ignoreMessages: (string | RegExp)[];
1010
output: ValidatorResultsOutput;
11-
skip: boolean;
11+
dryRun: boolean;
1212
};
1313
export type ValidatorResultsMessage = {
1414
type: 'info' | 'error' | 'non-document-error' | 'network-error';
@@ -34,7 +34,7 @@ export type ValidatorResults = {
3434
status: number;
3535
messages: ValidatorResultsMessage[] | null;
3636
display: string | null;
37-
skip: boolean;
37+
dryRun: boolean;
3838
};
3939
export type ValidatorResultsOutput = ValidatorResults['output'];
4040
export type ReporterSettings = {
@@ -46,7 +46,7 @@ export type ReporterSettings = {
4646
declare const w3cHtmlValidator: {
4747
version: string;
4848
validate(options: Partial<ValidatorSettings>): Promise<ValidatorResults>;
49-
skipNotice(): void;
49+
dryRunNotice(): void;
5050
summary(numFiles: number): void;
5151
reporter(results: ValidatorResults, options?: Partial<ReporterSettings>): ValidatorResults;
5252
};

dist/w3c-html-validator.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
//! w3c-html-validator v1.8.0 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License
1+
//! w3c-html-validator v1.8.1 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License
22

33
import chalk from 'chalk';
44
import fs from 'fs';
55
import log from 'fancy-log';
66
import request from 'superagent';
77
import slash from 'slash';
88
const w3cHtmlValidator = {
9-
version: '1.8.0',
9+
version: '1.8.1',
1010
validate(options) {
1111
const defaults = {
1212
checkUrl: 'https://validator.w3.org/nu/',
13+
dryRun: false,
1314
ignoreLevel: null,
1415
ignoreMessages: [],
1516
output: 'json',
16-
skip: false,
1717
};
1818
const settings = { ...defaults, ...options };
1919
if (!settings.html && !settings.filename && !settings.website)
@@ -61,7 +61,7 @@ const w3cHtmlValidator = {
6161
status: response.statusCode || -1,
6262
messages: json ? response.body.messages : null,
6363
display: json ? null : response.text,
64-
skip: settings.skip,
64+
dryRun: settings.dryRun,
6565
});
6666
const handleError = (reason) => {
6767
const errRes = reason.response ?? {};
@@ -73,14 +73,14 @@ const w3cHtmlValidator = {
7373
const pseudoResponse = {
7474
statusCode: 200,
7575
body: { messages: [] },
76-
text: 'Validation skipped.',
76+
text: 'Validation bypassed.',
7777
};
7878
const pseudoRequest = () => new Promise(resolve => resolve(pseudoResponse));
79-
const validation = settings.skip ? pseudoRequest() : w3cRequest;
79+
const validation = settings.dryRun ? pseudoRequest() : w3cRequest;
8080
return validation.then(filterMessages).then(toValidatorResults).catch(handleError);
8181
},
82-
skipNotice() {
83-
log(chalk.gray('w3c-html-validator'), chalk.yellowBright('skip mode:'), chalk.whiteBright('validation being bypassed'));
82+
dryRunNotice() {
83+
log(chalk.gray('w3c-html-validator'), chalk.yellowBright('dry run mode:'), chalk.whiteBright('validation being bypassed'));
8484
},
8585
summary(numFiles) {
8686
log(chalk.gray('w3c-html-validator'), chalk.magenta('files: ' + numFiles));

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "w3c-html-validator",
3-
"version": "1.8.0",
3+
"version": "1.8.1",
44
"description": "Check the markup validity of HTML files using the W3C validator",
55
"license": "MIT",
66
"type": "module",

0 commit comments

Comments
 (0)