microsoft / microsoft/playwright

[BUG] Playwright CLI updater does not respect supply chain policies and spams the console

Open
#42,505 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P3-collecting-feedback
Dominant language
TypeScript
Stars
96.3k
Forks
6.5k
Avg merge
1d 6h
Merged PRs (30d)
180

Description

### What's going on?

running **any** `playwright-cli` command displays the following banner:

```
$ playwright-cli

╔════════════════════════════════════════════════════════════════════╗
║ Update available for @playwright/cli: 0.1.18 → 0.1.19 ║
║ Run `npm install -g @playwright/cli@latest` (global) or ║
║ `npm install --save-dev @playwright/cli@latest` (local) to update. ║
╚════════════════════════════════════════════════════════════════════╝
```

This does not respect minimum-age supply chain policies of the package manager (the package can not be updated since it's not old enough). Running these commands will **not** update the package.

Since usually you run several commands in succession, this quickly fills the console logs with large useless banners.

Also, it does:
- not respect the current package manager (eg. `pnpm` etc.), creating potential confusion.
- commands are wrong for monorepos in which the dependency is not necessarily in the current `package.json`.
- the package has been installed anyway by the user, so displaying how to install packages seems somewhat redundant...

Overall, this seems that it can cause more potential confusion with inaccurate instructions than it adds positive value.

### Version

cli 0.1.18

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by running any playwright-cli command with an available update, then locate the CLI updater that prints the banner. Check how it chooses installation commands and handles package-manager minimum-age policies and monorepos. Done means repeated commands no longer produce misleading or excessive update instructions, with the chosen behavior covered by relevant CLI tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
56/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.