Skip to content

Commit 274fd21

Browse files
authored
Merge pull request #22491 from qmonmert/lighthouse1020
bump lighthouse from 9.6.8 to 10.2.0
2 parents c884633 + b18606e commit 274fd21

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

generators/client/resources/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"cypress": "12.14.0",
1010
"cypress-audit": "1.1.0",
1111
"eslint-plugin-cypress": "2.13.3",
12-
"lighthouse": "9.6.8",
12+
"lighthouse": "10.2.0",
1313
"nyc": "15.1.0",
1414
"swagger-ui-dist": "4.19.0"
1515
}

generators/cypress/templates/src/test/javascript/cypress/plugins/index.ts.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
<%_ if (cypressAudit) { _%>
3232
import { existsSync, mkdirSync, writeFileSync } from 'fs';
3333
import { lighthouse, pa11y, prepareAudit } from 'cypress-audit';
34-
import ReportGenerator from 'lighthouse/report/generator/report-generator';
3534
<%_ } _%>
3635

3736
export default async (on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions) => {
@@ -59,7 +58,8 @@ export default async (on: Cypress.PluginEvents, config: Cypress.PluginConfigOpti
5958

6059
<%_ if (cypressAudit) { _%>
6160
on('task', {
62-
lighthouse: lighthouse((lighthouseReport) => {
61+
lighthouse: lighthouse(async (lighthouseReport) => {
62+
const { default: ReportGenerator } = await import('lighthouse/report/generator/report-generator');
6363
!existsSync('<%= cypressTemporaryDir %>') && mkdirSync('<%= cypressTemporaryDir %>', { recursive: true });
6464
writeFileSync('<%= cypressTemporaryDir %>lhreport.html', ReportGenerator.generateReport(lighthouseReport.lhr, 'html'));
6565
}),

0 commit comments

Comments
 (0)