upgrade-browser

작성자: flutter

Flutter Web Engine 및/또는 Framework 테스트에서 브라우저 버전(Chrome 또는 Firefox)을 업그레이드합니다. Chrome 또는 Firefox를 최신 버전으로 롤 또는 업그레이드하라는 요청을 받을 때 사용하세요.

npx skills add https://github.com/flutter/flutter --skill upgrade-browser

Upgrade Browser

This skill automates the process of upgrading Chrome and Firefox versions in the Flutter Web Engine and the Framework tests.

Workflow

1. Identify and Verify the New Version

Before updating any files, find and verify the existence of the version you want to use.

  • To find the latest stable version:
    dart scripts/fetch_versions.dart latest <chrome|firefox>
    
  • To verify a specific version exists:
    dart scripts/fetch_versions.dart verify <chrome|firefox> <version>
    
    This command will return true or false.

Verification Rules:

  • Enforced by default: If the command returns false, do not proceed.
  • Optional if requested: If the user explicitly asks to skip verification (e.g., "Upgrade to version X without verification"), you may skip this step.
  • Failed verification: If verification fails but the user confirms they want to proceed anyway, you may continue.

2. Update Local Files

The user may request to upgrade one or both locations. They may also use different versions for each location.

Flutter Web Engine (engine/src/flutter/lib/web_ui/dev/package_lock.yaml)

Update the version field for chrome or firefox.

chrome:
  version: 'NEW_VERSION'

firefox:
  version: 'NEW_VERSION'

Framework Tests (.ci.yaml)

Update all occurrences of chrome_and_driver with the new version.

- {"dependency": "chrome_and_driver", "version": "version:NEW_VERSION"}

Use replace with allow_multiple: true to ensure all instances are updated. Note: Currently, only Chrome is managed this way in .ci.yaml.

3. CI Config Sync

After updating the browser versions, synchronize the CI configurations. This step updates engine/src/flutter/ci/builders/linux_web_engine_test.json.

Only run this once. To verify if it needs to run, check the modification time of the file:

ls -l engine/src/flutter/ci/builders/linux_web_engine_test.json

From engine/src/flutter/lib/web_ui, run:

dev/felt generate-builder-json

Validation: Confirm the file engine/src/flutter/ci/builders/linux_web_engine_test.json has a new timestamp after the command finishes.

4. Local Verification

Before uploading to CIPD, run tests locally to ensure no regressions. From engine/src/flutter/lib/web_ui, run:

dev/felt test

Note: You can use --browser <chrome|firefox> to limit the scope.

5. CIPD Upload (Package Roller)

This is the final step as it uploads binaries to CIPD and requires special, temporary permissions.

  1. Ask the user if they have the necessary CIPD permissions (contact #hackers-infra on Discord if unsure).
  2. If confirmed, from engine/src/flutter/lib/web_ui, run:
    dart dev/package_roller.dart
    
    Note: Use --dry-run if the user wants to test first.

Examples

  • User: "Upgrade Chrome and Firefox to the latest stable versions everywhere."

  • Agent:

    1. Runs dart scripts/fetch_versions.dart latest to get the latest versions.
    2. Updates engine/src/flutter/lib/web_ui/dev/package_lock.yaml and .ci.yaml.
    3. Runs dev/felt generate-builder-json to sync CI configs.
    4. Suggests running local tests.
    5. Finally, asks about CIPD permissions.
  • User: "Roll Chrome to version 135.0.0.0 everywhere. Skip verification."

  • Agent:

    1. Skips dart scripts/fetch_versions.dart verify because the user requested it.
    2. Updates package_lock.yaml and .ci.yaml directly with 135.0.0.0.
    3. Follows the rest of the workflow (Sync, Test, CIPD).
  • User: "Update Firefox in the web engine to 130.0."

  • Agent:

    1. Verifies version 130.0 for Firefox using dart scripts/fetch_versions.dart verify firefox 130.0.
    2. If verification fails, informs the user: "I was unable to verify Firefox version 130.0 through Mozilla's official release history. Are you sure this is the correct version number?"
    3. If user confirms or verification succeeds, updates package_lock.yaml.
    4. Follows the rest of the workflow (Sync, Test, CIPD).

flutter의 다른 스킬

adding-release-notes
flutter
사용자 대상 변경 사항 설명을 DevTools 릴리스 노트에 추가합니다. NEXT_RELEASE_NOTES.md 파일에 개선 사항, 수정 사항 또는 새로운 기능을 문서화할 때 사용하세요.
official
dart-modern-features
flutter
현대화를 위한 후보를 찾으려면:
official
api-review
flutter
지정된 코드를 표준 API 설계 지침에 맞춰 검토합니다. 사용자가 API 리뷰를 요청하거나 API 설계에 따라 코드를 확인할 때 이 스킬을 사용하세요…
official
code-documentation
flutter
효과적인 코드 문서 작성 가이드로, docstrings, JSDoc, dartdoc 및 구현 주석을 포함합니다. 새 코드를 작성하거나 추가할 때 이 스킬을 사용하세요…
official
dart-add-unit-test
flutter
Write and organize unit tests for functions, methods, and classes using `package:test`. Use when creating new logic or fixing bugs to ensure code remains…
official
dart-build-cli-app
flutter
진입점 구조, 종료 코드, 크로스 플랫폼 스크립트. 명령줄 유틸리티, 스크립트 또는 애플리케이션을 빌드할 때 사용합니다.
official
dart-collect-coverage
flutter
coverage 패키지를 사용하여 커버리지를 수집하고 LCOV 보고서를 생성합니다
official
dart-fix-runtime-errors
flutter
get_runtime_errors와 lsp를 사용하여 활성 스택 트레이스를 가져오고, 실패한 줄을 찾아 수정을 적용한 후 hot_reload를 통해 해결 여부를 확인합니다.
official