Skip to content

semver.satisfies("v27.0.0-alpha.0.0.0", ">=26.0.0") fails #47421

Open

Description

@lgarron

What version of Bun is running?

1.4.4+38afee6c8

What platform is your computer?

macOS 26.7.1

What steps can reproduce the bug?

Run the following through bun run:

import assert from "node:assert";
import { semver } from "bun";

assert(semver.satisfies("v27.0.0-alpha.0.0.0", ">=26.0.0"));

What is the expected behavior?

Success.

What do you see instead?

1 | import assert from "node:assert";
2 | import { semver } from "bun";
3 | 
4 | assert(semver.satisfies("v27.0.0-alpha.0.0.0", ">=26.0.0"));
    ^
AssertionError: false == true
 generatedMessage: true,
     actual: false,
   expected: true,
   operator: "==",
       diff: "simple",
       code: "ERR_ASSERTION"

      at /private/var/folders/f8/xb75y_w11zd80s36yl4l0ydm0000gn/T/qs.a4Oak7Hlgw/test.ts:4:1

Bun v1.4.4 (macOS arm64)

v27.0.0-alpha.0.0.0 is used by GitHub Actions when actions/setup-node is set to latest, so our CI started failing its version checks when it was releases.

Additional information

Other tools like https://www.npmjs.com/package/compare-versions also do not error.

semver.order("v27.0.0-alpha.0.0.0", "26.0.0") also matches semver.order("v27.0.0", "26.0.0")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions