Commit Graph

955 Commits

Author SHA1 Message Date
release-please[bot]
931d4fced5
chore: release main (#9322)
🤖 I have created a release *beep* *boop*
---


<details><summary>puppeteer: 19.4.0</summary>

##
[19.4.0](https://github.com/puppeteer/puppeteer/compare/puppeteer-v19.3.0...puppeteer-v19.4.0)
(2022-12-07)


### Features

* **chromium:** roll to Chromium 109.0.5412.0 (r1069273)
([#9364](https://github.com/puppeteer/puppeteer/issues/9364))
([1875da6](1875da6191)),
closes [#9233](https://github.com/puppeteer/puppeteer/issues/9233)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * puppeteer-core bumped from 19.3.0 to 19.4.0
</details>

<details><summary>puppeteer-core: 19.4.0</summary>

##
[19.4.0](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v19.3.0...puppeteer-core-v19.4.0)
(2022-12-07)


### Features

* ability to send headers via ws connection to browser in node.js
environment
([#9314](https://github.com/puppeteer/puppeteer/issues/9314))
([937fffa](937fffaedc)),
closes [#7218](https://github.com/puppeteer/puppeteer/issues/7218)
* **chromium:** roll to Chromium 109.0.5412.0 (r1069273)
([#9364](https://github.com/puppeteer/puppeteer/issues/9364))
([1875da6](1875da6191)),
closes [#9233](https://github.com/puppeteer/puppeteer/issues/9233)
* **puppeteer-core:** keydown supports commands
([#9357](https://github.com/puppeteer/puppeteer/issues/9357))
([b7ebc5d](b7ebc5d9bb))


### Bug Fixes

* **puppeteer-core:** avoid type instantiation errors
([#9370](https://github.com/puppeteer/puppeteer/issues/9370))
([17f31a9](17f31a9ee4)),
closes [#9369](https://github.com/puppeteer/puppeteer/issues/9369)
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2022-12-07 19:35:29 +01:00
Nikolay Vitkov
1875da6191
feat(chromium): roll to Chromium 109.0.5412.0 (r1069273) (#9364)
Closes #9233
2022-12-07 14:54:00 +01:00
Robin Richtsfeld
1501edefa8
docs(requestinterception): remove outdated note (#9358)
See #7304 @jschfflr Seems like we missed some
Thanks to @chrismdd for spotting this
2022-12-07 07:33:27 +00:00
Junyan
b7ebc5d9bb
feat(puppeteer-core): keydown supports commands (#9357)
Issue: #1313

<!-- Thanks for submitting a pull request! Please provide enough
information so that others can review your pull request. -->

**What kind of change does this PR introduce?**

Feature.

**Did you add tests for your changes?**

Yes.

**If relevant, did you update the documentation?**

Yes.

**Summary**

Supports keyboard shotcuts on MacOS. See Chrome Devtools Protocol
document:
https://chromedevtools.github.io/devtools-protocol/tot/Input/#method-dispatchKeyEvent.
2022-12-03 11:23:47 +01:00
Alex Rudenko
f3c87dcdb7
chore: upgrade mitt (#9340) 2022-11-29 19:50:58 +00:00
jrandolf
982a324a88
docs: add guide on query selectors (#9328) 2022-11-25 08:58:21 +01:00
Dmitriy Dudkevich
937fffaedc
feat: ability to send headers via ws connection to browser in node.js environment (#9314)
**What kind of change does this PR introduce?**

I have browsers pool in some cloud. I want that only users with access
will be able to connect to them. So they must provide token through
headers. But puppeteer does not allow to send headers when connected to
browser by ws connection. So I added this feature.

Closes #7218
2022-11-24 11:00:03 +01:00
Alex Rudenko
eda182741b
docs: add bug triage guidelines (#9305)
Co-authored-by: Mathias Bynens <mathias@qiwi.be>
2022-11-23 11:51:25 +01:00
Joe Gomain Hoyes
bef1061c06
feat(puppeteer-core): Infer element type from complex selector (#9253)
**What kind of change does this PR introduce?**

Better type inference.

**Did you add tests for your changes?**

~Not yet.~ Yes.

**If relevant, did you update the documentation?**

Not yet.

**Summary**

<!-- Explain the **motivation** for making this change. What existing
problem does the pull request solve? -->
<!-- Try to link to an open issue for more information. -->
Currently methods that return an element handle, i.e. `.$`,
`.waitForSelector` attempt to infer the node element type from the
selector string. However, this only works when the selector is an exact
match of the element tag, i.e. a selector `"a"` would be inferred as
`HTMLAnchorElement` . And not when the selector is complex, i.e.
selectors `"a#some-id"`, `div > a`, `a:nth-child(2)` would all fallback
on `Element`.

This is due to simply looking up the the selector in
`HTMLElementTagNameMap` and `SVGElementTagNameMap` without any attempt
to parse the selector string.

This PR is an attempt to do so.

**Does this PR introduce a breaking change?**

<!-- If this PR introduces a breaking change, please describe the impact
and a migration path for existing applications. -->
This could break existing incorrect assertions using the `as` keyword.

**Other information**

~This PR introduces a dependency on the `type-fest` package.~

This PR is far from complete (no tests, no docs). Put out early for
feedback and discussion.

Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
2022-11-23 10:59:23 +01:00
Guillaume Gomez
0a2d310e4e
docs: fix typo in Viewport fields (#9293)
The `deviceScalarFactor` field of `Viewport` is actually named
`deviceScaleFactor`.
2022-11-17 17:27:07 +01:00
Alex Rudenko
30c6b13eec
chore: re-export all exports (#9241)
Adds index files to subfolders and removes generation of types.ts in
puppeteer-core.
2022-11-10 17:11:18 +01:00
jrandolf
641a326541
chore: update contributing (#9202) 2022-11-03 11:08:36 +01:00
release-please[bot]
990635abc9
chore: release main (#9184)
🤖 I have created a release *beep* *boop*
---


<details><summary>puppeteer: 19.2.1</summary>

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * puppeteer-core bumped from 19.2.0 to ^19.2.1
</details>

<details><summary>puppeteer-core: 19.2.1</summary>

##
[19.2.1](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v19.2.0...puppeteer-core-v19.2.1)
(2022-10-28)


### Bug Fixes

* resolve navigation requests when request fails
([#9178](https://github.com/puppeteer/puppeteer/issues/9178))
([c11297b](c11297baa5)),
closes [#9175](https://github.com/puppeteer/puppeteer/issues/9175)
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2022-11-02 10:54:37 +01:00
jrandolf
8c9308d3dc
docs: remove unsupported debugging method (#9182)
`ndb` is no longer maintained.
2022-10-28 11:04:05 +02:00
jrandolf
2d2120cea1
docs: improve docs (#9179)
This PR drastically improves the documentation by improving the sidebars
and adding a GitHub icon.

Fixed: https://github.com/puppeteer/puppeteer/pull/9176
Fixed: https://github.com/puppeteer/puppeteer/issues/9173


![image](https://user-images.githubusercontent.com/101637635/198374826-399219f6-e04f-4613-9613-f7e3281d332f.png)
2022-10-28 08:49:28 +02:00
release-please[bot]
4ef83e0ee6
chore: release main (#9168) 2022-10-26 09:51:16 +02:00
Alex Rudenko
e78a4e89c2
feat(chromium): roll to Chromium 108.0.5351.0 (r1056772) (#9153) 2022-10-25 12:55:19 +02:00
jrandolf
f07ad2c661
fix: update documentation on configuring puppeteer (#9150)
This PR updates the docs regarding configuring puppeteer. In addition,
some changes have been made to the documentation generator to show
default values on the documentation site.

Also fixes: https://github.com/puppeteer/puppeteer/pull/9144
2022-10-24 09:07:05 +02:00
jrandolf
ec201744f0
feat: use configuration files (#9140)
This PR adds configurations files to `puppeteer`'s methods for
configuration. Under the hood, `puppeteer` relies on
https://www.npmjs.com/package/cosmiconfig which resolves several formats
of configuration:

- a `puppeteer` property in package.json
- a `.puppeteerrc` file in JSON or YAML format
- a `.puppeteerrc.json`, `.puppeteerrc.yaml`, `.puppeteerrc.yml`,
`.puppeteerrc.js`, or `.puppeteerrc.cjs` file
- a `puppeteer.config.js` or `puppeteer.config.cjs` CommonJS module
exporting an object

Documentation will be added later.

Fixed: #9128
2022-10-21 15:09:21 +02:00
jrandolf
efcbc97c60
fix: update BrowserFetcher deprecation message (#9141) 2022-10-20 13:25:24 +02:00
Alex Rudenko
122778a1f8
feat: expose browser context id (#9134)
Closes #9132
2022-10-19 08:30:57 +00:00
jrandolf
535309feff
chore: update troubleshooting guide (#9123)
This PR updates the troubleshooting guide with some information
regarding the new `exports` resolution and cache directory.

This PR also reformats some of the other MD documents.
2022-10-17 13:07:41 +02:00
jrandolf
6a05d8e9c1
chore: improve docs and scripts (#9107)
This PR updates some docs and scripts related to the recent changes in
the repository.
2022-10-13 18:55:11 +02:00
jrandolf
1fbc3c643f
chore: improve docs (#9105)
This PR makes some improvements to the documentation. It migrates
docker, debugging, and chrome extension documentation to the `guides`
folder and also updates some of the terminology.
2022-10-13 08:46:53 +00:00
jrandolf
7294dfe9c6
feat!: deprecate createBrowserFetcher in favor of BrowserFetcher (#9079)
This PR deprecates the `createBrowserFetcher` API and requests users to
import the `BrowserFetcher` directly.

Fixed: #8999
2022-10-10 17:51:18 +02:00
jrandolf
1847704789
fix!: refactor custom query handler API (#9078)
This PR removes the deprecated query selector API from the `puppeteer`
instance. Direct imports of the query selector API have also been
deprecated and users are now expected to use the static methods defined
on `Puppeteer`.
2022-10-10 16:01:09 +02:00
jrandolf
87c08fd86a
fix!: remove puppeteer.devices in favor of KnownDevices (#9075)
This PR removes the deprecated `puppeteer.devices` in favor of a new
exported object `KnownDevices`. `devices` can also be exported, but has
been deprecated.
2022-10-10 15:30:12 +02:00
smithc
a032583b6c feat: add ability to collect JS code coverage at the function level (#9027) 2022-10-06 23:53:05 +02:00
jrandolf
41d0122b94 fix!: deprecate indirect network condition imports (#9074) 2022-10-06 23:52:58 +02:00
jrandolf
9f4f43a28b fix!: deprecate indirect error imports (#9072) 2022-10-06 23:52:51 +02:00
jrandolf
416d56b033
chore: refactor utils (#9053)
This PR

- renames the `utils` folder to `tools` (follows internal practice),
- migrates the contents of `scripts` into `tools` and removes scripts.
2022-10-06 10:27:14 +02:00
release-please[bot]
ee1272e65e
chore: release main (#9052) 2022-10-05 16:51:59 +02:00
jrandolf
f42336cf83
feat: separate puppeteer and puppeteer-core (#9023)
This PR moves the puppeteer source code into separate mono-repo packages:

- `puppeteer` and `puppeteer-core` are now separated into their own
packages.
- `puppeteer-core` has a new exports called `puppeteer-core/internal`
for internal usage.

Tests and various tools have been updated to accommodate the migration.
2022-10-05 14:17:03 +02:00
release-please[bot]
3aee641c3d
chore(main): release 18.1.0 (#9042)
🤖 I have created a release *beep* *boop*
---


##
[18.1.0](https://github.com/puppeteer/puppeteer/compare/v18.0.5...v18.1.0)
(2022-10-05)


### Features

* **chromium:** roll to Chromium 107.0.5296.0 (r1045629)
([#9039](https://github.com/puppeteer/puppeteer/issues/9039))
([022fbde](022fbde85e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2022-10-05 08:27:19 +00:00
Pedro Campelo Matheus
b7b07e3790 chore: add documentation to xpath prefix and deprecated page.waitForTimeout (#9014) 2022-10-05 00:25:26 +02:00
Noel Kim (김민혁)
5dbd69e1a4
chore: type in waitForRequest function description (#9015) 2022-10-05 00:05:32 +02:00
jrandolf
2a21896cf8
chore: rename vendor to third_party (#9021)
This PR renames `vendor` to `third_party` to better adhere to internal
codebase nomenclature.
2022-09-28 15:23:37 +02:00
jrandolf
f8de7b1273
chore: bundle vendor code (#9016)
This PR removes the manual vendoring process. Third party code can now
be updated using the typical NPM pipeline with types/code bundling done
through Rollup.
2022-09-28 13:03:19 +02:00
jrandolf
d06a905540
chore: update deps (#9013) 2022-09-27 11:53:19 +02:00
Alex Rudenko
a6f4584a74
chore: clarify build instructions (#9000) 2022-09-22 14:53:06 +02:00
Alex Rudenko
31e7b608d5
chore: implement basic evaluate in BiDi (#8989)
Only the basic return values are supported.
The follow-up PRs will re-use the shared code
from the ExecutionContext and introduce Frame
in BiDi.
2022-09-21 08:10:50 +02:00
jrandolf
d5045976a6
fix: internal lazy params (#8982) 2022-09-19 15:10:57 +02:00
jrandolf
7c4f41fadc
chore: use injections for wait tasks (#8943)
This PR refactors wait tasks to use injected scripts.
2022-09-15 08:22:20 +02:00
Alex Rudenko
db28203e64 chore: support WebDriver BiDi browser instances (#8932)
This PR adds a basic support for WebDriver BiDi that currently includes only the ability to establish a connection and shutdown the browser. Therefore, the implementation is marked as internal and won't show up in the changelog as it's barely useful at the moment.

The API classes are kept as classes instead of interfaces so that clients relying on instanceof checks still work.
2022-09-15 02:15:15 +02:00
Alex Rudenko
c23c00a4c2
docs: update documentation about the test runner (#8945) 2022-09-13 15:04:24 +00:00
Alex Rudenko
27ccd0ae5e
docs: sort and group sidebar items (#8940)
Issues #8897, #8936
2022-09-12 13:00:37 +02:00
Connor Clark
7a2d9df146
docs: correct comment about anonymous script coverage urls (#8914) 2022-09-08 07:56:26 +02:00
Alex Rudenko
260e428227
fix: support scale for screenshot clips (#8908)
Closes #5329
2022-09-07 05:27:40 +00:00
Alex Rudenko
6e7c6368d3
docs: fix example formatting in evaluateOnNewDocument (#8906) 2022-09-06 10:39:55 +00:00
Guillaume Gomez
32400954c5
fix: add Page.getDefaultTimeout getter (#8903)
Closes #8901
2022-09-05 17:43:39 +00:00