Skip to content

Commit 273a5c5

Browse files
committed
Update dependencies
1 parent e274c23 commit 273a5c5

File tree

9 files changed

+1534
-2077
lines changed

9 files changed

+1534
-2077
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- :boom: Drop Node 16 support.
66
- :rocket: Disable `html-validate` "wcag/h63" rule by default as [it reports errors for accessible tables](https://www.w3.org/WAI/tutorials/tables/one-header/).
7+
- :hammer: Update dependencies.
78
- :hammer: Switch from Yarn to npm.
89
- :hammer: Update GitHub Action versions.
910

package-lock.json

Lines changed: 1501 additions & 2045 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,29 @@
1010
"url": "https://github.com/darekkay/evaluatory/issues"
1111
},
1212
"dependencies": {
13-
"@darekkay/logger": "3.0.3",
14-
"axe-core": "^4.7.2",
15-
"axios": "1.4.0",
16-
"dayjs": "1.11.7",
17-
"fast-xml-parser": "4.2.5",
18-
"fs-extra": "11.1.1",
19-
"highlight.js": "11.8.0",
20-
"html-validate": "7.18.0",
13+
"@darekkay/logger": "4.0.0",
14+
"axe-core": "^4.8.3",
15+
"axios": "1.6.5",
16+
"dayjs": "1.11.10",
17+
"fast-xml-parser": "4.3.2",
18+
"fs-extra": "11.2.0",
19+
"highlight.js": "11.9.0",
20+
"html-validate": "8.8.0",
2121
"json5": "2.2.3",
2222
"kleur": "4.1.5",
2323
"lodash": "4.17.21",
2424
"nunjucks": "3.2.4",
2525
"open": "8.4.2",
26-
"playwright": "1.34.3",
26+
"playwright": "1.40.1",
2727
"sywac": "1.3.0",
2828
"tiny-async-pool": "1.3.0"
2929
},
3030
"devDependencies": {
31-
"@darekkay/gulp": "3.0.1",
32-
"@darekkay/scripts": "2.6.2",
33-
"@darekkay/styles": "4.3.0",
31+
"@darekkay/gulp": "4.0.0",
32+
"@darekkay/scripts": "3.0.1",
33+
"@darekkay/styles": "5.1.0",
3434
"http-server": "14.1.1",
35-
"rimraf": "5.0.1"
35+
"rimraf": "5.0.5"
3636
},
3737
"engines": {
3838
"node": ">=18.0.0"

src/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const executeForSingleUrl = async ({ config, modules, url, ...parameters }) => {
5555
await renderToFile(
5656
join(__dirname, "templates", "module.njk"),
5757
{ url, modules, results: htmlParts },
58-
join(config.output, `${parameters.index}.html`)
58+
join(config.output, `${parameters.index}.html`),
5959
);
6060
} catch (error) {
6161
logger.error(error.message || error);
@@ -87,7 +87,7 @@ const execute = async (config) => {
8787
.filter(Boolean);
8888

8989
logger.info(
90-
`Evaluating ${config.urls.length} URL${config.urls.length > 1 ? "s" : ""}`
90+
`Evaluating ${config.urls.length} URL${config.urls.length > 1 ? "s" : ""}`,
9191
);
9292
logger.info("Clearing output folder:", resolve(join(config.output)));
9393
await emptyDir(config.output);
@@ -105,9 +105,9 @@ const execute = async (config) => {
105105
modules,
106106
},
107107
],
108-
[]
108+
[],
109109
),
110-
executeForSingleUrl
110+
executeForSingleUrl,
111111
);
112112

113113
// group results by fail/success
@@ -121,12 +121,12 @@ const execute = async (config) => {
121121
}
122122
return accumulator;
123123
},
124-
{ fail: [], success: [] }
124+
{ fail: [], success: [] },
125125
);
126126

127127
const totalIssueCount = results.reduce(
128128
(accumulator, result) => accumulator + result.issueCount,
129-
0
129+
0,
130130
);
131131

132132
// create an index file
@@ -138,7 +138,7 @@ const execute = async (config) => {
138138
totalIssueCount,
139139
lastGenerated: dayjs().format("YYYY-MM-DD HH:mm:ss"),
140140
},
141-
join(config.output, "index.html")
141+
join(config.output, "index.html"),
142142
);
143143

144144
// copy static assets

src/modules/axe-core/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ module.exports = async ({ page, moduleName, index, config }) => {
4545
({ moduleConfig }) => {
4646
return window.axe.run(window.document, moduleConfig);
4747
},
48-
{ moduleConfig: config.modulesConfig[moduleName] }
48+
{ moduleConfig: config.modulesConfig[moduleName] },
4949
);
5050

5151
violationsPerDevice[deviceName] = axeResults.violations;
@@ -60,7 +60,7 @@ module.exports = async ({ page, moduleName, index, config }) => {
6060
deviceViolations.forEach((violation) => {
6161
const accumulatedViolation = _.find(
6262
accumulator,
63-
(value) => value.id === violation.id
63+
(value) => value.id === violation.id,
6464
);
6565
if (!accumulatedViolation) {
6666
violation.breakpoints = [deviceName];
@@ -74,7 +74,7 @@ module.exports = async ({ page, moduleName, index, config }) => {
7474
!_.some(
7575
accumulatedViolation.nodes,
7676
(accumulatedNode) =>
77-
node.target.join("") === accumulatedNode.target.join("")
77+
node.target.join("") === accumulatedNode.target.join(""),
7878
)
7979
) {
8080
accumulatedViolation.nodes.push(node);
@@ -84,12 +84,12 @@ module.exports = async ({ page, moduleName, index, config }) => {
8484
});
8585
return accumulator;
8686
},
87-
[]
87+
[],
8888
);
8989

9090
const issueCount = violations.reduce(
9191
(accumulator, violation) => accumulator + violation.nodes.length,
92-
0
92+
0,
9393
);
9494

9595
const jsonFileName = `${index}-${moduleName}.json`;

src/modules/html-validate/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const { render } = require("../../utils/render");
99
/** Module to validate HTML of a page */
1010
module.exports = async ({ pageSource, moduleName, index, config }) => {
1111
const htmlvalidate = new HtmlValidate(config.modulesConfig[moduleName]);
12-
const validationResult = htmlvalidate.validateString(pageSource);
12+
const validationResult = await htmlvalidate.validateString(pageSource);
1313
const issueCount =
1414
validationResult.errorCount + validationResult.warningCount;
1515

src/utils/__tests__/config.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe("config", () => {
1616

1717
test("user config overrides default config", async () => {
1818
await expect(
19-
getConfig({ config: join(__dirname, "test-config.json") })
19+
getConfig({ config: join(__dirname, "test-config.json") }),
2020
).resolves.toEqual({
2121
...defaultConfig,
2222
maxConnections: 1,
@@ -29,7 +29,7 @@ describe("config", () => {
2929
getConfig({
3030
config: join(__dirname, "test-config.json"),
3131
modules: "axe-core",
32-
})
32+
}),
3333
).resolves.toEqual({
3434
...defaultConfig,
3535
maxConnections: 1,
@@ -42,7 +42,7 @@ describe("config", () => {
4242
await expect(
4343
getConfig({
4444
config: join(__dirname, "nonexisting-config.json"),
45-
})
45+
}),
4646
).resolves.toEqual(defaultConfig);
4747
});
4848
});

src/utils/code-highlight.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class NunjucksExtension {
3737
lang = code.language;
3838
}
3939
return new SafeString(
40-
this.wrap(`<code class="language-${lang}">${code.value}</code>`)
40+
this.wrap(`<code class="language-${lang}">${code.value}</code>`),
4141
);
4242
}
4343

src/utils/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ const getConfig = async (cliArguments = {}) => {
6060
defaultConfig,
6161
userConfig,
6262
argvConfig,
63-
configArrayCustomizer
63+
configArrayCustomizer,
6464
);
6565

6666
if (!["chromium", "firefox", "webkit"].includes(config.browser)) {
6767
// verify browser value
6868
throw new Error(
69-
`Unknown Playwright browser '${config.browser}'. Please use one of "chromium", "firefox" or "webkit".`
69+
`Unknown Playwright browser '${config.browser}'. Please use one of "chromium", "firefox" or "webkit".`,
7070
);
7171
}
7272

0 commit comments

Comments
 (0)