function expectVersionMetrics(metrics) { expect(metrics).toHaveLength(1); expect(metrics[0].help).toEqual('Node.js version info.'); expect(metrics[0].type).toEqual('gauge'); expect(metrics[0].name).toEqual('nodejs_version_info'); expect(metrics[0].values[0].labels.version).toEqual(nodeVersion); expect(metrics[0].values[0].labels.major).toEqual(versionSegments[0]); expect(metrics[0].values[0].labels.minor).toEqual(versionSegments[1]); expect(metrics[0].values[0].labels.patch).toEqual(versionSegments[2]); }
function versionAsString(version) { return [ version.major, version.minor, version.patch, version.rev === 255 ? null : version.rev, ].filter(v => v != null).join('.'); }
up(number) { let step = number || this.minor; let num = this.toNumber(this.input); if (num > this.max + step) return this.alert(); this.input = `${num + step}`; return this.render(); }
function getPackageVersion(tag, branch) { let baseVersion = `v${tag.major}.${tag.minor}.${tag.patch}`; if (tag.commit === 0 && branch === 'master') { return baseVersion; } baseVersion += '-'; if (branch !== 'master') { baseVersion += (tag.commit + 1 + '.' + branch); } else { baseVersion += (tag.commit + 1); } return baseVersion; }
constructor(options = {}) { super({ style: 'number', ...options }); this.min = this.isValue(options.min) ? this.toNumber(options.min) : -Infinity; this.max = this.isValue(options.max) ? this.toNumber(options.max) : Infinity; this.delay = options.delay != null ? options.delay : 1000; this.float = options.float !== false; this.round = options.round === true || options.float === false; this.major = options.major || 10; this.minor = options.minor || 1; this.initial = options.initial != null ? options.initial : ''; this.input = String(this.initial); this.cursor = this.input.length; this.cursorShow(); }
}); assert.equal(prompt.minor, 5);
down(number) { let step = number || this.minor; let num = this.toNumber(this.input); if (num < this.min - step) return this.alert(); this.input = `${num - step}`; return this.render(); }
if (!animEnabled(element)) { statics.enter(element, target, cb); } else if (angular.version.minor > 2) { $animate.enter(element, null, target).then(cb); } else { if (!animEnabled(element)) { statics.leave(element, cb); } else if (angular.version.minor > 2) { $animate.leave(element).then(cb); } else {
l(t, null, [{ key: "isSupported", value: function() { try { var e = f.default.msedge && f.default.version.minor >= 15048, t = !f.default.msedge || e; return self.fetch && self.ReadableStream && t } catch (e) { return !1 } } }])
function showVersion(version) { console.log( ` API version: ${version.apiVersion.major}.${version.apiVersion.minor}`); console.log(` Build: ${version.buildNumber}`); console.log(` Description: ${version.description}`); }
/** * Tests for ALTER INDEX replica_count compatibility * * @param {Version} version * @return {boolean} */ static alterIndexReplicaCount(version) { return version && (version.major > 6 || (version.major == 6 && version.minor >= 5)); }
// returns true if version is >= minimum function compareSemVer(version, minimum) { version = parseSemVer(version); minimum = parseSemVer(minimum); var versionNum = (version.major * 10000 * 10000) + (version.minor * 10000) + version.patch; var minimumNum = (minimum.major * 10000 * 10000) + (minimum.minor * 10000) + minimum.patch; return (versionNum >= minimumNum); }
get buildToolsVersionName() { if (!this.buildToolsVersion) { return ''; } return `${this.buildToolsVersion.major}.${this.buildToolsVersion.minor}.${this.buildToolsVersion.patch}`; }
get buildToolsVersionName(): string { if (!this.buildToolsVersion) { return '' } return `${this.buildToolsVersion.major}.${this.buildToolsVersion.minor}.${this.buildToolsVersion.patch}` }