Given a version with a prerelease identifier containing a dot, such as 1.0.0-foo.bar.0, if bump() is called with preid specified, the version is unchanged:
const bump = require("bump-regex");
const bumpOpts = {
str: 'version: "1.0.0-foo.bar.0"',
type: "prerelease",
preid: "foo.bar"
};
bump(bumpOpts, (err, out) => console.log(out));
Output:
{ key: 'version',
type: 'prerelease',
case: false,
keys: null,
str: 'version: "1.0.0-foo.bar.0"',
preid: 'foo.bar',
prev: '1.0.0-foo.bar.0',
new: '1.0.0-foo.bar.0' }
Notice that out.prev === out.new.
I've found that if I omit the preid option, it is bumped correctly:
const bump = require("bump-regex");
const bumpOpts = {
str: 'version: "1.0.0-foo.bar.0"',
type: "prerelease"
};
bump(bumpOpts, (err, out) => console.log(out));
Output:
{ key: 'version',
type: 'prerelease',
case: false,
keys: null,
str: 'version: "1.0.0-foo.bar.1"',
prev: '1.0.0-foo.bar.0',
new: '1.0.0-foo.bar.1' }
I would expect that specifying preid would not cause the bump to fail.
Given a version with a prerelease identifier containing a dot, such as
1.0.0-foo.bar.0, ifbump()is called withpreidspecified, the version is unchanged:Output:
Notice that
out.prev === out.new.I've found that if I omit the
preidoption, it is bumped correctly:Output:
I would expect that specifying
preidwould not cause the bump to fail.