update @actions/tool-cache, install semver, nock

This commit is contained in:
Alex Kalyvitis 2020-06-18 16:31:13 +02:00
parent 74d434c5ca
commit 4c6749115a
678 changed files with 39259 additions and 14619 deletions

37
node_modules/semver/functions/parse.js generated vendored Normal file
View file

@ -0,0 +1,37 @@
const {MAX_LENGTH} = require('../internal/constants')
const { re, t } = require('../internal/re')
const SemVer = require('../classes/semver')
const parse = (version, options) => {
if (!options || typeof options !== 'object') {
options = {
loose: !!options,
includePrerelease: false
}
}
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