Skip to content

Commit 3639cb8

Browse files
committed
Revert "fix(deps): Upgrade puppeteer using cache utils (#540)"
This reverts commit f831eb1.
1 parent 7e39aaf commit 3639cb8

File tree

3 files changed

+38
-65
lines changed

3 files changed

+38
-65
lines changed

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"express": "^4.17.1",
3030
"html-minifier": "^4.0.0",
3131
"lighthouse": "^9.6.3",
32-
"puppeteer": "^19.5.2"
32+
"puppeteer": "^18.0.0"
3333
},
3434
"engines": {
3535
"node": ">=14.15 <19"

src/index.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import { join } from 'path';
2-
import { homedir } from 'os';
3-
41
import chalk from 'chalk';
52
import * as dotenv from 'dotenv';
63

@@ -12,21 +9,7 @@ import runAudit from './lib/run-audit/index.js';
129

1310
dotenv.config();
1411

15-
const puppeteerCacheDir = join(homedir(), '.cache', 'puppeteer');
16-
17-
export const onPreBuild = async ({ utils } = {}) => {
18-
console.log('Restoring Lighthouse cache...');
19-
// Puppeteer relies on a global cache since v19.x, which otherwise would not be persisted in Netlify builds
20-
await utils?.cache.restore(puppeteerCacheDir);
21-
console.log('Lighthouse cache restored');
22-
};
23-
2412
export const onPostBuild = async ({ constants, utils, inputs } = {}) => {
25-
// Persist Puppeteer cache for subsequent builds/plugin runs
26-
console.log('Persisting Lighthouse cache resources...');
27-
await utils?.cache.save(puppeteerCacheDir);
28-
console.log('Lighthouse cache resources persisted');
29-
3013
const { failBuild, show } = getUtils({ utils });
3114
let errorMetadata = [];
3215

0 commit comments

Comments
 (0)