@vc-shell/release-config 1.0.340 → 1.1.0-alpha.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/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## [v1.1.0-alpha.2](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.340...vv1.1.0-alpha.2) (2025-02-25)
2
+
3
+
4
+ ### Features
5
+
6
+ * partial redesign ([846e215](https://github.com/VirtoCommerce/vc-shell/commit/846e2152c6e48753622ca7cf3a71300323c99d51))
7
+
8
+
9
+ ### Reverts
10
+
11
+ * Revert "release: v1.1.0-alpha.2" ([80b0dc9](https://github.com/VirtoCommerce/vc-shell/commit/80b0dc99fdd318205f26bde81e6a49ab79214cb3))
12
+
13
+
14
+
15
+ # [1.1.0-alpha.1](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.327...v1.1.0-alpha.1) (2024-11-13)
16
+
17
+
18
+
1
19
  ## [1.0.340](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.339...v1.0.340) (2025-02-06)
2
20
 
3
21
 
@@ -50,6 +68,10 @@
50
68
 
51
69
 
52
70
 
71
+ # [1.1.0-alpha.1](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.326...v1.1.0-alpha.1) (2024-11-13)
72
+
73
+
74
+
53
75
  ## [1.0.327](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.326...v1.0.327) (2024-11-12)
54
76
 
55
77
 
@@ -1,36 +1,47 @@
1
- import u from "prompts";
2
- import { inc as $, valid as k } from "semver";
3
- import { readFileSync as C } from "node:fs";
4
- import f from "node:path";
5
- import i from "chalk";
6
- import N from "mri";
7
- import { argv as R } from "node:process";
8
- import { sync as j } from "cross-spawn";
9
- const x = N(R.slice(2)), y = !!x.dry;
10
- y && (console.log(i.inverse(i.yellow(" DRY RUN "))), console.log());
11
- function v(e) {
12
- const t = f.resolve(e), o = f.resolve(t, "package.json");
13
- return { pkg: JSON.parse(C(o, "utf-8")), pkgDir: t, pkgPath: o };
1
+ import v from "prompts";
2
+ import { inc as y, valid as b } from "semver";
3
+ import { readFileSync as x } from "node:fs";
4
+ import d from "node:path";
5
+ import r from "chalk";
6
+ import C from "mri";
7
+ import { argv as N } from "node:process";
8
+ import { sync as R } from "cross-spawn";
9
+ const c = C(N.slice(2)), $ = !!c.dry;
10
+ $ && (console.log(r.inverse(r.yellow(" DRY RUN "))), console.log());
11
+ function w(e) {
12
+ const t = d.resolve(e), a = d.resolve(t, "package.json");
13
+ return { pkg: JSON.parse(x(a, "utf-8")), pkgDir: t, pkgPath: a };
14
14
  }
15
- async function h(e, t, o) {
16
- return j(e, t, { stdio: "inherit", ...o });
15
+ async function k(e, t, a) {
16
+ return R(e, t, { stdio: "inherit", ...a });
17
17
  }
18
- async function D(e, t, o) {
19
- return console.log(i.blue(`[dryrun] ${e} ${t.join(" ")}`), o || "");
18
+ async function j(e, t, a) {
19
+ return console.log(r.blue(`[dryrun] ${e} ${t.join(" ")}`), a || "");
20
20
  }
21
- const a = y ? D : h;
22
- function g(e) {
23
- return console.log(i.cyan(e));
21
+ const l = $ ? j : k;
22
+ function p(e) {
23
+ return console.log(r.cyan(e));
24
24
  }
25
- function I(e) {
26
- function t(n) {
27
- return $(e, n);
25
+ function D(e) {
26
+ function t(o, n) {
27
+ if (o === "prerelease" && n === "alpha") {
28
+ if (e.includes("-alpha")) {
29
+ const [i, u] = e.split("-alpha."), f = parseInt(u) + 1;
30
+ return `${i}-alpha.${f}`;
31
+ }
32
+ return `${y(e, "patch")}-alpha.0`;
33
+ }
34
+ return y(e, o);
28
35
  }
29
36
  return [
30
37
  {
31
38
  title: "next",
32
39
  value: t("patch")
33
40
  },
41
+ {
42
+ title: "alpha",
43
+ value: t("prerelease", "alpha")
44
+ },
34
45
  {
35
46
  title: "minor",
36
47
  value: t("minor")
@@ -43,57 +54,59 @@ function I(e) {
43
54
  value: "custom",
44
55
  title: "custom"
45
56
  }
46
- ].map((n) => (n.title = `${n.title} (${n.value})`, n));
57
+ ].map((o) => (o.title = `${o.title} (${o.value})`, o));
47
58
  }
48
- const F = async ({
59
+ const H = async ({
49
60
  packages: e,
50
61
  bumpVersion: t,
51
- generateChangelog: o,
52
- toTag: n
62
+ generateChangelog: a,
63
+ toTag: o
53
64
  }) => {
54
- let r;
65
+ let n;
55
66
  if (e.length === 0)
56
67
  throw new Error("No packages to release");
57
- const { pkg: p } = v(e[0]);
58
- if (!r) {
59
- const { release: s } = await u({
68
+ const { pkg: m } = w(e[0]);
69
+ if (!n) {
70
+ const { release: s } = await v({
60
71
  type: "select",
61
72
  name: "release",
62
73
  message: "Select release type",
63
- choices: I(p.version)
74
+ choices: D(m.version)
64
75
  });
65
- s === "custom" ? r = (await u({
76
+ s === "custom" ? n = (await v({
66
77
  type: "text",
67
78
  name: "version",
68
79
  message: "Input custom version",
69
- initial: p.version
70
- })).version : r = s;
80
+ initial: m.version
81
+ })).version : n = s;
71
82
  }
72
- if (!k(r))
73
- throw new Error(`invalid target version: ${r}`);
74
- const c = n(r), { yes: w } = await u({
83
+ if (!b(n))
84
+ throw new Error(`invalid target version: ${n}`);
85
+ const i = o(n);
86
+ n.includes("beta") && !c.tag && (c.tag = "beta"), n.includes("alpha") && !c.tag && (c.tag = "alpha");
87
+ const { yes: u } = await v({
75
88
  type: "confirm",
76
89
  name: "yes",
77
- message: `Releasing ${i.yellow(c)} Confirm?`
90
+ message: `Releasing ${r.yellow(i)} Confirm?`
78
91
  });
79
- if (!w) return;
92
+ if (!u) return;
80
93
  for (let s = 0; s < e.length; s++) {
81
- const m = e[s], { pkg: l } = v(m);
82
- g(`
83
- Updating ${i.green(l.name)} package version to ${i.green(r)}...`), await t(l.name, r), g(`
84
- Generating ${i.green(l.name)} changelog...`), await o(l.name, r, m);
94
+ const h = e[s], { pkg: g } = w(h);
95
+ p(`
96
+ Updating ${r.green(g.name)} package version to ${r.green(n)}...`), await t(g.name, n), p(`
97
+ Generating ${r.green(g.name)} changelog...`), await a(g.name, n, h);
85
98
  }
86
- const { stdout: d } = await h("git", ["diff"], { stdio: "pipe" });
87
- if (d)
88
- g(`
89
- Committing changes...`), await a("git", ["add", "-A"]), await a("git", ["commit", "-m", `release: ${c}`, "--no-verify"]), await a("git", ["tag", c]);
99
+ const { stdout: f } = await k("git", ["diff"], { stdio: "pipe" });
100
+ if (f)
101
+ p(`
102
+ Committing changes...`), await l("git", ["add", "-A"]), await l("git", ["commit", "-m", `release: ${i}`, "--no-verify"]), await l("git", ["tag", i]);
90
103
  else {
91
104
  console.log("No changes to commit.");
92
105
  return;
93
106
  }
94
- g(`
95
- Pushing to GitHub...`), await a("git", ["push", "origin", `refs/tags/${c}`]), await a("git", ["push"]), console.log();
107
+ p(`
108
+ Pushing to GitHub...`), await l("git", ["push", "origin", `refs/tags/${i}`]), await l("git", ["push"]), console.log();
96
109
  };
97
110
  export {
98
- F as release
111
+ H as release
99
112
  };
@@ -1 +1 @@
1
- {"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../src/release.ts"],"names":[],"mappings":"AAMA;;;;;;;;GAQG;AACH,eAAO,MAAM,OAAO;cAMR,MAAM,EAAE;2BACK,MAAM,WAAW,MAAM,KAAK,IAAI,GAAG,QAAQ,IAAI,CAAC;iCAC1C,MAAM,WAAW,MAAM,kBAAkB,MAAM,KAAK,IAAI,GAAG,QAAQ,IAAI,CAAC;qBACpF,MAAM,KAAK,MAAM;mBAyEnC,CAAC"}
1
+ {"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../src/release.ts"],"names":[],"mappings":"AAMA;;;;;;;;GAQG;AACH,eAAO,MAAM,OAAO;cAMR,MAAM,EAAE;2BACK,MAAM,WAAW,MAAM,KAAK,IAAI,GAAG,QAAQ,IAAI,CAAC;iCAC1C,MAAM,WAAW,MAAM,kBAAkB,MAAM,KAAK,IAAI,GAAG,QAAQ,IAAI,CAAC;qBACpF,MAAM,KAAK,MAAM;mBAgFnC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAGA,OAAO,EAAE,kCAAkC,EAAE,MAAM,oBAAoB,CAAC;AAGxE,OAAO,GAAG,MAAM,KAAK,CAAC;AAItB,eAAO,MAAM,IAAI;;EAAqB,CAAC;AAEvC,eAAO,MAAM,QAAQ,SAAa,CAAC;AAOnC,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM;;cAIpC,MAAM;iBACH,MAAM;;;;EAIlB;AAED,wBAAsB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,kCAAkC,CAAC,sEAExG;AAED,wBAAsB,MAAM,CAC1B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAAE,EACd,IAAI,CAAC,EAAE,OAAO,CAAC,kCAAkC,CAAC,GACjD,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,eAAO,MAAM,WAAW,4BAA0B,CAAC;AAEnD,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEtC;AAED,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,MAAM,GAAG,aAAa,EAAE,CA4BzE"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAGA,OAAO,EAAE,kCAAkC,EAAE,MAAM,oBAAoB,CAAC;AAGxE,OAAO,GAAG,MAAM,KAAK,CAAC;AAItB,eAAO,MAAM,IAAI;;EAAqB,CAAC;AAEvC,eAAO,MAAM,QAAQ,SAAa,CAAC;AAOnC,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM;;cAIpC,MAAM;iBACH,MAAM;;;;EAIlB;AAED,wBAAsB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,kCAAkC,CAAC,sEAExG;AAED,wBAAsB,MAAM,CAC1B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAAE,EACd,IAAI,CAAC,EAAE,OAAO,CAAC,kCAAkC,CAAC,GACjD,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,eAAO,MAAM,WAAW,4BAA0B,CAAC;AAEnD,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEtC;AAED,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,MAAM,GAAG,aAAa,EAAE,CAyCzE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vc-shell/release-config",
3
- "version": "1.0.340",
3
+ "version": "1.1.0-alpha.2",
4
4
  "type": "module",
5
5
  "main": "dist/release-config.js",
6
6
  "types": "./dist/index.d.ts",
@@ -22,12 +22,13 @@
22
22
  "@types/cross-spawn": "^6.0.6",
23
23
  "@types/prompts": "^2.4.7",
24
24
  "@types/semver": "^7.5.4",
25
- "@vc-shell/ts-config": "^1.0.340",
25
+ "@vc-shell/ts-config": "^1.1.0-alpha.2",
26
26
  "typescript": "~5.3.3",
27
27
  "vite-plugin-dts": "^3.6.4"
28
28
  },
29
29
  "publishConfig": {
30
30
  "access": "public",
31
31
  "registry": "https://registry.npmjs.org/"
32
- }
32
+ },
33
+ "stableVersion": "1.0.340"
33
34
  }