Skip to content

Fix narrow format test expectations for Playwright 1.58.2 / newer Chromium ICU#346

Merged
liuliu-dev merged 2 commits intodependabot/npm_and_yarn/npm_and_yarn-8ff8a2d82bfrom
copilot/sub-pr-343-another-one
Mar 9, 2026
Merged

Fix narrow format test expectations for Playwright 1.58.2 / newer Chromium ICU#346
liuliu-dev merged 2 commits intodependabot/npm_and_yarn/npm_and_yarn-8ff8a2d82bfrom
copilot/sub-pr-343-another-one

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Playwright 1.58.2 ships a newer Chromium with updated ICU data that produces shorter narrow style strings from Intl.RelativeTimeFormat — dropping abbreviation periods and spaces (e.g. in 1 hr.in 1h, in 1 min.in 1m, 3 wk. ago3w ago).

Changes

  • test/relative-time.js — Update 15 narrow formatStyle expectations to match the new ICU output:

    Old New
    in 50 sec. in 50s
    in 1 min. / 1 min. ago in 1m / 1m ago
    in 1 hr. / 1 hr. ago in 1h / 1h ago
    in 3 wk. / 3 wk. ago in 3w / 3w ago
    in 2 yr. in 2y
  • src/duration-format-ponyfill.ts — Add as const to the 'unit' string literal to satisfy the stricter Intl.NumberFormat overload resolution introduced by the updated TypeScript version:

    // Before
    {style: 'unit', unit: nfUnit, unitDisplay: unitStyle}
    // After
    {style: 'unit' as const, unit: nfUnit, unitDisplay: unitStyle}

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…um/ICU

Co-authored-by: francinelucca <40550942+francinelucca@users.noreply.github.com>
Copilot AI changed the title [WIP] Bump npm_and_yarn group across 1 directory with updates Fix narrow format test expectations for Playwright 1.58.2 / newer Chromium ICU Mar 4, 2026
@liuliu-dev liuliu-dev marked this pull request as ready for review March 9, 2026 18:28
@liuliu-dev liuliu-dev requested a review from a team as a code owner March 9, 2026 18:28
Copilot AI review requested due to automatic review settings March 9, 2026 18:28
@liuliu-dev liuliu-dev merged commit d813545 into dependabot/npm_and_yarn/npm_and_yarn-8ff8a2d82b Mar 9, 2026
3 checks passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates narrow-style relative time test expectations to align with the newer ICU data shipped in Playwright 1.58.2’s Chromium, and adjusts a DurationFormat ponyfill option object for stricter TypeScript Intl.NumberFormat typing.

Changes:

  • Update Intl.RelativeTimeFormat narrow output expectations (e.g., in 1 hr.in 1h) in the relative-time test suite.
  • Add as const to the 'unit' style literal in duration-format-ponyfill.ts to satisfy updated TS overload resolution for Intl.NumberFormat.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
test/relative-time.js Updates narrow-style expected strings to match newer Chromium ICU output.
src/duration-format-ponyfill.ts Narrows the 'unit' option literal type to fix TypeScript overload inference for Intl.NumberFormat.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

4 participants