Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Microsoft Playwright Roll Browser

From Leeroopedia

Template:Implementation Page

Overview

Roll Browser is a build utility for updating browser revisions in the Playwright repository, handling version bumps, protocol type regeneration, and CDN URL validation.

Description

This script automates the process of updating a browser (Chromium, Firefox, WebKit, FFmpeg) to a new revision: 1. Parses CLI arguments for browser name and revision number 2. Updates the revision in browsers.json 3. Validates that the browser build exists on the CDN 4. Downloads the new browser build 5. Regenerates protocol type definitions from the new browser 6. Supports short aliases (cr, ff, wk) for browser names

The script handles browser-specific logic:

  • Chromium, Firefox, WebKit have protocol type files that need regeneration
  • Firefox-beta has a separate revision track
  • FFmpeg updates are revision-only without protocol changes

Usage

Run when updating browsers to new revisions during the release process.

Code Reference

Source Location

utils/roll_browser.js (137 lines)

Execution

node utils/roll_browser.js <browser> <revision>
# Example:
node utils/roll_browser.js chromium 123456
node utils/roll_browser.js ff 1234

I/O Contract

Inputs

  • Browser name: chromium, firefox, webkit, ffmpeg, firefox-beta (or aliases cr, ff, wk)
  • Revision number

Outputs

  • Updated browsers.json with new revision
  • Downloaded browser binary
  • Regenerated protocol type definition files

Side Effects

  • Downloads browser from CDN
  • Runs protocol type generator

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment