summaryrefslogtreecommitdiff
path: root/together/node_modules/semver/functions
diff options
context:
space:
mode:
Diffstat (limited to 'together/node_modules/semver/functions')
-rw-r--r--together/node_modules/semver/functions/clean.js6
-rw-r--r--together/node_modules/semver/functions/cmp.js52
-rw-r--r--together/node_modules/semver/functions/coerce.js52
-rw-r--r--together/node_modules/semver/functions/compare-build.js7
-rw-r--r--together/node_modules/semver/functions/compare-loose.js3
-rw-r--r--together/node_modules/semver/functions/compare.js5
-rw-r--r--together/node_modules/semver/functions/diff.js23
-rw-r--r--together/node_modules/semver/functions/eq.js3
-rw-r--r--together/node_modules/semver/functions/gt.js3
-rw-r--r--together/node_modules/semver/functions/gte.js3
-rw-r--r--together/node_modules/semver/functions/inc.js18
-rw-r--r--together/node_modules/semver/functions/lt.js3
-rw-r--r--together/node_modules/semver/functions/lte.js3
-rw-r--r--together/node_modules/semver/functions/major.js3
-rw-r--r--together/node_modules/semver/functions/minor.js3
-rw-r--r--together/node_modules/semver/functions/neq.js3
-rw-r--r--together/node_modules/semver/functions/parse.js33
-rw-r--r--together/node_modules/semver/functions/patch.js3
-rw-r--r--together/node_modules/semver/functions/prerelease.js6
-rw-r--r--together/node_modules/semver/functions/rcompare.js3
-rw-r--r--together/node_modules/semver/functions/rsort.js3
-rw-r--r--together/node_modules/semver/functions/satisfies.js10
-rw-r--r--together/node_modules/semver/functions/sort.js3
-rw-r--r--together/node_modules/semver/functions/valid.js6
24 files changed, 0 insertions, 257 deletions
diff --git a/together/node_modules/semver/functions/clean.js b/together/node_modules/semver/functions/clean.js
deleted file mode 100644
index 811fe6b..0000000
--- a/together/node_modules/semver/functions/clean.js
+++ /dev/null
@@ -1,6 +0,0 @@
-const parse = require('./parse')
-const clean = (version, options) => {
- const s = parse(version.trim().replace(/^[=v]+/, ''), options)
- return s ? s.version : null
-}
-module.exports = clean
diff --git a/together/node_modules/semver/functions/cmp.js b/together/node_modules/semver/functions/cmp.js
deleted file mode 100644
index 4011909..0000000
--- a/together/node_modules/semver/functions/cmp.js
+++ /dev/null
@@ -1,52 +0,0 @@
-const eq = require('./eq')
-const neq = require('./neq')
-const gt = require('./gt')
-const gte = require('./gte')
-const lt = require('./lt')
-const lte = require('./lte')
-
-const cmp = (a, op, b, loose) => {
- switch (op) {
- case '===':
- if (typeof a === 'object') {
- a = a.version
- }
- if (typeof b === 'object') {
- b = b.version
- }
- return a === b
-
- case '!==':
- if (typeof a === 'object') {
- a = a.version
- }
- if (typeof b === 'object') {
- b = b.version
- }
- return a !== b
-
- case '':
- case '=':
- case '==':
- return eq(a, b, loose)
-
- case '!=':
- return neq(a, b, loose)
-
- case '>':
- return gt(a, b, loose)
-
- case '>=':
- return gte(a, b, loose)
-
- case '<':
- return lt(a, b, loose)
-
- case '<=':
- return lte(a, b, loose)
-
- default:
- throw new TypeError(`Invalid operator: ${op}`)
- }
-}
-module.exports = cmp
diff --git a/together/node_modules/semver/functions/coerce.js b/together/node_modules/semver/functions/coerce.js
deleted file mode 100644
index 2e01452..0000000
--- a/together/node_modules/semver/functions/coerce.js
+++ /dev/null
@@ -1,52 +0,0 @@
-const SemVer = require('../classes/semver')
-const parse = require('./parse')
-const { re, t } = require('../internal/re')
-
-const coerce = (version, options) => {
- if (version instanceof SemVer) {
- return version
- }
-
- if (typeof version === 'number') {
- version = String(version)
- }
-
- if (typeof version !== 'string') {
- return null
- }
-
- options = options || {}
-
- let match = null
- if (!options.rtl) {
- match = version.match(re[t.COERCE])
- } else {
- // Find the right-most coercible string that does not share
- // a terminus with a more left-ward coercible string.
- // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
- //
- // Walk through the string checking with a /g regexp
- // Manually set the index so as to pick up overlapping matches.
- // Stop when we get a match that ends at the string end, since no
- // coercible string can be more right-ward without the same terminus.
- let next
- while ((next = re[t.COERCERTL].exec(version)) &&
- (!match || match.index + match[0].length !== version.length)
- ) {
- if (!match ||
- next.index + next[0].length !== match.index + match[0].length) {
- match = next
- }
- re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length
- }
- // leave it in a clean state
- re[t.COERCERTL].lastIndex = -1
- }
-
- if (match === null) {
- return null
- }
-
- return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)
-}
-module.exports = coerce
diff --git a/together/node_modules/semver/functions/compare-build.js b/together/node_modules/semver/functions/compare-build.js
deleted file mode 100644
index 9eb881b..0000000
--- a/together/node_modules/semver/functions/compare-build.js
+++ /dev/null
@@ -1,7 +0,0 @@
-const SemVer = require('../classes/semver')
-const compareBuild = (a, b, loose) => {
- const versionA = new SemVer(a, loose)
- const versionB = new SemVer(b, loose)
- return versionA.compare(versionB) || versionA.compareBuild(versionB)
-}
-module.exports = compareBuild
diff --git a/together/node_modules/semver/functions/compare-loose.js b/together/node_modules/semver/functions/compare-loose.js
deleted file mode 100644
index 4881fbe..0000000
--- a/together/node_modules/semver/functions/compare-loose.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compare = require('./compare')
-const compareLoose = (a, b) => compare(a, b, true)
-module.exports = compareLoose
diff --git a/together/node_modules/semver/functions/compare.js b/together/node_modules/semver/functions/compare.js
deleted file mode 100644
index 748b7af..0000000
--- a/together/node_modules/semver/functions/compare.js
+++ /dev/null
@@ -1,5 +0,0 @@
-const SemVer = require('../classes/semver')
-const compare = (a, b, loose) =>
- new SemVer(a, loose).compare(new SemVer(b, loose))
-
-module.exports = compare
diff --git a/together/node_modules/semver/functions/diff.js b/together/node_modules/semver/functions/diff.js
deleted file mode 100644
index 87200ef..0000000
--- a/together/node_modules/semver/functions/diff.js
+++ /dev/null
@@ -1,23 +0,0 @@
-const parse = require('./parse')
-const eq = require('./eq')
-
-const diff = (version1, version2) => {
- if (eq(version1, version2)) {
- return null
- } else {
- const v1 = parse(version1)
- const v2 = parse(version2)
- const hasPre = v1.prerelease.length || v2.prerelease.length
- const prefix = hasPre ? 'pre' : ''
- const defaultResult = hasPre ? 'prerelease' : ''
- for (const key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return prefix + key
- }
- }
- }
- return defaultResult // may be undefined
- }
-}
-module.exports = diff
diff --git a/together/node_modules/semver/functions/eq.js b/together/node_modules/semver/functions/eq.js
deleted file mode 100644
index 271fed9..0000000
--- a/together/node_modules/semver/functions/eq.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compare = require('./compare')
-const eq = (a, b, loose) => compare(a, b, loose) === 0
-module.exports = eq
diff --git a/together/node_modules/semver/functions/gt.js b/together/node_modules/semver/functions/gt.js
deleted file mode 100644
index d9b2156..0000000
--- a/together/node_modules/semver/functions/gt.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compare = require('./compare')
-const gt = (a, b, loose) => compare(a, b, loose) > 0
-module.exports = gt
diff --git a/together/node_modules/semver/functions/gte.js b/together/node_modules/semver/functions/gte.js
deleted file mode 100644
index 5aeaa63..0000000
--- a/together/node_modules/semver/functions/gte.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compare = require('./compare')
-const gte = (a, b, loose) => compare(a, b, loose) >= 0
-module.exports = gte
diff --git a/together/node_modules/semver/functions/inc.js b/together/node_modules/semver/functions/inc.js
deleted file mode 100644
index 62d1da2..0000000
--- a/together/node_modules/semver/functions/inc.js
+++ /dev/null
@@ -1,18 +0,0 @@
-const SemVer = require('../classes/semver')
-
-const inc = (version, release, options, identifier) => {
- if (typeof (options) === 'string') {
- identifier = options
- options = undefined
- }
-
- try {
- return new SemVer(
- version instanceof SemVer ? version.version : version,
- options
- ).inc(release, identifier).version
- } catch (er) {
- return null
- }
-}
-module.exports = inc
diff --git a/together/node_modules/semver/functions/lt.js b/together/node_modules/semver/functions/lt.js
deleted file mode 100644
index b440ab7..0000000
--- a/together/node_modules/semver/functions/lt.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compare = require('./compare')
-const lt = (a, b, loose) => compare(a, b, loose) < 0
-module.exports = lt
diff --git a/together/node_modules/semver/functions/lte.js b/together/node_modules/semver/functions/lte.js
deleted file mode 100644
index 6dcc956..0000000
--- a/together/node_modules/semver/functions/lte.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compare = require('./compare')
-const lte = (a, b, loose) => compare(a, b, loose) <= 0
-module.exports = lte
diff --git a/together/node_modules/semver/functions/major.js b/together/node_modules/semver/functions/major.js
deleted file mode 100644
index 4283165..0000000
--- a/together/node_modules/semver/functions/major.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const SemVer = require('../classes/semver')
-const major = (a, loose) => new SemVer(a, loose).major
-module.exports = major
diff --git a/together/node_modules/semver/functions/minor.js b/together/node_modules/semver/functions/minor.js
deleted file mode 100644
index 57b3455..0000000
--- a/together/node_modules/semver/functions/minor.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const SemVer = require('../classes/semver')
-const minor = (a, loose) => new SemVer(a, loose).minor
-module.exports = minor
diff --git a/together/node_modules/semver/functions/neq.js b/together/node_modules/semver/functions/neq.js
deleted file mode 100644
index f944c01..0000000
--- a/together/node_modules/semver/functions/neq.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compare = require('./compare')
-const neq = (a, b, loose) => compare(a, b, loose) !== 0
-module.exports = neq
diff --git a/together/node_modules/semver/functions/parse.js b/together/node_modules/semver/functions/parse.js
deleted file mode 100644
index a66663a..0000000
--- a/together/node_modules/semver/functions/parse.js
+++ /dev/null
@@ -1,33 +0,0 @@
-const { MAX_LENGTH } = require('../internal/constants')
-const { re, t } = require('../internal/re')
-const SemVer = require('../classes/semver')
-
-const parseOptions = require('../internal/parse-options')
-const parse = (version, options) => {
- options = parseOptions(options)
-
- if (version instanceof SemVer) {
- return version
- }
-
- if (typeof version !== 'string') {
- return null
- }
-
- if (version.length > MAX_LENGTH) {
- return null
- }
-
- const r = options.loose ? re[t.LOOSE] : re[t.FULL]
- if (!r.test(version)) {
- return null
- }
-
- try {
- return new SemVer(version, options)
- } catch (er) {
- return null
- }
-}
-
-module.exports = parse
diff --git a/together/node_modules/semver/functions/patch.js b/together/node_modules/semver/functions/patch.js
deleted file mode 100644
index 63afca2..0000000
--- a/together/node_modules/semver/functions/patch.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const SemVer = require('../classes/semver')
-const patch = (a, loose) => new SemVer(a, loose).patch
-module.exports = patch
diff --git a/together/node_modules/semver/functions/prerelease.js b/together/node_modules/semver/functions/prerelease.js
deleted file mode 100644
index 06aa132..0000000
--- a/together/node_modules/semver/functions/prerelease.js
+++ /dev/null
@@ -1,6 +0,0 @@
-const parse = require('./parse')
-const prerelease = (version, options) => {
- const parsed = parse(version, options)
- return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
-}
-module.exports = prerelease
diff --git a/together/node_modules/semver/functions/rcompare.js b/together/node_modules/semver/functions/rcompare.js
deleted file mode 100644
index 0ac509e..0000000
--- a/together/node_modules/semver/functions/rcompare.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compare = require('./compare')
-const rcompare = (a, b, loose) => compare(b, a, loose)
-module.exports = rcompare
diff --git a/together/node_modules/semver/functions/rsort.js b/together/node_modules/semver/functions/rsort.js
deleted file mode 100644
index 82404c5..0000000
--- a/together/node_modules/semver/functions/rsort.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compareBuild = require('./compare-build')
-const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))
-module.exports = rsort
diff --git a/together/node_modules/semver/functions/satisfies.js b/together/node_modules/semver/functions/satisfies.js
deleted file mode 100644
index 50af1c1..0000000
--- a/together/node_modules/semver/functions/satisfies.js
+++ /dev/null
@@ -1,10 +0,0 @@
-const Range = require('../classes/range')
-const satisfies = (version, range, options) => {
- try {
- range = new Range(range, options)
- } catch (er) {
- return false
- }
- return range.test(version)
-}
-module.exports = satisfies
diff --git a/together/node_modules/semver/functions/sort.js b/together/node_modules/semver/functions/sort.js
deleted file mode 100644
index 4d10917..0000000
--- a/together/node_modules/semver/functions/sort.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const compareBuild = require('./compare-build')
-const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))
-module.exports = sort
diff --git a/together/node_modules/semver/functions/valid.js b/together/node_modules/semver/functions/valid.js
deleted file mode 100644
index f27bae1..0000000
--- a/together/node_modules/semver/functions/valid.js
+++ /dev/null
@@ -1,6 +0,0 @@
-const parse = require('./parse')
-const valid = (version, options) => {
- const v = parse(version, options)
- return v ? v.version : null
-}
-module.exports = valid