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

Pre-release付きのタグが意図せず範囲指定で有効と判断される場合がある #47

Closed
mkht opened this issue Jun 25, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@mkht
Copy link
Owner

mkht commented Jun 25, 2018

例えば>=0.9.0 <1.0.0という範囲指定の時、1.0.0-alphaはこの範囲を満たすべきではないだろう。

この範囲指定はすなわちユーザは0.9.xのみを使いたいのであって、1.0.0は使いたくないのだから、1.0.0-alphaはなおのこと使いたくないはずである。

しかし現状の実装では以下の通りである。

([pspm.SemVerRange]::new('>=0.9.0 <1.0.0')).IsSatisfied('1.0.0-alpha') => $true

これはSemantic Versioning 2.0.0の仕様上、0.9.0 < 1.0.0-alpha < 1.0.0であることに起因する。
通常の大小比較とは異なる特例処理が必要になる。

@mkht mkht added the bug Something isn't working label Jun 25, 2018
mkht added a commit that referenced this issue Jul 8, 2018
mkht added a commit that referenced this issue Jul 9, 2018
@mkht mkht closed this as completed Jul 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant