docs: update website deps and fix some broken links (#11631)

This commit is contained in:
Nikolay Vitkov 2024-01-05 09:28:39 +01:00 committed by GitHub
parent 6e87444471
commit e8b501de6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 404 additions and 671 deletions

View File

@ -6,7 +6,7 @@ sidebar_label: Browser.isConnected
> Warning: This API is now obsolete.
>
> Use [Browser.connected](./puppeteer.browser.connected.md).
> Use [Browser.connected](./puppeteer.browser.md).
Whether Puppeteer is connected to this [browser](./puppeteer.browser.md).

View File

@ -6,7 +6,7 @@ sidebar_label: Page.isDragInterceptionEnabled
> Warning: This API is now obsolete.
>
> We no longer support intercepting drag payloads. Use the new drag APIs found on [ElementHandle](./puppeteer.elementhandle.md) to drag (or just use the [Page.mouse](./puppeteer.page.mouse.md)).
> We no longer support intercepting drag payloads. Use the new drag APIs found on [ElementHandle](./puppeteer.elementhandle.md) to drag (or just use the [Page.mouse](./puppeteer.page.md)).
`true` if drag events are being intercepted, `false` otherwise.

View File

@ -151,7 +151,7 @@ page.off('request', logRequest);
| [title()](./puppeteer.page.title.md) | | The page's title |
| [type(selector, text, options)](./puppeteer.page.type.md) | | <p>Sends a <code>keydown</code>, <code>keypress/input</code>, and <code>keyup</code> event for each character in the text.</p><p>To press a special key, like <code>Control</code> or <code>ArrowDown</code>, use [Keyboard.press()](./puppeteer.keyboard.press.md).</p> |
| [url()](./puppeteer.page.url.md) | | The page's URL. |
| [viewport()](./puppeteer.page.viewport.md) | | <p>Returns the current page viewport settings without checking the actual page viewport.</p><p>This is either the viewport set with the previous [Page.setViewport()](./puppeteer.page.setviewport.md) call or the default viewport set via [BrowserConnectOptions.defaultViewport](./puppeteer.browserconnectoptions.defaultviewport.md).</p> |
| [viewport()](./puppeteer.page.viewport.md) | | <p>Returns the current page viewport settings without checking the actual page viewport.</p><p>This is either the viewport set with the previous [Page.setViewport()](./puppeteer.page.setviewport.md) call or the default viewport set via [BrowserConnectOptions.defaultViewport](./puppeteer.browserconnectoptions.md).</p> |
| [waitForDevicePrompt(options)](./puppeteer.page.waitfordeviceprompt.md) | | <p>This method is typically coupled with an action that triggers a device request from an api such as WebBluetooth.</p><p>:::caution</p><p>This must be called before the device request is made. It will not return a currently active device prompt.</p><p>:::</p> |
| [waitForFileChooser(options)](./puppeteer.page.waitforfilechooser.md) | | <p>This method is typically coupled with an action that triggers file choosing.</p><p>:::caution</p><p>This must be called before the file chooser is launched. It will not return a currently active file chooser.</p><p>:::</p> |
| [waitForFrame(urlOrPredicate, options)](./puppeteer.page.waitforframe.md) | | Waits for a frame matching the given conditions to appear. |

View File

@ -6,7 +6,7 @@ sidebar_label: Page.setDragInterception
> Warning: This API is now obsolete.
>
> We no longer support intercepting drag payloads. Use the new drag APIs found on [ElementHandle](./puppeteer.elementhandle.md) to drag (or just use the [Page.mouse](./puppeteer.page.mouse.md)).
> We no longer support intercepting drag payloads. Use the new drag APIs found on [ElementHandle](./puppeteer.elementhandle.md) to drag (or just use the [Page.mouse](./puppeteer.page.md)).
#### Signature:

View File

@ -6,7 +6,7 @@ sidebar_label: Page.viewport
Returns the current page viewport settings without checking the actual page viewport.
This is either the viewport set with the previous [Page.setViewport()](./puppeteer.page.setviewport.md) call or the default viewport set via [BrowserConnectOptions.defaultViewport](./puppeteer.browserconnectoptions.defaultviewport.md).
This is either the viewport set with the previous [Page.setViewport()](./puppeteer.page.setviewport.md) call or the default viewport set via [BrowserConnectOptions.defaultViewport](./puppeteer.browserconnectoptions.md).
#### Signature:

View File

@ -54,8 +54,8 @@ const browser = await puppeteer.launch({
### Capture `console.*` output
Since client code runs in the browser, doing `console.*` in client code will not
directly log to Node.js. However, you can [listen](../api/puppeteer.page.on) for
the [`console`](../api/puppeteer.pageeventobject) event which returns a
directly log to Node.js. However, you can [listen (page.on)](../api/puppeteer.page) for
the [`console`](../api/puppeteer.pageevents) event which returns a
payload with the logged text.
```ts

View File

@ -409,7 +409,7 @@ export abstract class Browser extends EventEmitter<BrowserEvents> {
/**
* Whether Puppeteer is connected to this {@link Browser | browser}.
*
* @deprecated Use {@link Browser.connected}.
* @deprecated Use {@link Browser | Browser.connected}.
*/
isConnected(): boolean {
return this.connected;

View File

@ -609,7 +609,7 @@ export abstract class Page extends EventEmitter<PageEvents> {
*
* @deprecated We no longer support intercepting drag payloads. Use the new
* drag APIs found on {@link ElementHandle} to drag (or just use the
* {@link Page.mouse}).
* {@link Page | Page.mouse}).
*/
abstract isDragInterceptionEnabled(): boolean;
@ -838,7 +838,7 @@ export abstract class Page extends EventEmitter<PageEvents> {
*
* @deprecated We no longer support intercepting drag payloads. Use the new
* drag APIs found on {@link ElementHandle} to drag (or just use the
* {@link Page.mouse}).
* {@link Page | Page.mouse}).
*/
abstract setDragInterception(enabled: boolean): Promise<void>;
@ -2057,7 +2057,7 @@ export abstract class Page extends EventEmitter<PageEvents> {
*
* This is either the viewport set with the previous {@link Page.setViewport}
* call or the default viewport set via
* {@link BrowserConnectOptions.defaultViewport}.
* {@link BrowserConnectOptions | BrowserConnectOptions.defaultViewport}.
*/
abstract viewport(): Viewport | null;

View File

@ -16,8 +16,7 @@
* necessary.
*/
try {
const {downloadBrowser} = await (async () => {
async function importInstaller() {
try {
return await import('puppeteer/internal/node/install.js');
} catch {
@ -26,7 +25,10 @@ try {
);
process.exit(0);
}
})();
}
try {
const {downloadBrowser} = await importInstaller();
downloadBrowser();
} catch (error) {
console.warn('Browser download failed', error);

1009
website/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -15,18 +15,20 @@
"archive": "node archive.js"
},
"dependencies": {
"@docusaurus/core": "3.0.0",
"@docusaurus/plugin-client-redirects": "3.0.0",
"@docusaurus/preset-classic": "3.0.0",
"@docusaurus/core": "3.0.1",
"@docusaurus/plugin-client-redirects": "3.0.1",
"@docusaurus/preset-classic": "3.0.1",
"@mdx-js/react": "3.0.0",
"clsx": "1.2.1",
"prism-react-renderer": "2.1.0",
"semver": "7.5.4",
"clsx": "2.1.0",
"prism-react-renderer": "2.3.1",
"react": "18.2.0",
"react-dom": "18.2.0"
"react-dom": "18.2.0",
"semver": "7.5.4"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.0.0",
"@docusaurus/module-type-aliases": "3.0.1",
"@docusaurus/types": "3.0.1",
"@swc/core": "1.3.102",
"swc-loader": "0.2.3"
},
"browserslist": {

View File

@ -14,7 +14,7 @@ import translations from '@theme/SearchTranslations';
import React, {useState, useRef, useCallback, useMemo} from 'react';
import {createPortal} from 'react-dom';
// eslint-disable-next-line import/extensions
// eslint-disable-next-line rulesdir/extensions
import {tagToCounter} from '../SearchMetadata';
let DocSearchModal = null;
function Hit({hit, children}) {

View File

@ -18,7 +18,7 @@ import algoliaSearchHelper from 'algoliasearch-helper';
import clsx from 'clsx';
import React, {useEffect, useState, useReducer, useRef} from 'react';
// eslint-disable-next-line import/extensions
// eslint-disable-next-line rulesdir/extensions
import {tagToCounter} from '../SearchMetadata';
import styles from './styles.module.css';