Skip to content

Satisfying functions don't provide an option to also compare build meta #610

@pflannery

Description

@pflannery

Similar to the issue #276.

When using the maxSatisfying function
where the latest version includes build meta data
then maxSatisfying returns a lesser version.

Example

const options = { loose: true, includePrerelease: true };
const releases = [
  '0.1.4',
  '0.1.4+1',
  '0.1.4+2',
  '0.1.4+3',
  '0.1.5',
  '0.1.5+1',
  '0.1.5+2',
];

// returns 0.1.5
maxSatisfying( releases, '0.1.5+2', options );

I can't find a way to utilize the newer compareBuild function when using maxSatisfying.

Is it possible if we can have an additional option like includeBuild so that we can compare builds?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions