Masterminds / Masterminds/semver

Support strict comparisons

Open
#247 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1.4k
Forks
168
PR merge metrics
No merged PRs in 30d

Description

PR #243 suggested the idea of a strict comparison (i.e. ==) that does direct string comparisons. Stricter comparisons are a good idea. This issue captures some notes and requirements (for myself for later).

  1. If there is a == there should be a !== to complement it
  2. There should be a way to do strict comparisons with build metadata taken into account and with it skipped
  3. Consider comparisons to node-semver which does not expose it's == and === functionality in the Comparator but it exists for direct use (and has for over a decade).
  4. If a full semver is NOT provided a loose (dirty) handling should be enabled so that users get what they expect. If it's not loose than a ==1 will NEVER match to anything because a version would be 1.0.0 and a strict string comparison between those would be different.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing PR #243 and the issue's discussion of node-semver's Comparator behavior. Turn the four listed requirements into a settled strict-comparison API, including complementary operators, build-metadata handling, and loose handling of partial versions; done means the behavior and scope are agreed and testable.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.