Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit e744102

Browse files
authored
Fix page audit script (#1222)
Fixes the page audit script that has been broken for a while now. To do this, I had to update to the latest versions of `lighthouse` and `puppeteer`. This in turn meant that I had to convert `lighthouse-audit.js` to ESM, because `lighthouse` started using ESM as well.
1 parent 7aae145 commit e744102

File tree

8 files changed

+875
-636
lines changed

8 files changed

+875
-636
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Input hashes for repository rule npm_translate_lock(name = "npm", pnpm_lock = "//:pnpm-lock.yaml").
22
# This file should be checked into version control along with the pnpm-lock.yaml file.
33
.npmrc=-1306950124
4-
pnpm-lock.yaml=897100486
5-
yarn.lock=301484834
6-
package.json=-1393640632
4+
pnpm-lock.yaml=-1236521065
5+
yarn.lock=86022894
6+
package.json=1192278631

.circleci/config.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
version: 2.1
1212

1313
orbs:
14-
browser-tools: circleci/[email protected].0
14+
browser-tools: circleci/[email protected].4
1515
devinfra: angular/[email protected]
1616

1717
# Cache key for CircleCI. We want to invalidate the cache whenever the Yarn lock file changes.
1818
var_1: &cache_key material-angular-io-{{ .Branch }}-{{ checksum "yarn.lock" }}
19-
var_2: &default_docker_image cimg/node:16.17.1-browsers
19+
var_2: &default_docker_image cimg/node:18.17.1-browsers
2020

2121
# Settings common to each job
2222
var_3: &job_defaults
@@ -97,10 +97,15 @@ jobs:
9797
- attach_workspace:
9898
at: *workspace_location
9999
- checkout
100+
- browser-tools/install-chrome
100101
- restore_cache:
101102
key: *cache_key
102103
- *yarn_install
103-
- run: yarn test:audit:ci
104+
- browser-tools/install-browser-tools
105+
- run:
106+
command: yarn test:audit:ci
107+
environment:
108+
CHROMIUM_BIN: '/usr/bin/google-chrome'
104109

105110
bazel-build:
106111
<<: *job_defaults

BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ js_test(
5555
"$(location //:build.production)",
5656
],
5757
data = [
58-
"tools/lighthouse-audit.js",
58+
"tools/lighthouse-audit.mjs",
5959
"//:build.production",
6060
"//:node_modules/lighthouse",
6161
"//:node_modules/lighthouse-logger",

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@
8888
"karma-jasmine": "^4.0.1",
8989
"karma-jasmine-html-reporter": "^1.5.4",
9090
"light-server": "^2.9.1",
91-
"lighthouse": "~7.2.0",
91+
"lighthouse": "~11.0.0",
9292
"lighthouse-logger": "~1.2.0",
9393
"npm-run-all": "^4.1.5",
9494
"protractor": "^7.0.0",
95-
"puppeteer": "~8.0.0",
95+
"puppeteer": "~21.1.0",
9696
"shelljs": "^0.8.4",
9797
"ts-node": "^8.10.2",
9898
"typescript": "~5.1.3"

0 commit comments

Comments
 (0)