@vc-shell/release-config 1.1.91-alpha.1 → 1.1.91-alpha.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/CHANGELOG.md CHANGED
@@ -1,7 +1,27 @@
1
1
  # Change Log
2
2
 
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
3
+ ## [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
+
5
+ ### Bug Fixes
6
+
7
+ - **release-config:** clean up comments and formatting in release.ts for improved clarity ([2a1130d](https://github.com/VirtoCommerce/vc-shell/commit/2a1130d7cc89a69069ca959f0647fb84ce1924c2))
8
+ - **release:** disable Lerna push to avoid double CI runs ([78aef0a](https://github.com/VirtoCommerce/vc-shell/commit/78aef0aebd10c5089df0cb96d35591d57bdbcee6))
9
+
10
+ # Change Log
11
+
12
+ ## [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
+
14
+ ### Bug Fixes
15
+
16
+ - **release:** add automatic push after amend to sync commits and tags ([0aa84c4](https://github.com/VirtoCommerce/vc-shell/commit/0aa84c4f4791533f3423f49c06910becf224b1a4))
17
+
18
+ # Change Log
19
+
20
+ ## [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
+ **Note:** Version bump only for package @vc-shell/release-config
23
+
24
+ # Change Log
5
25
 
6
26
  ## [1.1.91-alpha.1](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.90...v1.1.91-alpha.1) (2025-10-14)
7
27
 
@@ -9,8 +9,8 @@ import { sync as y } from "cross-spawn";
9
9
  const p = E(H.slice(2)), j = !!p.dry;
10
10
  j && (console.log(n.inverse(n.yellow(" DRY RUN "))), console.log());
11
11
  function w(i) {
12
- const f = N.resolve(i), h = N.resolve(f, "package.json");
13
- return { pkg: JSON.parse(S(h, "utf-8")), pkgDir: f, pkgPath: h };
12
+ const f = N.resolve(i), m = N.resolve(f, "package.json");
13
+ return { pkg: JSON.parse(S(m, "utf-8")), pkgDir: f, pkgPath: m };
14
14
  }
15
15
  async function R(i, f) {
16
16
  if (j) {
@@ -23,14 +23,14 @@ async function R(i, f) {
23
23
  const B = async ({
24
24
  packages: i,
25
25
  bumpVersion: f,
26
- generateChangelog: h,
26
+ generateChangelog: m,
27
27
  toTag: l,
28
28
  customHooks: s
29
29
  }) => {
30
30
  if (i.length === 0)
31
31
  throw new Error("No packages to release");
32
- const m = !!p.dry;
33
- m && console.log(n.yellow(`
32
+ const h = !!p.dry;
33
+ h && console.log(n.yellow(`
34
34
  ⚠️ DRY RUN MODE - No git operations will be performed
35
35
  `));
36
36
  const { releaseType: c } = await v({
@@ -132,26 +132,28 @@ Release cancelled
132
132
  `));
133
133
  return;
134
134
  }
135
- m && a.push("--no-git-tag-version", "--no-push"), console.log(n.cyan(`
135
+ h ? a.push("--no-git-tag-version", "--no-push") : a.push("--no-push"), console.log(n.cyan(`
136
136
  Running: npx ${a.join(" ")}
137
137
  `));
138
138
  const u = y("npx", a, { stdio: "inherit" });
139
139
  if (u.status !== 0 && (console.error(n.red(`
140
140
  ❌ Release process failed
141
- `)), process.exit(u.status || 1)), await D(i), s) {
141
+ `)), process.exit(u.status || 1)), await $(i), s) {
142
142
  console.log(n.cyan(`
143
143
  Running post-version hooks...
144
144
  `));
145
145
  const { pkg: e } = w(i[0] === "." ? i[1] : i[0]);
146
146
  await s(e.version);
147
147
  }
148
- if (await $(i), await L(i), await I(i), !m && y("git", ["status", "--porcelain"], { stdio: "pipe" }).stdout?.toString().trim()) {
148
+ if (await D(i), await L(i), await I(i), !h && y("git", ["status", "--porcelain"], { stdio: "pipe" }).stdout?.toString().trim()) {
149
149
  const o = 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", o], { stdio: "inherit" }), console.log(n.green(`
151
- Updated changelogs and package.json
150
+ y("git", ["add", "-A"], { stdio: "inherit" }), y("git", ["commit", "--amend", "--no-edit", "--no-verify"], { stdio: "inherit" }), y("git", ["tag", "-f", o], { 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", o, "--force"], { stdio: "inherit" }), console.log(n.green(`
153
+ ✅ Updated changelogs, package.json, and pushed to remote
152
154
  `));
153
155
  }
154
- m ? (console.log(n.yellow(`
156
+ h ? (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
@@ -162,29 +164,29 @@ Running post-version hooks...
162
164
  ℹ️ Package files updated with npmTag: ${n.blue(p.tag)}`)), console.log(n.cyan(` GitHub Actions will automatically publish with this tag
163
165
  `))));
164
166
  };
165
- async function $(i) {
167
+ async function D(i) {
166
168
  console.log(n.cyan(`
167
169
  Enhancing changelogs...
168
170
  `));
169
- const f = y("npx", ["lerna", "changed", "--json"], { stdio: "pipe" }), h = /* @__PURE__ */ new Set();
171
+ const f = y("npx", ["lerna", "changed", "--json"], { stdio: "pipe" }), m = /* @__PURE__ */ new Set();
170
172
  if (f.stdout)
171
173
  try {
172
- JSON.parse(f.stdout.toString()).forEach((s) => h.add(s.name));
174
+ JSON.parse(f.stdout.toString()).forEach((s) => m.add(s.name));
173
175
  } catch {
174
176
  }
175
177
  for (const l of i) {
176
178
  if (l === ".") continue;
177
- const s = N.join(l, "CHANGELOG.md"), { pkg: m } = w(l), c = h.has(m.name);
179
+ const s = N.join(l, "CHANGELOG.md"), { pkg: h } = w(l), c = m.has(h.name);
178
180
  if (!V(s)) {
179
181
  const t = `# CHANGELOG
180
182
 
181
183
  All notable changes to this package will be documented in this file.
182
184
 
183
- ## [${m.version}] (${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]})
185
+ ## [${h.version}] (${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]})
184
186
 
185
187
  **Note:** Version bump only - Updated dependencies to match framework version
186
188
  `;
187
- b(s, t, "utf-8"), console.log(n.gray(` Created changelog for ${m.name}`));
189
+ b(s, t, "utf-8"), console.log(n.gray(` Created changelog for ${h.name}`));
188
190
  continue;
189
191
  }
190
192
  let a = S(s, "utf-8");
@@ -200,7 +202,7 @@ All notable changes to this package will be documented in this file.
200
202
  for (; e < r.length; ) {
201
203
  const t = r[e], o = t.match(/^##\s+(\[)?([\d.a-z-]+)(\])?(\s+\([^)]+\))?/i);
202
204
  if (o) {
203
- const d = o[2] === m.version;
205
+ const d = o[2] === h.version;
204
206
  for (u.push(t), e++; e < r.length && r[e].trim() === ""; )
205
207
  u.push(r[e]), e++;
206
208
  let C = !1, P = e, k = e;
@@ -220,18 +222,18 @@ All notable changes to this package will be documented in this file.
220
222
  `), b(s, a, "utf-8");
221
223
  }
222
224
  }
223
- async function D(i) {
225
+ async function $(i) {
224
226
  const f = i.find((c) => c !== ".");
225
227
  if (!f) return;
226
- const { pkg: h } = w(f), l = h.version, s = "package.json", m = JSON.parse(S(s, "utf-8"));
227
- m.version !== l && (m.version = l, b(s, JSON.stringify(m, null, 2) + `
228
+ const { pkg: m } = w(f), l = m.version, s = "package.json", h = JSON.parse(S(s, "utf-8"));
229
+ h.version !== l && (h.version = l, b(s, JSON.stringify(h, null, 2) + `
228
230
  `, "utf-8"), console.log(n.gray(` Updated root package.json version: ${l}`)));
229
231
  }
230
232
  async function L(i) {
231
233
  console.log(n.cyan(`
232
234
  Generating root CHANGELOG with package grouping...
233
235
  `));
234
- const f = "CHANGELOG.md", h = {
236
+ const f = "CHANGELOG.md", m = {
235
237
  framework: "VC-Shell Framework (@vc-shell/framework)",
236
238
  "cli/api-client": "API Client Generator (@vc-shell/api-client-generator)",
237
239
  "cli/create-vc-app": "Create VC App (@vc-shell/create-vc-app)",
@@ -241,7 +243,7 @@ Generating root CHANGELOG with package grouping...
241
243
  }, l = {};
242
244
  for (const c of i) {
243
245
  if (c === ".") continue;
244
- const a = N.join(c, "CHANGELOG.md"), r = h[c] || c;
246
+ const a = N.join(c, "CHANGELOG.md"), r = m[c] || c;
245
247
  if (!V(a)) continue;
246
248
  const e = S(a, "utf-8").split(`
247
249
  `);
@@ -268,7 +270,7 @@ Generating root CHANGELOG with package grouping...
268
270
  All notable changes to this monorepo will be documented in this file.
269
271
 
270
272
  `;
271
- const m = Object.keys(l).sort((c, a) => {
273
+ const h = Object.keys(l).sort((c, a) => {
272
274
  const r = c.split(/[.-]/).map((e) => isNaN(parseInt(e)) ? e : parseInt(e)), u = a.split(/[.-]/).map((e) => isNaN(parseInt(e)) ? e : parseInt(e));
273
275
  for (let e = 0; e < Math.max(r.length, u.length); e++) {
274
276
  const t = r[e] ?? 0, o = u[e] ?? 0;
@@ -277,7 +279,7 @@ All notable changes to this monorepo will be documented in this file.
277
279
  }
278
280
  return 0;
279
281
  });
280
- for (const c of m) {
282
+ for (const c of h) {
281
283
  const a = l[c], r = Object.values(a).some((e) => e && e.trim().length > 0);
282
284
  if (s += `## ${c}
283
285
 
@@ -290,7 +292,7 @@ All notable changes to this monorepo will be documented in this file.
290
292
  let u = !1;
291
293
  for (const e of i) {
292
294
  if (e === ".") continue;
293
- const t = h[e] || e, o = a[t];
295
+ const t = m[e] || e, o = a[t];
294
296
  o && o.trim() && (u = !0, s += `### ${t}
295
297
 
296
298
  `, s += `${o}
@@ -309,7 +311,7 @@ async function I(i) {
309
311
  if (p.tag)
310
312
  for (const f of i) {
311
313
  if (f === ".") continue;
312
- const { pkg: h, pkgPath: l } = w(f), s = { ...h };
314
+ const { pkg: m, pkgPath: l } = w(f), s = { ...m };
313
315
  p.tag !== "latest" ? (s.npmTag = p.tag, await R(l, s)) : s.npmTag && (delete s.npmTag, await R(l, s));
314
316
  }
315
317
  }
@@ -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,kBA+MA,CAAC"}
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.1",
3
+ "version": "1.1.91-alpha.4",
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.1",
26
+ "@vc-shell/ts-config": "1.1.91-alpha.4",
27
27
  "typescript": "^5.8.3",
28
28
  "vite-plugin-dts": "^3.6.4"
29
29
  },