feat(chromium): roll to Chromium 108.0.5351.0 (r1056772) (#9153)

This commit is contained in:
Alex Rudenko 2022-10-25 12:55:19 +02:00 committed by GitHub
parent fe4fcf6019
commit e78a4e89c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 31 additions and 32 deletions

View File

@ -266,9 +266,9 @@ The following steps are needed to update the Chromium version.
number.
3. Update `versions.js` with the new Chromium-to-Puppeteer version mapping and
update `lastMaintainedChromiumVersion` with the latest stable Chrome version.
4. Run `npm run check:protocol-revision`. If it fails, update `package.json`
4. Run `npm run check`. If it fails, update `packages/puppeteer-core/package.json` and `packages/puppeteer/package.json`
with the expected `devtools-protocol` version.
5. Run `npm run build` and `npm install`.
5. Run `npm run clean`, `npm run build` and `npm install`.
6. Run `npm test` and ensure that all tests pass. If a test fails,
[bisect](#bisecting-upstream-changes) the upstream cause of the failure, and
either update the test expectations accordingly (if it was an intended

18
package-lock.json generated
View File

@ -3041,9 +3041,9 @@
}
},
"node_modules/devtools-protocol": {
"version": "0.0.1045489",
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1045489.tgz",
"integrity": "sha512-D+PTmWulkuQW4D1NTiCRCFxF7pQPn0hgp4YyX4wAQ6xYXKOadSWPR3ENGDQ47MW/Ewc9v2rpC/UEEGahgBYpSQ=="
"version": "0.0.1056733",
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1056733.tgz",
"integrity": "sha512-CmTu6SQx2g3TbZzDCAV58+LTxVdKplS7xip0g5oDXpZ+isr0rv5dDP8ToyVRywzPHkCCPKgKgScEcwz4uPWDIA=="
},
"node_modules/diff": {
"version": "5.1.0",
@ -8469,6 +8469,7 @@
"license": "Apache-2.0",
"dependencies": {
"cosmiconfig": "7.0.1",
"devtools-protocol": "0.0.1056733",
"https-proxy-agent": "5.0.1",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",
@ -8484,7 +8485,7 @@
"dependencies": {
"cross-fetch": "3.1.5",
"debug": "4.3.4",
"devtools-protocol": "0.0.1045489",
"devtools-protocol": "0.0.1056733",
"extract-zip": "2.0.1",
"https-proxy-agent": "5.0.1",
"proxy-from-env": "1.1.0",
@ -10616,9 +10617,9 @@
}
},
"devtools-protocol": {
"version": "0.0.1045489",
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1045489.tgz",
"integrity": "sha512-D+PTmWulkuQW4D1NTiCRCFxF7pQPn0hgp4YyX4wAQ6xYXKOadSWPR3ENGDQ47MW/Ewc9v2rpC/UEEGahgBYpSQ=="
"version": "0.0.1056733",
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1056733.tgz",
"integrity": "sha512-CmTu6SQx2g3TbZzDCAV58+LTxVdKplS7xip0g5oDXpZ+isr0rv5dDP8ToyVRywzPHkCCPKgKgScEcwz4uPWDIA=="
},
"diff": {
"version": "5.1.0",
@ -13298,6 +13299,7 @@
"version": "file:packages/puppeteer",
"requires": {
"cosmiconfig": "7.0.1",
"devtools-protocol": "0.0.1056733",
"https-proxy-agent": "5.0.1",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",
@ -13309,7 +13311,7 @@
"requires": {
"cross-fetch": "3.1.5",
"debug": "4.3.4",
"devtools-protocol": "0.0.1045489",
"devtools-protocol": "0.0.1056733",
"extract-zip": "2.0.1",
"https-proxy-agent": "5.0.1",
"proxy-from-env": "1.1.0",

View File

@ -152,7 +152,7 @@
"dependencies": {
"cross-fetch": "3.1.5",
"debug": "4.3.4",
"devtools-protocol": "0.0.1045489",
"devtools-protocol": "0.0.1056733",
"extract-zip": "2.0.1",
"https-proxy-agent": "5.0.1",
"proxy-from-env": "1.1.0",

View File

@ -2533,14 +2533,8 @@ export class CDPPage extends Page {
targetId: this.#target._targetId,
});
let clip = options.clip ? processClip(options.clip) : undefined;
const captureBeyondViewport =
typeof options.captureBeyondViewport === 'boolean'
? options.captureBeyondViewport
: true;
const fromSurface =
typeof options.fromSurface === 'boolean'
? options.fromSurface
: undefined;
let captureBeyondViewport = options.captureBeyondViewport ?? true;
const fromSurface = options.fromSurface;
if (options.fullPage) {
const metrics = await this.#client.send('Page.getLayoutMetrics');
@ -2548,7 +2542,7 @@ export class CDPPage extends Page {
const {width, height} = metrics.cssContentSize || metrics.contentSize;
// Overwrite clip for full page.
clip = {x: 0, y: 0, width, height, scale: 1};
clip = undefined;
if (!captureBeyondViewport) {
const {
@ -2568,7 +2562,10 @@ export class CDPPage extends Page {
screenOrientation,
});
}
} else if (!clip) {
captureBeyondViewport = false;
}
const shouldSetDefaultBackground =
options.omitBackground && (format === 'png' || format === 'webp');
if (shouldSetDefaultBackground) {
@ -2578,12 +2575,10 @@ export class CDPPage extends Page {
const result = await this.#client.send('Page.captureScreenshot', {
format,
quality: options.quality,
clip: clip
? {
clip: clip && {
...clip,
scale: clip.scale === undefined ? 1 : clip.scale,
}
: undefined,
scale: clip.scale ?? 1,
},
captureBeyondViewport,
fromSurface,
});

View File

@ -18,6 +18,6 @@
* @internal
*/
export const PUPPETEER_REVISIONS = Object.freeze({
chromium: '1045629',
chromium: '1056772',
firefox: 'latest',
});

View File

@ -136,6 +136,7 @@
"license": "Apache-2.0",
"dependencies": {
"cosmiconfig": "7.0.1",
"devtools-protocol": "0.0.1056733",
"https-proxy-agent": "5.0.1",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

View File

@ -278,7 +278,7 @@ describe('Accessibility', function () {
children: [
{
role: 'text leaf',
name: 'Edit this image: ',
name: 'Edit this image:',
},
{
role: 'StaticText',
@ -293,7 +293,7 @@ describe('Accessibility', function () {
children: [
{
role: 'StaticText',
name: 'Edit this image:',
name: 'Edit this image: ',
},
{
role: 'img',
@ -334,7 +334,7 @@ describe('Accessibility', function () {
children: [
{
role: 'StaticText',
name: 'Edit this image:',
name: 'Edit this image: ',
},
],
};

View File

@ -248,7 +248,7 @@ async function checkRangeAvailability({
}
const fetchers = platforms.map(platform => {
return new BrowserFetcher('', {platform});
return new BrowserFetcher({platform});
});
const inc = fromRevision < toRevision ? 1 : -1;

View File

@ -17,6 +17,7 @@
const versionsPerRelease = new Map([
// This is a mapping from Chromium version => Puppeteer version.
// In Chromium roll patches, use `NEXT` for the Puppeteer version.
['108.0.5351.0', 'NEXT'],
['107.0.5296.0', 'v18.1.0'],
['106.0.5249.0', 'v17.1.0'],
['105.0.5173.0', 'v15.5.0'],
@ -52,7 +53,7 @@ const versionsPerRelease = new Map([
]);
// The same major version as the current Chrome Stable per https://chromestatus.com/roadmap.
const lastMaintainedChromiumVersion = '103.0.5059.0';
const lastMaintainedChromiumVersion = '106.0.5249.0';
if (!versionsPerRelease.has(lastMaintainedChromiumVersion)) {
throw new Error(