@molin.ai/rebrowser-cloudflare-puppeteer-core
v1.0.10
Published
A high-level API to control headless Chrome over the DevTools Protocol
Readme
Puppeteer fork
Forked from @cloudflare/puppeteer with rebrowser patches applied.
Development
npm install
npm run build
npm install # run again after build to install browser binariesTesting
npm run test:chrome:shell # no need to run all testsPublishing
npm install
npm run build
npm install # run again after build to install browser binaries
./rebrowser/apply_patch.sh ./rebrowser/patches/lib-v22.8.2.patch
cd packages/puppeteer-core
npm version patch
npm run build # update version in .ts
git add . && git commit -m 'v1.0.9'
npm publishUpdating from upstream
Check against original repo at https://github.com/cloudflare/puppeteer/
Debugging
Set __PUPPETEER_DEBUG (WIP: not working yet)
Updating Patches
When patches fail to apply due to codebase changes:
- Identify failing hunks - look for
.rejfiles after failed patch application - Update split patches - edit individual patches in
rebrowser/patches/lib-v22.8.2.patch-split/ - Regenerate main patch - run
./rebrowser/unsplit_patch.sh ./rebrowser/patches/lib-v22.8.2.patch-split - Test application - run
./rebrowser/apply_patch.sh ./rebrowser/lib-v22.8.2.patch
Custom Changes Made to puppeteer-core
To resolve merge conflicts correctly during upstream updates, keep in mind these modifications we've made:
- Removed Herebyfile
- Removed api-extractor
- Removed unused packages (vitest, mocha, sinon@root, tsd, @actions/core)
- Direct imports: Moved rxjs, mitt, parsel-js to production dependencies and import directly instead of through third_party re-exports
- Removed third_party re-export layer: Deleted third_party/*.ts files and updated all imports to use libraries directly
Upstreams
- https://github.com/cloudflare/puppeteer/blob/86d176c1d94affde1a934df7523b8efd5cab501b/README.md direct fork of this commit
- https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-v22.8.2 CF forked this
- https://github.com/rebrowser/rebrowser-patches/blob/f3123e2743abc3e773711a01b794900af1cb2b55/patches/puppeteer-core/lib.patch rebrowser patches version
