Skip to content

fix(cli): prefer project Puppeteer installation - #1144

Open
jon4v wants to merge 1 commit into
GoogleChrome:mainfrom
jon4v:fix/prefer-project-puppeteer
Open

fix(cli): prefer project Puppeteer installation#1144
jon4v wants to merge 1 commit into
GoogleChrome:mainfrom
jon4v:fix/prefer-project-puppeteer

Conversation

@jon4v

@jon4v jon4v commented Aug 12, 2026

Copy link
Copy Markdown

Summary

  • prefer the current project's puppeteer or puppeteer-core installation for puppeteerScript
  • retain the CLI dependency tree as a fallback
  • cover project puppeteer, project puppeteer-core, and fallback resolution

This aligns module resolution with the existing configuration documentation, which asks users to install a Puppeteer version compatible with their Chrome installation. Today, the CLI's transitive puppeteer-core is found first, so the documented project installation is never reached whenever that transitive dependency exists.

Reproduction

With @lhci/cli@0.15.1 and puppeteer@25.6.0 installed in the current project, the existing resolver selects the CLI's puppeteer-core@24.43.1 instead of the explicit project dependency.

After this change, the project installation is selected. If neither project package exists, resolution falls back to the CLI dependency tree as before.

Validation

  • focused Jest regression: 3/3
  • yarn test:typecheck
  • source lint
  • test lint
  • git diff --check

@google-cla

google-cla Bot commented Aug 12, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant