mirror of
https://gitee.com/onvia/ccc-tnt-psd2ui
synced 2025-11-02 12:26:39 +00:00
mac npm-packages
This commit is contained in:
@@ -2,6 +2,6 @@ const Range = require('../classes/range')
|
||||
const intersects = (r1, r2, options) => {
|
||||
r1 = new Range(r1, options)
|
||||
r2 = new Range(r2, options)
|
||||
return r1.intersects(r2)
|
||||
return r1.intersects(r2, options)
|
||||
}
|
||||
module.exports = intersects
|
||||
|
||||
@@ -68,6 +68,9 @@ const subset = (sub, dom, options = {}) => {
|
||||
return true
|
||||
}
|
||||
|
||||
const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]
|
||||
const minimumVersion = [new Comparator('>=0.0.0')]
|
||||
|
||||
const simpleSubset = (sub, dom, options) => {
|
||||
if (sub === dom) {
|
||||
return true
|
||||
@@ -77,9 +80,9 @@ const simpleSubset = (sub, dom, options) => {
|
||||
if (dom.length === 1 && dom[0].semver === ANY) {
|
||||
return true
|
||||
} else if (options.includePrerelease) {
|
||||
sub = [new Comparator('>=0.0.0-0')]
|
||||
sub = minimumVersionWithPreRelease
|
||||
} else {
|
||||
sub = [new Comparator('>=0.0.0')]
|
||||
sub = minimumVersion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +90,7 @@ const simpleSubset = (sub, dom, options) => {
|
||||
if (options.includePrerelease) {
|
||||
return true
|
||||
} else {
|
||||
dom = [new Comparator('>=0.0.0')]
|
||||
dom = minimumVersion
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user