Skip to content
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

Merged
merged 1 commit into from
Nov 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 66 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/e2e-test-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@

## Unreleased

### Breaking Changes

- The peer `puppeteer` dependency has been replaced with `puppeteer-core` requiring version `>=11` (see [Breaking Changes](https://github.com/puppeteer/puppeteer/releases/tag/v11.0.0), [#36040](https://github.com/WordPress/gutenberg/pull/36040)).

## 5.4.6 (2021-11-07)

### New Features

- Added `disablePageDialogAccept` - Disable auto-accepting dialogs enabled by `enablePageDialogAccept` [#35828](https://github.com/WordPress/gutenberg/pull/35828).

## 5.4.0 (2021-07-21)
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"peerDependencies": {
"jest": ">=26",
"puppeteer": ">=1.19.0"
"puppeteer-core": ">=11"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-test-utils/src/auto-accept-page-dialogs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @typedef {import('puppeteer').Dialog} Dialog */
/** @typedef {import('puppeteer-core').Dialog} Dialog */

/**
* Callback which automatically accepts dialog.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { first } from 'lodash';

/** @typedef {import('puppeteer').ElementHandle} ElementHandle */
/** @typedef {import('puppeteer-core').ElementHandle} ElementHandle */

/**
* Finds a sidebar panel with the provided title.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @typedef {import('puppeteer').ElementHandle} ElementHandle */
/** @typedef {import('puppeteer-core').ElementHandle} ElementHandle */

/**
* Finds the button responsible for toggling the sidebar panel with the provided title.
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-test-utils/src/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { last } from 'lodash';

/** @typedef {import('puppeteer').Page} Page */
/** @typedef {import('puppeteer-core').Page} Page */

/**
* Opens the preview page of an edited post.
Expand Down
4 changes: 4 additions & 0 deletions packages/e2e-tests/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Breaking Changes

- The peer `puppeteer` dependency has been replaced with `puppeteer-core` requiring version `>=11` (see [Breaking Changes](https://github.com/puppeteer/puppeteer/releases/tag/v11.0.0), [#36040](https://github.com/WordPress/gutenberg/pull/36040)).

## 2.5.0 (2021-09-09)

### New Features
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"peerDependencies": {
"jest": ">=26",
"jest-snapshot": ">=26",
"puppeteer": ">=1.19.0"
"puppeteer-core": ">=11"
},
"publishConfig": {
"access": "public"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
getEditedPostContent,
} from '@wordpress/e2e-test-utils';

/** @typedef {import('puppeteer').ElementHandle} ElementHandle */
/** @typedef {import('puppeteer-core').ElementHandle} ElementHandle */

describe( 'adding patterns', () => {
beforeEach( async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
pressKeyWithModifier,
} from '@wordpress/e2e-test-utils';

/** @typedef {import('puppeteer').ElementHandle} ElementHandle */
/** @typedef {import('puppeteer-core').ElementHandle} ElementHandle */

/**
* Waits for all patterns in the inserter to have a height, which should
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/specs/editor/various/preview.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
pressKeyWithModifier,
} from '@wordpress/e2e-test-utils';

/** @typedef {import('puppeteer').Page} Page */
/** @typedef {import('puppeteer-core').Page} Page */

/**
* Given the Page instance for the editor, opens preview drodpdown, and
Expand Down
4 changes: 4 additions & 0 deletions packages/jest-puppeteer-axe/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Breaking Changes

- The peer `puppeteer` dependency has been updated from requiring `>=1.19` to requiring `>=11` (see [Breaking Changes](https://github.com/puppeteer/puppeteer/releases/tag/v11.0.0), [#36040](https://github.com/WordPress/gutenberg/pull/36040)).

## 3.0.0 (2021-01-21)

### Breaking Changes
Expand Down
7 changes: 6 additions & 1 deletion packages/jest-puppeteer-axe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@
},
"peerDependencies": {
"jest": ">=26",
"puppeteer": ">=1.19.0"
"puppeteer": ">=11"
},
"peerDependenciesMeta": {
"puppeteer": {
"optional": true
}
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-puppeteer-axe/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import AxePuppeteer from '@axe-core/puppeteer';

/** @typedef {import('puppeteer').Page} Page */
/** @typedef {import('puppeteer-core').Page} Page */

/** @typedef {import('axe-core').RunOptions} RunOptions */

Expand Down
6 changes: 5 additions & 1 deletion packages/scripts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

## Unreleased

### Breaking Changes

- The `puppeteer-core` dependency has been updated from requiring `^10.1.0` to requiring `^11.0.0` (see [Breaking Changes](https://github.com/puppeteer/puppeteer/releases/tag/v11.0.0), [#36040](https://github.com/WordPress/gutenberg/pull/36040)).

### Bug Fixes

- Prevent the `CleanWebpackPlugin` plugin from deleting webpack assets during multi-configuration builds [#35980](https://github.com/WordPress/gutenberg/issues/35980).
- Prevent the `CleanWebpackPlugin` plugin from deleting webpack assets during multi-configuration builds [#35980](https://github.com/WordPress/gutenberg/issues/35980).

## 19.2.0 (2021-11-15)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ async function readConfig() {
function getPuppeteer( { browser } ) {
switch ( browser.toLowerCase() ) {
case 'chromium':
try {
return require( 'puppeteer' );
} catch ( e ) {
return require( 'puppeteer-core' );
}
return require( 'puppeteer-core' );
case 'firefox':
return require( 'puppeteer-firefox' );
default:
Expand Down
2 changes: 1 addition & 1 deletion packages/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"postcss": "^8.2.15",
"postcss-loader": "^6.1.1",
"prettier": "npm:[email protected]",
"puppeteer-core": "^10.1.0",
"puppeteer-core": "^11.0.0",
"read-pkg-up": "^1.0.1",
"resolve-bin": "^0.4.0",
"sass": "^1.35.2",
Expand Down