This commit is contained in:
2021-11-21 11:18:28 +01:00
parent 7a358eb836
commit 230b10b2a3
9339 changed files with 892519 additions and 62 deletions

28
node_modules/semver-truncate/index.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
'use strict';
var semver = require('semver');
module.exports = function (version, type) {
if (['major', 'minor', 'patch'].indexOf(type) === -1) {
throw new TypeError('Invalid version type');
}
version = semver.parse(version, {loose: true});
if (!version) {
throw new Error('Version ' + version + ' is not valid semver');
}
version.build = '';
version.prerelease = '';
if (type === 'minor') {
version.patch = 0;
}
if (type === 'major') {
version.patch = 0;
version.minor = 0;
}
return version.format();
};