1.0.6 • Published 8 years ago

bump-version-range v1.0.6

Weekly downloads
6
License
ISC
Repository
github
Last release
8 years ago

bump-version-range

Build Status npm

Given an existing semver version range and a fixed version number, produces an updated version range matching the existing range format.

npm install bump-version-range --save

Examples

import bumpRange from 'bump-version-range';

bumpRange({ oldRange: '^0.x', newVersion: '1.2.3' });
// '^1.x'

bumpRange({ oldRange: '<=9.12.x', newVersion: '15.0.2' });
// '<=15.0.x'

bumpRange({ oldRange: 'not-a-valid-range', newVersion: '1.2.3' });
// '1.2.3'

Supported range formats

See test/index.js for the tested ranges. In summary:

  • Modifiers: ^, ~, <, <=, >=, >
  • Version formats: 0.0.0, 0.0.x, 0.x.x, 0.x
1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago