chore: update dependencies (#38)

This commit is contained in:
Luca Casonato
2022-10-17 12:03:20 +02:00
committed by GitHub
parent 1dfbed57f6
commit 8e9de219f8
362 changed files with 28892 additions and 3980 deletions

12
node_modules/semver/functions/cmp.js generated vendored
View File

@@ -8,17 +8,21 @@ const lte = require('./lte')
const cmp = (a, op, b, loose) => {
switch (op) {
case '===':
if (typeof a === 'object')
if (typeof a === 'object') {
a = a.version
if (typeof b === 'object')
}
if (typeof b === 'object') {
b = b.version
}
return a === b
case '!==':
if (typeof a === 'object')
if (typeof a === 'object') {
a = a.version
if (typeof b === 'object')
}
if (typeof b === 'object') {
b = b.version
}
return a !== b
case '':

View File

@@ -1,6 +1,6 @@
const SemVer = require('../classes/semver')
const parse = require('./parse')
const {re, t} = require('../internal/re')
const { re, t } = require('../internal/re')
const coerce = (version, options) => {
if (version instanceof SemVer) {
@@ -43,8 +43,9 @@ const coerce = (version, options) => {
re[t.COERCERTL].lastIndex = -1
}
if (match === null)
if (match === null) {
return null
}
return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)
}

View File

@@ -7,7 +7,10 @@ const inc = (version, release, options, identifier) => {
}
try {
return new SemVer(version, options).inc(release, identifier).version
return new SemVer(
version instanceof SemVer ? version.version : version,
options
).inc(release, identifier).version
} catch (er) {
return null
}

View File

@@ -1,4 +1,4 @@
const {MAX_LENGTH} = require('../internal/constants')
const { MAX_LENGTH } = require('../internal/constants')
const { re, t } = require('../internal/re')
const SemVer = require('../classes/semver')