diff --git a/docs/contributing.md b/docs/contributing.md index c636924996852..c6b9c4a0d8d7d 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -244,9 +244,7 @@ ensure this, the main `test` command runs coverage during testing. ## Debugging Puppeteer -See -[Debugging Tips](https://github.com/puppeteer/puppeteer/blob/main/README.md#debugging-tips) -in the readme. +See [Debugging Tips](https://pptr.dev/guides/debugging). # For Project Maintainers @@ -262,6 +260,8 @@ 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. + You can find the corresponding version by going to [omahaproxy.appspot.com](https://omahaproxy.appspot.com/) then + searching in `Find Releases` for `r`. 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. @@ -272,7 +272,7 @@ The following steps are needed to update the Chromium version. change) or work around the changes in Puppeteer (if it’s not desirable to change Puppeteer’s observable behavior). 7. Commit and push your changes and open a pull request. The commit message must - contain the version in `Chromium ()` format to ensure + contain the version in `Chromium (r)` format to ensure that [pptr.dev](https://pptr.dev/) can parse it correctly, e.g. `'feat(chromium): roll to Chromium 90.0.4427.0 (r856583)'`. diff --git a/package-lock.json b/package-lock.json index cada0861453b8..887190f60cc2c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3299,9 +3299,9 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1056733", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1056733.tgz", - "integrity": "sha512-CmTu6SQx2g3TbZzDCAV58+LTxVdKplS7xip0g5oDXpZ+isr0rv5dDP8ToyVRywzPHkCCPKgKgScEcwz4uPWDIA==" + "version": "0.0.1068969", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1068969.tgz", + "integrity": "sha512-ATFTrPbY1dKYhPPvpjtwWKSK2mIwGmRwX54UASn9THEuIZCe2n9k3vVuMmt6jWeL+e5QaaguEv/pMyR+JQB7VQ==" }, "node_modules/diff": { "version": "5.1.0", @@ -8776,7 +8776,7 @@ "license": "Apache-2.0", "dependencies": { "cosmiconfig": "8.0.0", - "devtools-protocol": "0.0.1056733", + "devtools-protocol": "0.0.1068969", "https-proxy-agent": "5.0.1", "progress": "2.0.3", "proxy-from-env": "1.1.0", @@ -8792,7 +8792,7 @@ "dependencies": { "cross-fetch": "3.1.5", "debug": "4.3.4", - "devtools-protocol": "0.0.1056733", + "devtools-protocol": "0.0.1068969", "extract-zip": "2.0.1", "https-proxy-agent": "5.0.1", "proxy-from-env": "1.1.0", @@ -11132,9 +11132,9 @@ } }, "devtools-protocol": { - "version": "0.0.1056733", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1056733.tgz", - "integrity": "sha512-CmTu6SQx2g3TbZzDCAV58+LTxVdKplS7xip0g5oDXpZ+isr0rv5dDP8ToyVRywzPHkCCPKgKgScEcwz4uPWDIA==" + "version": "0.0.1068969", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1068969.tgz", + "integrity": "sha512-ATFTrPbY1dKYhPPvpjtwWKSK2mIwGmRwX54UASn9THEuIZCe2n9k3vVuMmt6jWeL+e5QaaguEv/pMyR+JQB7VQ==" }, "diff": { "version": "5.1.0", @@ -13829,7 +13829,7 @@ "version": "file:packages/puppeteer", "requires": { "cosmiconfig": "8.0.0", - "devtools-protocol": "0.0.1056733", + "devtools-protocol": "0.0.1068969", "https-proxy-agent": "5.0.1", "progress": "2.0.3", "proxy-from-env": "1.1.0", @@ -13867,7 +13867,7 @@ "requires": { "cross-fetch": "3.1.5", "debug": "4.3.4", - "devtools-protocol": "0.0.1056733", + "devtools-protocol": "0.0.1068969", "extract-zip": "2.0.1", "https-proxy-agent": "5.0.1", "proxy-from-env": "1.1.0", diff --git a/packages/puppeteer-core/package.json b/packages/puppeteer-core/package.json index da87ca0979be3..8b9b053826ec5 100644 --- a/packages/puppeteer-core/package.json +++ b/packages/puppeteer-core/package.json @@ -152,7 +152,7 @@ "dependencies": { "cross-fetch": "3.1.5", "debug": "4.3.4", - "devtools-protocol": "0.0.1056733", + "devtools-protocol": "0.0.1068969", "extract-zip": "2.0.1", "https-proxy-agent": "5.0.1", "proxy-from-env": "1.1.0", diff --git a/packages/puppeteer-core/src/node/ChromeLauncher.ts b/packages/puppeteer-core/src/node/ChromeLauncher.ts index 21df6aa3aabe5..6873ef6997a3b 100644 --- a/packages/puppeteer-core/src/node/ChromeLauncher.ts +++ b/packages/puppeteer-core/src/node/ChromeLauncher.ts @@ -204,7 +204,7 @@ export class ChromeLauncher extends ProductLauncher { } if (headless) { chromeArguments.push( - headless === 'chrome' ? '--headless=chrome' : '--headless', + headless === 'new' ? '--headless=new' : '--headless', '--hide-scrollbars', '--mute-audio' ); diff --git a/packages/puppeteer-core/src/node/LaunchOptions.ts b/packages/puppeteer-core/src/node/LaunchOptions.ts index ab10642d1bb1e..af7847a60b5af 100644 --- a/packages/puppeteer-core/src/node/LaunchOptions.ts +++ b/packages/puppeteer-core/src/node/LaunchOptions.ts @@ -27,7 +27,7 @@ export interface BrowserLaunchArgumentOptions { * Whether to run the browser in headless mode. * @defaultValue true */ - headless?: boolean | 'chrome'; + headless?: boolean | 'new'; /** * Path to a user data directory. * {@link https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/user_data_dir.md | see the Chromium docs} diff --git a/packages/puppeteer-core/src/revisions.ts b/packages/puppeteer-core/src/revisions.ts index c874cacec36de..52cbe99a80cb5 100644 --- a/packages/puppeteer-core/src/revisions.ts +++ b/packages/puppeteer-core/src/revisions.ts @@ -18,6 +18,6 @@ * @internal */ export const PUPPETEER_REVISIONS = Object.freeze({ - chromium: '1056772', + chromium: '1069273', firefox: 'latest', }); diff --git a/packages/puppeteer/package.json b/packages/puppeteer/package.json index e7e711fc5508f..d8823f3384ace 100644 --- a/packages/puppeteer/package.json +++ b/packages/puppeteer/package.json @@ -123,7 +123,7 @@ "license": "Apache-2.0", "dependencies": { "cosmiconfig": "8.0.0", - "devtools-protocol": "0.0.1056733", + "devtools-protocol": "0.0.1068969", "https-proxy-agent": "5.0.1", "progress": "2.0.3", "proxy-from-env": "1.1.0", diff --git a/test/TestExpectations.json b/test/TestExpectations.json index 22331e47605a9..e64e72309c509 100644 --- a/test/TestExpectations.json +++ b/test/TestExpectations.json @@ -2039,18 +2039,6 @@ "parameters": ["chrome"], "expectations": ["PASS", "FAIL"] }, - { - "testIdPattern": "[navigation.spec] navigation Page.goto should fail when navigating to bad SSL", - "platforms": ["darwin"], - "parameters": ["chrome", "headful"], - "expectations": ["FAIL"] - }, - { - "testIdPattern": "[navigation.spec] navigation Page.goto should fail when navigating to bad SSL after redirects", - "platforms": ["darwin"], - "parameters": ["chrome", "headful"], - "expectations": ["FAIL"] - }, { "testIdPattern": "[click.spec] Page.click should click on checkbox input and toggle", "platforms": ["linux"], diff --git a/test/src/browser.spec.ts b/test/src/browser.spec.ts index 375b3dba934fa..ce719e4149f10 100644 --- a/test/src/browser.spec.ts +++ b/test/src/browser.spec.ts @@ -27,7 +27,7 @@ describe('Browser specs', function () { const version = await browser.version(); expect(version.length).toBeGreaterThan(0); expect(version.startsWith('Headless')).toBe( - isHeadless && headless !== 'chrome' + isHeadless && headless !== 'new' ); }); }); diff --git a/test/src/mocha-utils.ts b/test/src/mocha-utils.ts index 56da13b6d3a2a..6d30961d1cd4e 100644 --- a/test/src/mocha-utils.ts +++ b/test/src/mocha-utils.ts @@ -66,7 +66,7 @@ const product = const alternativeInstall = process.env['PUPPETEER_ALT_INSTALL'] || false; const headless = (process.env['HEADLESS'] || 'true').trim().toLowerCase(); -const isHeadless = headless === 'true' || headless === 'chrome'; +const isHeadless = headless === 'true' || headless === 'new'; const isFirefox = product === 'firefox'; const isChrome = product === 'chrome'; const protocol = process.env['PUPPETEER_PROTOCOL'] || 'cdp'; @@ -88,7 +88,7 @@ const defaultBrowserOptions = Object.assign( { handleSIGINT: true, executablePath: process.env['BINARY'], - headless: headless === 'chrome' ? ('chrome' as const) : isHeadless, + headless: headless === 'new' ? ('new' as const) : isHeadless, dumpio: !!process.env['DUMPIO'], protocol: protocol as 'cdp' | 'webDriverBiDi', }, @@ -172,8 +172,8 @@ if ( } -> mode: ${ isHeadless - ? headless === 'chrome' - ? '--headless=chrome' + ? headless === 'new' + ? '--headless=new' : '--headless' : 'headful' }` diff --git a/tools/mochaRunner/src/main.ts b/tools/mochaRunner/src/main.ts index 08770b94732ab..38f0d3b6f7b02 100644 --- a/tools/mochaRunner/src/main.ts +++ b/tools/mochaRunner/src/main.ts @@ -180,7 +180,7 @@ async function main() { fail = true; recommendations.push(...recommendation); } else { - console.log('Test run matches expecations'); + console.log('Test run matches expectations'); continue; } } catch (err) { @@ -197,7 +197,7 @@ async function main() { }); if (toAdd.length) { console.log( - 'Add the following to TestExpecations.json to ignore the error:' + 'Add the following to TestExpectations.json to ignore the error:' ); prettyPrintJSON( toAdd.map(item => { @@ -210,7 +210,7 @@ async function main() { }); if (toRemove.length) { console.log( - 'Remove the following from the TestExpecations.json to ignore the error:' + 'Remove the following from the TestExpectations.json to ignore the error:' ); prettyPrintJSON( toRemove.map(item => { diff --git a/versions.js b/versions.js index 8a25bfc5fbbb5..4d5007050c823 100644 --- a/versions.js +++ b/versions.js @@ -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. + ['109.0.5412.0', 'NEXT'], ['108.0.5351.0', 'v19.2.0'], ['107.0.5296.0', 'v18.1.0'], ['106.0.5249.0', 'v17.1.0'], @@ -52,8 +53,8 @@ const versionsPerRelease = new Map([ ['73.0.3679.0', 'v1.12.2'], ]); -// The same major version as the current Chrome Stable per https://chromestatus.com/roadmap. -const lastMaintainedChromiumVersion = '106.0.5249.0'; +// Should not be more then 2 major versions behind Chrome Stable (https://chromestatus.com/roadmap). +const lastMaintainedChromiumVersion = '107.0.5296.0'; if (!versionsPerRelease.has(lastMaintainedChromiumVersion)) { throw new Error(