Given a initial version string that contains some metadata (e.g. 0.1.0-pre.2+meta.0) and bump() is called to set a fixed version that also contains metadata fragment for semver, e.g. 0.2.0+build.1, the logger output differs from the actual replacement that takes place.
Notice that bump() does not replace the previous metadata fragment and adds a new version before it. This results in an invalid semver. However, the opts.new does correctly reported the expected value.
Given a initial version string that contains some metadata (e.g.
0.1.0-pre.2+meta.0
) andbump()
is called to set a fixed version that also contains metadata fragment for semver, e.g.0.2.0+build.1
, the logger output differs from the actual replacement that takes place.Testcase
Output
Expected Output
0.1.0-pre+meta
0.2.0+build.1
0.2.0+build.1
0.1.0-pre.2+meta.0
0.2.0+build.1
0.2.0+build.1
Actual Output
0.1.0-pre+meta
0.2.0+build.1
0.2.0+build.1+meta.0
:x:0.1.0-pre.2+meta.0
0.2.0+build.1
0.2.0+build.1+meta.0
:x:Notice that
bump()
does not replace the previous metadata fragment and adds a new version before it. This results in an invalid semver. However, theopts.new
does correctly reported the expected value.