satisfies(range) { module.exports.validate(this.version); return semver.satisfies(this.version, range, { includePrerelease: true }); }
beforeAll(async () => { if ( semver.satisfies(process.env.MONGODB_VERSION, '>=4.0.4') && process.env.MONGODB_TOPOLOGY === 'replicaset' && process.env.MONGODB_STORAGE_ENGINE === 'wiredTiger' ) { await reconfigureServer({ databaseAdapter: undefined, databaseURI: 'mongodb://localhost:27017/parseServerMongoAdapterTestDatabase?replicaSet=replicaset', }); } });
function compatible(compatibleSDK) { return function(clientSDK) { if (typeof clientSDK === 'string') { clientSDK = fromString(clientSDK); } // REST API, or custom SDK if (!clientSDK) { return true; } const clientVersion = clientSDK.version; const compatiblityVersion = compatibleSDK[clientSDK.sdk]; return semver.satisfies(clientVersion, compatiblityVersion); }; }
const resolveDownloads = (version) => { let downloads = allDownloads if (semver.satisfies(version, '< 1.0.0')) { return legacyDownloads if (semver.satisfies(version, '>= 8.0.0')) { downloads = downloads.filter(ver => ver.title !== 'Linux PPC BE 64-bit Binary' if (semver.satisfies(version, '>= 10.0.0')) { downloads = downloads.filter(ver => ver.title !== 'Linux 32-bit Binary' && if (semver.satisfies(version, '>= 12.0.0')) { downloads = downloads.filter(ver => ver.title !== 'ARMv6 32-bit Binary' if (semver.satisfies(version, '>= 14.0.0')) { downloads = downloads.filter(ver => ver.title !== 'SmartOS 64-bit Binary'
satisfied: semver.satisfies(thing.semversion, `${thing.semmin} - ${thing.semmax}`, true), })) .value();
list.forEach((str) => { if (str.split('\t').length === 1) return const hash = str.split('\t')[0].slice(0, 6) const version = str.split('\t')[1].replace('refs/tags/', '') if (version.match(/\^\{\}/)) return if (!semver.valid(version)) return if (semver.satisfies(version, range)) hosted.committish = hash })
//------------------------------------------------------------------------------ // Helpers //------------------------------------------------------------------------------ function isNodeVersionSatisfies(range) { return semver.satisfies(process.versions.node, range) }
function wrapNative (native, agent, version) { // We support it only versions gte 4.0.0 if (!version) { debug.error('postgres', 'cannot determine postgres version. ' + '(No package.json?) Native queries won\'t be instrumented.') } else if (!semver.satisfies(version, '>= 4.0.0')) { debug.warn('postgres', 'you are using node-postgres version ' + version + ', (<4.0.0) so native queries won\'t be instrumented.') } else { wrapClient(native, agent) } }
function handler (fn) { if (semver.satisfies(pkg.version, '>=17')) return fn return function (request, reply) { var p = new Promise(function (resolve, reject) { resolve(fn(request)) }) p.then(reply, reply) } }
function isNodeVersionLE8(version) { if (version === void 0) { version = process.version; } if (!version) { return false; } return semver.satisfies(version, '<9'); }
function initServer (server, cb) { if (semver.satisfies(pkg.version, '<17')) { server.initialize(cb) } else { server.initialize().then( cb.bind(null, null), cb ) } }
function unpatch (http) { shimmer.unwrap(http, 'request') if (semver.satisfies(process.version, '>=8.0.0')) { shimmer.unwrap(http, 'get') } debug('Unpatched') }
function makeServer (opts) { var server = new Hapi.Server() if (semver.satisfies(pkg.version, '<17')) { server.connection(opts) } return server }
beforeAll(async () => { if ( semver.satisfies(process.env.MONGODB_VERSION, '>=4.0.4') && process.env.MONGODB_TOPOLOGY === 'replicaset' && process.env.MONGODB_STORAGE_ENGINE === 'wiredTiger' ) { await reconfigureServer({ databaseAdapter: undefined, databaseURI: 'mongodb://localhost:27017/parseServerMongoAdapterTestDatabase?replicaSet=replicaset', }); } });
function compatible(compatibleSDK) { return function (clientSDK) { if (typeof clientSDK === 'string') { clientSDK = fromString(clientSDK); } // REST API, or custom SDK if (!clientSDK) { return true; } const clientVersion = clientSDK.version; const compatiblityVersion = compatibleSDK[clientSDK.sdk]; return semver.satisfies(clientVersion, compatiblityVersion); }; }