var semverBumperForFileText = require('semver-bumper-for-file-text');
semverBumperForFileText.bump().subscribe();
Test
npm test
TODO
Add testing for main.js, including bumping of JSON files. Possibly split JSON bumping out into its own file.
Allow for saving user's answer for whether to bump each grepped version match, using code something like this:
```js
var filepath = './run-inc.js';
var lineIndex = 3;
var chunkIndex = 1;
var chunk = 'This version is now 1.2.3';
var versionNumberRE = /[0-9]+.[0-9]+.[0-9]+(-(alpha|beta|rc)(.[0-9]+)?)?/;
var nonVersionInput = chunk.replace(versionNumberRE, '');
var semverBumperSettings = {
'jsonFiles': [
{
'filepath': 'package.json',
'key': 'version'
}
],
'grepOptions': {
'include': [],
'exclude': [],
'excludeDir': [
'test'
]
},
savedAnswers: {
'4446b9f25a40b91f4b83b0d3a244384d': false,
'595f44fec1e92a71d3e9e77456ba80d1': true,
'71f920fa275127a7b60fa4d4d41432a3': false,
'43c191bf6d6c3f263a8cd0efd4a058ab': false
}
};
var crypto = require('crypto');
var hash = crypto.createHash('md5')
.update([filepath, lineIndex, chunkIndex, nonVersionInput].join(','))
.digest('hex');
console.log('ask user? ' + !!semverBumperSettings.savedAnswers[hash]);
```
Utility for bumping version number (e.g., 1.2.3 to 1.3.0) in the text of all appropriate files.
We found that semver-bumper-for-file-text demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.
Package last updated on 11 Mar 2016
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.