feat: support puppeteer v25#3772
Closed
renovate[bot] wants to merge 5 commits into
Closed
Conversation
renovate
Bot
force-pushed
the
renovate/puppeteer
branch
2 times, most recently
from
June 25, 2026 16:55
87ffd9b to
118036e
Compare
renovate
Bot
force-pushed
the
renovate/puppeteer
branch
from
July 2, 2026 12:56
118036e to
656a2ab
Compare
renovate
Bot
force-pushed
the
renovate/puppeteer
branch
from
July 12, 2026 14:39
656a2ab to
b63b32c
Compare
renovate
Bot
force-pushed
the
renovate/puppeteer
branch
from
July 16, 2026 18:03
b63b32c to
3203d65
Compare
Puppeteer 25 is ESM-only and its bundled Chrome changes a few behaviors. This keeps compatibility with older versions: - suppress the type-only ESM import errors the same way we do for got-scraping - map the removed `clickCount` click option to its `count` replacement in `clickElements()` (both are passed through, so older versions keep working) - set a `User-Agent` header from `gotoExtended()` via `page.setUserAgent()`, since newer Chrome ignores it in `setExtraHTTPHeaders()` - normalize the new `sameSite: 'Default'` cookie value to undefined in the session cookies
B4nan
approved these changes
Jul 16, 2026
Puppeteer 25 can hang `page.close()` indefinitely when the page's navigation was aborted (e.g. on a navigation timeout), and the request cleanup awaited it without any guard, blocking the crawler forever. Bound it with a 5s timeout.
…rors Unlike `@ts-expect-error`, it is inert when there is nothing to suppress, so the repo compiles against both puppeteer 24 (CJS) and 25+ (ESM only).
Contributor
Author
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
B4nan
added a commit
that referenced
this pull request
Jul 17, 2026
Puppeteer 25 is ESM-only, requires Node 22.12+, and its bundled Chrome
changes a few behaviors. This adds support for it while keeping
compatibility with older versions:
- suppress the type-only ESM import errors with inert `@ts-ignore`
comments (same approach as for got-scraping), so the code compiles
against both puppeteer 24 (CJS) and 25+ (ESM-only) — the published
`.d.ts` shape is unchanged
- map the removed `clickCount` click option to its `count` replacement
in `clickElements()`, passing both through so older versions keep
working
- set a `User-Agent` header from `gotoExtended()` via
`page.setUserAgent()`, since newer Chrome ignores it in
`setExtraHTTPHeaders()`
- normalize the new `sameSite: 'Default'` cookie value to `undefined` in
session cookies
- bound the `page.close()` call in request cleanup with a 5s timeout —
puppeteer 25 can hang it indefinitely when the page's navigation was
aborted (e.g. on a navigation timeout), which blocked the crawler
forever
No new runtime version detection was needed — the existing
`CdpBrowser`/`package.json` checks still work with v25, and
`require('puppeteer')` works there because v25's minimum Node has
`require(esm)`.
Everything is verified locally against both puppeteer 24.36.1 and 25.3.0
(build, type checks, and the full puppeteer test suites, including under
CPU load for the timeout tests).
Supersedes #3772.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
24.36.1→25.3.0Release Notes
puppeteer/puppeteer (puppeteer)
v25.3.0Compare Source
♻️ Chores
Dependencies
🎉 Features
🛠️ Fixes
📄 Documentation
v25.2.1Compare Source
♻️ Chores
Dependencies
🛠️ Fixes
v25.2.0Compare Source
🎉 Features
🛠️ Fixes
Dependencies
📄 Documentation
⚡ Performance
headersArrayiteration in HTTPRequest (#15004) (eb95798)🏗️ Refactor
v25.1.0Compare Source
🎉 Features
🛠️ Fixes
🏗️ Refactor
Dependencies
📄 Documentation
v25.0.4Compare Source
♻️ Chores
Dependencies
🛠️ Fixes
v25.0.3Compare Source
♻️ Chores
Dependencies
🛠️ Fixes
v25.0.2Compare Source
♻️ Chores
Dependencies
🛠️ Fixes
v24.43.1Compare Source
♻️ Chores
Dependencies
🛠️ Fixes
⚡ Performance
v24.43.0Compare Source
🎉 Features
Dependencies
🛠️ Fixes
v24.42.0Compare Source
♻️ Chores
Dependencies
🎉 Features
🛠️ Fixes
v24.41.0Compare Source
♻️ Chores
Dependencies
🎉 Features
🛠️ Fixes
v24.40.0Compare Source
🎉 Features
Dependencies
🛠️ Fixes
Target.asPagereturn the same Page instance (#14862) (e484a91)📄 Documentation
v24.39.1Compare Source
♻️ Chores
Dependencies
🎉 Features
🛠️ Fixes
v24.39.0Compare Source
♻️ Chores
Dependencies
🛠️ Fixes
v24.38.0Compare Source
♻️ Chores
Dependencies
🎉 Features
🛠️ Fixes
v24.37.5Compare Source
🎉 Features
Dependencies
🛠️ Fixes
v24.37.4Compare Source
♻️ Chores
Dependencies
🛠️ Fixes
v24.37.3Compare Source
♻️ Chores
Dependencies
🛠️ Fixes
v24.37.2Compare Source
♻️ Chores
Dependencies
🛠️ Fixes
📄 Documentation
v24.37.1Compare Source
♻️ Chores
Dependencies
🛠️ Fixes
📄 Documentation
v24.37.0Compare Source
♻️ Chores
Dependencies
🛠️ Fixes
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.