microsoft / microsoft/OSSGadget

EnumerateVersions should have a parameter for whether or not pre-release versions get counted.

Open
#315 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
371
Forks
58
PR merge metrics
No merged PRs in 30d

Description

When I think about "latest", I think about "what would npm install foo do?"

But for npm, this really means "whatever is tagged latest", which is defined under dist-tags in the registry. Other package managers could of course do it differently. I suppose we could use that for registries that provide it, and if not, sort by semver, and if ambiguous, sort by time?

I agree, and think the behavior should try to match the default behavior of the original package manager tool.

In general, even if the manager api we use doesn't set a prerelease flag, if it's set by semver (having a - flag in the version) that shouldn't come up as latest.

Maybe this API needs a bool flag to accept/not accept prereleases?

Originally posted by @gfs in https://github.com/microsoft/OSSGadget/issues/314#issuecomment-1071259406

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 locating the EnumerateVersions API and its callers or tests in the OSSGadget repository. Review how versions are ordered and how package-manager defaults are represented; done means callers can choose whether semver prerelease versions are counted without changing the intended default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.