shipseal 0.0.4 → 0.0.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/dist/cli.js +8 -13
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -312,18 +312,13 @@ function deterministicCopy(facts, maxHighlights = 4) {
|
|
|
312
312
|
const tagline = facts.project.tagline?.value;
|
|
313
313
|
const subheadline = tagline !== void 0 && tagline.length > 0 ? cleanLine(tagline) : cleanLine(features[1] ?? fixes[1] ?? fixes[0] ?? `What's new in ${version ?? name}`);
|
|
314
314
|
const highlights = [];
|
|
315
|
-
|
|
316
|
-
if (highlights.length >= maxHighlights)
|
|
317
|
-
highlights.push(cleanLine(line));
|
|
318
|
-
}
|
|
319
|
-
for (const line of
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
}
|
|
323
|
-
for (const line of breaking) {
|
|
324
|
-
if (highlights.length >= maxHighlights) break;
|
|
325
|
-
highlights.push(`Breaking: ${cleanLine(line)}`);
|
|
326
|
-
}
|
|
315
|
+
const addHighlight = (line, prefix = "") => {
|
|
316
|
+
if (highlights.length >= maxHighlights) return;
|
|
317
|
+
highlights.push(`${prefix}${cleanLine(firstSentence(line))}`);
|
|
318
|
+
};
|
|
319
|
+
for (const line of breaking) addHighlight(line, "Breaking: ");
|
|
320
|
+
for (const line of features) addHighlight(line);
|
|
321
|
+
for (const line of fixes) addHighlight(line);
|
|
327
322
|
return {
|
|
328
323
|
headline,
|
|
329
324
|
subheadline,
|
|
@@ -1965,7 +1960,7 @@ function listItems(block) {
|
|
|
1965
1960
|
let current;
|
|
1966
1961
|
for (const raw of block.split("\n")) {
|
|
1967
1962
|
const trimmed = raw.trim();
|
|
1968
|
-
if (trimmed.startsWith("- ") || trimmed.startsWith("* ")) {
|
|
1963
|
+
if (!/^\s+/.test(raw) && (trimmed.startsWith("- ") || trimmed.startsWith("* "))) {
|
|
1969
1964
|
if (current !== void 0) items.push(current);
|
|
1970
1965
|
current = trimmed;
|
|
1971
1966
|
continue;
|