lyxaira.glass 74ca844f42 Actualizacion cambios generados: seccion #12, #14 y #15. | преди 4 години | |
---|---|---|
.. | ||
node_modules | преди 4 години | |
index.d.ts | преди 4 години | |
index.js | преди 4 години | |
license | преди 4 години | |
package.json | преди 4 години | |
readme.md | преди 4 години |
Get the diff type of two semver versions:
0.0.1 0.0.2
→patch
$ npm install semver-diff
const semverDiff = require('semver-diff');
semverDiff('1.1.1', '1.1.2');
//=> 'patch'
semverDiff('1.1.1-foo', '1.1.2');
//=> 'prepatch'
semverDiff('0.0.1', '1.0.0');
//=> 'major'
semverDiff('0.0.1-foo', '1.0.0');
//=> 'premajor'
semverDiff('0.0.1', '0.1.0');
//=> 'minor'
semverDiff('0.0.1-foo', '0.1.0');
//=> 'preminor'
semverDiff('0.0.1-foo', '0.0.1-foo.bar');
//=> 'prerelease'
semverDiff('0.1.0', '0.1.0+foo');
//=> 'build'
semverDiff('0.0.1', '0.0.1');
//=> undefined
semverDiff('0.0.2', '0.0.1');
//=> undefined
Returns the difference type between two semver versions, or undefined
if they’re identical or the second one is lower than the first.
Possible values: 'major'
, 'premajor'
, 'minor'
, 'preminor'
, 'patch'
, 'prepatch'
, 'prerelease'
, 'build'
, undefined
.
1.2.3
→ 1.2.0