Skip to content

test: the floor of the ICU version takes a version with more parts than it has - #47323

Merged
Jarred-Sumner merged 2 commits into
mainfrom
claude/icu-floor-four-part-version
Oct 29, 2026
Merged

Jarred-Sumner merged 2 commits into
mainfrom
claude/icu-floor-four-part-version

Conversation

@Jarred-Sumner

@Jarred-Sumner Jarred-Sumner commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to a review comment on #47281.

ICU version does not regress hands process.versions.icu to Bun.semver.order. On macOS the version is what the system's ICU reports, and u_versionToString can print three or four parts. The test beside it already allows for that (/^\d+\.\d+(\.\d+)*$/). Two things go wrong then:

  • Bun.semver.order throws on a fourth part.
  • It reads a missing part as the highest, so a floor of 72.1 is 72.1.MAX, and 72.1.0 is below it.

The floors have two parts, so the comparison now takes the first two parts of the version.

The test's lines, run by themselves, floor 72.1 Before After
78.1 (macOS 26.7.1) pass pass
74.2.0.1 Invalid SemVer: 74.2.0.1 pass
72.1.0.1 Invalid SemVer: 72.1.0.1 pass
72.1.0 fail (-1) pass
71.9.9.9 Invalid SemVer: 71.9.9.9 fail (-1), as it should

No machine is known to report more than two parts, so nothing fails today.

process.versions.icu on macOS is what the system's ICU reports, and u_versionToString can print four parts. Bun.semver.order throws on a fourth. No machine is known to report one: macOS 26.7.1 reports 78.1.
@robobun

robobun commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator
Updated 12:05 AM PT - Oct 29th, 2026

@Jarred-Sumner, your commit b60fa72 is building: #134972

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Comment thread test/js/node/process/process.test.js Resolved
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between c4b243a and b60fa72.

Files selected for processing: 1
  • test/js/node/process/process.test.js

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

Walkthrough

The ICU regression test now compares the first two dot-separated components of process.versions.icu against the platform and architecture minimum version.

Changes

ICU version check

Layer / File(s) Summary
ICU version comparison
test/js/node/process/process.test.js
The test compares the first two components of process.versions.icu with the minimum version. A comment explains the component-count rule and semver handling of missing components.

Possibly related PRs

  • oven-sh/bun#47314: Raises the ICU minimum in the same test and upgrades bundled ICU to 79.1.
  • oven-sh/bun#47281: Raises the ICU minimum in the same test and upgrades bundled ICU to 79.1.

Suggested reviewers: dylan-conway

Priority: Low

Merge Risk: Minimal · up to b60fa

The test accommodates longer ICU version strings without changing production behavior. No actionable merge-blocking risk is identified.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly identifies the ICU version floor change and the handling of versions with more components. The wording is somewhat awkward, but it is specific and related to the main change.
Description check Passed The description explains the problem, the implementation, and the verification results. It does not use the template headings, but it covers both required topics and is sufficiently complete.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Bun.semver.order reads a missing part as the highest, so 72.1 is 72.1.MAX and 72.1.0 is below it. With three parts kept, 72.1.0.1 against a floor of 72.1 still failed.
@Jarred-Sumner Jarred-Sumner changed the title test: the floor of the ICU version takes a version with four parts test: the floor of the ICU version takes a version with more parts than it has Oct 29, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code review completed

Nothing new to post: everything this review found is already covered by existing comments on this pull request or didn't merit a separate one.

Still open from earlier reviews (1):

  • Unresolved: 1 minor or pre-existing.

@Jarred-Sumner
Jarred-Sumner merged commit 000ef50 into main Oct 29, 2026
4 of 5 checks passed
@Jarred-Sumner
Jarred-Sumner deleted the claude/icu-floor-four-part-version branch October 29, 2026 06:31
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.

2 participants