chore(deps): bump Playwright to 1.61 and vendor recorder codegen#1151
Open
shahzad31 wants to merge 1 commit into
Open
chore(deps): bump Playwright to 1.61 and vendor recorder codegen#1151shahzad31 wants to merge 1 commit into
shahzad31 wants to merge 1 commit into
Conversation
…ting it Playwright 1.61 bundles its server code into coreBundle.js and no longer ships the codegen classes as importable modules, so the recorder's `playwright-core/lib/server/codegen/javascript` deep import no longer resolves. Vendor the minimal slice SyntheticsGenerator extends (_asLocator + _generateActionCall + JavaScriptFormatter) into src/formatter/codegen.ts, reusing the still-exported `iso` helpers (asLocator / formatObject / escapeWithQuotes) rather than vendoring the heavy locator logic. Formatter snapshots are unchanged. Also bump playwright/-chromium/-core to 1.61.0 (required for the native APIResponse TLS APIs) and refresh the device-descriptor Chrome UA in the options test that 1.61's bundled descriptors updated. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps
playwright/playwright-chromium/playwright-corefrom1.58.2to1.61.0.Playwright 1.61 bundles its server code into
coreBundle.jsand no longer exports the recorder's codegen classes, so the existingplaywright-core/lib/server/codegen/javascriptdeep import insrc/formatter/javascript.tsstops resolving (TS2307). This vendors the minimal sliceSyntheticsGeneratorextends —JavaScriptLanguageGenerator._asLocator/._generateActionCallandJavaScriptFormatter— intosrc/formatter/codegen.ts, reusing Playwright's still-exportedisohelpers (asLocator/formatObject/escapeWithQuotes) instead of vendoring the heavy locator logic.Why
Prerequisite for #997 (multi-step API journeys), which uses the native
APIResponse.securityDetails()/APIResponse.serverAddr()APIs added in Playwright 1.61 (microsoft/playwright#40932). Splitting the bump + codegen fix out keeps that PR focused on the feature.Changes
package.json/package-lock.json: Playwright1.58.2→1.61.0.src/formatter/codegen.ts(new): vendoredJavaScriptLanguageGenerator(minimal) +JavaScriptFormatter, adapted from playwright-core (Apache-2.0, © Microsoft Corporation).src/formatter/javascript.ts: import the codegen classes from the vendored module instead of the removed deep path.__tests__/options.test.ts: refresh the device-descriptor Chrome UA string that 1.61's bundled descriptors updated (145.0.7632.6→149.0.7827.55).Test plan
tscclean__tests__/formatter/javascript.test.ts— recorder codegen snapshots unchanged (7/7)