@xcanwin/manyoyo 5.7.1 → 5.7.2
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/lib/dev-release.js +19 -12
- package/package.json +1 -1
package/lib/dev-release.js
CHANGED
|
@@ -34,14 +34,14 @@ function buildVersionSuggestions(version) {
|
|
|
34
34
|
}
|
|
35
35
|
return [
|
|
36
36
|
{
|
|
37
|
-
key: '
|
|
38
|
-
label: '第
|
|
37
|
+
key: 'major',
|
|
38
|
+
label: '第1段 +1 (major)',
|
|
39
39
|
version: formatReleaseVersion({
|
|
40
|
-
major: parsed.major,
|
|
41
|
-
minor:
|
|
42
|
-
patch:
|
|
40
|
+
major: parsed.major + 1,
|
|
41
|
+
minor: 0,
|
|
42
|
+
patch: 0
|
|
43
43
|
}),
|
|
44
|
-
recommended:
|
|
44
|
+
recommended: false
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
key: 'minor',
|
|
@@ -54,18 +54,24 @@ function buildVersionSuggestions(version) {
|
|
|
54
54
|
recommended: false
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
|
-
key: '
|
|
58
|
-
label: '第
|
|
57
|
+
key: 'patch',
|
|
58
|
+
label: '第3段 +1 (patch)',
|
|
59
59
|
version: formatReleaseVersion({
|
|
60
|
-
major: parsed.major
|
|
61
|
-
minor:
|
|
62
|
-
patch:
|
|
60
|
+
major: parsed.major,
|
|
61
|
+
minor: parsed.minor,
|
|
62
|
+
patch: parsed.patch + 1
|
|
63
63
|
}),
|
|
64
|
-
recommended:
|
|
64
|
+
recommended: true
|
|
65
65
|
}
|
|
66
66
|
];
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
function findRecommendedChoiceIndex(options, fallbackIndex = 0) {
|
|
70
|
+
const list = Array.isArray(options) ? options : [];
|
|
71
|
+
const matchedIndex = list.findIndex(option => option && option.recommended === true);
|
|
72
|
+
return matchedIndex >= 0 ? matchedIndex : fallbackIndex;
|
|
73
|
+
}
|
|
74
|
+
|
|
69
75
|
function pickLatestVersionTag(tags) {
|
|
70
76
|
let latest = null;
|
|
71
77
|
for (const rawTag of (tags || [])) {
|
|
@@ -129,6 +135,7 @@ module.exports = {
|
|
|
129
135
|
parseReleaseVersion,
|
|
130
136
|
compareReleaseVersions,
|
|
131
137
|
buildVersionSuggestions,
|
|
138
|
+
findRecommendedChoiceIndex,
|
|
132
139
|
pickLatestVersionTag,
|
|
133
140
|
normalizeCommitMessage,
|
|
134
141
|
extractAgentMessageFromCodexJsonl
|