Skip to content

feat: playwright >= 1.58.0#67

Merged
fengmk2 merged 1 commit intomasterfrom
playwirght-1.58
Jan 27, 2026
Merged

feat: playwright >= 1.58.0#67
fengmk2 merged 1 commit intomasterfrom
playwirght-1.58

Conversation

@elrrrrrrr
Copy link
Member

@elrrrrrrr elrrrrrrr commented Jan 26, 2026

https://github.com/microsoft/playwright/pull/38573/changes
playwright 从 1.58.0 开始,把 chromium 的静态模板改成调用 cftUrl 方法获取,不再从 playwright/builds 中获取版本。

新增了 PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST 指向 chromium 官方 testing 库,确保兼容性。
其余 firefox、webkit 等 binary 仍然从 playwright/builds 中获取对应版本。
对于 playwright <= 1.57.0 版本仍然通过 playwright/builds 中获取,不识别 PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST 变量

image

Summary by CodeRabbit

  • Chores
    • Updated Playwright Chromium download host configuration in environment settings
    • Added mirror-specific host configuration for regional deployment environments
    • Updated test environment setup to reflect new configuration

✏️ Tip: You can customize this high-level summary in your review settings.

@elrrrrrrr elrrrrrrr requested review from fengmk2 and killagu January 26, 2026 14:45
@gemini-code-assist
Copy link

Summary of Changes

Hello @elrrrrrrr, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求旨在适应 Playwright 1.58.0 及更高版本中 Chromium 下载机制的变化。通过引入一个专门的下载主机环境变量,它确保了新版本 Playwright 能够正确地从指定的镜像源获取 Chromium,同时保持了对旧版本 Playwright 和其他浏览器二进制文件的现有下载逻辑的兼容性。

Highlights

  • Playwright Chromium 下载机制更新: Playwright 从 1.58.0 版本开始,Chromium 的下载方式从静态模板改为通过 cftUrl 方法获取,不再从 playwright/builds 路径获取。
  • 新增 PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST 环境变量: 引入了 PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST 环境变量,用于指定 Chromium 的下载源,以确保与新机制的兼容性。
  • Chromium 下载源指向 chrome-for-testing 镜像: PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST 被配置为 https://cdn.npmmirror.com/binaries/chrome-for-testing
  • 其他浏览器和旧版本兼容性: Firefox、Webkit 等其他浏览器二进制文件仍通过 PLAYWRIGHT_DOWNLOAD_HOST 获取。对于 Playwright <= 1.57.0 版本,Chromium 仍通过 playwright/builds 获取,且不识别新的 PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST 变量。
  • 配置更新: package.jsontest/index.test.js 文件已更新,以包含新的 PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST 配置。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link

coderabbitai bot commented Jan 26, 2026

📝 Walkthrough

Walkthrough

This pull request adds the PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST environment variable to the China mirrors configuration in package.json, pointing to a Chinese CDN mirror for Playwright's Chromium binary downloads. Corresponding test environment mocks are updated to include this new variable.

Changes

Cohort / File(s) Summary
Configuration Updates
package.json
Adds PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST environment variable with CDN mirror URL to mirrors.china.ENVS object
Test Environment Setup
test/index.test.js
Adds PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST environment variable to three test environment mock locations for consistent testing

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • feat: add env for gl@8 #55 — Adds related environment variable entries to the same mirrors.china.ENVS configuration section with corresponding test updates

Suggested labels

enhancement

Suggested reviewers

  • fengmk2
  • killagu

Poem

🐰 A whisker-twitching hop of joy!

New mirrors for our Chromium friend,
From mountains of the East they send,
Fast downloads make our tests rejoice,
China's CDN—the right choice! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: playwright >= 1.58.0' directly reflects the main change - adding support for Playwright 1.58.0 with a new environment variable configuration for Chromium downloads.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

本次 PR 为支持 playwright >= 1.58.0 版本,引入了 PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST 环境变量,这是由于 playwright 更改了其 chromium 的下载机制。package.json 中的变更以及 test/index.test.js 中对应的测试更新都是正确且与 PR 的目标一致的。代码很整洁,变更也控制得很好。我只在测试文件中发现了一个可以改进代码可维护性的地方。

@fengmk2 fengmk2 enabled auto-merge January 26, 2026 14:48
@fengmk2 fengmk2 added this pull request to the merge queue Jan 27, 2026
Merged via the queue into master with commit 1af2ea5 Jan 27, 2026
10 checks passed
@fengmk2 fengmk2 deleted the playwirght-1.58 branch January 27, 2026 03:01
fengmk2 pushed a commit that referenced this pull request Jan 27, 2026
[skip ci]

## 2.19.0 (2026-01-27)

* feat: playwright >= 1.58.0 (#67) ([1af2ea5](1af2ea5)), closes [#67](#67) [hi#level](https://github.com/hi/issues/level)
* chore: Configure Renovate (#60) ([ae84b8a](ae84b8a)), closes [#60](#60)
* chore(deps): update actions/checkout action to v6 (#65) ([e75dffa](e75dffa)), closes [#65](#65)
* chore(deps): update dependency node to v24 (#64) ([38628dc](38628dc)), closes [#64](#64)
@github-actions
Copy link

🎉 This PR is included in version 2.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants