From def26872356a3c3bb5377531e6057c02cad143ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Aug 2022 15:52:52 +0200 Subject: [PATCH 01/28] chore(deps): bump docker/build-push-action from 2.5.0 to 3.1.1 (#8785) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.5.0 to 3.1.1. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/ad44023a93711e3deb337508980b4b5e9bcdc5dc...c84f38281176d4c9cdb1626ffafcd6b3911b5d94) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 0671a297026b2..a4d88a1d9d5d6 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -42,7 +42,7 @@ jobs: - name: Pack Puppeteer for docker run: docker/pack.sh - name: Build and push the Docker image - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94 with: context: ./docker push: true From 90aa628fcc110df16516636b22232a309a1d4233 Mon Sep 17 00:00:00 2001 From: jrandolf <101637635+jrandolf@users.noreply.github.com> Date: Tue, 16 Aug 2022 08:22:14 +0200 Subject: [PATCH 02/28] chore: update `NEXT` during versioning (#8794) --- utils/generate_version_file.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/utils/generate_version_file.js b/utils/generate_version_file.js index 596dbf87fa01d..a77dfe8a37a76 100644 --- a/utils/generate_version_file.js +++ b/utils/generate_version_file.js @@ -1,9 +1,18 @@ const {writeFileSync, readFileSync} = require('fs'); const {join} = require('path'); +const version = require('../package.json').version; + writeFileSync( join(__dirname, '../src/generated/version.ts'), readFileSync(join(__dirname, '../src/templates/version.ts.tmpl'), { encoding: 'utf-8', - }).replace('PACKAGE_VERSION', require('../package.json').version) + }).replace('PACKAGE_VERSION', version) +); + +writeFileSync( + join(__dirname, '../versions.js'), + readFileSync(join(__dirname, '../versions.js'), { + encoding: 'utf-8', + }).replace('NEXT', `v${version}`) ); From b5da718e2e4a2004a36cf23cad555e1fc3b50333 Mon Sep 17 00:00:00 2001 From: jrandolf <101637635+jrandolf@users.noreply.github.com> Date: Tue, 16 Aug 2022 08:22:45 +0200 Subject: [PATCH 03/28] fix: deprecate `ExecutionContext` (#8792) --- docs/api/index.md | 4 +-- docs/api/puppeteer.executioncontext.md | 6 +++- docs/api/puppeteer.frame.evaluate.md | 8 ++--- docs/api/puppeteer.frame.evaluatehandle.md | 8 ++--- docs/api/puppeteer.frame.executioncontext.md | 4 +++ docs/api/puppeteer.frame.isoopframe.md | 2 +- docs/api/puppeteer.frame.md | 14 +++++--- docs/api/puppeteer.frame.waitforselector.md | 2 +- package-lock.json | 2 +- src/common/ExecutionContext.ts | 2 ++ src/common/FrameManager.ts | 38 ++++++++++++-------- 11 files changed, 57 insertions(+), 33 deletions(-) diff --git a/docs/api/index.md b/docs/api/index.md index aab590d9573af..8a4e32d92b336 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -21,9 +21,9 @@ sidebar_label: API | [Dialog](./puppeteer.dialog.md) | Dialog instances are dispatched by the [Page](./puppeteer.page.md) via the dialog event. | | [ElementHandle](./puppeteer.elementhandle.md) | ElementHandle represents an in-page DOM element. | | [EventEmitter](./puppeteer.eventemitter.md) | The EventEmitter class that many Puppeteer classes extend. | -| [ExecutionContext](./puppeteer.executioncontext.md) | Represents a context for JavaScript execution. | +| [ExecutionContext](./puppeteer.executioncontext.md) | | | [FileChooser](./puppeteer.filechooser.md) | File choosers let you react to the page requesting for a file. | -| [Frame](./puppeteer.frame.md) | At every point of time, page exposes its current frame tree via the [page.mainFrame](./puppeteer.page.mainframe.md) and [frame.childFrames](./puppeteer.frame.childframes.md) methods. | +| [Frame](./puppeteer.frame.md) |

Represents a DOM frame.

To understand frames, you can think of frames as <iframe> elements. Just like iframes, frames can be nested, and when JavaScript is executed in a frame, the JavaScript does not effect frames inside the ambient frame the JavaScript executes in.

| | [HTTPRequest](./puppeteer.httprequest.md) | Represents an HTTP request sent by a page. | | [HTTPResponse](./puppeteer.httpresponse.md) | The HTTPResponse class represents responses which are received by the [Page](./puppeteer.page.md) class. | | [JSCoverage](./puppeteer.jscoverage.md) | | diff --git a/docs/api/puppeteer.executioncontext.md b/docs/api/puppeteer.executioncontext.md index 551673050f184..d59ee4c1156a5 100644 --- a/docs/api/puppeteer.executioncontext.md +++ b/docs/api/puppeteer.executioncontext.md @@ -4,7 +4,11 @@ sidebar_label: ExecutionContext # ExecutionContext class -Represents a context for JavaScript execution. +> Warning: This API is now obsolete. +> +> Do not use directly. +> +> Represents a context for JavaScript execution. **Signature:** diff --git a/docs/api/puppeteer.frame.evaluate.md b/docs/api/puppeteer.frame.evaluate.md index 400f752f67773..9804c36a00225 100644 --- a/docs/api/puppeteer.frame.evaluate.md +++ b/docs/api/puppeteer.frame.evaluate.md @@ -22,10 +22,10 @@ class Frame { ## Parameters -| Parameter | Type | Description | -| ------------ | -------------- | ------------------------------------------ | -| pageFunction | Func \| string | a function that is run within the frame | -| args | Params | arguments to be passed to the pageFunction | +| Parameter | Type | Description | +| ------------ | -------------- | ----------- | +| pageFunction | Func \| string | | +| args | Params | | **Returns:** diff --git a/docs/api/puppeteer.frame.evaluatehandle.md b/docs/api/puppeteer.frame.evaluatehandle.md index b9ea0d8294e67..0532cf177a9b8 100644 --- a/docs/api/puppeteer.frame.evaluatehandle.md +++ b/docs/api/puppeteer.frame.evaluatehandle.md @@ -22,10 +22,10 @@ class Frame { ## Parameters -| Parameter | Type | Description | -| ------------ | -------------- | ------------------------------------------ | -| pageFunction | Func \| string | a function that is run within the frame | -| args | Params | arguments to be passed to the pageFunction | +| Parameter | Type | Description | +| ------------ | -------------- | ----------- | +| pageFunction | Func \| string | | +| args | Params | | **Returns:** diff --git a/docs/api/puppeteer.frame.executioncontext.md b/docs/api/puppeteer.frame.executioncontext.md index cb6c95555bb51..9a364c79a5669 100644 --- a/docs/api/puppeteer.frame.executioncontext.md +++ b/docs/api/puppeteer.frame.executioncontext.md @@ -4,6 +4,10 @@ sidebar_label: Frame.executionContext # Frame.executionContext() method +> Warning: This API is now obsolete. +> +> Do not use the execution context directly. + **Signature:** ```typescript diff --git a/docs/api/puppeteer.frame.isoopframe.md b/docs/api/puppeteer.frame.isoopframe.md index 323e2c10a7fba..c818d8a2f6b15 100644 --- a/docs/api/puppeteer.frame.isoopframe.md +++ b/docs/api/puppeteer.frame.isoopframe.md @@ -16,4 +16,4 @@ class Frame { boolean -`true` if the frame is an OOP frame, or `false` otherwise. +`true` if the frame is an out-of-process (OOP) frame. Otherwise, `false`. diff --git a/docs/api/puppeteer.frame.md b/docs/api/puppeteer.frame.md index c8732d22e1db1..a0c6ad27f1c1b 100644 --- a/docs/api/puppeteer.frame.md +++ b/docs/api/puppeteer.frame.md @@ -4,7 +4,9 @@ sidebar_label: Frame # Frame class -At every point of time, page exposes its current frame tree via the [page.mainFrame](./puppeteer.page.mainframe.md) and [frame.childFrames](./puppeteer.frame.childframes.md) methods. +Represents a DOM frame. + +To understand frames, you can think of frames as `