Skip to content

[BUG] diff prerelease changed between 7.3.8 and 7.5.4 #607

Closed
@foxriver76

Description

@foxriver76

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

a diff between a non prerelease version like 5.5.0 and a prerelease version on the same patch now creates a major diff while it previously was prerelease

see https://github.com/npm/node-semver/pull/566/files

Expected Behavior

It should be either prerelease or mention the breaking change it the changelog and why you think it should be that way.

Steps To Reproduce

import semverDiff from 'semver/functions/diff';

// is major
console.log(semverDiff('1.0.0-alpha.1', '1.0.0'));

Environment

  • npm:
  • Node: 16/18/20
  • OS: windows/linux and mac (all on CI failing due to this problem)
  • platform:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds an initial review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions