Description
Hi,
In my package.json (and others files passed to bump command), there are some dependencies like "cordova-plugin-add-swift-support": "1.7.0",
in it.
When i bump with bump --prompt --tag --push --all --grep config.xml
for new value at 1.7.1 for example, if my actual package version is the same as dependencies versions (exemple 1.7.0), then all occurences are replaces in files instead of only the first value (example in package.json : "version": "1.7.0",
).
So when bump is finished, the dependencie is also at the new version "cordova-plugin-add-swift-support": "1.7.1",
, altough it must not be !
A correction for this will be to replace the line 162 in lib/index.js: let oldVersionPattern = new RegExp(oldVersion.replace(/\./g, '\\.'), 'g');
with let oldVersionPattern = new RegExp(oldVersion.replace(/./g, '\.'));
The new code replace only the first occurence of old version in any files changing by bump command.
What do you think ?