From c4b243abe6614e412070c7ab732d89c986d732f3 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Wed, 28 Oct 2026 22:45:43 -0700 Subject: [PATCH 1/2] test: the floor of the ICU version takes a version with four parts 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. --- test/js/node/process/process.test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/js/node/process/process.test.js b/test/js/node/process/process.test.js index 5221e43389e8..1375e3c28a86 100644 --- a/test/js/node/process/process.test.js +++ b/test/js/node/process/process.test.js @@ -644,7 +644,9 @@ it("ICU version does not regress", () => { if (!min) { throw new Error(`Unknown platform/arch: ${process.platform}-${process.arch}`); } - expect(Bun.semver.order(process.versions.icu, min)).toBeGreaterThanOrEqual(0); + // The version of the system's ICU on macOS may have four parts, and Bun.semver.order takes at most three. + const version = process.versions.icu.split(".").slice(0, 3).join("."); + expect(Bun.semver.order(version, min)).toBeGreaterThanOrEqual(0); }); it("process.versions.icu and process.versions.unicode describe the ICU the process runs with", () => { From b60fa72b37237e9e73a872420ce5b4aec3b9d695 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Wed, 28 Oct 2026 22:52:58 -0700 Subject: [PATCH 2/2] test: compare as many parts of the ICU version as the floor has 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. --- test/js/node/process/process.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/js/node/process/process.test.js b/test/js/node/process/process.test.js index 1375e3c28a86..b9a738958f7c 100644 --- a/test/js/node/process/process.test.js +++ b/test/js/node/process/process.test.js @@ -644,8 +644,8 @@ it("ICU version does not regress", () => { if (!min) { throw new Error(`Unknown platform/arch: ${process.platform}-${process.arch}`); } - // The version of the system's ICU on macOS may have four parts, and Bun.semver.order takes at most three. - const version = process.versions.icu.split(".").slice(0, 3).join("."); + // As many parts as the floor has: macOS may report four, and Bun.semver.order reads a missing part as the highest. + const version = process.versions.icu.split(".").slice(0, 2).join("."); expect(Bun.semver.order(version, min)).toBeGreaterThanOrEqual(0); });