@vc-shell/release-config 1.1.91-alpha.4 → 1.1.91-alpha.5
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/CHANGELOG.md +6 -7
- package/dist/release-config.js +137 -175
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
## [1.1.91-alpha.5](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.91-alpha.4...v1.1.91-alpha.5) (2025-10-14)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **release-config:** enhance changelog cleanup and add version bump notes for empty versions ([cd2b9b0](https://github.com/VirtoCommerce/vc-shell/commit/cd2b9b0250018f4a26a65c41a31d308b3dc6aa51))
|
|
6
|
+
- **release-config:** improve root changelog generation to exclude empty version bumps ([19ac0ee](https://github.com/VirtoCommerce/vc-shell/commit/19ac0ee6536b6172088c919a5ce2d10ab4718863))
|
|
2
7
|
|
|
3
8
|
## [1.1.91-alpha.4](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.91-alpha.3...v1.1.91-alpha.4) (2025-10-14)
|
|
4
9
|
|
|
@@ -7,22 +12,16 @@
|
|
|
7
12
|
- **release-config:** clean up comments and formatting in release.ts for improved clarity ([2a1130d](https://github.com/VirtoCommerce/vc-shell/commit/2a1130d7cc89a69069ca959f0647fb84ce1924c2))
|
|
8
13
|
- **release:** disable Lerna push to avoid double CI runs ([78aef0a](https://github.com/VirtoCommerce/vc-shell/commit/78aef0aebd10c5089df0cb96d35591d57bdbcee6))
|
|
9
14
|
|
|
10
|
-
# Change Log
|
|
11
|
-
|
|
12
15
|
## [1.1.91-alpha.3](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.91-alpha.2...v1.1.91-alpha.3) (2025-10-14)
|
|
13
16
|
|
|
14
17
|
### Bug Fixes
|
|
15
18
|
|
|
16
19
|
- **release:** add automatic push after amend to sync commits and tags ([0aa84c4](https://github.com/VirtoCommerce/vc-shell/commit/0aa84c4f4791533f3423f49c06910becf224b1a4))
|
|
17
20
|
|
|
18
|
-
# Change Log
|
|
19
|
-
|
|
20
21
|
## [1.1.91-alpha.2](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.91-alpha.1...v1.1.91-alpha.2) (2025-10-14)
|
|
21
22
|
|
|
22
23
|
**Note:** Version bump only for package @vc-shell/release-config
|
|
23
24
|
|
|
24
|
-
# Change Log
|
|
25
|
-
|
|
26
25
|
## [1.1.91-alpha.1](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.90...v1.1.91-alpha.1) (2025-10-14)
|
|
27
26
|
|
|
28
27
|
**Note:** Version bump only for package @vc-shell/release-config
|
package/dist/release-config.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import v from "prompts";
|
|
2
|
-
import { parse as
|
|
3
|
-
import { readFileSync as
|
|
4
|
-
import
|
|
2
|
+
import { parse as P, valid as V } from "semver";
|
|
3
|
+
import { readFileSync as b, writeFileSync as k, existsSync as S } from "node:fs";
|
|
4
|
+
import C from "node:path";
|
|
5
5
|
import n from "chalk";
|
|
6
|
-
import
|
|
7
|
-
import { argv as
|
|
6
|
+
import T from "mri";
|
|
7
|
+
import { argv as j } from "node:process";
|
|
8
8
|
import { sync as y } from "cross-spawn";
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
function w(
|
|
12
|
-
const
|
|
13
|
-
return { pkg: JSON.parse(
|
|
9
|
+
const r = T(j.slice(2)), R = !!r.dry;
|
|
10
|
+
R && (console.log(n.inverse(n.yellow(" DRY RUN "))), console.log());
|
|
11
|
+
function w(a) {
|
|
12
|
+
const g = C.resolve(a), f = C.resolve(g, "package.json");
|
|
13
|
+
return { pkg: JSON.parse(b(f, "utf-8")), pkgDir: g, pkgPath: f };
|
|
14
14
|
}
|
|
15
|
-
async function
|
|
16
|
-
if (
|
|
17
|
-
console.log(n.blue(`[dryrun] Writing package.json to ${
|
|
15
|
+
async function G(a, g) {
|
|
16
|
+
if (R) {
|
|
17
|
+
console.log(n.blue(`[dryrun] Writing package.json to ${a}`));
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
k(a, JSON.stringify(g, null, 2) + `
|
|
21
21
|
`, "utf-8");
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
packages:
|
|
25
|
-
bumpVersion:
|
|
26
|
-
generateChangelog:
|
|
27
|
-
toTag:
|
|
28
|
-
customHooks:
|
|
23
|
+
const M = async ({
|
|
24
|
+
packages: a,
|
|
25
|
+
bumpVersion: g,
|
|
26
|
+
generateChangelog: f,
|
|
27
|
+
toTag: t,
|
|
28
|
+
customHooks: u
|
|
29
29
|
}) => {
|
|
30
|
-
if (
|
|
30
|
+
if (a.length === 0)
|
|
31
31
|
throw new Error("No packages to release");
|
|
32
|
-
const
|
|
33
|
-
|
|
32
|
+
const c = !!r.dry;
|
|
33
|
+
c && console.log(n.yellow(`
|
|
34
34
|
⚠️ DRY RUN MODE - No git operations will be performed
|
|
35
35
|
`));
|
|
36
|
-
const { releaseType:
|
|
36
|
+
const { releaseType: d } = await v({
|
|
37
37
|
type: "select",
|
|
38
38
|
name: "releaseType",
|
|
39
39
|
message: "Select release type",
|
|
@@ -44,62 +44,62 @@ const B = async ({
|
|
|
44
44
|
{ title: "Custom version", value: "custom" }
|
|
45
45
|
]
|
|
46
46
|
});
|
|
47
|
-
if (!
|
|
47
|
+
if (!d) {
|
|
48
48
|
console.log(n.yellow(`
|
|
49
49
|
Release cancelled
|
|
50
50
|
`));
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
const { pkg:
|
|
53
|
+
const l = ["lerna", "version", "--conventional-commits"];
|
|
54
|
+
if (d === "prerelease") {
|
|
55
|
+
const { pkg: p } = w(a[0]), o = P(p.version), e = o && o.prerelease.length > 0, s = e ? o.prerelease[0] : null, { preid: i } = await v({
|
|
56
56
|
type: "select",
|
|
57
57
|
name: "preid",
|
|
58
58
|
message: "Select prerelease identifier",
|
|
59
59
|
choices: [
|
|
60
60
|
{
|
|
61
|
-
title:
|
|
61
|
+
title: e && s === "alpha" ? "alpha (continue)" : "alpha",
|
|
62
62
|
value: "alpha"
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
|
-
title:
|
|
65
|
+
title: e && s === "beta" ? "beta (continue)" : "beta",
|
|
66
66
|
value: "beta"
|
|
67
67
|
},
|
|
68
|
-
{ title:
|
|
68
|
+
{ title: e && s === "rc" ? "rc (continue)" : "rc", value: "rc" }
|
|
69
69
|
]
|
|
70
70
|
});
|
|
71
|
-
if (!
|
|
71
|
+
if (!i) {
|
|
72
72
|
console.log(n.yellow(`
|
|
73
73
|
Release cancelled
|
|
74
74
|
`));
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
} else if (
|
|
79
|
-
|
|
80
|
-
else if (
|
|
81
|
-
const { pkg:
|
|
77
|
+
e && s === i ? l.push("prerelease") : l.push("prerelease", "--preid", i), r.tag || (r.tag = i);
|
|
78
|
+
} else if (d === "graduate")
|
|
79
|
+
l.push("--conventional-graduate");
|
|
80
|
+
else if (d === "custom") {
|
|
81
|
+
const { pkg: p } = w(a[0]), { customVersion: o } = await v({
|
|
82
82
|
type: "text",
|
|
83
83
|
name: "customVersion",
|
|
84
84
|
message: "Enter custom version",
|
|
85
|
-
initial:
|
|
86
|
-
validate: (
|
|
85
|
+
initial: p.version,
|
|
86
|
+
validate: (s) => V(s) ? !0 : "Invalid semver version"
|
|
87
87
|
});
|
|
88
|
-
if (!
|
|
88
|
+
if (!o) {
|
|
89
89
|
console.log(n.yellow(`
|
|
90
90
|
Release cancelled
|
|
91
91
|
`));
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
if (
|
|
97
|
-
const
|
|
98
|
-
typeof
|
|
94
|
+
l.push(o);
|
|
95
|
+
const e = P(o);
|
|
96
|
+
if (e && e.prerelease.length > 0 && !r.tag) {
|
|
97
|
+
const s = e.prerelease[0];
|
|
98
|
+
typeof s == "string" && (r.tag = s);
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
if (!
|
|
102
|
-
const { npmTag:
|
|
101
|
+
if (!r.tag) {
|
|
102
|
+
const { npmTag: p } = await v({
|
|
103
103
|
type: "select",
|
|
104
104
|
name: "npmTag",
|
|
105
105
|
message: "Select npm distribution tag",
|
|
@@ -111,210 +111,172 @@ Release cancelled
|
|
|
111
111
|
{ title: "custom", value: "custom" }
|
|
112
112
|
]
|
|
113
113
|
});
|
|
114
|
-
if (
|
|
115
|
-
const
|
|
114
|
+
if (p === "custom") {
|
|
115
|
+
const o = await v({
|
|
116
116
|
type: "text",
|
|
117
117
|
name: "customTag",
|
|
118
118
|
message: "Input custom npm tag",
|
|
119
119
|
initial: "latest"
|
|
120
120
|
});
|
|
121
|
-
|
|
122
|
-
} else
|
|
121
|
+
r.tag = o.customTag;
|
|
122
|
+
} else p !== "latest" && (r.tag = p);
|
|
123
123
|
}
|
|
124
|
-
const { yes:
|
|
124
|
+
const { yes: h } = await v({
|
|
125
125
|
type: "confirm",
|
|
126
126
|
name: "yes",
|
|
127
|
-
message: `Ready to release${
|
|
127
|
+
message: `Ready to release${r.tag && r.tag !== "latest" ? ` with npm tag ${n.blue(r.tag)}` : ""}. Continue?`
|
|
128
128
|
});
|
|
129
|
-
if (!
|
|
129
|
+
if (!h) {
|
|
130
130
|
console.log(n.yellow(`
|
|
131
131
|
Release cancelled
|
|
132
132
|
`));
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
|
-
|
|
136
|
-
Running: npx ${
|
|
135
|
+
c ? l.push("--no-git-tag-version", "--no-push") : l.push("--no-push"), console.log(n.cyan(`
|
|
136
|
+
Running: npx ${l.join(" ")}
|
|
137
137
|
`));
|
|
138
|
-
const
|
|
139
|
-
if (
|
|
138
|
+
const m = y("npx", l, { stdio: "inherit" });
|
|
139
|
+
if (m.status !== 0 && (console.error(n.red(`
|
|
140
140
|
❌ Release process failed
|
|
141
|
-
`)), process.exit(
|
|
141
|
+
`)), process.exit(m.status || 1)), await E(a), u) {
|
|
142
142
|
console.log(n.cyan(`
|
|
143
143
|
Running post-version hooks...
|
|
144
144
|
`));
|
|
145
|
-
const { pkg:
|
|
146
|
-
await
|
|
145
|
+
const { pkg: p } = w(a[0] === "." ? a[1] : a[0]);
|
|
146
|
+
await u(p.version);
|
|
147
147
|
}
|
|
148
|
-
if (await
|
|
149
|
-
const
|
|
150
|
-
y("git", ["add", "-A"], { stdio: "inherit" }), y("git", ["commit", "--amend", "--no-edit", "--no-verify"], { stdio: "inherit" }), y("git", ["tag", "-f",
|
|
148
|
+
if (await O(a), await H(a), await $(a), !c && y("git", ["status", "--porcelain"], { stdio: "pipe" }).stdout?.toString().trim()) {
|
|
149
|
+
const e = y("git", ["describe", "--tags", "--abbrev=0"], { stdio: "pipe" }).stdout?.toString().trim() || "HEAD";
|
|
150
|
+
y("git", ["add", "-A"], { stdio: "inherit" }), y("git", ["commit", "--amend", "--no-edit", "--no-verify"], { stdio: "inherit" }), y("git", ["tag", "-f", e], { stdio: "inherit" }), console.log(n.cyan(`
|
|
151
151
|
Pushing changes to remote...
|
|
152
|
-
`)), y("git", ["push", "origin", "HEAD", "--force-with-lease"], { stdio: "inherit" }), y("git", ["push", "origin",
|
|
152
|
+
`)), y("git", ["push", "origin", "HEAD", "--force-with-lease"], { stdio: "inherit" }), y("git", ["push", "origin", e, "--force"], { stdio: "inherit" }), console.log(n.green(`
|
|
153
153
|
✅ Updated changelogs, package.json, and pushed to remote
|
|
154
154
|
`));
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
c ? (console.log(n.yellow(`
|
|
157
157
|
✅ Dry run completed successfully!
|
|
158
158
|
`)), console.log(n.cyan("Changes made:")), console.log(n.cyan(" - Updated package versions")), console.log(n.cyan(" - Generated/updated CHANGELOG.md files")), console.log(n.cyan(` - Updated npmTag fields in package.json
|
|
159
159
|
`)), console.log(n.yellow("No git operations performed. Review changes with:")), console.log(n.cyan(` git diff
|
|
160
160
|
`)), console.log(n.yellow("To revert all changes:")), console.log(n.cyan(` git checkout -- .
|
|
161
161
|
`))) : (console.log(n.green(`
|
|
162
162
|
✅ Release completed successfully!
|
|
163
|
-
`)),
|
|
164
|
-
ℹ️ Package files updated with npmTag: ${n.blue(
|
|
163
|
+
`)), r.tag && r.tag !== "latest" && (console.log(n.cyan(`
|
|
164
|
+
ℹ️ Package files updated with npmTag: ${n.blue(r.tag)}`)), console.log(n.cyan(` GitHub Actions will automatically publish with this tag
|
|
165
165
|
`))));
|
|
166
166
|
};
|
|
167
|
-
async function
|
|
167
|
+
async function O(a) {
|
|
168
168
|
console.log(n.cyan(`
|
|
169
169
|
Enhancing changelogs...
|
|
170
170
|
`));
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
for (const l of i) {
|
|
178
|
-
if (l === ".") continue;
|
|
179
|
-
const s = N.join(l, "CHANGELOG.md"), { pkg: h } = w(l), c = m.has(h.name);
|
|
180
|
-
if (!V(s)) {
|
|
181
|
-
const t = `# CHANGELOG
|
|
182
|
-
|
|
183
|
-
All notable changes to this package will be documented in this file.
|
|
184
|
-
|
|
185
|
-
## [${h.version}] (${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]})
|
|
186
|
-
|
|
187
|
-
**Note:** Version bump only - Updated dependencies to match framework version
|
|
188
|
-
`;
|
|
189
|
-
b(s, t, "utf-8"), console.log(n.gray(` Created changelog for ${h.name}`));
|
|
190
|
-
continue;
|
|
191
|
-
}
|
|
192
|
-
let a = S(s, "utf-8");
|
|
193
|
-
a = a.replace(/^All notable changes to this project will be documented in this file\.\s*\n/gm, ""), a = a.replace(
|
|
171
|
+
for (const g of a) {
|
|
172
|
+
if (g === ".") continue;
|
|
173
|
+
const f = C.join(g, "CHANGELOG.md");
|
|
174
|
+
if (!S(f)) continue;
|
|
175
|
+
let t = b(f, "utf-8");
|
|
176
|
+
t = t.replace(/^# CHANGELOG\s*\n/gm, ""), t = t.replace(/^# Change Log\s*\n/gm, ""), t = t.replace(/^All notable changes to this (project|package) will be documented in this file\.\s*\n/gm, ""), t = t.replace(
|
|
194
177
|
/^See \[Conventional Commits\]\(https:\/\/conventionalcommits\.org\) for commit guidelines\.\s*\n/gm,
|
|
195
178
|
""
|
|
196
|
-
),
|
|
179
|
+
), t = t.replace(/\n{3,}/g, `
|
|
197
180
|
|
|
198
|
-
`)
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
for (u.push(t), e++; e < r.length && r[e].trim() === ""; )
|
|
207
|
-
u.push(r[e]), e++;
|
|
208
|
-
let C = !1, P = e, k = e;
|
|
209
|
-
for (; k < r.length && !r[k].match(/^##\s+(\[)?[\d.a-z-]+(\])?/i); ) {
|
|
210
|
-
const G = r[k].trim();
|
|
211
|
-
if (G !== "" && !G.startsWith("**Note:**")) {
|
|
212
|
-
C = !0;
|
|
213
|
-
break;
|
|
214
|
-
}
|
|
215
|
-
k++;
|
|
216
|
-
}
|
|
217
|
-
C || r.slice(P, Math.min(P + 5, r.length)).some((O) => O.includes("**Note:**")) || (d && !c ? u.push("**Note:** Version bump only - Updated dependencies to match framework version") : u.push("**Note:** Version bump only for package"), u.push(""));
|
|
218
|
-
} else
|
|
219
|
-
u.push(t), e++;
|
|
220
|
-
}
|
|
221
|
-
a = u.join(`
|
|
222
|
-
`), b(s, a, "utf-8");
|
|
181
|
+
`), t = t.replace(
|
|
182
|
+
/^(##\s+\[[^\]]+\][^\n]*\n)\n(##\s+\[|$)/gm,
|
|
183
|
+
`$1
|
|
184
|
+
**Note:** Version bump only for package
|
|
185
|
+
|
|
186
|
+
$2`
|
|
187
|
+
), t = t.trim() + `
|
|
188
|
+
`, k(f, t, "utf-8");
|
|
223
189
|
}
|
|
224
190
|
}
|
|
225
|
-
async function
|
|
226
|
-
const
|
|
227
|
-
if (!
|
|
228
|
-
const { pkg:
|
|
229
|
-
|
|
230
|
-
`, "utf-8"), console.log(n.gray(` Updated root package.json version: ${
|
|
191
|
+
async function E(a) {
|
|
192
|
+
const g = a.find((d) => d !== ".");
|
|
193
|
+
if (!g) return;
|
|
194
|
+
const { pkg: f } = w(g), t = f.version, u = "package.json", c = JSON.parse(b(u, "utf-8"));
|
|
195
|
+
c.version !== t && (c.version = t, k(u, JSON.stringify(c, null, 2) + `
|
|
196
|
+
`, "utf-8"), console.log(n.gray(` Updated root package.json version: ${t}`)));
|
|
231
197
|
}
|
|
232
|
-
async function
|
|
198
|
+
async function H(a) {
|
|
233
199
|
console.log(n.cyan(`
|
|
234
200
|
Generating root CHANGELOG with package grouping...
|
|
235
201
|
`));
|
|
236
|
-
const
|
|
202
|
+
const g = "CHANGELOG.md", f = {
|
|
237
203
|
framework: "VC-Shell Framework (@vc-shell/framework)",
|
|
238
204
|
"cli/api-client": "API Client Generator (@vc-shell/api-client-generator)",
|
|
239
205
|
"cli/create-vc-app": "Create VC App (@vc-shell/create-vc-app)",
|
|
240
206
|
"configs/release-config": "Release Config (@vc-shell/release-config)",
|
|
241
207
|
"configs/vite-config": "Vite Config (@vc-shell/config-generator)",
|
|
242
208
|
"configs/ts-config": "TypeScript Config (@vc-shell/ts-config)"
|
|
243
|
-
},
|
|
244
|
-
for (const
|
|
245
|
-
if (
|
|
246
|
-
const
|
|
247
|
-
if (!
|
|
248
|
-
const
|
|
209
|
+
}, t = {}, u = {};
|
|
210
|
+
for (const l of a) {
|
|
211
|
+
if (l === ".") continue;
|
|
212
|
+
const h = C.join(l, "CHANGELOG.md"), m = f[l] || l;
|
|
213
|
+
if (!S(h)) continue;
|
|
214
|
+
const o = b(h, "utf-8").split(`
|
|
249
215
|
`);
|
|
250
|
-
let
|
|
251
|
-
for (const
|
|
252
|
-
const
|
|
253
|
-
if (
|
|
254
|
-
if (
|
|
255
|
-
const
|
|
216
|
+
let e = null, s = [];
|
|
217
|
+
for (const i of o) {
|
|
218
|
+
const N = i.match(/^##\s+(?:\[)?([\d.a-z-]+)(?:\])?(?:\s+\([^)]+\))?/i);
|
|
219
|
+
if (N) {
|
|
220
|
+
if (e && s.length > 0) {
|
|
221
|
+
const A = s.join(`
|
|
256
222
|
`).trim();
|
|
257
|
-
|
|
223
|
+
t[e] || (t[e] = {}), t[e][m] = A;
|
|
258
224
|
}
|
|
259
|
-
|
|
260
|
-
} else
|
|
225
|
+
e = N[1], s = [], u[e] || (u[e] = i.replace(/^##\s+/, ""));
|
|
226
|
+
} else e && i.trim() !== "" && !i.startsWith("# CHANGELOG") && !i.startsWith("# Change Log") && !i.startsWith("All notable changes") && !i.startsWith("See [Conventional Commits]") && s.push(i);
|
|
261
227
|
}
|
|
262
|
-
if (
|
|
263
|
-
const
|
|
228
|
+
if (e && s.length > 0) {
|
|
229
|
+
const i = s.join(`
|
|
264
230
|
`).trim();
|
|
265
|
-
|
|
231
|
+
t[e] || (t[e] = {}), t[e][m] = i;
|
|
266
232
|
}
|
|
267
233
|
}
|
|
268
|
-
let
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
for (let e = 0; e < Math.max(r.length, u.length); e++) {
|
|
276
|
-
const t = r[e] ?? 0, o = u[e] ?? 0;
|
|
277
|
-
if (t !== o)
|
|
278
|
-
return typeof t == "number" && typeof o == "number" ? o - t : String(o).localeCompare(String(t));
|
|
234
|
+
let c = "";
|
|
235
|
+
const d = Object.keys(t).sort((l, h) => {
|
|
236
|
+
const m = l.split(/[.-]/).map((o) => isNaN(parseInt(o)) ? o : parseInt(o)), p = h.split(/[.-]/).map((o) => isNaN(parseInt(o)) ? o : parseInt(o));
|
|
237
|
+
for (let o = 0; o < Math.max(m.length, p.length); o++) {
|
|
238
|
+
const e = m[o] ?? 0, s = p[o] ?? 0;
|
|
239
|
+
if (e !== s)
|
|
240
|
+
return typeof e == "number" && typeof s == "number" ? s - e : String(s).localeCompare(String(e));
|
|
279
241
|
}
|
|
280
242
|
return 0;
|
|
281
243
|
});
|
|
282
|
-
for (const
|
|
283
|
-
const
|
|
284
|
-
if (
|
|
244
|
+
for (const l of d) {
|
|
245
|
+
const h = t[l], m = Object.values(h).some((e) => !e || !e.trim() ? !1 : e.replace(/\*\*Note:\*\*\s+Version bump only[^\n]*/gi, "").trim().length > 0), p = u[l] || l;
|
|
246
|
+
if (c += `## ${p}
|
|
285
247
|
|
|
286
|
-
`, !
|
|
287
|
-
|
|
248
|
+
`, !m) {
|
|
249
|
+
c += `**Note:** Version bump only for package
|
|
288
250
|
|
|
289
251
|
`;
|
|
290
252
|
continue;
|
|
291
253
|
}
|
|
292
|
-
let
|
|
293
|
-
for (const e of
|
|
254
|
+
let o = !1;
|
|
255
|
+
for (const e of a) {
|
|
294
256
|
if (e === ".") continue;
|
|
295
|
-
const
|
|
296
|
-
|
|
257
|
+
const s = f[e] || e, i = h[s];
|
|
258
|
+
i && i.trim() && i.replace(/\*\*Note:\*\*\s+Version bump only[^\n]*/gi, "").trim().length > 0 && (o = !0, c += `### ${s}
|
|
297
259
|
|
|
298
|
-
`,
|
|
260
|
+
`, c += `${i}
|
|
299
261
|
|
|
300
262
|
`);
|
|
301
263
|
}
|
|
302
|
-
|
|
264
|
+
o || (c += `**Note:** Version bump only for package
|
|
303
265
|
|
|
304
266
|
`);
|
|
305
267
|
}
|
|
306
|
-
|
|
268
|
+
c = c.replace(/\n{3,}/g, `
|
|
307
269
|
|
|
308
|
-
`),
|
|
270
|
+
`), k(g, c, "utf-8"), console.log(n.green(" ✓ Generated root CHANGELOG.md with package grouping"));
|
|
309
271
|
}
|
|
310
|
-
async function
|
|
311
|
-
if (
|
|
312
|
-
for (const
|
|
313
|
-
if (
|
|
314
|
-
const { pkg:
|
|
315
|
-
|
|
272
|
+
async function $(a) {
|
|
273
|
+
if (r.tag)
|
|
274
|
+
for (const g of a) {
|
|
275
|
+
if (g === ".") continue;
|
|
276
|
+
const { pkg: f, pkgPath: t } = w(g), u = { ...f };
|
|
277
|
+
r.tag !== "latest" ? (u.npmTag = r.tag, await G(t, u)) : u.npmTag && (delete u.npmTag, await G(t, u));
|
|
316
278
|
}
|
|
317
279
|
}
|
|
318
280
|
export {
|
|
319
|
-
|
|
281
|
+
M as release
|
|
320
282
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/release-config",
|
|
3
|
-
"version": "1.1.91-alpha.
|
|
3
|
+
"version": "1.1.91-alpha.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/release-config.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@types/cross-spawn": "^6.0.6",
|
|
24
24
|
"@types/prompts": "^2.4.7",
|
|
25
25
|
"@types/semver": "^7.5.4",
|
|
26
|
-
"@vc-shell/ts-config": "1.1.91-alpha.
|
|
26
|
+
"@vc-shell/ts-config": "1.1.91-alpha.5",
|
|
27
27
|
"typescript": "^5.8.3",
|
|
28
28
|
"vite-plugin-dts": "^3.6.4"
|
|
29
29
|
},
|