diff --git a/.eslintrc.js b/.eslintrc.js index a119974e1fe..2c53f10bc4c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -142,7 +142,7 @@ module.exports = { '@typescript-eslint/ban-ts-ignore': 0, /** * This is the default options (as per - * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/ban-types.md), + * https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/docs/rules/ban-types.md), * * Unfortunately there's no way to */ diff --git a/README.md b/README.md index aab80dd1dee..38613e2fe95 100644 --- a/README.md +++ b/README.md @@ -181,7 +181,7 @@ const browser = await puppeteer.launch({ executablePath: '/path/to/Chrome' }); You can also use Puppeteer with Firefox Nightly (experimental support). See [`Puppeteer.launch()`](https://github.com/puppeteer/puppeteer/blob/v10.2.0/docs/api.md#puppeteerlaunchoptions) for more information. -See [`this article`](https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/) for a description of the differences between Chromium and Chrome. [`This article`](https://chromium.googlesource.com/chromium/src/+/master/docs/chromium_browser_vs_google_chrome.md) describes some differences for Linux users. +See [`this article`](https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/) for a description of the differences between Chromium and Chrome. [`This article`](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/chromium_browser_vs_google_chrome.md) describes some differences for Linux users. **3. Creates a fresh user profile** diff --git a/docs/api.md b/docs/api.md index 6d73a1c2457..353c5b8f475 100644 --- a/docs/api.md +++ b/docs/api.md @@ -565,7 +565,7 @@ This methods attaches Puppeteer to an existing browser instance. - `options` <[Object]> Set of configurable options to set on the browser. Can have the following fields: - `headless` <[boolean]> Whether to run browser in [headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome). Defaults to `true` unless the `devtools` option is `true`. - `args` <[Array]<[string]>> Additional arguments to pass to the browser instance. The list of Chromium flags can be found [here](http://peter.sh/experiments/chromium-command-line-switches/). - - `userDataDir` <[string]> Path to a [User Data Directory](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md). + - `userDataDir` <[string]> Path to a [User Data Directory](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/user_data_dir.md). - `devtools` <[boolean]> Whether to auto-open a DevTools panel for each tab. If this option is `true`, the `headless` option will be set `false`. - returns: <[Array]<[string]>> @@ -646,7 +646,7 @@ try { - `handleSIGHUP` <[boolean]> Close the browser process on SIGHUP. Defaults to `true`. - `timeout` <[number]> Maximum time in milliseconds to wait for the browser instance to start. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. - `dumpio` <[boolean]> Whether to pipe the browser process stdout and stderr into `process.stdout` and `process.stderr`. Defaults to `false`. - - `userDataDir` <[string]> Path to a [User Data Directory](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md). + - `userDataDir` <[string]> Path to a [User Data Directory](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/user_data_dir.md). - `env` <[Object]> Specify environment variables that will be visible to the browser. Defaults to `process.env`. - `devtools` <[boolean]> Whether to auto-open a DevTools panel for each tab. If this option is `true`, the `headless` option will be set `false`. - `pipe` <[boolean]> Connects to the browser over a pipe instead of a WebSocket. Defaults to `false`. @@ -5036,7 +5036,7 @@ The `CDPSession` instances are used to talk raw Chrome Devtools Protocol: Useful links: - Documentation on DevTools Protocol can be found here: [DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/). -- Getting Started with DevTools Protocol: https://github.com/aslushnikov/getting-started-with-cdp/blob/master/README.md +- Getting Started with DevTools Protocol: https://github.com/aslushnikov/getting-started-with-cdp/blob/HEAD/README.md ```js const client = await page.target().createCDPSession(); diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index dd3ceef3c29..64446217f9a 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -440,7 +440,7 @@ There's also another [simple guide](https://timleland.com/headless-chrome-on-her AWS Lambda [limits](https://docs.aws.amazon.com/lambda/latest/dg/limits.html) deployment package sizes to ~50MB. This presents challenges for running headless Chrome (and therefore Puppeteer) on Lambda. The community has put together a few resources that work around the issues: - https://github.com/alixaxel/chrome-aws-lambda (kept updated with the latest stable release of puppeteer) -- https://github.com/adieuadieu/serverless-chrome/blob/master/docs/chrome.md (serverless plugin - outdated) +- https://github.com/adieuadieu/serverless-chrome/blob/HEAD/docs/chrome.md (serverless plugin - outdated) ### Running Puppeteer on AWS EC2 instance running Amazon-Linux diff --git a/src/common/Connection.ts b/src/common/Connection.ts index 865e9833fb1..9b3a861fe0a 100644 --- a/src/common/Connection.ts +++ b/src/common/Connection.ts @@ -228,7 +228,7 @@ export const CDPSessionEmittedEvents = { * events can be subscribed to with `CDPSession.on` method. * * Useful links: {@link https://chromedevtools.github.io/devtools-protocol/ | DevTools Protocol Viewer} - * and {@link https://github.com/aslushnikov/getting-started-with-cdp/blob/master/README.md | Getting Started with DevTools Protocol}. + * and {@link https://github.com/aslushnikov/getting-started-with-cdp/blob/HEAD/README.md | Getting Started with DevTools Protocol}. * * @example * ```js diff --git a/src/common/Page.ts b/src/common/Page.ts index b2aa354d9eb..20d282e3643 100644 --- a/src/common/Page.ts +++ b/src/common/Page.ts @@ -501,7 +501,7 @@ export class Page extends EventEmitter { // We still want to attach to workers for emitting events. // We still want to attach to iframes so sessions may interact with them. // We detach from all other types out of an abundance of caution. - // See https://source.chromium.org/chromium/chromium/src/+/master:content/browser/devtools/devtools_agent_host_impl.cc?q=f:devtools%20-f:out%20%22::kTypePage%5B%5D%22&ss=chromium + // See https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/devtools_agent_host_impl.cc?ss=chromium&q=f:devtools%20-f:out%20%22::kTypePage%5B%5D%22 // for the complete list of available types. client .send('Target.detachFromTarget', { @@ -1098,7 +1098,7 @@ export class Page extends EventEmitter { * * TODO(@jackfranklin): We could fix this by using overloads like * DefinitelyTyped does: - * https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/puppeteer/index.d.ts#L114 + * https://github.com/DefinitelyTyped/DefinitelyTyped/blob/HEAD/types/puppeteer/index.d.ts#L114 */ ...args: unknown[] ) => ReturnType | Promise, diff --git a/src/node/LaunchOptions.ts b/src/node/LaunchOptions.ts index 52c81cf5193..6b3d9b25af1 100644 --- a/src/node/LaunchOptions.ts +++ b/src/node/LaunchOptions.ts @@ -30,7 +30,7 @@ export interface BrowserLaunchArgumentOptions { headless?: boolean; /** * Path to a user data directory. - * {@link https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md | see the Chromium docs} + * {@link https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/user_data_dir.md | see the Chromium docs} * for more info. */ userDataDir?: string; diff --git a/utils/fetch_devices.js b/utils/fetch_devices.js index f49a09124cd..4d255b5d39a 100755 --- a/utils/fetch_devices.js +++ b/utils/fetch_devices.js @@ -20,7 +20,7 @@ const fs = require('fs'); const path = require('path'); const puppeteer = require('..'); const DEVICES_URL = - 'https://raw.githubusercontent.com/ChromeDevTools/devtools-frontend/master/front_end/emulated_devices/module.json'; + 'https://raw.githubusercontent.com/ChromeDevTools/devtools-frontend/HEAD/front_end/emulated_devices/module.json'; const template = `/** * Copyright 2017 Google Inc. All rights reserved.