isLowerThanOrEqualTo(otherVersion) { module.exports.validate(this.version); module.exports.validate(otherVersion); return semver.lte(otherVersion, this.version); }
const testIfKafkaVersionLTE = version => testIfKafkaVersion(version, semver.lte)
checkActiveVersion(activeVersion, versionToUse, latestV1, opts = {}) { const activeMajor = semver.major(activeVersion); if (opts.v1 && activeMajor > 1) { throw new CliError({ message: 'The --v1 flag was provided, but the current version of Ghost is v2 or greater', help: 'Re-run the command without the --v1 flag', log: false }); } if (semver.lte(versionToUse, activeVersion) && !opts.force) { return null; } if (activeMajor === 1 && activeVersion !== latestV1 && semver.diff(activeVersion, versionToUse) === 'major') { const majorToUse = semver.major(versionToUse); throw new CliError({ message: `You are trying to update to Ghost v${majorToUse}, but your blog is not on the latest Ghost 1.0 version`, help: 'Instead run "ghost update v1".' }); } return versionToUse; }
if (!error && response.statusCode === 200){ let version = JSON.parse(body).version; if (semver.lte(version, requiredVersion)) { spinner.stop(); resolve();
const applicable = semver.gt(potential, currentLock.version) && semver.lte(potential, config.schema);