-
Notifications
You must be signed in to change notification settings - Fork 33
fix(deps): Upgrade puppeteer using cache utils #540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
👷 Deploy Preview for plugin-lighthouse processing.
|
|
||
export const onPreBuild = async ({ utils } = {}) => { | ||
// Puppeteer relies on a global cache since v19.x, which otherwise would not be persisted in Netlify builds | ||
await utils?.cache.restore(puppeteerCacheDir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing is logged out during this step by default - I'm not sure if we want to add a simple console log here/when we save the cache, just for info... what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woo! Working great 💯
I think a couple more log lines could be nice, but happy either way
|
||
export const onPreBuild = async ({ utils } = {}) => { | ||
// Puppeteer relies on a global cache since v19.x, which otherwise would not be persisted in Netlify builds | ||
await utils?.cache.restore(puppeteerCacheDir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay! messaging looks good 🚀
This reverts commit f831eb1.
Closes https://github.com/netlify/netlify-plugin-lighthouse/issues/510
Upgrades puppeteer, working around the new caching behaviour by making sure the puppeteer cache is saved/restored on each build.
Internal test steps: