bump-regex
bump RegEx with semver
Last updated a year ago by stevelacy .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install bump-regex 
SYNC missed versions from official npm registry.

bump-regex

Build Status NPM version

bump regex with semver

Information

Packagebump-regex
Description bump regex with semver
Node Version >= 4.0.0

Usage

Install

$ npm install --save bump-regex

var bump = require('bump-regex');

bump('version: "0.1.2"', function(err, out) {
  // => 'version: "0.1.3"'
});

Options

options.type

Semver version type to bump

Type: `String`
Default: `patch`
Valid values: `major|minor|patch|prerelease`

options.key

Set the versioning key

Type: `String`
Default: `version`

options.keys

Sets multiple versioning keys.

Type: `Array` of `String`s
Default: null

options.case

Set case insensitive matching

This option enables matching a specific Case Sensitive selector

<xml>
  <version>nope</version>
  <Version>1.2.3</Version>
</xml>
Type: `Boolean`
Default: `false`

options.version

Set a specific version to bump to.

Type: `String`
Default: `null`

options.preid

Set the prerelase tag to use

Type: `String`
Default: `null`

options.regex

Set the version selector regex

Type: `RegEx`

options.keepmetadata

Keep the metadata of the old version after bumping (exception: you are using options.version)

Type: `Boolean`
Default: `false`

Example:

  type: 'prerelease',
  preid : 'alphaWhateverTheYWant'

 // => '0.0.2-alphaWhateverTheYWant.0'

Versioning

Versioning Used: Semantic

String, lowercase

  • MAJOR ("major") version when you make incompatible API changes
  • MINOR ("minor") version when you add functionality in a backwards-compatible manner
  • PATCH ("patch") version when you make backwards-compatible bug fixes.
  • PRERELEASE ("prerelease") a pre-release version

Version example

major: 1.0.0
minor: 0.1.0
patch: 0.0.2
prerelease: 0.0.1-2

LICENSE MIT

Current Tags

  • 4.0.0                                ...           latest (a year ago)

17 Versions

  • 4.0.0                                ...           a year ago
  • 3.1.1                                ...           a year ago
  • 3.1.0                                ...           2 years ago
  • 3.0.0                                ...           2 years ago
  • 2.9.0                                ...           2 years ago
  • 2.8.0                                ...           2 years ago
  • 2.7.0                                ...           3 years ago
  • 2.6.1                                ...           3 years ago
  • 2.6.0                                ...           3 years ago
  • 2.5.2                                ...           3 years ago
  • 2.5.1                                ...           3 years ago
  • 2.5.0                                ...           3 years ago
  • 2.3.0                                ...           3 years ago
  • 2.2.0                                ...           3 years ago
  • 2.1.0                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 4
This Week 71
This Month 298
Last Day 10
Last Week 78
Last Month 458
Dependencies (1)
Dev Dependencies (2)

Copyright 2014 - 2016 © taobao.org |