semver 7.7.3 → 7.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/bin/semver.js +1 -1
- package/functions/diff.js +1 -1
- package/internal/re.js +2 -2
- package/package.json +4 -4
- package/ranges/subset.js +1 -1
package/README.md
CHANGED
|
@@ -110,8 +110,9 @@ Options:
|
|
|
110
110
|
-l --loose
|
|
111
111
|
Interpret versions and ranges loosely
|
|
112
112
|
|
|
113
|
-
-n <0|1>
|
|
114
|
-
|
|
113
|
+
-n <0|1|false>
|
|
114
|
+
Base number for prerelease identifier (default: 0).
|
|
115
|
+
Use false to omit the number altogether.
|
|
115
116
|
|
|
116
117
|
-p --include-prerelease
|
|
117
118
|
Always include prerelease versions in range matching
|
package/bin/semver.js
CHANGED
|
@@ -105,7 +105,7 @@ const main = () => {
|
|
|
105
105
|
versions = versions.map((v) => {
|
|
106
106
|
return coerce ? (semver.coerce(v, options) || { version: v }).version : v
|
|
107
107
|
}).filter((v) => {
|
|
108
|
-
return semver.valid(v)
|
|
108
|
+
return semver.valid(v, options)
|
|
109
109
|
})
|
|
110
110
|
if (!versions.length) {
|
|
111
111
|
return fail()
|
package/functions/diff.js
CHANGED
package/internal/re.js
CHANGED
|
@@ -78,8 +78,8 @@ createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
|
|
|
78
78
|
|
|
79
79
|
// ## Pre-release Version Identifier
|
|
80
80
|
// A numeric identifier, or a non-numeric identifier.
|
|
81
|
-
// Non-
|
|
82
|
-
// Therefore non-
|
|
81
|
+
// Non-numeric identifiers include numeric identifiers but can be longer.
|
|
82
|
+
// Therefore non-numeric identifiers must go first.
|
|
83
83
|
|
|
84
84
|
createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]
|
|
85
85
|
}|${src[t.NUMERICIDENTIFIER]})`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semver",
|
|
3
|
-
"version": "7.7.
|
|
3
|
+
"version": "7.7.4",
|
|
4
4
|
"description": "The semantic version parser used by npm.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@npmcli/eslint-config": "^
|
|
18
|
-
"@npmcli/template-oss": "4.
|
|
17
|
+
"@npmcli/eslint-config": "^6.0.0",
|
|
18
|
+
"@npmcli/template-oss": "4.29.0",
|
|
19
19
|
"benchmark": "^2.1.4",
|
|
20
20
|
"tap": "^16.0.0"
|
|
21
21
|
},
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"author": "GitHub Inc.",
|
|
53
53
|
"templateOSS": {
|
|
54
54
|
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
|
55
|
-
"version": "4.
|
|
55
|
+
"version": "4.29.0",
|
|
56
56
|
"engines": ">=10",
|
|
57
57
|
"distPaths": [
|
|
58
58
|
"classes/",
|
package/ranges/subset.js
CHANGED
|
@@ -38,7 +38,7 @@ const compare = require('../functions/compare.js')
|
|
|
38
38
|
// - If LT
|
|
39
39
|
// - If LT.semver is greater than any < or <= comp in C, return false
|
|
40
40
|
// - If LT is <=, and LT.semver does not satisfy every C, return false
|
|
41
|
-
// - If
|
|
41
|
+
// - If LT.semver has a prerelease, and not in prerelease mode
|
|
42
42
|
// - If no C has a prerelease and the LT.semver tuple, return false
|
|
43
43
|
// - Else return true
|
|
44
44
|
|