oclif / oclif/plugin-warn-if-update-available

Prerelease tag warnings not working as expected

Open
#47 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
TypeScript
Stars
40
Forks
14
Avg merge
20m
Merged PRs (30d)
2

Description

When working with prerelease tags, we've noticed that the the plugin will warn the first time when a prerelease version has been published, for example x.x.x to x.x.x-alpha.x.

However, after that when the version has been bumped to prerelease, due to https://github.com/oclif/plugin-warn-if-update-available/blob/master/src/hooks/init/check-update.ts#L27 , there seems to be an early return due to the existence of -and there appears to no longer be any warning shown for further updates whether a prerelease or not. https://github.com/oclif/plugin-warn-if-update-available/blob/master/src/hooks/init/check-update.ts#L31 seems to indicate the possibility of splitting on a - and comparing at least the first part.

We were wondering what the reasoning is for the early return or if this is a case of unfinished logic?

Thanks

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 in src/hooks/init/check-update.ts, especially lines 27 and 31 cited in the issue. Trace how prerelease versions are handled after the first warning and determine the intended comparison behavior for subsequent prerelease and stable updates. Done means the warning behavior is defined and the relevant update-check logic reflects it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.