Alex Rudenko
383e855847
fix: CSS coverage should work with empty stylesheets ( #8570 )
...
Closes #8535
2022-06-24 14:17:16 +02:00
release-please[bot]
d15f2239b9
chore(main): release 15.0.1 ( #8565 )
...
* chore(main): release 15.0.1
* chore: freeze version on docs
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2022-06-24 09:42:02 +02:00
jrandolf
8100cbb295
fix: infer unioned handles ( #8562 )
2022-06-24 06:40:08 +00:00
release-please[bot]
9705797a02
chore(main): release 15.0.0 ( #8555 )
...
* chore(main): release 15.0.0
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2022-06-23 13:38:28 +02:00
jrandolf
ec79f3a58a
feat: add experimental client
to HTTPRequest
( #8556 )
2022-06-23 13:20:42 +02:00
jrandolf
ebcb8a2760
chore: split JSHandle.ts
( #8551 )
2022-06-23 11:31:43 +02:00
jrandolf
26c3acbb07
feat!: type inference for evaluation types ( #8547 )
...
This PR greatly improves the types within Puppeteer:
- **Almost everything** is auto-deduced.
- Parameters don't need to be specified in the function. They are deduced from the spread.
- Return types don't need to be specified. They are deduced from the function. (More on this below)
- Selections based on tag names correctly deduce element type, similar to TypeScript's mechanism for `getElementByTagName`.
- [**BREAKING CHANGE**] We've removed the ability to declare return types in type arguments for the following reasons:
1. Setting them will indubitably break auto-deduction.
2. You can just use `as ...` in TypeScript to coerce the correct type (given it makes sense).
- [**BREAKING CHANGE**] `waitFor` is officially gone.
To migrate to these changes, there are only four things you may need to change:
- If you set a return type using the `ReturnType` type parameter, remove it and use `as ...` and `HandleFor` (if necessary).
⛔ `evaluate<ReturnType>(a: number, b: number) => {...}, a, b)`
✅ `(await evaluate(a, b) => {...}, a, b)) as ReturnType`
⛔ `evaluateHandle<ReturnType>(a: number, b: number) => {...}, a, b)`
✅ `(await evaluateHandle(a, b) => {...}, a, b)) as HandleFor<ReturnType>`
- If you set any type parameters in the *parameters* of an evaluation function, remove them.
⛔ `evaluate(a: number, b: number) => {...}, a, b)`
✅ `evaluate(a, b) => {...}, a, b)`
- If you set any type parameters in the method's declaration, remove them.
⛔ `evaluate<(a: number, b: number) => void>((a, b) => {...}, a, b)`
✅ `evaluate(a, b) => {...}, a, b)`
2022-06-23 11:29:46 +02:00
jrandolf
347101883f
chore: split Launcher.ts
( #8544 )
2022-06-23 00:13:39 +02:00
jrandolf
70c7f64a58
chore: freeze revisions ( #8543 )
2022-06-22 15:56:43 +02:00
jrandolf
84712cbc28
chore: use Google's TS style guide's format config ( #8542 )
2022-06-22 15:25:44 +02:00
release-please[bot]
3d1ec573fb
chore(main): release 14.4.1 ( #8523 )
2022-06-17 15:29:28 +02:00
James Diefenderfer
6cd5cd0439
fix: avoid instanceof Object
check in isErrorLike
( #8527 )
2022-06-17 15:26:18 +02:00
jrandolf
ce0dd25349
chore: use braces in function bodies ( #8525 )
2022-06-15 12:42:21 +02:00
jrandolf
570087ea94
chore: use strict typing in tests ( #8524 )
...
* The testing tsconfig.json inherits from the base TS config.
* A lot of type assertions have been inserted...a lot.
* All testing utilities have migrated to TS.
* text-diff is being replaced with diff for TS compatibility.
* ProtocolError has been added to PuppeteerErrors and PuppeteerErrors is no longer a record (it's been frozen).
* Fixes a small bug where null was an allowable media type in emulation (should be undefined).
2022-06-15 12:09:22 +02:00
jrandolf
80373f7a12
chore: use composite
builds for tests ( #8522 )
2022-06-15 12:05:25 +02:00
Randolf J
cba58a12c4
fix: export devices
, errors
, and more
...
This commits exports `devices`, `errors`, and `networkConditions`.
2022-06-14 20:56:14 +02:00
jrandolf
e6442dd767
chore: use curly
( #8519 )
2022-06-14 13:55:35 +02:00
jrandolf
0678343b53
chore: move helper.js
to util.js
( #8510 )
2022-06-14 13:16:21 +02:00
release-please[bot]
e0c537408e
chore(main): release 14.4.0 ( #8512 )
...
* chore(main): release 14.4.0
* chore: freeze version on docs
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2022-06-13 23:05:56 +02:00
jrandolf
6c960115a3
chore: use private fields ( #8506 )
2022-06-13 11:16:25 +02:00
jrandolf
4d359906a4
fix: use error-like ( #8504 )
2022-06-10 15:27:42 +02:00
jrandolf
bfd4e68f25
fix: use OS-independent abs. path check ( #8505 )
2022-06-10 14:34:57 +02:00
jrandolf
465a7c405f
feat: export puppeteer methods ( #8493 )
2022-06-09 19:00:50 +02:00
jrandolf
b30f3f44cd
fix: parse empty options in <select> ( #8489 )
2022-06-09 13:27:34 +02:00
jrandolf
f64ec2051b
feat: support node-like environments ( #8490 )
2022-06-09 13:03:44 +02:00
release-please[bot]
4b05a8454e
chore(main): release 14.3.0 ( #8471 )
...
* chore(main): release 14.3.0
* chore: freeze version on docs
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2022-06-07 16:21:47 +02:00
jrandolf
e8378666c6
fix: don't throw on bad access ( #8472 )
2022-06-07 16:17:21 +02:00
Alex Rudenko
e14256010d
feat: use absolute URL for EVALUATION_SCRIPT_URL ( #8481 )
...
Closes #8424
2022-06-07 15:36:51 +02:00
James Diefenderfer
7dc8e37a23
fix: Kill browser process when killing process group fails ( #8477 )
...
Fixes #8476 . Similar fix to #8352 which only covered Windows.
2022-06-07 15:25:45 +02:00
jrandolf
b54dc55f76
fix: robustly check for launch executable ( #8468 )
2022-06-07 15:25:04 +02:00
Randolf J
1b025b4c84
fix: only lookup localhost
for DNS lookups
2022-06-04 01:04:38 +02:00
release-please[bot]
d5cd41686c
chore(main): release 14.2.1 ( #8462 )
...
* chore(main): release 14.2.1
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: jrandolf <101637635+jrandolf@users.noreply.github.com>
2022-06-02 15:38:51 +02:00
jrandolf
2615c1c3d6
fix: use null
instead of undefined
( #8463 )
2022-06-02 15:38:13 +02:00
Alex Rudenko
5c9050aea0
fix: use isPageTargetCallback in Browser::pages() ( #8460 )
2022-06-02 13:27:31 +02:00
release-please[bot]
b3b62b35f3
chore(main): release 14.2.0 ( #8457 )
...
* chore(main): release 14.2.0
* chore: freeze version on docs
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2022-06-01 22:11:58 +02:00
jrandolf
f2d8276d6e
feat: support node 18 ( #8447 )
2022-06-01 13:53:17 +02:00
jrandolf
30438e6532
chore: use ts-doc and factor out importFSModule
( #8449 )
2022-06-01 11:11:09 +02:00
jrandolf
3f4451eff7
chore: extract puppeteer launch options to type ( #8448 )
2022-05-31 17:54:25 +00:00
jrandolf
9f9a1a4dd5
chore: update deps ( #8446 )
2022-05-31 19:04:30 +02:00
Yutaka Hirano
2219eed386
chore: fix network-service related chromium feature settings ( #8350 )
2022-05-31 17:32:54 +02:00
jrandolf
b4e751f29c
feat: use strict typescript ( #8401 )
2022-05-31 16:34:16 +02:00
Junyan
92110151d9
fix: multiple same request event listener ( #8404 )
2022-05-30 20:34:08 +00:00
Alex Rudenko
54efc2c949
feat(chromium): roll to Chromium 103.0.5059.0 (r1002410) ( #8410 )
2022-05-30 19:38:38 +02:00
Alex Rudenko
c96c915b53
fix: do not use loaderId for lifecycle events ( #8395 )
...
This PR works around the upstream bug crbug.com/1325782. Previously Puppeteer relied on the presence of the loaderId to determine the kind of navigation and expected events. It does not look like there is a reason to do so: instead, we could see what events we get and proceed accordingly.
2022-05-30 10:30:30 +02:00
Alex Rudenko
256223a7b1
chore: strict-mode TS for DOMWorld ( #8398 )
2022-05-25 15:34:11 +02:00
Alex Rudenko
af92a24ba9
fix: use strict TS in Input.ts ( #8392 )
2022-05-24 14:28:36 +00:00
Alex Rudenko
b349d71dcd
chore: fix strict-mode TS in LifecycleWatcher ( #8387 )
2022-05-24 11:14:19 +00:00
Alex Rudenko
aa014d8f5f
chore: fix TS issues in NetworkManager ( #8386 )
2022-05-23 17:41:11 +02:00
Alex Rudenko
0ca60a7ff0
chore(release): mark v14.1.1 ( #8374 )
2022-05-19 14:54:39 +00:00
Alex Rudenko
04dbd8f39a
Revert "fix: do not use loaderId for Lifecycle events ( #8353 )" ( #8369 )
...
This reverts commit 7107d2d300
.
2022-05-19 12:05:33 +00:00
Alex Rudenko
7107d2d300
fix: do not use loaderId for Lifecycle events ( #8353 )
2022-05-17 13:27:21 +00:00
jrandolf
74380303ac
fix: only check loading iframe in lifecycling ( #8348 )
2022-05-17 12:15:44 +00:00
Simon
dccfadb90e
fix: kill browser process when 'taskkill' fails on Windows ( #8352 )
2022-05-16 13:32:29 +00:00
Alex Rudenko
eec2bf882b
chore: set up daily jobs for latest Chromium builds ( #8344 )
2022-05-13 12:15:12 +00:00
Alex Rudenko
1441fb84d8
chore(release): mark v14.1.0 ( #8339 )
2022-05-13 07:31:25 +00:00
Alex Rudenko
3b66a2c47e
feat: allow handling other targets as pages internally ( #8336 )
...
Co-authored-by: jrandolf <101637635+jrandolf@users.noreply.github.com>
2022-05-13 08:04:46 +02:00
Pirikara
a61144d437
fix: If currentNode and root are the same, do not include them in the result ( #8332 )
...
* fix: If currentNode and root are the same, do not include them in the result
* fix: Tests that only child element is included in the result
Co-authored-by: jrandolf <101637635+jrandolf@users.noreply.github.com>
2022-05-11 12:17:02 +00:00
Alex Rudenko
4854ad5b15
fix: disable AvoidUnnecessaryBeforeUnloadCheckSync to fix navigations ( #8330 )
2022-05-11 09:41:53 +02:00
Alex Rudenko
7eaadafe19
feat: add waitForXPath to ElementHandle ( #8329 )
2022-05-10 12:45:20 +02:00
jrandolf
6841bd68d8
feat: support ES modules ( #8306 )
2022-05-09 11:17:24 +00:00
Ergün Erdoğmuş
be4c930c60
feat(chromium): roll to Chromium 102.0.5002.0 (r991974) ( #8319 )
2022-05-09 08:58:48 +00:00
Valentin Semirulnik
baa017db92
feat: add support for Apple Silicon chromium builds ( #7546 )
...
Google has published Chromium builds for Apple Silicon so we can fetch it now
Related to #6622
2022-05-05 07:33:19 +00:00
Alex Rudenko
2804ae8cdb
fix!: strict mode fixes for HTTPRequest/Response classes ( #8297 )
...
Solves type issues in HTTPRequest/Response with some slight changes in the behaviour and API.
Issues #6769
2022-05-05 06:48:03 +00:00
Alex Rudenko
553959884f
fix: make sure inner OOPIFs can be attached to ( #8304 )
2022-05-04 07:46:38 +02:00
Alex Rudenko
e841d7f9f3
fix: tests failing in headful ( #8273 )
...
* fix: test failing in headful
* fix: install Firefox for headful tests
* fix: skip favicon.ico requests in test
* fix: auth test in headful
* fix: disable NetworkTimeServiceQuerying
* fix: filter more favicon requests
* fix: network test with favicon
* fix: improve fixes
2022-05-02 11:37:21 +02:00
Darío Kondratiuk
f39eb70f2f
test: run Frame.evaluate tests on Firefox ( #8296 )
2022-05-02 08:21:19 +02:00
jrandolf
7a51bff47f
feat: add back
and forward
mouse buttons ( #8284 )
2022-04-27 21:00:07 +00:00
Alex Rudenko
1308d9aa6a
feat: support chrome headless mode ( #8260 )
...
* feat: support chrome headless mode
Co-authored-by: Ergün Erdoğmuş <erdogmusergun@gmail.com>
2022-04-25 13:11:23 +02:00
Darío Kondratiuk
4b786c904c
fix: forget request will be sent from the _requestWillBeSentMap list. ( #8226 )
...
That forget looked wrong to me. Let me know if this change is correct.
2022-04-19 14:46:40 +00:00
Henrik Skupin
b6504d7186
fix: also kill Firefox when temporary profile is used ( #8233 )
...
* fix: also kill Firefox when temporary profile is used
* fix: use separate tests for Puppeteer.launch should filter out ignored default arguments
2022-04-19 12:09:23 +00:00
Joel Baranick
91a8e73b11
fix: forget queuedEventGroup when emitting response in responseReceivedExtraInfo ( #8234 ) ( #8239 )
2022-04-19 09:28:44 +00:00
Ergün Erdoğmuş
ec74bd811d
feat(chromium): roll to Chromium 101.0.4950.0 (r982053) ( #8213 )
...
Co-authored-by: Ergün Erdoğmuş <ergunsh@chromium.org>
2022-04-08 11:10:02 +00:00
Alex Rudenko
ed4afe81a5
docs: typos and minor documentation issues ( #8211 )
2022-04-08 11:58:55 +02:00
Alex Rudenko
0955225b51
fix: consider existing frames when waiting for a frame ( #8200 )
2022-04-07 15:05:36 +02:00
Cody Eakins
12260b19af
docs: fix small typo ( #8195 )
...
This commit fixes a single typo.
- functon -> function
2022-04-06 08:32:31 +00:00
Alex Rudenko
9ac7318506
fix: disable bfcache in the launcher ( #8196 )
...
Puppeteer has problems handling navigations to pages that
are restored from the back-forward cache. Let's disable it
until we have the support and test coverage.
Issues: #8182
2022-04-06 09:04:31 +02:00
Junyan
c1dcd857e3
feat: respond multiple headers with same key ( #8183 )
2022-04-05 09:06:35 +00:00
liangwu
8f13470af0
fix: chromium downloading hung at 99% ( #8169 )
...
set keep-alive header to fix downloading done without 'finish' event trigged on some devices.
2022-03-31 08:08:22 +02:00
Junyan
37ede68770
fix: get extra headers from Fetch.requestPaused event ( #8162 )
2022-03-28 07:54:24 +00:00
Kazuki Higashiguchi
e31b8e6d39
docs: fix small typo ( #8167 )
...
The commit fixes the two typos.
- guarnateed -> guaranteed
- guaranteeded -> guaranteed
2022-03-28 06:00:10 +00:00
Alex Rudenko
7748730163
chore: revert #7868 to use the size parameter for streaming PDF ( #8145 )
...
Issues: #7757
2022-03-18 15:08:25 +01:00
Alex Rudenko
34775e5831
fix: waitForNavigation in OOPIFs ( #8117 )
2022-03-09 12:24:17 +01:00
James Diefenderfer
3feca325a9
fix: Inherit browser-level proxy settings from incognito context ( #7770 )
...
* chore: add request proxy tests
* fix: inherit browser-level proxy settings from incognito context
* fix: skip test on Windows
2022-03-07 10:12:26 +00:00
Alex Rudenko
d12f42754f
feat(chromium): roll to Chromium 100.0.4889.0 (r970485) ( #8108 )
2022-03-07 10:18:25 +01:00
Dima
309e8b80da
fix(page): page.createIsolatedWorld error catching has been added ( #7848 )
...
Co-authored-by: DimaShustal <dzmitry.shustal@gmail.com>
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
2022-03-03 12:56:12 +01:00
Alex Rudenko
85decdc28d
fix: regression in --user-data-dir handling ( #8060 )
2022-02-23 19:21:17 +00:00
Alex Rudenko
e6a6295d9a
fix: use both __dirname and require.resolve to support different bundlers ( #8046 )
...
Issues: #8044
2022-02-22 10:22:25 +00:00
jrandolf
e9278fcfcf
feat: export Frame._client
through getter ( #8041 )
...
Co-authored-by: Randolf Jung <jrandolf@chromium.org>
2022-02-21 14:58:37 +00:00
Tmk
dbf0639822
feat: add support for async waitForTarget ( #7885 )
...
* feat: add support for async waitForTarget
* fix: add timeout
* fix: potential async bugs
2022-02-18 12:05:29 +01:00
Junyan
543a4d44bc
chore: remove console.error ( #7883 )
...
* chore: remove console.error
* fix: replace console.error with debugError
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
2022-02-18 08:47:14 +00:00
Michael Mok
5c308b0704
fix: ensure dom binding is not called after detach ( #8024 )
...
* fix: ensure dom binding is not called after detatch
Fixes #7814
* refactor: detach listeners instead
* refactor: safer approach
* fix: test in test/page.spec.ts
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
2022-02-17 15:52:51 +00:00
Pasi Tuominen
0eb9c78617
fix: change kill to signal the whole process group to terminate ( #6859 )
...
* fix: change kill to signal the whole process group to terminate immediately
* chore: ignore taskkill errors
Co-authored-by: Jan Scheffler <janscheffler@chromium.org>
2022-02-17 12:17:33 +00:00
omjadas
30b3d49b0d
feat(HTTPResponse): expose timing information ( #8025 )
2022-02-15 11:16:49 +01:00
Alex Rudenko
5346e70ffc
fix: element screenshot issue in headful mode ( #8018 )
...
Fixes : #7999
2022-02-15 11:15:18 +01:00
Alex Rudenko
bbb186d88c
fix: use require.resolve instead of __dirname ( #8003 )
2022-02-14 10:03:45 +00:00
Nick Schonning
b2bf70fc3b
chore: update prettier globs and format files ( #7856 )
...
* chore: update prettier globs and format files
* fix: remove reference to Markdownlint
2022-02-11 20:29:43 +01:00
Josh Bielick
6d6ea9bf59
fix: always use ENV executable path when present ( #7985 )
...
Some recent changes to allow arm64 environments (including M1 macs) to
launch a chromium installation successfully before arm-compatible builds
were downloadable prevented the usage of PUPPETEER_EXECUTABLE_PATH in
some environments. Currently, when the platform is not darwin and the
arch is arm64, an executable cannot be specified using the environment
variable.
Generally speaking, environment variables have highest precedence for
options such as this since they depend on system configuration.
These change:
1. allow the ENV variable to always be used when defined and not
specified in LaunchOptions (and when not puppeteer-core)
2. Retain the existing behavior of assuming /usr/bin/chromium-browser on
platforms like Ubuntu (exact if-conditions preserved to avoid any
breaking changes)
3. Add some tests for this particular portion of the code.
2022-02-11 13:07:31 +00:00
Alex Rudenko
179ededa14
revert: esm modules ( #7996 )
...
* Revert "fix(puppeteer): export internals (#7991 )"
This reverts commit 448118cbdb
.
* Revert "feat(puppeteer): export esm modules in package.json (#7964 )"
This reverts commit 523b487e88
.
2022-02-10 13:34:36 +00:00
jrandolf
8ff9d598bf
chore(deps): update deps
...
Signed-off-by: Randolf Jung <jrandolf@chromium.org>
Co-authored-by: Randolf Jung <jrandolf@chromium.org>
2022-02-09 14:49:25 +00:00
jrandolf
523b487e88
feat(puppeteer): export esm modules in package.json ( #7964 )
...
* feat(puppeteer): export esm modules in package.json
Signed-off-by: Randolf Jung <jrandolf@chromium.org>
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
Co-authored-by: Randolf Jung <jrandolf@chromium.org>
2022-02-09 07:47:27 +00:00