How to use the subset function from semver
Find comprehensive JavaScript semver.subset code examples handpicked from public code repositorys.
GitHub: DataDog/dd-trace-js
67 68 69 70 71 72 73 74 75
instrumentations .filter(instrumentation => instrumentation.name === moduleName) .forEach(instrumentation => { instrumentation.versions .filter(version => !process.env.RANGE || semver.subset(version, process.env.RANGE)) .forEach(version => { const min = semver.coerce(version).version const max = require(`../../../../versions/${moduleName}@${version}`).version()
243
449
0
199 200 201 202 203 204 205 206 207 208
) } } } else { const foundRange = (pkg.dependencies || {})[requiredPackage] || (pkg.devDependencies || {})[requiredPackage] const satisfied = foundRange && semver.subset(foundRange, requiredRange) if (!peerIsOptional && !satisfied) { errors.push( `Package "${pkg.name}" depends on package "${localPackageName}", but is missing one of` + ` its peerDependencies "${requiredPackage}@${requiredRange}"`
80
180
0
GitHub: ArMigELo/laravel_umarche
1247 1248 1249 1250 1251 1252 1253 1254 1255
let range = spec if ( !isRange || spec === '*' || subset(prefixRange, spec, { loose: true }) ) { range = prefixRange }
0
0
1
+ 2 other calls in file
semver.gte is the most popular function in semver (528 examples)