Skip to content

chore(deps): depend on playwright-core instead of playwright - #482

Open
AmrDab wants to merge 1 commit into
mainfrom
deps/playwright-core
Open

AmrDab wants to merge 1 commit into
mainfrom
deps/playwright-core

Conversation

@AmrDab

@AmrDab AmrDab commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Requested by Amr · project thread

Summary

clawdcursor only attaches to a browser that's already running, through chromium.connectOverCDP. That comes from playwright-core. The playwright package is a wrapper that adds the test runner (about 5 MB installed), which clawdcursor never uses. This is 1 of 5 separate simplification PRs.

Changes

  • package.json / lockfile: playwright → playwright-core at the same version range (^1.64.1, locked at 1.64.1).
  • Imports in src/platform/cdp-driver.ts, src/core/confirm-mode.ts and bench/lib/* now point to playwright-core. The API is the same.
  • vi.mock('playwright') → vi.mock('playwright-core') in 3 tests.
  • scripts/verify-install.js now checks for playwright-core. Its fix hint was wrong before: it said npx playwright install chromium, which installs a browser, not the package. It now says to reinstall.
  • scripts/bundle-cli.mjs external list, plus mentions in the eslint comment and SECURITY.md.

I didn't add a CHANGELOG entry because there's no Unreleased section, and 5 parallel PRs editing the top of the changelog would conflict. It's worth one line at release time.

Test plan

  • npm run typecheck clean, typecheck:tests clean, lint: 0 errors (same 3 warnings as main)
  • vitest --project unit: 4111 passed, 6 skipped (same as main)
  • npm run test:mcp-schema-snapshot: OK (compact 6, granular 90)
  • npm run build and loading dist/platform/cdp-driver.js work
  • Manual check on Linux: playwright-core connectOverCDP to a running Chromium, then getByText().click()
  • System tests and the Windows/macOS CI matrix: not run here. CI covers them.

Risk / scope

Low. It's the same library at the same version, imported from the package that actually contains it. No guarantees in SECURITY.md are touched.


Generated by Claude Code

clawdcursor only attaches to a running browser over CDP (connectOverCDP),
which playwright-core provides. The playwright package adds the test
runner on top (~5 MB installed) and nothing clawdcursor uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BKm7nbpP8aK35EfAYVt7NL

This branch has not been deployed

No deployments
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.

2 participants