We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
PS> [SemVer]::new('>1.2.0 || 1.0.0') MinimumVersion : 1.2.0 MaximumVersion : 2147483647.2147483647.2147483647.2147483647 Expression : >1.2.0 || 1.0.0 IncludeMaximum : True IncludeMinimum : False
上記例だとExpressionは正しい表記だが、MinimumVersionやMaximumVersionが正しくない。 ただしIsSatisfiedを始めとする各種比較系メソッドは正しく動作する
Expression
MinimumVersion
MaximumVersion
IsSatisfied
PS> $r = [SemVer]::new('>1.2.0 || 1.0.0') PS> $r.IsSatisfied('1.0.0') True
The text was updated successfully, but these errors were encountered:
||を使ったOR複数条件の範囲表現の場合、最も左側にある条件の範囲表現がMinimumVersionやMaximumVersionに設定される動作をする。
||
これは複数条件範囲を単一のMinimumVersionとMaximumVersionで表現する適切な方法が無いため、やむを得ずそのような仕様としている。
内部処理的には隠しプロパティである_RangeSetの中にすべての条件を格納して比較処理に使用しているため、比較系メソッドの動作は問題ない。
_RangeSet
かなり非直感的な実装なので改善したいが、いい方法が思いつかない 😟
Sorry, something went wrong.
No branches or pull requests
上記例だと
Expression
は正しい表記だが、MinimumVersion
やMaximumVersion
が正しくない。ただし
IsSatisfied
を始めとする各種比較系メソッドは正しく動作するThe text was updated successfully, but these errors were encountered: