Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: new mode next #116

Merged
merged 1 commit into from
May 1, 2024
Merged

feat: new mode next #116

merged 1 commit into from
May 1, 2024

Conversation

SukkaW
Copy link
Contributor

@SukkaW SukkaW commented May 1, 2024

Prior to #37, taze newest would specifically target the next tag of a package. #37 altered this to target the most recently published version of the package.

I appreciate the modification introduced by #37 (it does make sense), but occasionally, I need to bump the next tag of a package rather than the most recently published version. eslint-plugin-react-hooks would be an example of the case:

image

So I introduce a new mode next that brings the old behavior back.

import type { SortOption } from './utils/sort'

export type RangeMode = 'default' | 'major' | 'minor' | 'patch' | 'latest' | 'newest'
export type RangeMode = typeof MODE_CHOICES[number]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer not to specify the literal type twice, so I employ a minor trick to infer the type from the constant variable.

@antfu antfu merged commit 3b42900 into antfu-collective:main May 1, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants