chore: release main (#12507)

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
This commit is contained in:
release-please[bot] 2024-06-11 11:17:49 +00:00 committed by GitHub
parent dfefbd100b
commit defda0905f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
617 changed files with 758 additions and 617 deletions

View File

@ -1,6 +1,6 @@
{
"packages/puppeteer": "22.10.0",
"packages/puppeteer-core": "22.10.0",
"packages/puppeteer": "22.10.1",
"packages/puppeteer-core": "22.10.1",
"packages/testserver": "0.6.0",
"packages/ng-schematics": "0.6.0",
"packages/browsers": "2.2.3"

View File

@ -10,6 +10,7 @@ The following versions of the browsers are supported, mapped to Puppeteer versio
<!-- version-start -->
- [Chrome for Testing](https://developer.chrome.com/blog/chrome-for-testing/) 125.0.6422.141 - [Puppeteer v22.10.1](https://github.com/puppeteer/puppeteer/blob/puppeteer-v22.10.1/docs/api/index.md)
- [Chrome for Testing](https://developer.chrome.com/blog/chrome-for-testing/) 125.0.6422.78 - [Puppeteer v22.10.0](https://github.com/puppeteer/puppeteer/blob/puppeteer-v22.10.0/docs/api/index.md)
- [Chrome for Testing](https://developer.chrome.com/blog/chrome-for-testing/) 125.0.6422.60 - [Puppeteer v22.9.0](https://github.com/puppeteer/puppeteer/blob/puppeteer-v22.9.0/docs/api/index.md)
- [Chrome for Testing](https://developer.chrome.com/blog/chrome-for-testing/) 124.0.6367.207 - [Puppeteer v22.8.2](https://github.com/puppeteer/puppeteer/blob/puppeteer-v22.8.2/docs/api/index.md)

6
package-lock.json generated
View File

@ -11947,14 +11947,14 @@
}
},
"packages/puppeteer": {
"version": "22.10.0",
"version": "22.10.1",
"hasInstallScript": true,
"license": "Apache-2.0",
"dependencies": {
"@puppeteer/browsers": "2.2.3",
"cosmiconfig": "9.0.0",
"devtools-protocol": "0.0.1286932",
"puppeteer-core": "22.10.0"
"puppeteer-core": "22.10.1"
},
"bin": {
"puppeteer": "lib/esm/puppeteer/node/cli.js"
@ -11967,7 +11967,7 @@
}
},
"packages/puppeteer-core": {
"version": "22.10.0",
"version": "22.10.1",
"license": "Apache-2.0",
"dependencies": {
"@puppeteer/browsers": "2.2.3",

View File

@ -20,6 +20,21 @@ All notable changes to this project will be documented in this file. See [standa
* dependencies
* @puppeteer/browsers bumped from 1.5.1 to 1.6.0
## [22.10.1](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v22.10.0...puppeteer-core-v22.10.1) (2024-06-11)
### Bug Fixes
* add a way to run page.$$ without the isolation ([#12539](https://github.com/puppeteer/puppeteer/issues/12539)) ([03e10a7](https://github.com/puppeteer/puppeteer/commit/03e10a7559f184f8b1adfef83714f36ee26007ca))
* align network conditions presets with DevTools ([#12542](https://github.com/puppeteer/puppeteer/issues/12542)) ([ee10745](https://github.com/puppeteer/puppeteer/commit/ee1074559d5290eaa91e7757ecc048e81022fe48))
* exposed functions should only be called once ([#12560](https://github.com/puppeteer/puppeteer/issues/12560)) ([8aac8b1](https://github.com/puppeteer/puppeteer/commit/8aac8b1ccb1704f0a67165a7e06427c7db0b4b2f))
* **performance:** use Runtime.getProperties for improved performance ([#12561](https://github.com/puppeteer/puppeteer/issues/12561)) ([8b2059f](https://github.com/puppeteer/puppeteer/commit/8b2059f82a801daaa9d27f48d1925bd1335020c6))
* roll to Chrome 125.0.6422.141 (r1287751) ([#12509](https://github.com/puppeteer/puppeteer/issues/12509)) ([c4fdd10](https://github.com/puppeteer/puppeteer/commit/c4fdd102e9dd163e5797b2de9024e52ba6efe3bb))
* waitForSelector should work for pseudo classes ([#12545](https://github.com/puppeteer/puppeteer/issues/12545)) ([0b2999f](https://github.com/puppeteer/puppeteer/commit/0b2999f7b17d54f368f0a03a45c095e879b7245b))
* **webdriver:** default values for touch events ([#12554](https://github.com/puppeteer/puppeteer/issues/12554)) ([4d62988](https://github.com/puppeteer/puppeteer/commit/4d6298837fa85cce39394bfd63b04358b826db53))
* **webdriver:** frame url should not be updated on navigationStarted ([#12536](https://github.com/puppeteer/puppeteer/issues/12536)) ([7d0423b](https://github.com/puppeteer/puppeteer/commit/7d0423b12cb5987caf0cc0cd84976986ffc93c98))
* **webdriver:** HTTPRequest redirect chain from first request ([#12506](https://github.com/puppeteer/puppeteer/issues/12506)) ([68fd771](https://github.com/puppeteer/puppeteer/commit/68fd7712932f94730b6186107a0509c233938084))
## [22.10.0](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v22.9.0...puppeteer-core-v22.10.0) (2024-05-24)

View File

@ -1,6 +1,6 @@
{
"name": "puppeteer-core",
"version": "22.10.0",
"version": "22.10.1",
"description": "A high-level API to control headless Chrome over the DevTools Protocol",
"keywords": [
"puppeteer",

View File

@ -29,6 +29,20 @@ All notable changes to this project will be documented in this file. See [standa
* puppeteer-core bumped from 21.0.2 to 21.0.3
* @puppeteer/browsers bumped from 1.5.1 to 1.6.0
## [22.10.1](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.10.0...puppeteer-v22.10.1) (2024-06-11)
### Miscellaneous Chores
* **puppeteer:** Synchronize puppeteer versions
### Dependencies
* The following workspace dependencies were updated
* dependencies
* puppeteer-core bumped from 22.10.0 to 22.10.1
## [22.10.0](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.9.0...puppeteer-v22.10.0) (2024-05-24)

View File

@ -1,6 +1,6 @@
{
"name": "puppeteer",
"version": "22.10.0",
"version": "22.10.1",
"description": "A high-level API to control headless Chrome over the DevTools Protocol",
"keywords": [
"puppeteer",
@ -124,7 +124,7 @@
"license": "Apache-2.0",
"dependencies": {
"cosmiconfig": "9.0.0",
"puppeteer-core": "22.10.0",
"puppeteer-core": "22.10.1",
"@puppeteer/browsers": "2.2.3",
"devtools-protocol": "0.0.1286932"
},

View File

@ -7,7 +7,7 @@
const versionsPerRelease = new Map([
// This is a mapping from Chrome version => Puppeteer version.
// In Chrome roll patches, use `NEXT` for the Puppeteer version.
['125.0.6422.141', 'NEXT'],
['125.0.6422.141', 'v22.10.1'],
['125.0.6422.78', 'v22.10.0'],
['125.0.6422.60', 'v22.9.0'],
['124.0.6367.207', 'v22.8.2'],

View File

@ -1,52 +0,0 @@
---
sidebar_label: Frame.$
---
# Frame.$() method
Queries the frame for an element matching the given selector.
#### Signature:
```typescript
class Frame {
$<Selector extends string>(
selector: Selector
): Promise<ElementHandle<NodeFor<Selector>> | null>;
}
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
selector
</td><td>
Selector
</td><td>
The selector to query for.
</td></tr>
</tbody></table>
**Returns:**
Promise&lt;[ElementHandle](./puppeteer.elementhandle.md)&lt;[NodeFor](./puppeteer.nodefor.md)&lt;Selector&gt;&gt; \| null&gt;
A [element handle](./puppeteer.elementhandle.md) to the first element matching the given selector. Otherwise, `null`.

View File

@ -1,52 +0,0 @@
---
sidebar_label: Frame.$$
---
# Frame.$$() method
Queries the frame for all elements matching the given selector.
#### Signature:
```typescript
class Frame {
$$<Selector extends string>(
selector: Selector
): Promise<Array<ElementHandle<NodeFor<Selector>>>>;
}
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
selector
</td><td>
Selector
</td><td>
The selector to query for.
</td></tr>
</tbody></table>
**Returns:**
Promise&lt;Array&lt;[ElementHandle](./puppeteer.elementhandle.md)&lt;[NodeFor](./puppeteer.nodefor.md)&lt;Selector&gt;&gt;&gt;&gt;
An array of [element handles](./puppeteer.elementhandle.md) that point to elements matching the given selector.

View File

@ -1,50 +0,0 @@
---
sidebar_label: Page.$
---
# Page.$() method
Runs `document.querySelector` within the page. If no element matches the selector, the return value resolves to `null`.
#### Signature:
```typescript
class Page {
$<Selector extends string>(
selector: Selector
): Promise<ElementHandle<NodeFor<Selector>> | null>;
}
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
selector
</td><td>
Selector
</td><td>
A `selector` to query page for [selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors) to query page for.
</td></tr>
</tbody></table>
**Returns:**
Promise&lt;[ElementHandle](./puppeteer.elementhandle.md)&lt;[NodeFor](./puppeteer.nodefor.md)&lt;Selector&gt;&gt; \| null&gt;

View File

@ -1,54 +0,0 @@
---
sidebar_label: Page.$$
---
# Page.$$() method
The method runs `document.querySelectorAll` within the page. If no elements match the selector, the return value resolves to `[]`.
#### Signature:
```typescript
class Page {
$$<Selector extends string>(
selector: Selector
): Promise<Array<ElementHandle<NodeFor<Selector>>>>;
}
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
selector
</td><td>
Selector
</td><td>
A `selector` to query page for
</td></tr>
</tbody></table>
**Returns:**
Promise&lt;Array&lt;[ElementHandle](./puppeteer.elementhandle.md)&lt;[NodeFor](./puppeteer.nodefor.md)&lt;Selector&gt;&gt;&gt;&gt;
## Remarks
Shortcut for [Page.mainFrame().$$(selector)](./puppeteer.frame.__.md).

View File

@ -1,58 +0,0 @@
---
sidebar_label: Page.goBack
---
# Page.goBack() method
This method navigate to the previous page in history.
#### Signature:
```typescript
class Page {
abstract goBack(options?: WaitForOptions): Promise<HTTPResponse | null>;
}
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
options
</td><td>
[WaitForOptions](./puppeteer.waitforoptions.md)
</td><td>
_(Optional)_ Navigation parameters
</td></tr>
</tbody></table>
**Returns:**
Promise&lt;[HTTPResponse](./puppeteer.httpresponse.md) \| null&gt;
Promise which resolves to the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. If can not go back, resolves to `null`.
## Remarks
The argument `options` might have the following properties:
- `timeout` : Maximum navigation time in milliseconds, defaults to 30 seconds, pass 0 to disable timeout. The default value can be changed by using the [Page.setDefaultNavigationTimeout()](./puppeteer.page.setdefaultnavigationtimeout.md) or [Page.setDefaultTimeout()](./puppeteer.page.setdefaulttimeout.md) methods.
- `waitUntil` : When to consider navigation succeeded, defaults to `load`. Given an array of event strings, navigation is considered to be successful after all events have been fired. Events can be either:<br/> - `load` : consider navigation to be finished when the load event is fired.<br/> - `domcontentloaded` : consider navigation to be finished when the DOMContentLoaded event is fired.<br/> - `networkidle0` : consider navigation to be finished when there are no more than 0 network connections for at least `500` ms.<br/> - `networkidle2` : consider navigation to be finished when there are no more than 2 network connections for at least `500` ms.

View File

@ -1,58 +0,0 @@
---
sidebar_label: Page.goForward
---
# Page.goForward() method
This method navigate to the next page in history.
#### Signature:
```typescript
class Page {
abstract goForward(options?: WaitForOptions): Promise<HTTPResponse | null>;
}
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
options
</td><td>
[WaitForOptions](./puppeteer.waitforoptions.md)
</td><td>
_(Optional)_ Navigation Parameter
</td></tr>
</tbody></table>
**Returns:**
Promise&lt;[HTTPResponse](./puppeteer.httpresponse.md) \| null&gt;
Promise which resolves to the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. If can not go forward, resolves to `null`.
## Remarks
The argument `options` might have the following properties:
- `timeout` : Maximum navigation time in milliseconds, defaults to 30 seconds, pass 0 to disable timeout. The default value can be changed by using the [Page.setDefaultNavigationTimeout()](./puppeteer.page.setdefaultnavigationtimeout.md) or [Page.setDefaultTimeout()](./puppeteer.page.setdefaulttimeout.md) methods.
- `waitUntil`: When to consider navigation succeeded, defaults to `load`. Given an array of event strings, navigation is considered to be successful after all events have been fired. Events can be either:<br/> - `load` : consider navigation to be finished when the load event is fired.<br/> - `domcontentloaded` : consider navigation to be finished when the DOMContentLoaded event is fired.<br/> - `networkidle0` : consider navigation to be finished when there are no more than 0 network connections for at least `500` ms.<br/> - `networkidle2` : consider navigation to be finished when there are no more than 2 network connections for at least `500` ms.

View File

@ -1,52 +0,0 @@
---
sidebar_label: Page.locator
---
# Page.locator() method
Creates a locator for the provided selector. See [Locator](./puppeteer.locator.md) for details and supported actions.
#### Signature:
```typescript
class Page {
locator<Selector extends string>(
selector: Selector
): Locator<NodeFor<Selector>>;
}
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
selector
</td><td>
Selector
</td><td>
</td></tr>
</tbody></table>
**Returns:**
[Locator](./puppeteer.locator.md)&lt;[NodeFor](./puppeteer.nodefor.md)&lt;Selector&gt;&gt;
## Remarks
Locators API is experimental and we will not follow semver for breaking change in the Locators API.

View File

@ -1,69 +0,0 @@
---
sidebar_label: Page.setContent
---
# Page.setContent() method
Set the content of the page.
#### Signature:
```typescript
class Page {
setContent(html: string, options?: WaitForOptions): Promise<void>;
}
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
html
</td><td>
string
</td><td>
HTML markup to assign to the page.
</td></tr>
<tr><td>
options
</td><td>
[WaitForOptions](./puppeteer.waitforoptions.md)
</td><td>
_(Optional)_ Parameters that has some properties.
</td></tr>
</tbody></table>
**Returns:**
Promise&lt;void&gt;
## Remarks
The parameter `options` might have the following options.
- `timeout` : Maximum time in milliseconds for resources to load, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by using the [Page.setDefaultNavigationTimeout()](./puppeteer.page.setdefaultnavigationtimeout.md) or [Page.setDefaultTimeout()](./puppeteer.page.setdefaulttimeout.md) methods.
- `waitUntil`: When to consider setting markup succeeded, defaults to `load`. Given an array of event strings, setting content is considered to be successful after all events have been fired. Events can be either:<br/> - `load` : consider setting content to be finished when the `load` event is fired.<br/> - `domcontentloaded` : consider setting content to be finished when the `DOMContentLoaded` event is fired.<br/> - `networkidle0` : consider setting content to be finished when there are no more than 0 network connections for at least `500` ms.<br/> - `networkidle2` : consider setting content to be finished when there are no more than 2 network connections for at least `500` ms.

View File

@ -1,32 +0,0 @@
---
sidebar_label: PredefinedNetworkConditions
---
# PredefinedNetworkConditions variable
A list of network conditions to be used with [Page.emulateNetworkConditions()](./puppeteer.page.emulatenetworkconditions.md).
#### Signature:
```typescript
PredefinedNetworkConditions: Readonly<{
'Slow 3G': NetworkConditions;
'Fast 3G': NetworkConditions;
}>;
```
## Example
```ts
import {PredefinedNetworkConditions} from 'puppeteer';
const slow3G = PredefinedNetworkConditions['Slow 3G'];
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.emulateNetworkConditions(slow3G);
await page.goto('https://www.google.com');
// other actions...
await browser.close();
})();
```

View File

@ -1,57 +0,0 @@
---
hide_table_of_contents: true
---
# Puppeteer
[![build](https://github.com/puppeteer/puppeteer/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/puppeteer/puppeteer/actions/workflows/ci.yml)
[![npm puppeteer package](https://img.shields.io/npm/v/puppeteer.svg)](https://npmjs.org/package/puppeteer)
<img src="https://user-images.githubusercontent.com/10379601/29446482-04f7036a-841f-11e7-9872-91d1fc2ea683.png" height="200" align="right"/>
> Puppeteer is a Node.js library which provides a high-level API to control
> Chrome/Chromium over the
> [DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/).
> Puppeteer runs in
> [headless](https://developer.chrome.com/docs/chromium/new-headless/)
> mode by default, but can be configured to run in full ("headful")
> Chrome/Chromium.
## [Get started](https://pptr.dev/docs) | [API](https://pptr.dev/api) | [FAQ](https://pptr.dev/faq) | [Contributing](https://pptr.dev/contributing) | [Troubleshooting](https://pptr.dev/troubleshooting)
## Example
```ts
import puppeteer from 'puppeteer';
(async () => {
// Launch the browser and open a new blank page
const browser = await puppeteer.launch();
const page = await browser.newPage();
// Navigate the page to a URL
await page.goto('https://developer.chrome.com/');
// Set screen size
await page.setViewport({width: 1080, height: 1024});
// Type into search box
await page.type('.devsite-search-field', 'automate beyond recorder');
// Wait and click on first result
const searchResultSelector = '.devsite-result-item-link';
await page.waitForSelector(searchResultSelector);
await page.click(searchResultSelector);
// Locate the full title with a unique string
const textSelector = await page.waitForSelector(
'text/Customize and automate'
);
const fullTitle = await textSelector?.evaluate(el => el.textContent);
// Print the full title
console.log('The title of this blog post is "%s".', fullTitle);
await browser.close();
})();
```

View File

@ -1063,6 +1063,8 @@ Generic launch options that can be passed when launching any browser.
</td><td>
A media feature to emulate.
</td></tr>
<tr><td>
@ -1170,6 +1172,13 @@ Valid options to configure PDF generation via [Page.pdf()](./puppeteer.page.pdf.
</td></tr>
<tr><td>
<span id="queryoptions">[QueryOptions](./puppeteer.queryoptions.md)</span>
</td><td>
</td></tr>
<tr><td>
<span id="remoteaddress">[RemoteAddress](./puppeteer.remoteaddress.md)</span>
</td><td>
@ -1340,7 +1349,7 @@ Enum of valid mouse buttons.
</td><td>
A list of network conditions to be used with [Page.emulateNetworkConditions()](./puppeteer.page.emulatenetworkconditions.md).
A list of pre-defined network conditions to be used with [Page.emulateNetworkConditions()](./puppeteer.page.emulatenetworkconditions.md).
</td></tr>
<tr><td>

Some files were not shown because too many files have changed in this diff Show More