dev
Development workflows for the playwright-cli repository, including rolling Playwright dependencies and preparing releases.
Install
npx skills add https://github.com/microsoft/playwright-cli --skill devHow to prepare a release
A release is a chore: mark v<next-patch> commit whose PR body is the release notes. Example: https://github.com/microsoft/playwright-cli/pull/367.
Steps
- Bump the patch version in
package.json(e.g.0.1.7→0.1.8), thennpm installto syncpackage-lock.json. This is the entry point — everything else (branch name, PR title, release notes filename) keys off the new version. -
Find the baseline. The previous release is the last
chore: mark v...commit onmain. Read the Playwright version pinned at that commit — that's the baseline for the diff. -
Figure out the playwright commit window. Convert the baseline's alpha timestamp to a UTC date, and use the new alpha's date as the upper bound. Alphas are either
1.X.0-alpha-<ms-epoch>or1.X.0-alpha-<YYYY-MM-DD>. -
List Playwright commits in the window. Run from
~/code/playwright(a local Playwright checkout).--after/--beforework on any ref regardless of whatorigin/maincurrently points at;--since/--untilcan silently return empty if the branch is behind. -
Filter to CLI-relevant commits. Keep anything touching the CLI surface or its runtime; drop internal/unrelated churn.
- Keep:
src/tools/cli-client/**,src/tools/cli-daemon/**,src/tools/mcp/**,remote/playwrightConnection, CDP-attach paths, tracing/video APIs the CLI exposes, and anything with afix(cli)/feat(cli)/fix(mcp)/feat(mcp)prefix. - Drop: test-runner rolls, firefox/chromium/webkit version bumps, docs-only, test infra, unrelated refactors.
- Use
git show --stat <sha>to sanity-check whether a commit's files touch the CLI.
- Keep:
-
Pull issue context for each kept PR. The PR's linked issue often has better user-facing wording than the PR/commit title.
-
Write the release notes to
RELEASE_NOTES_v<version>.md. Use this exact shape — no top-level#header, the PR title is the heading: -
Commit, push, open PR. The PR body is the contents of the release notes file (no
#header, no filename).
Pitfalls
- Don't use
--since/--untilwhen diffing Playwright — iforigin/mainin the local checkout is behind, they return empty.--after/--beforeagainst the local ref work. - Don't include a
# playwright-cli vX.Y.Zheader in the PR body — GitHub already renders the PR title. - Don't paraphrase the commit subject as the highlight. A user who filed an issue described the pain; reuse their framing.
- Don't include test-runner / browser-version-roll commits in release notes — they're noise for CLI users.