committed by
Danny McCormick
parent
7fe1ba03a3
commit
7dc6a07f36
@@ -23,8 +23,8 @@ const tempDir = path.join(
|
|||||||
'temp'
|
'temp'
|
||||||
);
|
);
|
||||||
|
|
||||||
process.env['RUNNER_TOOLSDIRECTORY'] = toolDir;
|
process.env['RUNNER_TOOL_CACHE'] = toolDir;
|
||||||
process.env['RUNNER_TEMPDIRECTORY'] = tempDir;
|
process.env['RUNNER_TEMP'] = tempDir;
|
||||||
|
|
||||||
import * as finder from '../src/find-python';
|
import * as finder from '../src/find-python';
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -6,10 +6,10 @@ case `uname` in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
if [ -x "$basedir/node" ]; then
|
||||||
"$basedir/node" "$basedir/../semver/bin/semver" "$@"
|
"$basedir/node" "$basedir/../semver/bin/semver.js" "$@"
|
||||||
ret=$?
|
ret=$?
|
||||||
else
|
else
|
||||||
node "$basedir/../semver/bin/semver" "$@"
|
node "$basedir/../semver/bin/semver.js" "$@"
|
||||||
ret=$?
|
ret=$?
|
||||||
fi
|
fi
|
||||||
exit $ret
|
exit $ret
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
@IF EXIST "%~dp0\node.exe" (
|
||||||
"%~dp0\node.exe" "%~dp0\..\semver\bin\semver" %*
|
"%~dp0\node.exe" "%~dp0\..\semver\bin\semver.js" %*
|
||||||
) ELSE (
|
) ELSE (
|
||||||
@SETLOCAL
|
@SETLOCAL
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||||
node "%~dp0\..\semver\bin\semver" %*
|
node "%~dp0\..\semver\bin\semver.js" %*
|
||||||
)
|
)
|
||||||
+4
-4
@@ -7,23 +7,23 @@
|
|||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"where": "C:\\Users\\damccorm\\Documents\\setup-python",
|
"where": "E:\\github\\setup-python",
|
||||||
"raw": "@actions/core@file:toolkit/actions-core-0.0.0.tgz",
|
"raw": "@actions/core@file:toolkit/actions-core-0.0.0.tgz",
|
||||||
"name": "@actions/core",
|
"name": "@actions/core",
|
||||||
"escapedName": "@actions%2fcore",
|
"escapedName": "@actions%2fcore",
|
||||||
"scope": "@actions",
|
"scope": "@actions",
|
||||||
"rawSpec": "file:toolkit/actions-core-0.0.0.tgz",
|
"rawSpec": "file:toolkit/actions-core-0.0.0.tgz",
|
||||||
"saveSpec": "file:toolkit\\actions-core-0.0.0.tgz",
|
"saveSpec": "file:toolkit\\actions-core-0.0.0.tgz",
|
||||||
"fetchSpec": "C:\\Users\\damccorm\\Documents\\setup-python\\toolkit\\actions-core-0.0.0.tgz"
|
"fetchSpec": "E:\\github\\setup-python\\toolkit\\actions-core-0.0.0.tgz"
|
||||||
},
|
},
|
||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"/",
|
"/",
|
||||||
"/@actions/tool-cache"
|
"/@actions/tool-cache"
|
||||||
],
|
],
|
||||||
"_resolved": "C:\\Users\\damccorm\\Documents\\setup-python\\toolkit\\actions-core-0.0.0.tgz",
|
"_resolved": "E:\\github\\setup-python\\toolkit\\actions-core-0.0.0.tgz",
|
||||||
"_shasum": "346d90a534fa6c5021bc2e1b732574fd2c66fc35",
|
"_shasum": "346d90a534fa6c5021bc2e1b732574fd2c66fc35",
|
||||||
"_spec": "@actions/core@file:toolkit/actions-core-0.0.0.tgz",
|
"_spec": "@actions/core@file:toolkit/actions-core-0.0.0.tgz",
|
||||||
"_where": "C:\\Users\\damccorm\\Documents\\setup-python",
|
"_where": "E:\\github\\setup-python",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/actions/toolkit/issues"
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
},
|
},
|
||||||
|
|||||||
+4
-4
@@ -7,23 +7,23 @@
|
|||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"where": "C:\\Users\\damccorm\\Documents\\setup-python",
|
"where": "E:\\github\\setup-python",
|
||||||
"raw": "@actions/exec@file:toolkit/actions-exec-0.0.0.tgz",
|
"raw": "@actions/exec@file:toolkit/actions-exec-0.0.0.tgz",
|
||||||
"name": "@actions/exec",
|
"name": "@actions/exec",
|
||||||
"escapedName": "@actions%2fexec",
|
"escapedName": "@actions%2fexec",
|
||||||
"scope": "@actions",
|
"scope": "@actions",
|
||||||
"rawSpec": "file:toolkit/actions-exec-0.0.0.tgz",
|
"rawSpec": "file:toolkit/actions-exec-0.0.0.tgz",
|
||||||
"saveSpec": "file:toolkit\\actions-exec-0.0.0.tgz",
|
"saveSpec": "file:toolkit\\actions-exec-0.0.0.tgz",
|
||||||
"fetchSpec": "C:\\Users\\damccorm\\Documents\\setup-python\\toolkit\\actions-exec-0.0.0.tgz"
|
"fetchSpec": "E:\\github\\setup-python\\toolkit\\actions-exec-0.0.0.tgz"
|
||||||
},
|
},
|
||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"/",
|
"/",
|
||||||
"/@actions/tool-cache"
|
"/@actions/tool-cache"
|
||||||
],
|
],
|
||||||
"_resolved": "C:\\Users\\damccorm\\Documents\\setup-python\\toolkit\\actions-exec-0.0.0.tgz",
|
"_resolved": "E:\\github\\setup-python\\toolkit\\actions-exec-0.0.0.tgz",
|
||||||
"_shasum": "341d868fe6c4123ded20db9c2106b7b8c16e1d73",
|
"_shasum": "341d868fe6c4123ded20db9c2106b7b8c16e1d73",
|
||||||
"_spec": "@actions/exec@file:toolkit/actions-exec-0.0.0.tgz",
|
"_spec": "@actions/exec@file:toolkit/actions-exec-0.0.0.tgz",
|
||||||
"_where": "C:\\Users\\damccorm\\Documents\\setup-python",
|
"_where": "E:\\github\\setup-python",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/actions/toolkit/issues"
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
},
|
},
|
||||||
|
|||||||
+4
-4
@@ -7,23 +7,23 @@
|
|||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"where": "C:\\Users\\damccorm\\Documents\\setup-python",
|
"where": "E:\\github\\setup-python",
|
||||||
"raw": "@actions/exit@file:toolkit/actions-exit-0.0.0.tgz",
|
"raw": "@actions/exit@file:toolkit/actions-exit-0.0.0.tgz",
|
||||||
"name": "@actions/exit",
|
"name": "@actions/exit",
|
||||||
"escapedName": "@actions%2fexit",
|
"escapedName": "@actions%2fexit",
|
||||||
"scope": "@actions",
|
"scope": "@actions",
|
||||||
"rawSpec": "file:toolkit/actions-exit-0.0.0.tgz",
|
"rawSpec": "file:toolkit/actions-exit-0.0.0.tgz",
|
||||||
"saveSpec": "file:toolkit\\actions-exit-0.0.0.tgz",
|
"saveSpec": "file:toolkit\\actions-exit-0.0.0.tgz",
|
||||||
"fetchSpec": "C:\\Users\\damccorm\\Documents\\setup-python\\toolkit\\actions-exit-0.0.0.tgz"
|
"fetchSpec": "E:\\github\\setup-python\\toolkit\\actions-exit-0.0.0.tgz"
|
||||||
},
|
},
|
||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"/",
|
"/",
|
||||||
"/@actions/core"
|
"/@actions/core"
|
||||||
],
|
],
|
||||||
"_resolved": "C:\\Users\\damccorm\\Documents\\setup-python\\toolkit\\actions-exit-0.0.0.tgz",
|
"_resolved": "E:\\github\\setup-python\\toolkit\\actions-exit-0.0.0.tgz",
|
||||||
"_shasum": "d47c8c61b45750ae49fea3061e3419a547b2a48f",
|
"_shasum": "d47c8c61b45750ae49fea3061e3419a547b2a48f",
|
||||||
"_spec": "@actions/exit@file:toolkit/actions-exit-0.0.0.tgz",
|
"_spec": "@actions/exit@file:toolkit/actions-exit-0.0.0.tgz",
|
||||||
"_where": "C:\\Users\\damccorm\\Documents\\setup-python",
|
"_where": "E:\\github\\setup-python",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/actions/toolkit/issues"
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
},
|
},
|
||||||
|
|||||||
+4
-4
@@ -7,23 +7,23 @@
|
|||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"where": "C:\\Users\\damccorm\\Documents\\setup-python",
|
"where": "E:\\github\\setup-python",
|
||||||
"raw": "@actions/io@file:toolkit/actions-io-0.0.0.tgz",
|
"raw": "@actions/io@file:toolkit/actions-io-0.0.0.tgz",
|
||||||
"name": "@actions/io",
|
"name": "@actions/io",
|
||||||
"escapedName": "@actions%2fio",
|
"escapedName": "@actions%2fio",
|
||||||
"scope": "@actions",
|
"scope": "@actions",
|
||||||
"rawSpec": "file:toolkit/actions-io-0.0.0.tgz",
|
"rawSpec": "file:toolkit/actions-io-0.0.0.tgz",
|
||||||
"saveSpec": "file:toolkit\\actions-io-0.0.0.tgz",
|
"saveSpec": "file:toolkit\\actions-io-0.0.0.tgz",
|
||||||
"fetchSpec": "C:\\Users\\damccorm\\Documents\\setup-python\\toolkit\\actions-io-0.0.0.tgz"
|
"fetchSpec": "E:\\github\\setup-python\\toolkit\\actions-io-0.0.0.tgz"
|
||||||
},
|
},
|
||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"/",
|
"/",
|
||||||
"/@actions/tool-cache"
|
"/@actions/tool-cache"
|
||||||
],
|
],
|
||||||
"_resolved": "C:\\Users\\damccorm\\Documents\\setup-python\\toolkit\\actions-io-0.0.0.tgz",
|
"_resolved": "E:\\github\\setup-python\\toolkit\\actions-io-0.0.0.tgz",
|
||||||
"_shasum": "1e8f0faca6b39215bebacedf473e5bb0716e39bf",
|
"_shasum": "1e8f0faca6b39215bebacedf473e5bb0716e39bf",
|
||||||
"_spec": "@actions/io@file:toolkit/actions-io-0.0.0.tgz",
|
"_spec": "@actions/io@file:toolkit/actions-io-0.0.0.tgz",
|
||||||
"_where": "C:\\Users\\damccorm\\Documents\\setup-python",
|
"_where": "E:\\github\\setup-python",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/actions/toolkit/issues"
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
},
|
},
|
||||||
|
|||||||
+2
-2
@@ -29,8 +29,8 @@ exports.HTTPError = HTTPError;
|
|||||||
const IS_WINDOWS = process.platform === 'win32';
|
const IS_WINDOWS = process.platform === 'win32';
|
||||||
const userAgent = 'actions/tool-cache';
|
const userAgent = 'actions/tool-cache';
|
||||||
// On load grab temp directory and cache directory and remove them from env (currently don't want to expose this)
|
// On load grab temp directory and cache directory and remove them from env (currently don't want to expose this)
|
||||||
let tempDirectory = process.env['RUNNER_TEMPDIRECTORY'] || '';
|
let tempDirectory = process.env['RUNNER_TEMP'] || '';
|
||||||
let cacheRoot = process.env['AGENT_TOOLSDIRECTORY'] || process.env['RUNNER_TOOLSDIRECTORY'] || '';
|
let cacheRoot = process.env['RUNNER_TOOL_CACHE'] || '';
|
||||||
// If directories not found, place them in common temp locations
|
// If directories not found, place them in common temp locations
|
||||||
if (!tempDirectory || !cacheRoot) {
|
if (!tempDirectory || !cacheRoot) {
|
||||||
let baseLocation;
|
let baseLocation;
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
+6
-6
@@ -2,27 +2,27 @@
|
|||||||
"_from": "file:toolkit\\actions-tool-cache-0.0.0.tgz",
|
"_from": "file:toolkit\\actions-tool-cache-0.0.0.tgz",
|
||||||
"_id": "@actions/[email protected]",
|
"_id": "@actions/[email protected]",
|
||||||
"_inBundle": false,
|
"_inBundle": false,
|
||||||
"_integrity": "sha512-NavDg5VFXDfbe9TpFuj+uOHacjg1bT3Wmo3DQuul3gsGRBEXyzhh2MWKnBZs/Zh7FE3prLmIqpbtymafNBFkIA==",
|
"_integrity": "sha512-CCJjXKGfqR34oo1mgKpUk63g3fcoIq+aNJBZ7b73aWGot0ddju2cefJrKjhEun4FI7gYsLYg+ayAUnbFwkGd4Q==",
|
||||||
"_location": "/@actions/tool-cache",
|
"_location": "/@actions/tool-cache",
|
||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"where": "C:\\Users\\damccorm\\Documents\\setup-python",
|
"where": "E:\\github\\setup-python",
|
||||||
"raw": "@actions/tool-cache@file:toolkit/actions-tool-cache-0.0.0.tgz",
|
"raw": "@actions/tool-cache@file:toolkit/actions-tool-cache-0.0.0.tgz",
|
||||||
"name": "@actions/tool-cache",
|
"name": "@actions/tool-cache",
|
||||||
"escapedName": "@actions%2ftool-cache",
|
"escapedName": "@actions%2ftool-cache",
|
||||||
"scope": "@actions",
|
"scope": "@actions",
|
||||||
"rawSpec": "file:toolkit/actions-tool-cache-0.0.0.tgz",
|
"rawSpec": "file:toolkit/actions-tool-cache-0.0.0.tgz",
|
||||||
"saveSpec": "file:toolkit\\actions-tool-cache-0.0.0.tgz",
|
"saveSpec": "file:toolkit\\actions-tool-cache-0.0.0.tgz",
|
||||||
"fetchSpec": "C:\\Users\\damccorm\\Documents\\setup-python\\toolkit\\actions-tool-cache-0.0.0.tgz"
|
"fetchSpec": "E:\\github\\setup-python\\toolkit\\actions-tool-cache-0.0.0.tgz"
|
||||||
},
|
},
|
||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"/"
|
"/"
|
||||||
],
|
],
|
||||||
"_resolved": "C:\\Users\\damccorm\\Documents\\setup-python\\toolkit\\actions-tool-cache-0.0.0.tgz",
|
"_resolved": "E:\\github\\setup-python\\toolkit\\actions-tool-cache-0.0.0.tgz",
|
||||||
"_shasum": "fa216c10f724010a74602fd14881f25f5b008070",
|
"_shasum": "223a115ab2782ba0a7ad4a0a829030b9cb84eade",
|
||||||
"_spec": "@actions/tool-cache@file:toolkit/actions-tool-cache-0.0.0.tgz",
|
"_spec": "@actions/tool-cache@file:toolkit/actions-tool-cache-0.0.0.tgz",
|
||||||
"_where": "C:\\Users\\damccorm\\Documents\\setup-python",
|
"_where": "E:\\github\\setup-python",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/actions/toolkit/issues"
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
},
|
},
|
||||||
|
|||||||
+23
@@ -1,5 +1,28 @@
|
|||||||
# changes log
|
# changes log
|
||||||
|
|
||||||
|
## 6.2.0
|
||||||
|
|
||||||
|
* Coerce numbers to strings when passed to semver.coerce()
|
||||||
|
* Add `rtl` option to coerce from right to left
|
||||||
|
|
||||||
|
## 6.1.3
|
||||||
|
|
||||||
|
* Handle X-ranges properly in includePrerelease mode
|
||||||
|
|
||||||
|
## 6.1.2
|
||||||
|
|
||||||
|
* Do not throw when testing invalid version strings
|
||||||
|
|
||||||
|
## 6.1.1
|
||||||
|
|
||||||
|
* Add options support for semver.coerce()
|
||||||
|
* Handle undefined version passed to Range.test
|
||||||
|
|
||||||
|
## 6.1.0
|
||||||
|
|
||||||
|
* Add semver.compareBuild function
|
||||||
|
* Support `*` in semver.intersects
|
||||||
|
|
||||||
## 6.0
|
## 6.0
|
||||||
|
|
||||||
* Fix `intersects` logic.
|
* Fix `intersects` logic.
|
||||||
|
|||||||
+25
-12
@@ -60,6 +60,12 @@ Options:
|
|||||||
Coerce a string into SemVer if possible
|
Coerce a string into SemVer if possible
|
||||||
(does not imply --loose)
|
(does not imply --loose)
|
||||||
|
|
||||||
|
--rtl
|
||||||
|
Coerce version strings right to left
|
||||||
|
|
||||||
|
--ltr
|
||||||
|
Coerce version strings left to right (default)
|
||||||
|
|
||||||
Program exits successfully if any valid version satisfies
|
Program exits successfully if any valid version satisfies
|
||||||
all supplied ranges, and prints all satisfying versions.
|
all supplied ranges, and prints all satisfying versions.
|
||||||
|
|
||||||
@@ -399,19 +405,26 @@ range, use the `satisfies(version, range)` function.
|
|||||||
|
|
||||||
### Coercion
|
### Coercion
|
||||||
|
|
||||||
* `coerce(version)`: Coerces a string to semver if possible
|
* `coerce(version, options)`: Coerces a string to semver if possible
|
||||||
|
|
||||||
This aims to provide a very forgiving translation of a non-semver
|
This aims to provide a very forgiving translation of a non-semver string to
|
||||||
string to semver. It looks for the first digit in a string, and
|
semver. It looks for the first digit in a string, and consumes all
|
||||||
consumes all remaining characters which satisfy at least a partial semver
|
remaining characters which satisfy at least a partial semver (e.g., `1`,
|
||||||
(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters).
|
`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
|
||||||
Longer versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`).
|
versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
|
||||||
All surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`).
|
surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
|
||||||
Only text which lacks digits will fail coercion (`version one` is not valid).
|
`3.4.0`). Only text which lacks digits will fail coercion (`version one`
|
||||||
The maximum length for any semver component considered for coercion is 16 characters;
|
is not valid). The maximum length for any semver component considered for
|
||||||
longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`).
|
coercion is 16 characters; longer components will be ignored
|
||||||
The maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`;
|
(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
|
||||||
higher value components are invalid (`9999999999999999.4.7.4` is likely invalid).
|
semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
|
||||||
|
components are invalid (`9999999999999999.4.7.4` is likely invalid).
|
||||||
|
|
||||||
|
If the `options.rtl` flag is set, then `coerce` will return the right-most
|
||||||
|
coercible tuple that does not share an ending index with a longer coercible
|
||||||
|
tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not
|
||||||
|
`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of
|
||||||
|
any other overlapping SemVer tuple.
|
||||||
|
|
||||||
### Clean
|
### Clean
|
||||||
|
|
||||||
|
|||||||
+16
-2
@@ -19,6 +19,8 @@ var includePrerelease = false
|
|||||||
|
|
||||||
var coerce = false
|
var coerce = false
|
||||||
|
|
||||||
|
var rtl = false
|
||||||
|
|
||||||
var identifier
|
var identifier
|
||||||
|
|
||||||
var semver = require('../semver')
|
var semver = require('../semver')
|
||||||
@@ -71,6 +73,12 @@ function main () {
|
|||||||
case '-c': case '--coerce':
|
case '-c': case '--coerce':
|
||||||
coerce = true
|
coerce = true
|
||||||
break
|
break
|
||||||
|
case '--rtl':
|
||||||
|
rtl = true
|
||||||
|
break
|
||||||
|
case '--ltr':
|
||||||
|
rtl = false
|
||||||
|
break
|
||||||
case '-h': case '--help': case '-?':
|
case '-h': case '--help': case '-?':
|
||||||
return help()
|
return help()
|
||||||
default:
|
default:
|
||||||
@@ -79,10 +87,10 @@ function main () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var options = { loose: loose, includePrerelease: includePrerelease }
|
var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl }
|
||||||
|
|
||||||
versions = versions.map(function (v) {
|
versions = versions.map(function (v) {
|
||||||
return coerce ? (semver.coerce(v) || { version: v }).version : v
|
return coerce ? (semver.coerce(v, options) || { version: v }).version : v
|
||||||
}).filter(function (v) {
|
}).filter(function (v) {
|
||||||
return semver.valid(v)
|
return semver.valid(v)
|
||||||
})
|
})
|
||||||
@@ -149,6 +157,12 @@ function help () {
|
|||||||
' Coerce a string into SemVer if possible',
|
' Coerce a string into SemVer if possible',
|
||||||
' (does not imply --loose)',
|
' (does not imply --loose)',
|
||||||
'',
|
'',
|
||||||
|
'--rtl',
|
||||||
|
' Coerce version strings right to left',
|
||||||
|
'',
|
||||||
|
'--ltr',
|
||||||
|
' Coerce version strings left to right (default)',
|
||||||
|
'',
|
||||||
'Program exits successfully if any valid version satisfies',
|
'Program exits successfully if any valid version satisfies',
|
||||||
'all supplied ranges, and prints all satisfying versions.',
|
'all supplied ranges, and prints all satisfying versions.',
|
||||||
'',
|
'',
|
||||||
+19
-20
@@ -1,41 +1,40 @@
|
|||||||
{
|
{
|
||||||
"_args": [
|
"_from": "semver@^6.1.1",
|
||||||
[
|
"_id": "[email protected]",
|
||||||
"[email protected]",
|
|
||||||
"."
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"_from": "[email protected]",
|
|
||||||
"_id": "[email protected]",
|
|
||||||
"_inBundle": false,
|
"_inBundle": false,
|
||||||
"_integrity": "sha512-z4PqiCpomGtWj8633oeAdXm1Kn1W++3T8epkZYnwiVgIYIJ0QHszhInYSJTYxebByQH7KVCEAn8R9duzZW2PhQ==",
|
"_integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
||||||
"_location": "/semver",
|
"_location": "/semver",
|
||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
"type": "version",
|
"type": "range",
|
||||||
"registry": true,
|
"registry": true,
|
||||||
"raw": "[email protected].2",
|
"raw": "semver@^6.1.1",
|
||||||
"name": "semver",
|
"name": "semver",
|
||||||
"escapedName": "semver",
|
"escapedName": "semver",
|
||||||
"rawSpec": "6.1.2",
|
"rawSpec": "^6.1.1",
|
||||||
"saveSpec": null,
|
"saveSpec": null,
|
||||||
"fetchSpec": "6.1.2"
|
"fetchSpec": "^6.1.1"
|
||||||
},
|
},
|
||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"/"
|
"/",
|
||||||
|
"/@actions/tool-cache",
|
||||||
|
"/istanbul-lib-instrument"
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/semver/-/semver-6.1.2.tgz",
|
"_resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||||
"_spec": "6.1.2",
|
"_shasum": "ee0a64c8af5e8ceea67687b133761e1becbd1d3d",
|
||||||
"_where": ".",
|
"_spec": "semver@^6.1.1",
|
||||||
|
"_where": "E:\\github\\setup-python",
|
||||||
"bin": {
|
"bin": {
|
||||||
"semver": "./bin/semver"
|
"semver": "./bin/semver.js"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/npm/node-semver/issues"
|
"url": "https://github.com/npm/node-semver/issues"
|
||||||
},
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
|
"deprecated": false,
|
||||||
"description": "The semantic version parser used by npm.",
|
"description": "The semantic version parser used by npm.",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"tap": "^14.1.6"
|
"tap": "^14.3.1"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"bin",
|
"bin",
|
||||||
@@ -59,5 +58,5 @@
|
|||||||
"tap": {
|
"tap": {
|
||||||
"check-coverage": true
|
"check-coverage": true
|
||||||
},
|
},
|
||||||
"version": "6.1.2"
|
"version": "6.3.0"
|
||||||
}
|
}
|
||||||
|
|||||||
+166
-122
@@ -29,75 +29,80 @@ var MAX_SAFE_COMPONENT_LENGTH = 16
|
|||||||
// The actual regexps go on exports.re
|
// The actual regexps go on exports.re
|
||||||
var re = exports.re = []
|
var re = exports.re = []
|
||||||
var src = exports.src = []
|
var src = exports.src = []
|
||||||
|
var t = exports.tokens = {}
|
||||||
var R = 0
|
var R = 0
|
||||||
|
|
||||||
|
function tok (n) {
|
||||||
|
t[n] = R++
|
||||||
|
}
|
||||||
|
|
||||||
// The following Regular Expressions can be used for tokenizing,
|
// The following Regular Expressions can be used for tokenizing,
|
||||||
// validating, and parsing SemVer version strings.
|
// validating, and parsing SemVer version strings.
|
||||||
|
|
||||||
// ## Numeric Identifier
|
// ## Numeric Identifier
|
||||||
// A single `0`, or a non-zero digit followed by zero or more digits.
|
// A single `0`, or a non-zero digit followed by zero or more digits.
|
||||||
|
|
||||||
var NUMERICIDENTIFIER = R++
|
tok('NUMERICIDENTIFIER')
|
||||||
src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'
|
src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*'
|
||||||
var NUMERICIDENTIFIERLOOSE = R++
|
tok('NUMERICIDENTIFIERLOOSE')
|
||||||
src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'
|
src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+'
|
||||||
|
|
||||||
// ## Non-numeric Identifier
|
// ## Non-numeric Identifier
|
||||||
// Zero or more digits, followed by a letter or hyphen, and then zero or
|
// Zero or more digits, followed by a letter or hyphen, and then zero or
|
||||||
// more letters, digits, or hyphens.
|
// more letters, digits, or hyphens.
|
||||||
|
|
||||||
var NONNUMERICIDENTIFIER = R++
|
tok('NONNUMERICIDENTIFIER')
|
||||||
src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'
|
src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'
|
||||||
|
|
||||||
// ## Main Version
|
// ## Main Version
|
||||||
// Three dot-separated numeric identifiers.
|
// Three dot-separated numeric identifiers.
|
||||||
|
|
||||||
var MAINVERSION = R++
|
tok('MAINVERSION')
|
||||||
src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
|
src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' +
|
||||||
'(' + src[NUMERICIDENTIFIER] + ')\\.' +
|
'(' + src[t.NUMERICIDENTIFIER] + ')\\.' +
|
||||||
'(' + src[NUMERICIDENTIFIER] + ')'
|
'(' + src[t.NUMERICIDENTIFIER] + ')'
|
||||||
|
|
||||||
var MAINVERSIONLOOSE = R++
|
tok('MAINVERSIONLOOSE')
|
||||||
src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
|
src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' +
|
||||||
'(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
|
'(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' +
|
||||||
'(' + src[NUMERICIDENTIFIERLOOSE] + ')'
|
'(' + src[t.NUMERICIDENTIFIERLOOSE] + ')'
|
||||||
|
|
||||||
// ## Pre-release Version Identifier
|
// ## Pre-release Version Identifier
|
||||||
// A numeric identifier, or a non-numeric identifier.
|
// A numeric identifier, or a non-numeric identifier.
|
||||||
|
|
||||||
var PRERELEASEIDENTIFIER = R++
|
tok('PRERELEASEIDENTIFIER')
|
||||||
src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
|
src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] +
|
||||||
'|' + src[NONNUMERICIDENTIFIER] + ')'
|
'|' + src[t.NONNUMERICIDENTIFIER] + ')'
|
||||||
|
|
||||||
var PRERELEASEIDENTIFIERLOOSE = R++
|
tok('PRERELEASEIDENTIFIERLOOSE')
|
||||||
src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
|
src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] +
|
||||||
'|' + src[NONNUMERICIDENTIFIER] + ')'
|
'|' + src[t.NONNUMERICIDENTIFIER] + ')'
|
||||||
|
|
||||||
// ## Pre-release Version
|
// ## Pre-release Version
|
||||||
// Hyphen, followed by one or more dot-separated pre-release version
|
// Hyphen, followed by one or more dot-separated pre-release version
|
||||||
// identifiers.
|
// identifiers.
|
||||||
|
|
||||||
var PRERELEASE = R++
|
tok('PRERELEASE')
|
||||||
src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
|
src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] +
|
||||||
'(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'
|
'(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))'
|
||||||
|
|
||||||
var PRERELEASELOOSE = R++
|
tok('PRERELEASELOOSE')
|
||||||
src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
|
src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] +
|
||||||
'(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'
|
'(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))'
|
||||||
|
|
||||||
// ## Build Metadata Identifier
|
// ## Build Metadata Identifier
|
||||||
// Any combination of digits, letters, or hyphens.
|
// Any combination of digits, letters, or hyphens.
|
||||||
|
|
||||||
var BUILDIDENTIFIER = R++
|
tok('BUILDIDENTIFIER')
|
||||||
src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'
|
src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+'
|
||||||
|
|
||||||
// ## Build Metadata
|
// ## Build Metadata
|
||||||
// Plus sign, followed by one or more period-separated build metadata
|
// Plus sign, followed by one or more period-separated build metadata
|
||||||
// identifiers.
|
// identifiers.
|
||||||
|
|
||||||
var BUILD = R++
|
tok('BUILD')
|
||||||
src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
|
src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] +
|
||||||
'(?:\\.' + src[BUILDIDENTIFIER] + ')*))'
|
'(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))'
|
||||||
|
|
||||||
// ## Full Version String
|
// ## Full Version String
|
||||||
// A main version, followed optionally by a pre-release version and
|
// A main version, followed optionally by a pre-release version and
|
||||||
@@ -108,129 +113,133 @@ src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
|
|||||||
// capturing group, because it should not ever be used in version
|
// capturing group, because it should not ever be used in version
|
||||||
// comparison.
|
// comparison.
|
||||||
|
|
||||||
var FULL = R++
|
tok('FULL')
|
||||||
var FULLPLAIN = 'v?' + src[MAINVERSION] +
|
tok('FULLPLAIN')
|
||||||
src[PRERELEASE] + '?' +
|
src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] +
|
||||||
src[BUILD] + '?'
|
src[t.PRERELEASE] + '?' +
|
||||||
|
src[t.BUILD] + '?'
|
||||||
|
|
||||||
src[FULL] = '^' + FULLPLAIN + '$'
|
src[t.FULL] = '^' + src[t.FULLPLAIN] + '$'
|
||||||
|
|
||||||
// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
|
// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
|
||||||
// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
|
// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
|
||||||
// common in the npm registry.
|
// common in the npm registry.
|
||||||
var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
|
tok('LOOSEPLAIN')
|
||||||
src[PRERELEASELOOSE] + '?' +
|
src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] +
|
||||||
src[BUILD] + '?'
|
src[t.PRERELEASELOOSE] + '?' +
|
||||||
|
src[t.BUILD] + '?'
|
||||||
|
|
||||||
var LOOSE = R++
|
tok('LOOSE')
|
||||||
src[LOOSE] = '^' + LOOSEPLAIN + '$'
|
src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$'
|
||||||
|
|
||||||
var GTLT = R++
|
tok('GTLT')
|
||||||
src[GTLT] = '((?:<|>)?=?)'
|
src[t.GTLT] = '((?:<|>)?=?)'
|
||||||
|
|
||||||
// Something like "2.*" or "1.2.x".
|
// Something like "2.*" or "1.2.x".
|
||||||
// Note that "x.x" is a valid xRange identifer, meaning "any version"
|
// Note that "x.x" is a valid xRange identifer, meaning "any version"
|
||||||
// Only the first item is strictly required.
|
// Only the first item is strictly required.
|
||||||
var XRANGEIDENTIFIERLOOSE = R++
|
tok('XRANGEIDENTIFIERLOOSE')
|
||||||
src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'
|
src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'
|
||||||
var XRANGEIDENTIFIER = R++
|
tok('XRANGEIDENTIFIER')
|
||||||
src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'
|
src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*'
|
||||||
|
|
||||||
var XRANGEPLAIN = R++
|
tok('XRANGEPLAIN')
|
||||||
src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
|
src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' +
|
||||||
'(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
|
'(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' +
|
||||||
'(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
|
'(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' +
|
||||||
'(?:' + src[PRERELEASE] + ')?' +
|
'(?:' + src[t.PRERELEASE] + ')?' +
|
||||||
src[BUILD] + '?' +
|
src[t.BUILD] + '?' +
|
||||||
')?)?'
|
')?)?'
|
||||||
|
|
||||||
var XRANGEPLAINLOOSE = R++
|
tok('XRANGEPLAINLOOSE')
|
||||||
src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
|
src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +
|
||||||
'(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
|
'(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +
|
||||||
'(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
|
'(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +
|
||||||
'(?:' + src[PRERELEASELOOSE] + ')?' +
|
'(?:' + src[t.PRERELEASELOOSE] + ')?' +
|
||||||
src[BUILD] + '?' +
|
src[t.BUILD] + '?' +
|
||||||
')?)?'
|
')?)?'
|
||||||
|
|
||||||
var XRANGE = R++
|
tok('XRANGE')
|
||||||
src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'
|
src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$'
|
||||||
var XRANGELOOSE = R++
|
tok('XRANGELOOSE')
|
||||||
src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'
|
src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$'
|
||||||
|
|
||||||
// Coercion.
|
// Coercion.
|
||||||
// Extract anything that could conceivably be a part of a valid semver
|
// Extract anything that could conceivably be a part of a valid semver
|
||||||
var COERCE = R++
|
tok('COERCE')
|
||||||
src[COERCE] = '(?:^|[^\\d])' +
|
src[t.COERCE] = '(^|[^\\d])' +
|
||||||
'(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +
|
'(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +
|
||||||
'(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
|
'(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
|
||||||
'(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
|
'(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
|
||||||
'(?:$|[^\\d])'
|
'(?:$|[^\\d])'
|
||||||
|
tok('COERCERTL')
|
||||||
|
re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')
|
||||||
|
|
||||||
// Tilde ranges.
|
// Tilde ranges.
|
||||||
// Meaning is "reasonably at or greater than"
|
// Meaning is "reasonably at or greater than"
|
||||||
var LONETILDE = R++
|
tok('LONETILDE')
|
||||||
src[LONETILDE] = '(?:~>?)'
|
src[t.LONETILDE] = '(?:~>?)'
|
||||||
|
|
||||||
var TILDETRIM = R++
|
tok('TILDETRIM')
|
||||||
src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'
|
src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+'
|
||||||
re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g')
|
re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')
|
||||||
var tildeTrimReplace = '$1~'
|
var tildeTrimReplace = '$1~'
|
||||||
|
|
||||||
var TILDE = R++
|
tok('TILDE')
|
||||||
src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'
|
src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$'
|
||||||
var TILDELOOSE = R++
|
tok('TILDELOOSE')
|
||||||
src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'
|
src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$'
|
||||||
|
|
||||||
// Caret ranges.
|
// Caret ranges.
|
||||||
// Meaning is "at least and backwards compatible with"
|
// Meaning is "at least and backwards compatible with"
|
||||||
var LONECARET = R++
|
tok('LONECARET')
|
||||||
src[LONECARET] = '(?:\\^)'
|
src[t.LONECARET] = '(?:\\^)'
|
||||||
|
|
||||||
var CARETTRIM = R++
|
tok('CARETTRIM')
|
||||||
src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'
|
src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+'
|
||||||
re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g')
|
re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')
|
||||||
var caretTrimReplace = '$1^'
|
var caretTrimReplace = '$1^'
|
||||||
|
|
||||||
var CARET = R++
|
tok('CARET')
|
||||||
src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'
|
src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$'
|
||||||
var CARETLOOSE = R++
|
tok('CARETLOOSE')
|
||||||
src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'
|
src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$'
|
||||||
|
|
||||||
// A simple gt/lt/eq thing, or just "" to indicate "any version"
|
// A simple gt/lt/eq thing, or just "" to indicate "any version"
|
||||||
var COMPARATORLOOSE = R++
|
tok('COMPARATORLOOSE')
|
||||||
src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'
|
src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$'
|
||||||
var COMPARATOR = R++
|
tok('COMPARATOR')
|
||||||
src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'
|
src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$'
|
||||||
|
|
||||||
// An expression to strip any whitespace between the gtlt and the thing
|
// An expression to strip any whitespace between the gtlt and the thing
|
||||||
// it modifies, so that `> 1.2.3` ==> `>1.2.3`
|
// it modifies, so that `> 1.2.3` ==> `>1.2.3`
|
||||||
var COMPARATORTRIM = R++
|
tok('COMPARATORTRIM')
|
||||||
src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
|
src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] +
|
||||||
'\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'
|
'\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')'
|
||||||
|
|
||||||
// this one has to use the /g flag
|
// this one has to use the /g flag
|
||||||
re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g')
|
re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')
|
||||||
var comparatorTrimReplace = '$1$2$3'
|
var comparatorTrimReplace = '$1$2$3'
|
||||||
|
|
||||||
// Something like `1.2.3 - 1.2.4`
|
// Something like `1.2.3 - 1.2.4`
|
||||||
// Note that these all use the loose form, because they'll be
|
// Note that these all use the loose form, because they'll be
|
||||||
// checked against either the strict or loose comparator form
|
// checked against either the strict or loose comparator form
|
||||||
// later.
|
// later.
|
||||||
var HYPHENRANGE = R++
|
tok('HYPHENRANGE')
|
||||||
src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
|
src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' +
|
||||||
'\\s+-\\s+' +
|
'\\s+-\\s+' +
|
||||||
'(' + src[XRANGEPLAIN] + ')' +
|
'(' + src[t.XRANGEPLAIN] + ')' +
|
||||||
'\\s*$'
|
'\\s*$'
|
||||||
|
|
||||||
var HYPHENRANGELOOSE = R++
|
tok('HYPHENRANGELOOSE')
|
||||||
src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
|
src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' +
|
||||||
'\\s+-\\s+' +
|
'\\s+-\\s+' +
|
||||||
'(' + src[XRANGEPLAINLOOSE] + ')' +
|
'(' + src[t.XRANGEPLAINLOOSE] + ')' +
|
||||||
'\\s*$'
|
'\\s*$'
|
||||||
|
|
||||||
// Star ranges basically just allow anything at all.
|
// Star ranges basically just allow anything at all.
|
||||||
var STAR = R++
|
tok('STAR')
|
||||||
src[STAR] = '(<|>)?=?\\s*\\*'
|
src[t.STAR] = '(<|>)?=?\\s*\\*'
|
||||||
|
|
||||||
// Compile to actual regexp objects.
|
// Compile to actual regexp objects.
|
||||||
// All are flag-free, unless they were created above with a flag.
|
// All are flag-free, unless they were created above with a flag.
|
||||||
@@ -262,7 +271,7 @@ function parse (version, options) {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
var r = options.loose ? re[LOOSE] : re[FULL]
|
var r = options.loose ? re[t.LOOSE] : re[t.FULL]
|
||||||
if (!r.test(version)) {
|
if (!r.test(version)) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
@@ -317,7 +326,7 @@ function SemVer (version, options) {
|
|||||||
this.options = options
|
this.options = options
|
||||||
this.loose = !!options.loose
|
this.loose = !!options.loose
|
||||||
|
|
||||||
var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL])
|
var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
|
||||||
|
|
||||||
if (!m) {
|
if (!m) {
|
||||||
throw new TypeError('Invalid Version: ' + version)
|
throw new TypeError('Invalid Version: ' + version)
|
||||||
@@ -778,7 +787,7 @@ function Comparator (comp, options) {
|
|||||||
|
|
||||||
var ANY = {}
|
var ANY = {}
|
||||||
Comparator.prototype.parse = function (comp) {
|
Comparator.prototype.parse = function (comp) {
|
||||||
var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]
|
var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
|
||||||
var m = comp.match(r)
|
var m = comp.match(r)
|
||||||
|
|
||||||
if (!m) {
|
if (!m) {
|
||||||
@@ -933,18 +942,18 @@ Range.prototype.parseRange = function (range) {
|
|||||||
var loose = this.options.loose
|
var loose = this.options.loose
|
||||||
range = range.trim()
|
range = range.trim()
|
||||||
// `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
|
// `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
|
||||||
var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]
|
var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
|
||||||
range = range.replace(hr, hyphenReplace)
|
range = range.replace(hr, hyphenReplace)
|
||||||
debug('hyphen replace', range)
|
debug('hyphen replace', range)
|
||||||
// `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
|
// `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
|
||||||
range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace)
|
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
|
||||||
debug('comparator trim', range, re[COMPARATORTRIM])
|
debug('comparator trim', range, re[t.COMPARATORTRIM])
|
||||||
|
|
||||||
// `~ 1.2.3` => `~1.2.3`
|
// `~ 1.2.3` => `~1.2.3`
|
||||||
range = range.replace(re[TILDETRIM], tildeTrimReplace)
|
range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
|
||||||
|
|
||||||
// `^ 1.2.3` => `^1.2.3`
|
// `^ 1.2.3` => `^1.2.3`
|
||||||
range = range.replace(re[CARETTRIM], caretTrimReplace)
|
range = range.replace(re[t.CARETTRIM], caretTrimReplace)
|
||||||
|
|
||||||
// normalize spaces
|
// normalize spaces
|
||||||
range = range.split(/\s+/).join(' ')
|
range = range.split(/\s+/).join(' ')
|
||||||
@@ -952,7 +961,7 @@ Range.prototype.parseRange = function (range) {
|
|||||||
// At this point, the range is completely trimmed and
|
// At this point, the range is completely trimmed and
|
||||||
// ready to be split into comparators.
|
// ready to be split into comparators.
|
||||||
|
|
||||||
var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]
|
var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
|
||||||
var set = range.split(' ').map(function (comp) {
|
var set = range.split(' ').map(function (comp) {
|
||||||
return parseComparator(comp, this.options)
|
return parseComparator(comp, this.options)
|
||||||
}, this).join(' ').split(/\s+/)
|
}, this).join(' ').split(/\s+/)
|
||||||
@@ -1052,7 +1061,7 @@ function replaceTildes (comp, options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function replaceTilde (comp, options) {
|
function replaceTilde (comp, options) {
|
||||||
var r = options.loose ? re[TILDELOOSE] : re[TILDE]
|
var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
|
||||||
return comp.replace(r, function (_, M, m, p, pr) {
|
return comp.replace(r, function (_, M, m, p, pr) {
|
||||||
debug('tilde', comp, _, M, m, p, pr)
|
debug('tilde', comp, _, M, m, p, pr)
|
||||||
var ret
|
var ret
|
||||||
@@ -1093,7 +1102,7 @@ function replaceCarets (comp, options) {
|
|||||||
|
|
||||||
function replaceCaret (comp, options) {
|
function replaceCaret (comp, options) {
|
||||||
debug('caret', comp, options)
|
debug('caret', comp, options)
|
||||||
var r = options.loose ? re[CARETLOOSE] : re[CARET]
|
var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
|
||||||
return comp.replace(r, function (_, M, m, p, pr) {
|
return comp.replace(r, function (_, M, m, p, pr) {
|
||||||
debug('caret', comp, _, M, m, p, pr)
|
debug('caret', comp, _, M, m, p, pr)
|
||||||
var ret
|
var ret
|
||||||
@@ -1152,7 +1161,7 @@ function replaceXRanges (comp, options) {
|
|||||||
|
|
||||||
function replaceXRange (comp, options) {
|
function replaceXRange (comp, options) {
|
||||||
comp = comp.trim()
|
comp = comp.trim()
|
||||||
var r = options.loose ? re[XRANGELOOSE] : re[XRANGE]
|
var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
|
||||||
return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
|
return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
|
||||||
debug('xRange', comp, ret, gtlt, M, m, p, pr)
|
debug('xRange', comp, ret, gtlt, M, m, p, pr)
|
||||||
var xM = isX(M)
|
var xM = isX(M)
|
||||||
@@ -1164,10 +1173,14 @@ function replaceXRange (comp, options) {
|
|||||||
gtlt = ''
|
gtlt = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if we're including prereleases in the match, then we need
|
||||||
|
// to fix this to -0, the lowest possible prerelease value
|
||||||
|
pr = options.includePrerelease ? '-0' : ''
|
||||||
|
|
||||||
if (xM) {
|
if (xM) {
|
||||||
if (gtlt === '>' || gtlt === '<') {
|
if (gtlt === '>' || gtlt === '<') {
|
||||||
// nothing is allowed
|
// nothing is allowed
|
||||||
ret = '<0.0.0'
|
ret = '<0.0.0-0'
|
||||||
} else {
|
} else {
|
||||||
// nothing is forbidden
|
// nothing is forbidden
|
||||||
ret = '*'
|
ret = '*'
|
||||||
@@ -1204,11 +1217,12 @@ function replaceXRange (comp, options) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = gtlt + M + '.' + m + '.' + p
|
ret = gtlt + M + '.' + m + '.' + p + pr
|
||||||
} else if (xm) {
|
} else if (xm) {
|
||||||
ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
|
ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr
|
||||||
} else if (xp) {
|
} else if (xp) {
|
||||||
ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
|
ret = '>=' + M + '.' + m + '.0' + pr +
|
||||||
|
' <' + M + '.' + (+m + 1) + '.0' + pr
|
||||||
}
|
}
|
||||||
|
|
||||||
debug('xRange return', ret)
|
debug('xRange return', ret)
|
||||||
@@ -1222,10 +1236,10 @@ function replaceXRange (comp, options) {
|
|||||||
function replaceStars (comp, options) {
|
function replaceStars (comp, options) {
|
||||||
debug('replaceStars', comp, options)
|
debug('replaceStars', comp, options)
|
||||||
// Looseness is ignored here. star is always as loose as it gets!
|
// Looseness is ignored here. star is always as loose as it gets!
|
||||||
return comp.trim().replace(re[STAR], '')
|
return comp.trim().replace(re[t.STAR], '')
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function is passed to string.replace(re[HYPHENRANGE])
|
// This function is passed to string.replace(re[t.HYPHENRANGE])
|
||||||
// M, m, patch, prerelease, build
|
// M, m, patch, prerelease, build
|
||||||
// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
|
// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
|
||||||
// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
|
// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
|
||||||
@@ -1536,17 +1550,47 @@ function coerce (version, options) {
|
|||||||
return version
|
return version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof version === 'number') {
|
||||||
|
version = String(version)
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof version !== 'string') {
|
if (typeof version !== 'string') {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
var match = version.match(re[COERCE])
|
options = options || {}
|
||||||
|
|
||||||
if (match == null) {
|
var 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.
|
||||||
|
var 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 null
|
||||||
}
|
}
|
||||||
|
|
||||||
return parse(match[1] +
|
return parse(match[2] +
|
||||||
'.' + (match[2] || '0') +
|
'.' + (match[3] || '0') +
|
||||||
'.' + (match[3] || '0'), options)
|
'.' + (match[4] || '0'), options)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@
|
|||||||
"_resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz",
|
"_resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz",
|
||||||
"_shasum": "2d3785a158c174c9a16dc2c046ec5fc5f1742213",
|
"_shasum": "2d3785a158c174c9a16dc2c046ec5fc5f1742213",
|
||||||
"_spec": "[email protected]",
|
"_spec": "[email protected]",
|
||||||
"_where": "C:\\Users\\damccorm\\Documents\\setup-python\\node_modules\\typed-rest-client",
|
"_where": "E:\\github\\setup-python\\node_modules\\typed-rest-client",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Koichi Kobayashi",
|
"name": "Koichi Kobayashi",
|
||||||
"email": "[email protected]"
|
"email": "[email protected]"
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@
|
|||||||
"_resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.5.0.tgz",
|
"_resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.5.0.tgz",
|
||||||
"_shasum": "c0dda6e775b942fd46a2d99f2160a94953206fc2",
|
"_shasum": "c0dda6e775b942fd46a2d99f2160a94953206fc2",
|
||||||
"_spec": "typed-rest-client@^1.4.0",
|
"_spec": "typed-rest-client@^1.4.0",
|
||||||
"_where": "C:\\Users\\damccorm\\Documents\\setup-python\\toolkit\\actions-tool-cache-0.0.0.tgz",
|
"_where": "E:\\github\\setup-python\\toolkit\\actions-tool-cache-0.0.0.tgz",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Microsoft Corporation"
|
"name": "Microsoft Corporation"
|
||||||
},
|
},
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@
|
|||||||
"_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz",
|
"_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz",
|
||||||
"_shasum": "4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022",
|
"_shasum": "4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022",
|
||||||
"_spec": "[email protected]",
|
"_spec": "[email protected]",
|
||||||
"_where": "C:\\Users\\damccorm\\Documents\\setup-python\\node_modules\\typed-rest-client",
|
"_where": "E:\\github\\setup-python\\node_modules\\typed-rest-client",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Jeremy Ashkenas",
|
"name": "Jeremy Ashkenas",
|
||||||
"email": "[email protected]"
|
"email": "[email protected]"
|
||||||
|
|||||||
+10
-13
@@ -1,33 +1,28 @@
|
|||||||
{
|
{
|
||||||
"_args": [
|
"_from": "uuid@^3.3.2",
|
||||||
[
|
|
||||||
"[email protected]",
|
|
||||||
"C:\\Users\\damccorm\\Documents\\setup-python"
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"_from": "[email protected]",
|
|
||||||
"_id": "[email protected]",
|
"_id": "[email protected]",
|
||||||
"_inBundle": false,
|
"_inBundle": false,
|
||||||
"_integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
|
"_integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
|
||||||
"_location": "/uuid",
|
"_location": "/uuid",
|
||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
"type": "version",
|
"type": "range",
|
||||||
"registry": true,
|
"registry": true,
|
||||||
"raw": "[email protected]",
|
"raw": "uuid@^3.3.2",
|
||||||
"name": "uuid",
|
"name": "uuid",
|
||||||
"escapedName": "uuid",
|
"escapedName": "uuid",
|
||||||
"rawSpec": "3.3.2",
|
"rawSpec": "^3.3.2",
|
||||||
"saveSpec": null,
|
"saveSpec": null,
|
||||||
"fetchSpec": "3.3.2"
|
"fetchSpec": "^3.3.2"
|
||||||
},
|
},
|
||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"/@actions/tool-cache",
|
"/@actions/tool-cache",
|
||||||
"/request"
|
"/request"
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
|
"_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
|
||||||
"_spec": "3.3.2",
|
"_shasum": "1b4af4955eb3077c501c23872fc6513811587131",
|
||||||
"_where": "C:\\Users\\damccorm\\Documents\\setup-python",
|
"_spec": "uuid@^3.3.2",
|
||||||
|
"_where": "E:\\github\\setup-python\\toolkit\\actions-tool-cache-0.0.0.tgz",
|
||||||
"bin": {
|
"bin": {
|
||||||
"uuid": "./bin/uuid"
|
"uuid": "./bin/uuid"
|
||||||
},
|
},
|
||||||
@@ -39,6 +34,7 @@
|
|||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/kelektiv/node-uuid/issues"
|
"url": "https://github.com/kelektiv/node-uuid/issues"
|
||||||
},
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
"commitlint": {
|
"commitlint": {
|
||||||
"extends": [
|
"extends": [
|
||||||
"@commitlint/config-conventional"
|
"@commitlint/config-conventional"
|
||||||
@@ -66,6 +62,7 @@
|
|||||||
"email": "[email protected]"
|
"email": "[email protected]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"deprecated": false,
|
||||||
"description": "RFC4122 (v1, v4, and v5) UUIDs",
|
"description": "RFC4122 (v1, v4, and v5) UUIDs",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "7.0.0",
|
"@commitlint/cli": "7.0.0",
|
||||||
|
|||||||
Generated
+184
-287
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Reference in New Issue
Block a user