@vc-shell/release-config 1.2.4-beta.6 → 1.2.4-beta.8
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/README.md +3 -1
- package/dist/cli-generate-changelogs.js +1 -1
- package/dist/generate-changelogs-Dx-dDlOU.js +538 -0
- package/dist/release-config.js +97 -77
- package/dist/src/changelog.d.ts +38 -3
- package/dist/src/changelog.d.ts.map +1 -1
- package/dist/src/generate-changelogs.d.ts.map +1 -1
- package/dist/src/git.d.ts +16 -0
- package/dist/src/git.d.ts.map +1 -1
- package/dist/src/lerna.d.ts.map +1 -1
- package/dist/src/release.d.ts.map +1 -1
- package/dist/src/types.d.ts +4 -0
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/generate-changelogs-ujWf_gXz.js +0 -352
package/dist/release-config.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { parse as
|
|
2
|
-
import { readFileSync as
|
|
1
|
+
import { parse as P, valid as N } from "semver";
|
|
2
|
+
import { readFileSync as b, writeFileSync as T } from "node:fs";
|
|
3
3
|
import R from "node:path";
|
|
4
4
|
import $ from "mri";
|
|
5
|
-
import { argv as
|
|
5
|
+
import { argv as E } from "node:process";
|
|
6
6
|
import n from "chalk";
|
|
7
|
-
import { sync as
|
|
8
|
-
import
|
|
9
|
-
import { f as
|
|
10
|
-
import {
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
function
|
|
7
|
+
import { sync as h } from "cross-spawn";
|
|
8
|
+
import y from "prompts";
|
|
9
|
+
import { f as O, e as D, a as S, s as H, g as I, b as L, c as j, d as U, r as _, p as F } from "./generate-changelogs-Dx-dDlOU.js";
|
|
10
|
+
import { h as ge } from "./generate-changelogs-Dx-dDlOU.js";
|
|
11
|
+
const c = $(E.slice(2));
|
|
12
|
+
c.dry;
|
|
13
|
+
function w(t) {
|
|
14
14
|
const o = R.resolve(t), e = R.resolve(o, "package.json");
|
|
15
|
-
return { pkg: JSON.parse(
|
|
15
|
+
return { pkg: JSON.parse(b(e, "utf-8")), pkgDir: o, pkgPath: e };
|
|
16
16
|
}
|
|
17
|
-
async function
|
|
18
|
-
const { releaseType: t } = await
|
|
17
|
+
async function J() {
|
|
18
|
+
const { releaseType: t } = await y({
|
|
19
19
|
type: "select",
|
|
20
20
|
name: "releaseType",
|
|
21
21
|
message: "Select release type",
|
|
@@ -28,8 +28,8 @@ async function F() {
|
|
|
28
28
|
});
|
|
29
29
|
return t;
|
|
30
30
|
}
|
|
31
|
-
async function
|
|
32
|
-
const o =
|
|
31
|
+
async function M(t) {
|
|
32
|
+
const o = P(t), e = o && o.prerelease.length > 0, s = e ? o.prerelease[0] : null, { preid: a } = await y({
|
|
33
33
|
type: "select",
|
|
34
34
|
name: "preid",
|
|
35
35
|
message: "Select prerelease identifier",
|
|
@@ -48,11 +48,11 @@ async function G(t) {
|
|
|
48
48
|
}
|
|
49
49
|
]
|
|
50
50
|
});
|
|
51
|
-
if (
|
|
52
|
-
return e && s ===
|
|
51
|
+
if (a)
|
|
52
|
+
return e && s === a ? { preid: a, lernaVersionArg: "prerelease", lernaPreidArgs: [] } : { preid: a, lernaVersionArg: "prerelease", lernaPreidArgs: ["--preid", a] };
|
|
53
53
|
}
|
|
54
|
-
async function
|
|
55
|
-
const { customVersion: o } = await
|
|
54
|
+
async function G(t) {
|
|
55
|
+
const { customVersion: o } = await y({
|
|
56
56
|
type: "text",
|
|
57
57
|
name: "customVersion",
|
|
58
58
|
message: "Enter custom version",
|
|
@@ -62,62 +62,71 @@ async function H(t) {
|
|
|
62
62
|
return o;
|
|
63
63
|
}
|
|
64
64
|
async function B() {
|
|
65
|
-
const { yes: t } = await
|
|
65
|
+
const { yes: t } = await y({
|
|
66
66
|
type: "confirm",
|
|
67
67
|
name: "yes",
|
|
68
68
|
message: "Ready to release. Continue?"
|
|
69
69
|
});
|
|
70
70
|
return !!t;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function m() {
|
|
73
73
|
console.log(n.yellow(`
|
|
74
74
|
Release cancelled
|
|
75
75
|
`));
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function W(t, o) {
|
|
78
78
|
const e = ["lerna", "version", ...t];
|
|
79
79
|
return e.push("--conventional-commits"), e.push("--tag-version-prefix", o.tagVersionPrefix), e.push("--no-push"), o.isDryRun && e.push("--no-git-tag-version"), o.forcePublish && (e.push("--force-publish"), console.log(n.yellow(`
|
|
80
80
|
Force publish mode - all packages will be versioned
|
|
81
81
|
`))), e;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function K(t) {
|
|
84
84
|
console.log(n.cyan(`
|
|
85
85
|
Running: npx ${t.join(" ")}
|
|
86
86
|
`));
|
|
87
|
-
const o =
|
|
87
|
+
const o = h("npx", t, {
|
|
88
|
+
stdio: "inherit",
|
|
89
|
+
env: {
|
|
90
|
+
...process.env,
|
|
91
|
+
// Lerna v8+ resolves projects through Nx and can accidentally bind to a parent workspace
|
|
92
|
+
// when the releasable app lives inside a larger monorepo. Pin the workspace root to the
|
|
93
|
+
// current project so changed packages are detected correctly.
|
|
94
|
+
NX_WORKSPACE_ROOT_PATH: process.env.NX_WORKSPACE_ROOT_PATH || process.cwd()
|
|
95
|
+
}
|
|
96
|
+
});
|
|
88
97
|
o.status !== 0 && (console.error(n.red(`
|
|
89
98
|
Release process failed
|
|
90
99
|
`)), process.exit(o.status || 1));
|
|
91
100
|
}
|
|
92
|
-
function
|
|
101
|
+
function X(t) {
|
|
93
102
|
const o = {};
|
|
94
103
|
for (const e of t) {
|
|
95
|
-
const { pkg: s } =
|
|
104
|
+
const { pkg: s } = w(e.path);
|
|
96
105
|
o[e.path] = s.version;
|
|
97
106
|
}
|
|
98
107
|
return o;
|
|
99
108
|
}
|
|
100
|
-
function
|
|
109
|
+
function Y(t, o) {
|
|
101
110
|
for (const e of t) {
|
|
102
|
-
const { pkg: s } =
|
|
111
|
+
const { pkg: s } = w(e.path);
|
|
103
112
|
if (s.version !== o[e.path])
|
|
104
113
|
return s.version;
|
|
105
114
|
}
|
|
106
115
|
return null;
|
|
107
116
|
}
|
|
108
|
-
function
|
|
117
|
+
function q(t, o, e) {
|
|
109
118
|
if (console.log(n.gray(`
|
|
110
119
|
--- Release diagnostics ---`)), console.log(n.gray(` tagVersionPrefix: "${t}"`)), console.log(n.gray(` looking for tags: ${t}${o}.*`)), e) {
|
|
111
|
-
const s =
|
|
120
|
+
const s = h("git", ["rev-list", "--count", `${e}..HEAD`], {
|
|
112
121
|
stdio: "pipe",
|
|
113
122
|
encoding: "utf-8"
|
|
114
|
-
}),
|
|
123
|
+
}), a = s.status === 0 ? s.stdout.trim() : "?", f = h(
|
|
115
124
|
"git",
|
|
116
125
|
["log", `${e}..HEAD`, "--oneline", "--grep", "^feat\\|^fix\\|^perf\\|^revert"],
|
|
117
126
|
{ stdio: "pipe", encoding: "utf-8" }
|
|
118
|
-
),
|
|
127
|
+
), i = f.status === 0 ? f.stdout.trim().split(`
|
|
119
128
|
`).filter(Boolean).length : 0;
|
|
120
|
-
console.log(n.gray(` last matching tag: ${e}`)), console.log(n.gray(` commits since tag: ${
|
|
129
|
+
console.log(n.gray(` last matching tag: ${e}`)), console.log(n.gray(` commits since tag: ${a}`)), console.log(n.gray(` conventional commits: ${i}`)), i === 0 && parseInt(a) > 0 && console.log(
|
|
121
130
|
n.yellow(
|
|
122
131
|
" No conventional commits found. Use --force to publish anyway."
|
|
123
132
|
)
|
|
@@ -127,68 +136,69 @@ function K(t, o, e) {
|
|
|
127
136
|
console.log(n.gray(`---------------------------
|
|
128
137
|
`));
|
|
129
138
|
}
|
|
130
|
-
async function
|
|
139
|
+
async function ie(t) {
|
|
131
140
|
const {
|
|
132
141
|
packages: o,
|
|
133
142
|
tagVersionPrefix: e = "v",
|
|
134
143
|
customHooks: s,
|
|
135
|
-
updateRootVersion:
|
|
144
|
+
updateRootVersion: a = !0,
|
|
145
|
+
forcePublish: f = !1
|
|
136
146
|
} = t;
|
|
137
147
|
if (o.length === 0)
|
|
138
148
|
throw new Error("No packages to release");
|
|
139
|
-
const
|
|
140
|
-
|
|
149
|
+
const i = !!c.dry;
|
|
150
|
+
i && console.log(n.yellow(`
|
|
141
151
|
DRY RUN MODE - No git operations will be performed
|
|
142
152
|
`));
|
|
143
|
-
const { pkg:
|
|
144
|
-
|
|
145
|
-
const
|
|
146
|
-
if (!
|
|
147
|
-
const
|
|
148
|
-
if (
|
|
149
|
-
if (
|
|
150
|
-
const r = await
|
|
151
|
-
if (!r) return
|
|
152
|
-
|
|
153
|
-
} else if (
|
|
154
|
-
|
|
155
|
-
else if (
|
|
156
|
-
const r = await
|
|
157
|
-
if (!r) return
|
|
158
|
-
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
161
|
-
const
|
|
162
|
-
typeof
|
|
153
|
+
const { pkg: A } = w(o[0].path), v = A.version, k = v.split(".").slice(0, 2).join("."), C = O(k, e);
|
|
154
|
+
q(e, k, C);
|
|
155
|
+
const g = await J();
|
|
156
|
+
if (!g) return m();
|
|
157
|
+
const d = [];
|
|
158
|
+
if (g !== "auto") {
|
|
159
|
+
if (g === "prerelease") {
|
|
160
|
+
const r = await M(v);
|
|
161
|
+
if (!r) return m();
|
|
162
|
+
d.push(r.lernaVersionArg, ...r.lernaPreidArgs), c.tag || (c.tag = r.preid);
|
|
163
|
+
} else if (g === "graduate")
|
|
164
|
+
d.push("--conventional-graduate");
|
|
165
|
+
else if (g === "custom") {
|
|
166
|
+
const r = await G(v);
|
|
167
|
+
if (!r) return m();
|
|
168
|
+
d.push(r);
|
|
169
|
+
const l = P(r);
|
|
170
|
+
if (l && l.prerelease.length > 0 && !c.tag) {
|
|
171
|
+
const u = l.prerelease[0];
|
|
172
|
+
typeof u == "string" && (c.tag = u);
|
|
163
173
|
}
|
|
164
174
|
}
|
|
165
175
|
}
|
|
166
|
-
if (!await B()) return
|
|
167
|
-
const
|
|
176
|
+
if (!await B()) return m();
|
|
177
|
+
const V = W(d, {
|
|
168
178
|
tagVersionPrefix: e,
|
|
169
|
-
isDryRun:
|
|
170
|
-
forcePublish: !!
|
|
171
|
-
}),
|
|
172
|
-
|
|
173
|
-
const
|
|
174
|
-
if (!
|
|
179
|
+
isDryRun: i,
|
|
180
|
+
forcePublish: f || !!c.force
|
|
181
|
+
}), x = X(o);
|
|
182
|
+
K(V);
|
|
183
|
+
const p = Y(o, x);
|
|
184
|
+
if (!p) {
|
|
175
185
|
console.log(n.yellow(`
|
|
176
186
|
No packages were versioned. Nothing to release.
|
|
177
187
|
`));
|
|
178
188
|
return;
|
|
179
189
|
}
|
|
180
|
-
if (
|
|
190
|
+
if (a && z(p), s && (console.log(n.cyan(`
|
|
181
191
|
Running post-version hooks...
|
|
182
|
-
`)), await s(
|
|
192
|
+
`)), await s(p)), !i) {
|
|
183
193
|
console.log(n.cyan(`
|
|
184
194
|
Updating yarn.lock with new package versions...
|
|
185
195
|
`));
|
|
186
|
-
const r =
|
|
196
|
+
const r = h("yarn", ["install"], { stdio: "inherit" });
|
|
187
197
|
r.status !== 0 && (console.error(n.red(`
|
|
188
198
|
Failed to update yarn.lock
|
|
189
199
|
`)), process.exit(r.status || 1));
|
|
190
200
|
}
|
|
191
|
-
if (
|
|
201
|
+
if (D(o, !1), S(o, p, !1), H(o, p, e, !1), I({ packages: o }, !1), i)
|
|
192
202
|
console.log(n.yellow(`
|
|
193
203
|
Dry run completed successfully!
|
|
194
204
|
`)), console.log(n.cyan("Changes made:")), console.log(n.cyan(" - Updated package versions")), console.log(n.cyan(` - Generated/updated CHANGELOG.md files
|
|
@@ -196,22 +206,32 @@ Dry run completed successfully!
|
|
|
196
206
|
`)), console.log(n.yellow("To revert all changes:")), console.log(n.cyan(` git checkout -- .
|
|
197
207
|
`));
|
|
198
208
|
else {
|
|
199
|
-
const r =
|
|
209
|
+
const r = L();
|
|
200
210
|
r || (console.error(n.red(`
|
|
201
211
|
Could not determine the git tag created by Lerna
|
|
202
|
-
`)), process.exit(1))
|
|
212
|
+
`)), process.exit(1));
|
|
213
|
+
const l = j(), u = `release: ${e}`;
|
|
214
|
+
(!l || !l.startsWith(u)) && (console.error(
|
|
215
|
+
n.red(
|
|
216
|
+
`
|
|
217
|
+
Tag validation failed: HEAD commit message "${l}" does not match expected pattern "${u}*".
|
|
218
|
+
This may indicate extra commits were made after Lerna's release commit.
|
|
219
|
+
Aborting to prevent amending/tagging the wrong commit.
|
|
220
|
+
`
|
|
221
|
+
)
|
|
222
|
+
), process.exit(1)), U(), _(r), F(r), console.log(n.green(`
|
|
203
223
|
Release completed successfully!
|
|
204
224
|
`)), console.log(n.cyan(`npmTag will be automatically determined from git tag in CI
|
|
205
225
|
`));
|
|
206
226
|
}
|
|
207
227
|
}
|
|
208
|
-
function
|
|
209
|
-
const e = "package.json", s = JSON.parse(
|
|
210
|
-
s.version !== t && (s.version = t,
|
|
228
|
+
function z(t, o) {
|
|
229
|
+
const e = "package.json", s = JSON.parse(b(e, "utf-8"));
|
|
230
|
+
s.version !== t && (s.version = t, T(e, JSON.stringify(s, null, 2) + `
|
|
211
231
|
`, "utf-8"), console.log(n.gray(` Updated root package.json version: ${t}`)));
|
|
212
232
|
}
|
|
213
233
|
export {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
234
|
+
ge as generateInitialChangelogs,
|
|
235
|
+
I as generateRootChangelog,
|
|
236
|
+
ie as release
|
|
217
237
|
};
|
package/dist/src/changelog.d.ts
CHANGED
|
@@ -13,10 +13,22 @@ export declare function addVersionBumpNotes(content: string): string;
|
|
|
13
13
|
*/
|
|
14
14
|
export declare function enhancePackageChangelogs(packages: PackageConfig[], dryRun?: boolean): void;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
16
|
+
* Ensures each package has an entry for the current release version.
|
|
17
|
+
* If Lerna skipped a package because it had no direct changes, we still add
|
|
18
|
+
* a placeholder section for the version so lockstep releases stay aligned.
|
|
18
19
|
*/
|
|
19
|
-
export declare function
|
|
20
|
+
export declare function ensureCurrentVersionEntries(packages: PackageConfig[], version: string, dryRun?: boolean): void;
|
|
21
|
+
/**
|
|
22
|
+
* Replaces "Version bump only" current sections with git-derived changelog
|
|
23
|
+
* entries when a package had only non-default conventional commit types
|
|
24
|
+
* (e.g. refactor/docs/build) that Lerna omitted from the package changelog.
|
|
25
|
+
*/
|
|
26
|
+
export declare function supplementCurrentVersionEntries(packages: PackageConfig[], version: string, tagVersionPrefix?: string, dryRun?: boolean): void;
|
|
27
|
+
/**
|
|
28
|
+
* Sorts version strings in descending order by release date when available.
|
|
29
|
+
* Falls back to semver.rcompare, then string comparison.
|
|
30
|
+
*/
|
|
31
|
+
export declare function sortVersionsDescending(versions: string[], versionHeaders?: Record<string, string>): string[];
|
|
20
32
|
/**
|
|
21
33
|
* Generates a consolidated root CHANGELOG.md from package changelogs,
|
|
22
34
|
* grouped by version with sub-headings per package.
|
|
@@ -37,4 +49,27 @@ export declare function backfillEmptyVersions(packages: PackageConfig[], tagPref
|
|
|
37
49
|
* that were already recorded in backfilled older versions.
|
|
38
50
|
*/
|
|
39
51
|
export declare function deduplicateChangelog(packages: PackageConfig[], dryRun?: boolean): void;
|
|
52
|
+
/**
|
|
53
|
+
* Inserts missing version entries into package CHANGELOGs.
|
|
54
|
+
*
|
|
55
|
+
* In Lerna fixed-mode, packages with no changes sometimes don't get
|
|
56
|
+
* a CHANGELOG entry even though a version tag exists. This function
|
|
57
|
+
* compares git tags with CHANGELOG headers and inserts missing entries
|
|
58
|
+
* with a "Version bump only" placeholder, so that `backfillEmptyVersions`
|
|
59
|
+
* can then attempt to fill them with actual commits.
|
|
60
|
+
*/
|
|
61
|
+
export declare function insertMissingVersionEntries(packages: PackageConfig[], tagPrefix: string, dryRun?: boolean): void;
|
|
62
|
+
/**
|
|
63
|
+
* Supplements version sections that have SOME content but are missing commits
|
|
64
|
+
* present in the git tag range.
|
|
65
|
+
*
|
|
66
|
+
* For each version section with content, compares commit short hashes in the
|
|
67
|
+
* CHANGELOG against commits in the actual git range (previous_tag..version_tag).
|
|
68
|
+
* Appends any missing commits to the existing section.
|
|
69
|
+
*
|
|
70
|
+
* This handles the case where Lerna recorded some commits but the tag includes
|
|
71
|
+
* additional commits made after the CHANGELOG was generated (e.g. post-release
|
|
72
|
+
* fixes amended into the release commit).
|
|
73
|
+
*/
|
|
74
|
+
export declare function supplementIncompleteVersions(packages: PackageConfig[], tagPrefix: string, dryRun?: boolean): void;
|
|
40
75
|
//# sourceMappingURL=changelog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../src/changelog.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../src/changelog.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAiBjF;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAc7D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAK3D;AAID;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,aAAa,EAAE,EAAE,MAAM,UAAQ,GAAG,IAAI,CAiBxF;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,aAAa,EAAE,EACzB,OAAO,EAAE,MAAM,EACf,MAAM,UAAQ,GACb,IAAI,CAyCN;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,aAAa,EAAE,EACzB,OAAO,EAAE,MAAM,EACf,gBAAgB,SAAM,EACtB,MAAM,UAAQ,GACb,IAAI,CAoCN;AAqJD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAAE,EAClB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACtC,MAAM,EAAE,CAcV;AAcD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAQ,GAAG,IAAI,CAkFzF;AA4ED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,aAAa,EAAE,EACzB,SAAS,EAAE,MAAM,EACjB,MAAM,UAAQ,GACb,IAAI,CAqDN;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,aAAa,EAAE,EAAE,MAAM,UAAQ,GAAG,IAAI,CA6EpF;AAID;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,aAAa,EAAE,EACzB,SAAS,EAAE,MAAM,EACjB,MAAM,UAAQ,GACb,IAAI,CAsEN;AAID;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,aAAa,EAAE,EACzB,SAAS,EAAE,MAAM,EACjB,MAAM,UAAQ,GACb,IAAI,CAmFN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-changelogs.d.ts","sourceRoot":"","sources":["../../src/generate-changelogs.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"generate-changelogs.d.ts","sourceRoot":"","sources":["../../src/generate-changelogs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAGtF,YAAY,EAAE,aAAa,EAAE,yBAAyB,EAAE,CAAC;AAqPzD;;;GAGG;AACH,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAuCjG;AAGD,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
package/dist/src/git.d.ts
CHANGED
|
@@ -51,4 +51,20 @@ export declare function recreateAnnotatedTag(tag: string): void;
|
|
|
51
51
|
* Uses --force-with-lease for the commit (safe force) and --force for the tag.
|
|
52
52
|
*/
|
|
53
53
|
export declare function pushToRemote(tag: string): void;
|
|
54
|
+
/**
|
|
55
|
+
* Returns all version tags matching the given prefix, sorted by semver descending.
|
|
56
|
+
* Example: getAllVersionTags("v") → ["v1.2.4-beta.6", "v1.2.4-beta.5", ...]
|
|
57
|
+
*/
|
|
58
|
+
export declare function getAllVersionTags(prefix: string): string[];
|
|
59
|
+
/**
|
|
60
|
+
* Given a version string, finds the immediately preceding version TAG.
|
|
61
|
+
* Uses semver sorting on all tags matching the prefix.
|
|
62
|
+
* Works even when the target tag does not exist yet (e.g. during dry-run).
|
|
63
|
+
* Example: getPreviousVersionTag("1.2.4-beta.5", "v") → "v1.2.4-beta.4"
|
|
64
|
+
*/
|
|
65
|
+
export declare function getPreviousVersionTag(version: string, prefix: string): string | null;
|
|
66
|
+
/**
|
|
67
|
+
* Gets the commit message of HEAD.
|
|
68
|
+
*/
|
|
69
|
+
export declare function getHeadCommitMessage(): string | null;
|
|
54
70
|
//# sourceMappingURL=git.d.ts.map
|
package/dist/src/git.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/git.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/git.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAqBxF;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,GAAG,IAAI,CAa1C;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAK9C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CA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3,"file":"release.d.ts","sourceRoot":"","sources":["../../src/release.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../src/release.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AA8B3D;;;GAGG;AACH,wBAAsB,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAwJlE"}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -18,12 +18,16 @@ export interface ReleaseConfig {
|
|
|
18
18
|
customHooks?: (version: string) => void | Promise<void>;
|
|
19
19
|
/** Whether to sync root package.json version with packages (default true). */
|
|
20
20
|
updateRootVersion?: boolean;
|
|
21
|
+
/** Whether to version every package on each release (default false). */
|
|
22
|
+
forcePublish?: boolean;
|
|
21
23
|
}
|
|
22
24
|
export interface ChangelogGeneratorOptions {
|
|
23
25
|
packages: PackageConfig[];
|
|
24
26
|
rootDir?: string;
|
|
25
27
|
generateRoot?: boolean;
|
|
26
28
|
includeRootHeader?: boolean;
|
|
29
|
+
/** Git tag prefix used to identify release tags (default "v"). */
|
|
30
|
+
tagVersionPrefix?: string;
|
|
27
31
|
}
|
|
28
32
|
export interface RootChangelogOptions {
|
|
29
33
|
packages: PackageConfig[];
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,2FAA2F;IAC3F,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B;;;;OAIG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
"name": "@vc-shell/release-config",
|
|
3
|
-
"version": "1.2.4-beta.
|
|
3
|
+
"version": "1.2.4-beta.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/release-config.js",
|
|
6
6
|
"types": "./dist/src/index.d.ts",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"access": "public",
|
|
35
35
|
"registry": "https://registry.npmjs.org/"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "25aa3246d45b375af4fffcc256a447d05dfda64c"
|
|
38
38
|
}
|