@peiyanlu/release 1.1.0 → 1.1.1
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/dist/cli.mjs +13 -5
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -607,7 +607,7 @@ function headerPartial(context) {
|
|
|
607
607
|
function template(context) {
|
|
608
608
|
const { headerPartial, preamblePartial, commitPartial, footerPartial, noteGroups, commitGroups } = context;
|
|
609
609
|
return segments(headerPartial(context), preamblePartial(context), each(noteGroups, (group) => segments(heading(3, words("⚠", group.title)), list(group.notes, (note) => {
|
|
610
|
-
return each([words(note.commit.scope && bold(`${note.commit.scope}:`), commitPartial(context, note.commit)), list([note.text], (t) => t)], (t) => t, newline());
|
|
610
|
+
return each([words(note.commit.scope && bold(`${note.commit.scope}:`), commitPartial(context, note.commit)), note.commit.subject.trim() !== note.text.trim() ? list([note.text], (t) => t) : ""], (t) => t, newline());
|
|
611
611
|
})), newline(2)), each(commitGroups, (group) => segments(group.title && heading(3, group.title), list(group.commits, (commit) => commitPartial(context, commit))), newline(2)), footerPartial(context));
|
|
612
612
|
}
|
|
613
613
|
//#endregion
|
|
@@ -627,8 +627,13 @@ const parsePreset = (options = {}) => {
|
|
|
627
627
|
};
|
|
628
628
|
const inferReleaseType = async (options) => {
|
|
629
629
|
const preset = parsePreset(options);
|
|
630
|
-
const res = await new Bumper().bump(preset.whatBump);
|
|
631
|
-
|
|
630
|
+
const res = await new Bumper().config(preset).bump(preset.whatBump);
|
|
631
|
+
if (!("releaseType" in res)) return void 0;
|
|
632
|
+
const { releaseType, reason } = res;
|
|
633
|
+
return options?.json ? {
|
|
634
|
+
releaseType,
|
|
635
|
+
reason
|
|
636
|
+
} : releaseType;
|
|
632
637
|
};
|
|
633
638
|
const createGenerator = async (options) => {
|
|
634
639
|
const { getPkgDir, tagPrefix, releaseCount = 1, includeHidden, transformTypes } = options;
|
|
@@ -1124,10 +1129,13 @@ var Action = class {
|
|
|
1124
1129
|
return !next && isIncrement;
|
|
1125
1130
|
};
|
|
1126
1131
|
if (need(ctx)) {
|
|
1127
|
-
const
|
|
1132
|
+
const res = await inferReleaseType({
|
|
1128
1133
|
includeHidden,
|
|
1129
|
-
transformTypes
|
|
1134
|
+
transformTypes,
|
|
1135
|
+
json: true
|
|
1130
1136
|
});
|
|
1137
|
+
if (res) msg("BUMP", res.reason);
|
|
1138
|
+
const inferred = res?.releaseType;
|
|
1131
1139
|
const nextVersion = (isCI ? inferred ?? inc(current, "patch") : void 0) || await runVersionPrompts(ctx, config, inferred);
|
|
1132
1140
|
ctx.isIncrement = neq(current, nextVersion);
|
|
1133
1141
|
const { version: next, isPrerelease: toPreRelease, preId, preBase } = parseVersion(nextVersion);
|
package/dist/index.mjs
CHANGED
|
@@ -156,7 +156,7 @@ function headerPartial(context) {
|
|
|
156
156
|
function template(context) {
|
|
157
157
|
const { headerPartial, preamblePartial, commitPartial, footerPartial, noteGroups, commitGroups } = context;
|
|
158
158
|
return segments(headerPartial(context), preamblePartial(context), each(noteGroups, (group) => segments(heading(3, words("⚠", group.title)), list(group.notes, (note) => {
|
|
159
|
-
return each([words(note.commit.scope && bold(`${note.commit.scope}:`), commitPartial(context, note.commit)), list([note.text], (t) => t)], (t) => t, newline());
|
|
159
|
+
return each([words(note.commit.scope && bold(`${note.commit.scope}:`), commitPartial(context, note.commit)), note.commit.subject.trim() !== note.text.trim() ? list([note.text], (t) => t) : ""], (t) => t, newline());
|
|
160
160
|
})), newline(2)), each(commitGroups, (group) => segments(group.title && heading(3, group.title), list(group.commits, (commit) => commitPartial(context, commit))), newline(2)), footerPartial(context));
|
|
161
161
|
}
|
|
162
162
|
//#endregion
|