w3c-html-validator 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +3 -1
- package/dist/w3c-html-validator.d.ts +1 -1
- package/dist/w3c-html-validator.js +2 -2
- package/package.json +9 -9
package/bin/cli.js
CHANGED
|
@@ -33,6 +33,7 @@ const validFlags =
|
|
|
33
33
|
['continue', 'delay', 'dry-run', 'exclude', 'ignore', 'ignore-config', 'note', 'quiet', 'trim'];
|
|
34
34
|
const cli = cliArgvUtil.parse(validFlags);
|
|
35
35
|
const files = cli.params.length ? cli.params.map(cliArgvUtil.cleanPath) : ['.'];
|
|
36
|
+
const excludeList = cli.flagMap.exclude ? cli.flagMap.exclude.split(',') : [];
|
|
36
37
|
const ignore = cli.flagMap.ignore ?? null;
|
|
37
38
|
const ignoreConfig = cli.flagMap.ignoreConfig ?? null;
|
|
38
39
|
const delay = Number(cli.flagMap.delay) || 500; //default half second debounce pause
|
|
@@ -43,7 +44,8 @@ const getFilenames = () => {
|
|
|
43
44
|
const readFilenames = (file) => globSync(file, { ignore: '**/node_modules/**/*' }).map(slash);
|
|
44
45
|
const readHtmlFiles = (folder) => readFilenames(folder + '/**/*.html');
|
|
45
46
|
const addHtml = (file) => fs.lstatSync(file).isDirectory() ? readHtmlFiles(file) : file;
|
|
46
|
-
|
|
47
|
+
const keep = (file) => excludeList.every(exclude => !file.includes(exclude));
|
|
48
|
+
return files.map(readFilenames).flat().map(addHtml).flat().filter(keep).sort();
|
|
47
49
|
};
|
|
48
50
|
const filenames = getFilenames();
|
|
49
51
|
const error =
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//! w3c-html-validator v1.9.
|
|
1
|
+
//! w3c-html-validator v1.9.1 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License
|
|
2
2
|
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
import fs from 'fs';
|
|
@@ -6,7 +6,7 @@ import log from 'fancy-log';
|
|
|
6
6
|
import request from 'superagent';
|
|
7
7
|
import slash from 'slash';
|
|
8
8
|
const w3cHtmlValidator = {
|
|
9
|
-
version: '1.9.
|
|
9
|
+
version: '1.9.1',
|
|
10
10
|
validate(options) {
|
|
11
11
|
const defaults = {
|
|
12
12
|
checkUrl: 'https://validator.w3.org/nu/',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "w3c-html-validator",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "Check the markup validity of HTML files using the W3C validator",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"examples": "node examples.js"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"chalk": "~5.
|
|
60
|
+
"chalk": "~5.5",
|
|
61
61
|
"cli-argv-util": "~1.3",
|
|
62
62
|
"fancy-log": "~2.0",
|
|
63
63
|
"glob": "~11.0",
|
|
@@ -65,21 +65,21 @@
|
|
|
65
65
|
"superagent": "~10.2"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@eslint/js": "~9.
|
|
68
|
+
"@eslint/js": "~9.33",
|
|
69
69
|
"@types/fancy-log": "~2.0",
|
|
70
|
-
"@types/node": "~24.
|
|
70
|
+
"@types/node": "~24.2",
|
|
71
71
|
"@types/superagent": "~8.1",
|
|
72
|
-
"add-dist-header": "~1.
|
|
72
|
+
"add-dist-header": "~1.5",
|
|
73
73
|
"assert-deep-strict-equal": "~1.2",
|
|
74
|
-
"copy-file-util": "~1.
|
|
74
|
+
"copy-file-util": "~1.3",
|
|
75
75
|
"copy-folder-util": "~1.1",
|
|
76
|
-
"eslint": "~9.
|
|
76
|
+
"eslint": "~9.33",
|
|
77
77
|
"jshint": "~2.13",
|
|
78
78
|
"merge-stream": "~2.0",
|
|
79
79
|
"mocha": "~11.7",
|
|
80
80
|
"rimraf": "~6.0",
|
|
81
81
|
"run-scripts-util": "~1.3",
|
|
82
|
-
"typescript": "~5.
|
|
83
|
-
"typescript-eslint": "~8.
|
|
82
|
+
"typescript": "~5.9",
|
|
83
|
+
"typescript-eslint": "~8.39"
|
|
84
84
|
}
|
|
85
85
|
}
|