@vc-shell/release-config 1.1.91-alpha.2 → 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 +18 -5
- package/dist/release-config.js +139 -175
- package/dist/release.d.ts.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,27 @@
|
|
|
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
2
|
|
|
3
|
-
|
|
4
|
-
|
|
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))
|
|
7
|
+
|
|
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)
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
- **release-config:** clean up comments and formatting in release.ts for improved clarity ([2a1130d](https://github.com/VirtoCommerce/vc-shell/commit/2a1130d7cc89a69069ca959f0647fb84ce1924c2))
|
|
13
|
+
- **release:** disable Lerna push to avoid double CI runs ([78aef0a](https://github.com/VirtoCommerce/vc-shell/commit/78aef0aebd10c5089df0cb96d35591d57bdbcee6))
|
|
14
|
+
|
|
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)
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
- **release:** add automatic push after amend to sync commits and tags ([0aa84c4](https://github.com/VirtoCommerce/vc-shell/commit/0aa84c4f4791533f3423f49c06910becf224b1a4))
|
|
5
20
|
|
|
6
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)
|
|
7
22
|
|
|
8
23
|
**Note:** Version bump only for package @vc-shell/release-config
|
|
9
24
|
|
|
10
|
-
# Change Log
|
|
11
|
-
|
|
12
25
|
## [1.1.91-alpha.1](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.90...v1.1.91-alpha.1) (2025-10-14)
|
|
13
26
|
|
|
14
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,208 +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",
|
|
151
|
-
|
|
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
|
+
Pushing changes to remote...
|
|
152
|
+
`)), y("git", ["push", "origin", "HEAD", "--force-with-lease"], { stdio: "inherit" }), y("git", ["push", "origin", e, "--force"], { stdio: "inherit" }), console.log(n.green(`
|
|
153
|
+
✅ Updated changelogs, package.json, and pushed to remote
|
|
152
154
|
`));
|
|
153
155
|
}
|
|
154
|
-
|
|
156
|
+
c ? (console.log(n.yellow(`
|
|
155
157
|
✅ Dry run completed successfully!
|
|
156
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
|
|
157
159
|
`)), console.log(n.yellow("No git operations performed. Review changes with:")), console.log(n.cyan(` git diff
|
|
158
160
|
`)), console.log(n.yellow("To revert all changes:")), console.log(n.cyan(` git checkout -- .
|
|
159
161
|
`))) : (console.log(n.green(`
|
|
160
162
|
✅ Release completed successfully!
|
|
161
|
-
`)),
|
|
162
|
-
ℹ️ 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
|
|
163
165
|
`))));
|
|
164
166
|
};
|
|
165
|
-
async function
|
|
167
|
+
async function O(a) {
|
|
166
168
|
console.log(n.cyan(`
|
|
167
169
|
Enhancing changelogs...
|
|
168
170
|
`));
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
for (const l of i) {
|
|
176
|
-
if (l === ".") continue;
|
|
177
|
-
const s = N.join(l, "CHANGELOG.md"), { pkg: m } = w(l), c = h.has(m.name);
|
|
178
|
-
if (!V(s)) {
|
|
179
|
-
const t = `# CHANGELOG
|
|
180
|
-
|
|
181
|
-
All notable changes to this package will be documented in this file.
|
|
182
|
-
|
|
183
|
-
## [${m.version}] (${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]})
|
|
184
|
-
|
|
185
|
-
**Note:** Version bump only - Updated dependencies to match framework version
|
|
186
|
-
`;
|
|
187
|
-
b(s, t, "utf-8"), console.log(n.gray(` Created changelog for ${m.name}`));
|
|
188
|
-
continue;
|
|
189
|
-
}
|
|
190
|
-
let a = S(s, "utf-8");
|
|
191
|
-
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(
|
|
192
177
|
/^See \[Conventional Commits\]\(https:\/\/conventionalcommits\.org\) for commit guidelines\.\s*\n/gm,
|
|
193
178
|
""
|
|
194
|
-
),
|
|
179
|
+
), t = t.replace(/\n{3,}/g, `
|
|
195
180
|
|
|
196
|
-
`)
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
for (u.push(t), e++; e < r.length && r[e].trim() === ""; )
|
|
205
|
-
u.push(r[e]), e++;
|
|
206
|
-
let C = !1, P = e, k = e;
|
|
207
|
-
for (; k < r.length && !r[k].match(/^##\s+(\[)?[\d.a-z-]+(\])?/i); ) {
|
|
208
|
-
const G = r[k].trim();
|
|
209
|
-
if (G !== "" && !G.startsWith("**Note:**")) {
|
|
210
|
-
C = !0;
|
|
211
|
-
break;
|
|
212
|
-
}
|
|
213
|
-
k++;
|
|
214
|
-
}
|
|
215
|
-
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(""));
|
|
216
|
-
} else
|
|
217
|
-
u.push(t), e++;
|
|
218
|
-
}
|
|
219
|
-
a = u.join(`
|
|
220
|
-
`), 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");
|
|
221
189
|
}
|
|
222
190
|
}
|
|
223
|
-
async function
|
|
224
|
-
const
|
|
225
|
-
if (!
|
|
226
|
-
const { pkg:
|
|
227
|
-
|
|
228
|
-
`, "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}`)));
|
|
229
197
|
}
|
|
230
|
-
async function
|
|
198
|
+
async function H(a) {
|
|
231
199
|
console.log(n.cyan(`
|
|
232
200
|
Generating root CHANGELOG with package grouping...
|
|
233
201
|
`));
|
|
234
|
-
const
|
|
202
|
+
const g = "CHANGELOG.md", f = {
|
|
235
203
|
framework: "VC-Shell Framework (@vc-shell/framework)",
|
|
236
204
|
"cli/api-client": "API Client Generator (@vc-shell/api-client-generator)",
|
|
237
205
|
"cli/create-vc-app": "Create VC App (@vc-shell/create-vc-app)",
|
|
238
206
|
"configs/release-config": "Release Config (@vc-shell/release-config)",
|
|
239
207
|
"configs/vite-config": "Vite Config (@vc-shell/config-generator)",
|
|
240
208
|
"configs/ts-config": "TypeScript Config (@vc-shell/ts-config)"
|
|
241
|
-
},
|
|
242
|
-
for (const
|
|
243
|
-
if (
|
|
244
|
-
const
|
|
245
|
-
if (!
|
|
246
|
-
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(`
|
|
247
215
|
`);
|
|
248
|
-
let
|
|
249
|
-
for (const
|
|
250
|
-
const
|
|
251
|
-
if (
|
|
252
|
-
if (
|
|
253
|
-
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(`
|
|
254
222
|
`).trim();
|
|
255
|
-
|
|
223
|
+
t[e] || (t[e] = {}), t[e][m] = A;
|
|
256
224
|
}
|
|
257
|
-
|
|
258
|
-
} 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);
|
|
259
227
|
}
|
|
260
|
-
if (
|
|
261
|
-
const
|
|
228
|
+
if (e && s.length > 0) {
|
|
229
|
+
const i = s.join(`
|
|
262
230
|
`).trim();
|
|
263
|
-
|
|
231
|
+
t[e] || (t[e] = {}), t[e][m] = i;
|
|
264
232
|
}
|
|
265
233
|
}
|
|
266
|
-
let
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
for (let e = 0; e < Math.max(r.length, u.length); e++) {
|
|
274
|
-
const t = r[e] ?? 0, o = u[e] ?? 0;
|
|
275
|
-
if (t !== o)
|
|
276
|
-
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));
|
|
277
241
|
}
|
|
278
242
|
return 0;
|
|
279
243
|
});
|
|
280
|
-
for (const
|
|
281
|
-
const
|
|
282
|
-
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}
|
|
283
247
|
|
|
284
|
-
`, !
|
|
285
|
-
|
|
248
|
+
`, !m) {
|
|
249
|
+
c += `**Note:** Version bump only for package
|
|
286
250
|
|
|
287
251
|
`;
|
|
288
252
|
continue;
|
|
289
253
|
}
|
|
290
|
-
let
|
|
291
|
-
for (const e of
|
|
254
|
+
let o = !1;
|
|
255
|
+
for (const e of a) {
|
|
292
256
|
if (e === ".") continue;
|
|
293
|
-
const
|
|
294
|
-
|
|
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}
|
|
295
259
|
|
|
296
|
-
`,
|
|
260
|
+
`, c += `${i}
|
|
297
261
|
|
|
298
262
|
`);
|
|
299
263
|
}
|
|
300
|
-
|
|
264
|
+
o || (c += `**Note:** Version bump only for package
|
|
301
265
|
|
|
302
266
|
`);
|
|
303
267
|
}
|
|
304
|
-
|
|
268
|
+
c = c.replace(/\n{3,}/g, `
|
|
305
269
|
|
|
306
|
-
`),
|
|
270
|
+
`), k(g, c, "utf-8"), console.log(n.green(" ✓ Generated root CHANGELOG.md with package grouping"));
|
|
307
271
|
}
|
|
308
|
-
async function
|
|
309
|
-
if (
|
|
310
|
-
for (const
|
|
311
|
-
if (
|
|
312
|
-
const { pkg:
|
|
313
|
-
|
|
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));
|
|
314
278
|
}
|
|
315
279
|
}
|
|
316
280
|
export {
|
|
317
|
-
|
|
281
|
+
M as release
|
|
318
282
|
};
|
package/dist/release.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../src/release.ts"],"names":[],"mappings":"AASA;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,GAAU,mEAM3B;IACD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;;OAMG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,8DAA8D;IAC9D,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzE,2DAA2D;IAC3D,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvG,8DAA8D;IAC9D,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CACrC,
|
|
1
|
+
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../src/release.ts"],"names":[],"mappings":"AASA;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,GAAU,mEAM3B;IACD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;;OAMG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,8DAA8D;IAC9D,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzE,2DAA2D;IAC3D,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvG,8DAA8D;IAC9D,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CACrC,kBAwNA,CAAC"}
|
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
|
},
|