@releasekit/notes 0.2.0-next.0 → 0.2.0-next.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/dist/{chunk-NHDLQLG2.js → chunk-W7DVGQ7D.js} +4 -2
- package/dist/cli.cjs +14 -3
- package/dist/cli.js +11 -2
- package/dist/index.cjs +4 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -556,7 +556,8 @@ async function categorizeEntries(provider, entries, context) {
|
|
|
556
556
|
entries[idx] = { ...entries[idx], scope };
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
for (const [category,
|
|
559
|
+
for (const [category, rawIndices] of Object.entries(categoryMap)) {
|
|
560
|
+
const indices = Array.isArray(rawIndices) ? rawIndices : [];
|
|
560
561
|
const categoryEntries = indices.map((i) => entries[i]).filter((e) => e !== void 0);
|
|
561
562
|
if (categoryEntries.length > 0) {
|
|
562
563
|
result.push({ category, entries: categoryEntries });
|
|
@@ -564,7 +565,8 @@ async function categorizeEntries(provider, entries, context) {
|
|
|
564
565
|
}
|
|
565
566
|
} else {
|
|
566
567
|
const categoryMap = parsed;
|
|
567
|
-
for (const [category,
|
|
568
|
+
for (const [category, rawIndices] of Object.entries(categoryMap)) {
|
|
569
|
+
const indices = Array.isArray(rawIndices) ? rawIndices : [];
|
|
568
570
|
const categoryEntries = indices.map((i) => entries[i]).filter((e) => e !== void 0);
|
|
569
571
|
if (categoryEntries.length > 0) {
|
|
570
572
|
result.push({ category, entries: categoryEntries });
|
package/dist/cli.cjs
CHANGED
|
@@ -406,7 +406,8 @@ async function categorizeEntries(provider, entries, context) {
|
|
|
406
406
|
entries[idx] = { ...entries[idx], scope };
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
|
-
for (const [category,
|
|
409
|
+
for (const [category, rawIndices] of Object.entries(categoryMap)) {
|
|
410
|
+
const indices = Array.isArray(rawIndices) ? rawIndices : [];
|
|
410
411
|
const categoryEntries = indices.map((i) => entries[i]).filter((e) => e !== void 0);
|
|
411
412
|
if (categoryEntries.length > 0) {
|
|
412
413
|
result.push({ category, entries: categoryEntries });
|
|
@@ -414,7 +415,8 @@ async function categorizeEntries(provider, entries, context) {
|
|
|
414
415
|
}
|
|
415
416
|
} else {
|
|
416
417
|
const categoryMap = parsed;
|
|
417
|
-
for (const [category,
|
|
418
|
+
for (const [category, rawIndices] of Object.entries(categoryMap)) {
|
|
419
|
+
const indices = Array.isArray(rawIndices) ? rawIndices : [];
|
|
418
420
|
const categoryEntries = indices.map((i) => entries[i]).filter((e) => e !== void 0);
|
|
419
421
|
if (categoryEntries.length > 0) {
|
|
420
422
|
result.push({ category, entries: categoryEntries });
|
|
@@ -1461,7 +1463,7 @@ function detectMonorepo(cwd) {
|
|
|
1461
1463
|
// src/cli.ts
|
|
1462
1464
|
var program = new import_commander.Command();
|
|
1463
1465
|
program.name("releasekit-notes").description("Generate changelogs with LLM-powered enhancement and flexible templating").version("0.1.0");
|
|
1464
|
-
program.command("generate", { isDefault: true }).description("Generate changelog from input data").option("-i, --input <file>", "Input file (default: stdin)").option("-o, --output <spec>", "Output spec (format:file)", collectOutputs, []).option("-t, --template <path>", "Template file or directory").option("-e, --engine <engine>", "Template engine (handlebars|liquid|ejs)").option("--monorepo <mode>", "Monorepo mode (root|packages|both)").option("--llm-provider <provider>", "LLM provider").option("--llm-model <model>", "LLM model").option("--llm-base-url <url>", "LLM base URL (for openai-compatible provider)").option("--llm-tasks <tasks>", "Comma-separated LLM tasks").option("--no-llm", "Disable LLM processing").option("--config <path>", "Config file path").option("--dry-run", "Preview without writing").option("--regenerate", "Regenerate entire changelog").option("-v, --verbose", "Increase verbosity", increaseVerbosity, 0).option("-q, --quiet", "Suppress non-error output").action(async (options) => {
|
|
1466
|
+
program.command("generate", { isDefault: true }).description("Generate changelog from input data").option("-i, --input <file>", "Input file (default: stdin)").option("-o, --output <spec>", "Output spec (format:file)", collectOutputs, []).option("-t, --template <path>", "Template file or directory").option("-e, --engine <engine>", "Template engine (handlebars|liquid|ejs)").option("--monorepo <mode>", "Monorepo mode (root|packages|both)").option("--llm-provider <provider>", "LLM provider").option("--llm-model <model>", "LLM model").option("--llm-base-url <url>", "LLM base URL (for openai-compatible provider)").option("--llm-tasks <tasks>", "Comma-separated LLM tasks").option("--no-llm", "Disable LLM processing").option("--target <package>", "Filter to a specific package name").option("--config <path>", "Config file path").option("--dry-run", "Preview without writing").option("--regenerate", "Regenerate entire changelog").option("-v, --verbose", "Increase verbosity", increaseVerbosity, 0).option("-q, --quiet", "Suppress non-error output").action(async (options) => {
|
|
1465
1467
|
setVerbosity(options.verbose);
|
|
1466
1468
|
if (options.quiet) (0, import_core9.setQuietMode)(true);
|
|
1467
1469
|
try {
|
|
@@ -1514,6 +1516,15 @@ program.command("generate", { isDefault: true }).description("Generate changelog
|
|
|
1514
1516
|
inputJson = await readStdin();
|
|
1515
1517
|
}
|
|
1516
1518
|
const input = parsePackageVersioner(inputJson);
|
|
1519
|
+
if (options.target) {
|
|
1520
|
+
const before = input.packages.length;
|
|
1521
|
+
input.packages = input.packages.filter((p) => p.packageName === options.target);
|
|
1522
|
+
if (input.packages.length === 0) {
|
|
1523
|
+
(0, import_core9.info)(`No changelog found for package "${options.target}" (had ${before} package(s))`);
|
|
1524
|
+
return;
|
|
1525
|
+
}
|
|
1526
|
+
(0, import_core9.info)(`Filtered to package: ${options.target}`);
|
|
1527
|
+
}
|
|
1517
1528
|
if (options.monorepo || config.monorepo) {
|
|
1518
1529
|
const monorepoMode = options.monorepo ?? config.monorepo?.mode ?? "both";
|
|
1519
1530
|
const detected = detectMonorepo(process.cwd());
|
package/dist/cli.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
runPipeline,
|
|
12
12
|
saveAuth,
|
|
13
13
|
writeMonorepoChangelogs
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-W7DVGQ7D.js";
|
|
15
15
|
|
|
16
16
|
// src/cli.ts
|
|
17
17
|
import * as fs from "fs";
|
|
@@ -20,7 +20,7 @@ import { error, info, setLogLevel, setQuietMode, success } from "@releasekit/cor
|
|
|
20
20
|
import { Command } from "commander";
|
|
21
21
|
var program = new Command();
|
|
22
22
|
program.name("releasekit-notes").description("Generate changelogs with LLM-powered enhancement and flexible templating").version("0.1.0");
|
|
23
|
-
program.command("generate", { isDefault: true }).description("Generate changelog from input data").option("-i, --input <file>", "Input file (default: stdin)").option("-o, --output <spec>", "Output spec (format:file)", collectOutputs, []).option("-t, --template <path>", "Template file or directory").option("-e, --engine <engine>", "Template engine (handlebars|liquid|ejs)").option("--monorepo <mode>", "Monorepo mode (root|packages|both)").option("--llm-provider <provider>", "LLM provider").option("--llm-model <model>", "LLM model").option("--llm-base-url <url>", "LLM base URL (for openai-compatible provider)").option("--llm-tasks <tasks>", "Comma-separated LLM tasks").option("--no-llm", "Disable LLM processing").option("--config <path>", "Config file path").option("--dry-run", "Preview without writing").option("--regenerate", "Regenerate entire changelog").option("-v, --verbose", "Increase verbosity", increaseVerbosity, 0).option("-q, --quiet", "Suppress non-error output").action(async (options) => {
|
|
23
|
+
program.command("generate", { isDefault: true }).description("Generate changelog from input data").option("-i, --input <file>", "Input file (default: stdin)").option("-o, --output <spec>", "Output spec (format:file)", collectOutputs, []).option("-t, --template <path>", "Template file or directory").option("-e, --engine <engine>", "Template engine (handlebars|liquid|ejs)").option("--monorepo <mode>", "Monorepo mode (root|packages|both)").option("--llm-provider <provider>", "LLM provider").option("--llm-model <model>", "LLM model").option("--llm-base-url <url>", "LLM base URL (for openai-compatible provider)").option("--llm-tasks <tasks>", "Comma-separated LLM tasks").option("--no-llm", "Disable LLM processing").option("--target <package>", "Filter to a specific package name").option("--config <path>", "Config file path").option("--dry-run", "Preview without writing").option("--regenerate", "Regenerate entire changelog").option("-v, --verbose", "Increase verbosity", increaseVerbosity, 0).option("-q, --quiet", "Suppress non-error output").action(async (options) => {
|
|
24
24
|
setVerbosity(options.verbose);
|
|
25
25
|
if (options.quiet) setQuietMode(true);
|
|
26
26
|
try {
|
|
@@ -73,6 +73,15 @@ program.command("generate", { isDefault: true }).description("Generate changelog
|
|
|
73
73
|
inputJson = await readStdin();
|
|
74
74
|
}
|
|
75
75
|
const input = parsePackageVersioner(inputJson);
|
|
76
|
+
if (options.target) {
|
|
77
|
+
const before = input.packages.length;
|
|
78
|
+
input.packages = input.packages.filter((p) => p.packageName === options.target);
|
|
79
|
+
if (input.packages.length === 0) {
|
|
80
|
+
info(`No changelog found for package "${options.target}" (had ${before} package(s))`);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
info(`Filtered to package: ${options.target}`);
|
|
84
|
+
}
|
|
76
85
|
if (options.monorepo || config.monorepo) {
|
|
77
86
|
const monorepoMode = options.monorepo ?? config.monorepo?.mode ?? "both";
|
|
78
87
|
const detected = detectMonorepo(process.cwd());
|
package/dist/index.cjs
CHANGED
|
@@ -456,7 +456,8 @@ async function categorizeEntries(provider, entries, context) {
|
|
|
456
456
|
entries[idx] = { ...entries[idx], scope };
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
|
-
for (const [category,
|
|
459
|
+
for (const [category, rawIndices] of Object.entries(categoryMap)) {
|
|
460
|
+
const indices = Array.isArray(rawIndices) ? rawIndices : [];
|
|
460
461
|
const categoryEntries = indices.map((i) => entries[i]).filter((e) => e !== void 0);
|
|
461
462
|
if (categoryEntries.length > 0) {
|
|
462
463
|
result.push({ category, entries: categoryEntries });
|
|
@@ -464,7 +465,8 @@ async function categorizeEntries(provider, entries, context) {
|
|
|
464
465
|
}
|
|
465
466
|
} else {
|
|
466
467
|
const categoryMap = parsed;
|
|
467
|
-
for (const [category,
|
|
468
|
+
for (const [category, rawIndices] of Object.entries(categoryMap)) {
|
|
469
|
+
const indices = Array.isArray(rawIndices) ? rawIndices : [];
|
|
468
470
|
const categoryEntries = indices.map((i) => entries[i]).filter((e) => e !== void 0);
|
|
469
471
|
if (categoryEntries.length > 0) {
|
|
470
472
|
result.push({ category, entries: categoryEntries });
|
package/dist/index.js
CHANGED