-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Scripts: Upgrade Puppeteer to v11 #36040
Conversation
Size Change: 0 B Total Size: 1.1 MB ℹ️ View Unchanged
|
add236c
to
fb6d3a7
Compare
fb6d3a7
to
0b75a95
Compare
0b75a95
to
2a6e093
Compare
CI is now green so this should be good to go. |
packages/e2e-test-utils/package.json
Outdated
}, | ||
"peerDependenciesMeta": { | ||
"puppeteer": { | ||
"optional": true |
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.
Is this the default behavior in npm7 or are we trying to keep the current behavior when we switch to npm7
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.
Yes, it's to make sure it doens't install puppeteer
in Gutenberg and in projects that use @wordpress/e2e-test-utils
together with @wordpress/scripts
that depends on puppeteer-core
.
Reading this makes me wonder why we have a "puppeteer" dependency then? Should it be "puppeteer-core"? What's the difference? |
Good point. For e2e test utils and e2e tests we can change it to
|
813feaf
to
dda064a
Compare
Description
This change is necessary to bring compatibility with npm 7 and 8. It's based on the work in #33892 (a78030a). npm 7 and above by default installs all peer dependencies and that causes issues because
@wordpres/scripts
usespuppeteer-core
instead ofpuppeteer
. The solution is to makepuppeteer
an optional dependency for WordPress packages.As part of the change, this PR also upgrades
puppeteer-core
to the latest version.How has this been tested?
npm run test-e2e
still works locally and on CI.Types of changes
Breaking change for some packages and an enhancement for
@wordpress/scripts
.Checklist:
*.native.js
files for terms that need renaming or removal).