Skip to content

[playwright-browser-tunnel] Widen playwright-core peer dependency range - #5929

Merged
Bharat Middha (bmiddha) merged 2 commits into
microsoft:mainfrom
anarmawala:widen-playwright-core-peer-range
Aug 18, 2026
Merged

[playwright-browser-tunnel] Widen playwright-core peer dependency range#5929
Bharat Middha (bmiddha) merged 2 commits into
microsoft:mainfrom
anarmawala:widen-playwright-core-peer-range

Conversation

@anarmawala

Copy link
Copy Markdown
Contributor

Summary

Widens the playwright-core peer dependency range of @rushstack/playwright-browser-tunnel from ~1.56.1 to >=1.56.1 <2.0.0, and moves the package's own Playwright dependencies to the current release (1.62.1).

Motivation

The ~1.56.1 peer range forces every consumer onto one specific Playwright minor. Any consumer that upgrades Playwright is blocked until this package publishes a matching release, even though the tunnel itself is not coupled to a particular version.

That coupling isn't real. The tunnel negotiates the Playwright version over the wire:

  • TunneledBrowserConnection.ts defaults playwrightVersion to the client's installed playwright-core/package.json version and sends it in the handshake.
  • PlaywrightBrowserTunnel receives that version and installs it on the host on demand:
    `playwright-core-${playwrightVersion}@npm:playwright-core@${playwrightVersion}`
    then dynamically imports it to launch the browser server.

So the host already runs whatever version the client asks for. The version-matching requirement between the Playwright client and browser server is satisfied by that handshake, not by the peer range.

Everything the package imports from playwright-core is public API — LaunchOptions, Browser, BrowserServer, BrowserType — plus playwright-core/package.json for the version string. LaunchOptionsValidator iterates Object.keys(launchOptions) and has no hardcoded option list, so it needs no changes as Playwright's launch options evolve.

Changes

apps/playwright-browser-tunnel

  • peerDependencies.playwright-core: ~1.56.1>=1.56.1 <2.0.0
  • dependencies.playwright: 1.56.11.62.1
  • devDependencies.playwright-core / @playwright/test: ~1.56.1~1.62.1

vscode-extensions/playwright-local-browser-server-vscode-extension

  • dependencies.playwright-core: ~1.56.1~1.62.1

The peer range keeps a <2.0.0 ceiling so a future major still requires an explicit review.

Note

apps/playwright-browser-tunnel declares playwright (not playwright-core) as a runtime dependency, but nothing under src/ imports it — only @playwright/test in tests/ and playwright.config.ts, which are dev-only. It looks like it could be moved to devDependencies, which would also stop pulling a second full Playwright install into consumers' lockfiles. I left it in place since that's a separate call; happy to fold it in if you'd like.

@TheLarkInn
Sean Larkin (TheLarkInn) enabled auto-merge (squash) August 18, 2026 03:39
The `~1.56.1` peer range pinned consumers to a single Playwright minor,
even though the tunnel is not coupled to a specific version. The client
sends its own installed `playwright-core` version in the handshake, and
the host installs and imports that exact version on demand, so the
client/browser-server version match is established at runtime rather
than by the peer range. Only public API types are imported, and
`LaunchOptionsValidator` enumerates launch options dynamically.

Widen the peer range to `>=1.56.1 <2.0.0`, keeping a major-version
ceiling so a future breaking release still gets an explicit review, and
move the package's own Playwright dependencies to 1.62.1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The extension is not covered by a Rush change file, so its version is
bumped manually alongside the `playwright-core` dependency update.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
auto-merge was automatically disabled August 18, 2026 05:52

Head branch was pushed to by a user without write access

@anarmawala
Arshad Narmawala (anarmawala) force-pushed the widen-playwright-core-peer-range branch from 0d67c9b to 05c3247 Compare August 18, 2026 05:52
@bmiddha
Bharat Middha (bmiddha) enabled auto-merge (squash) August 18, 2026 06:08
@bmiddha
Bharat Middha (bmiddha) merged commit 02a5f0a into microsoft:main Aug 18, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from Needs triage to Closed in Bug Triage Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

3 participants