@releasekit/notes 0.2.0-next.4 → 0.2.0-next.6
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-H44KSHFJ.js → chunk-PJAWCB4Q.js} +25 -6
- package/dist/cli.cjs +25 -6
- package/dist/cli.js +1 -1
- package/dist/index.cjs +25 -6
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -256,6 +256,10 @@ function writeMarkdown(outputPath, contexts, config, dryRun) {
|
|
|
256
256
|
if (!fs2.existsSync(dir)) {
|
|
257
257
|
fs2.mkdirSync(dir, { recursive: true });
|
|
258
258
|
}
|
|
259
|
+
if (outputPath === "-") {
|
|
260
|
+
process.stdout.write(content);
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
259
263
|
if (config.updateStrategy === "prepend" && fs2.existsSync(outputPath) && contexts.length === 1) {
|
|
260
264
|
const firstContext = contexts[0];
|
|
261
265
|
if (firstContext) {
|
|
@@ -516,15 +520,26 @@ Entries:
|
|
|
516
520
|
Output only valid JSON, nothing else:`;
|
|
517
521
|
function buildCustomCategorizePrompt(categories) {
|
|
518
522
|
const categoryList = categories.map((c) => `- "${c.name}": ${c.description}`).join("\n");
|
|
523
|
+
const developerCategory = categories.find((c) => c.name === "Developer");
|
|
524
|
+
let scopeInstructions = "";
|
|
525
|
+
if (developerCategory) {
|
|
526
|
+
const scopeMatch = developerCategory.description.match(/from:\s*([^.]+)/);
|
|
527
|
+
if (scopeMatch?.[1]) {
|
|
528
|
+
const scopes = scopeMatch[1].split(",").map((s) => s.trim()).filter(Boolean);
|
|
529
|
+
if (scopes.length > 0) {
|
|
530
|
+
scopeInstructions = `
|
|
531
|
+
|
|
532
|
+
For the "Developer" category, you MUST assign a scope from this exact list: ${scopes.join(", ")}.
|
|
533
|
+
`;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
519
537
|
return `You are categorizing changelog entries for a software release.
|
|
520
538
|
|
|
521
|
-
Given the following entries, group them into the specified categories. Only use the categories listed below
|
|
539
|
+
Given the following entries, group them into the specified categories. Only use the categories listed below in this exact order:
|
|
522
540
|
|
|
523
541
|
Categories:
|
|
524
|
-
${categoryList}
|
|
525
|
-
|
|
526
|
-
For entries in categories that involve internal/developer changes, set a "scope" field on those entries with a short subcategory label (e.g., "CI", "Dependencies", "Testing", "Code Quality", "Build System").
|
|
527
|
-
|
|
542
|
+
${categoryList}${scopeInstructions}
|
|
528
543
|
Output a JSON object with two fields:
|
|
529
544
|
- "categories": an object where keys are category names and values are arrays of entry indices (0-based)
|
|
530
545
|
- "scopes": an object where keys are entry indices (as strings) and values are scope labels
|
|
@@ -1259,7 +1274,7 @@ async function processWithLLM(context, config) {
|
|
|
1259
1274
|
const activeTasks = Object.entries(tasks).filter(([, enabled]) => enabled).map(([name]) => name);
|
|
1260
1275
|
info4(`Running LLM tasks: ${activeTasks.join(", ")}`);
|
|
1261
1276
|
if (tasks.enhance && tasks.categorize) {
|
|
1262
|
-
info4("Enhancing and categorizing entries with LLM
|
|
1277
|
+
info4("Enhancing and categorizing entries with LLM...");
|
|
1263
1278
|
const result = await enhanceAndCategorize(provider, context.entries, llmContext);
|
|
1264
1279
|
enhanced.entries = result.enhancedEntries;
|
|
1265
1280
|
enhanced.categories = {};
|
|
@@ -1342,6 +1357,10 @@ async function generateWithTemplate(contexts, config, outputPath, dryRun) {
|
|
|
1342
1357
|
info4("--- End Preview ---");
|
|
1343
1358
|
return;
|
|
1344
1359
|
}
|
|
1360
|
+
if (outputPath === "-") {
|
|
1361
|
+
process.stdout.write(result.content);
|
|
1362
|
+
return;
|
|
1363
|
+
}
|
|
1345
1364
|
const dir = path6.dirname(outputPath);
|
|
1346
1365
|
if (!fs8.existsSync(dir)) {
|
|
1347
1366
|
fs8.mkdirSync(dir, { recursive: true });
|
package/dist/cli.cjs
CHANGED
|
@@ -366,15 +366,26 @@ Entries:
|
|
|
366
366
|
Output only valid JSON, nothing else:`;
|
|
367
367
|
function buildCustomCategorizePrompt(categories) {
|
|
368
368
|
const categoryList = categories.map((c) => `- "${c.name}": ${c.description}`).join("\n");
|
|
369
|
+
const developerCategory = categories.find((c) => c.name === "Developer");
|
|
370
|
+
let scopeInstructions = "";
|
|
371
|
+
if (developerCategory) {
|
|
372
|
+
const scopeMatch = developerCategory.description.match(/from:\s*([^.]+)/);
|
|
373
|
+
if (scopeMatch?.[1]) {
|
|
374
|
+
const scopes = scopeMatch[1].split(",").map((s) => s.trim()).filter(Boolean);
|
|
375
|
+
if (scopes.length > 0) {
|
|
376
|
+
scopeInstructions = `
|
|
377
|
+
|
|
378
|
+
For the "Developer" category, you MUST assign a scope from this exact list: ${scopes.join(", ")}.
|
|
379
|
+
`;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
369
383
|
return `You are categorizing changelog entries for a software release.
|
|
370
384
|
|
|
371
|
-
Given the following entries, group them into the specified categories. Only use the categories listed below
|
|
385
|
+
Given the following entries, group them into the specified categories. Only use the categories listed below in this exact order:
|
|
372
386
|
|
|
373
387
|
Categories:
|
|
374
|
-
${categoryList}
|
|
375
|
-
|
|
376
|
-
For entries in categories that involve internal/developer changes, set a "scope" field on those entries with a short subcategory label (e.g., "CI", "Dependencies", "Testing", "Code Quality", "Build System").
|
|
377
|
-
|
|
388
|
+
${categoryList}${scopeInstructions}
|
|
378
389
|
Output a JSON object with two fields:
|
|
379
390
|
- "categories": an object where keys are category names and values are arrays of entry indices (0-based)
|
|
380
391
|
- "scopes": an object where keys are entry indices (as strings) and values are scope labels
|
|
@@ -762,6 +773,10 @@ function writeMarkdown(outputPath, contexts, config, dryRun) {
|
|
|
762
773
|
if (!fs2.existsSync(dir)) {
|
|
763
774
|
fs2.mkdirSync(dir, { recursive: true });
|
|
764
775
|
}
|
|
776
|
+
if (outputPath === "-") {
|
|
777
|
+
process.stdout.write(content);
|
|
778
|
+
return;
|
|
779
|
+
}
|
|
765
780
|
if (config.updateStrategy === "prepend" && fs2.existsSync(outputPath) && contexts.length === 1) {
|
|
766
781
|
const firstContext = contexts[0];
|
|
767
782
|
if (firstContext) {
|
|
@@ -1271,7 +1286,7 @@ async function processWithLLM(context, config) {
|
|
|
1271
1286
|
const activeTasks = Object.entries(tasks).filter(([, enabled]) => enabled).map(([name]) => name);
|
|
1272
1287
|
(0, import_core8.info)(`Running LLM tasks: ${activeTasks.join(", ")}`);
|
|
1273
1288
|
if (tasks.enhance && tasks.categorize) {
|
|
1274
|
-
(0, import_core8.info)("Enhancing and categorizing entries with LLM
|
|
1289
|
+
(0, import_core8.info)("Enhancing and categorizing entries with LLM...");
|
|
1275
1290
|
const result = await enhanceAndCategorize(provider, context.entries, llmContext);
|
|
1276
1291
|
enhanced.entries = result.enhancedEntries;
|
|
1277
1292
|
enhanced.categories = {};
|
|
@@ -1354,6 +1369,10 @@ async function generateWithTemplate(contexts, config, outputPath, dryRun) {
|
|
|
1354
1369
|
(0, import_core8.info)("--- End Preview ---");
|
|
1355
1370
|
return;
|
|
1356
1371
|
}
|
|
1372
|
+
if (outputPath === "-") {
|
|
1373
|
+
process.stdout.write(result.content);
|
|
1374
|
+
return;
|
|
1375
|
+
}
|
|
1357
1376
|
const dir = path6.dirname(outputPath);
|
|
1358
1377
|
if (!fs8.existsSync(dir)) {
|
|
1359
1378
|
fs8.mkdirSync(dir, { recursive: true });
|
package/dist/cli.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -416,15 +416,26 @@ Entries:
|
|
|
416
416
|
Output only valid JSON, nothing else:`;
|
|
417
417
|
function buildCustomCategorizePrompt(categories) {
|
|
418
418
|
const categoryList = categories.map((c) => `- "${c.name}": ${c.description}`).join("\n");
|
|
419
|
+
const developerCategory = categories.find((c) => c.name === "Developer");
|
|
420
|
+
let scopeInstructions = "";
|
|
421
|
+
if (developerCategory) {
|
|
422
|
+
const scopeMatch = developerCategory.description.match(/from:\s*([^.]+)/);
|
|
423
|
+
if (scopeMatch?.[1]) {
|
|
424
|
+
const scopes = scopeMatch[1].split(",").map((s) => s.trim()).filter(Boolean);
|
|
425
|
+
if (scopes.length > 0) {
|
|
426
|
+
scopeInstructions = `
|
|
427
|
+
|
|
428
|
+
For the "Developer" category, you MUST assign a scope from this exact list: ${scopes.join(", ")}.
|
|
429
|
+
`;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
419
433
|
return `You are categorizing changelog entries for a software release.
|
|
420
434
|
|
|
421
|
-
Given the following entries, group them into the specified categories. Only use the categories listed below
|
|
435
|
+
Given the following entries, group them into the specified categories. Only use the categories listed below in this exact order:
|
|
422
436
|
|
|
423
437
|
Categories:
|
|
424
|
-
${categoryList}
|
|
425
|
-
|
|
426
|
-
For entries in categories that involve internal/developer changes, set a "scope" field on those entries with a short subcategory label (e.g., "CI", "Dependencies", "Testing", "Code Quality", "Build System").
|
|
427
|
-
|
|
438
|
+
${categoryList}${scopeInstructions}
|
|
428
439
|
Output a JSON object with two fields:
|
|
429
440
|
- "categories": an object where keys are category names and values are arrays of entry indices (0-based)
|
|
430
441
|
- "scopes": an object where keys are entry indices (as strings) and values are scope labels
|
|
@@ -812,6 +823,10 @@ function writeMarkdown(outputPath, contexts, config, dryRun) {
|
|
|
812
823
|
if (!fs2.existsSync(dir)) {
|
|
813
824
|
fs2.mkdirSync(dir, { recursive: true });
|
|
814
825
|
}
|
|
826
|
+
if (outputPath === "-") {
|
|
827
|
+
process.stdout.write(content);
|
|
828
|
+
return;
|
|
829
|
+
}
|
|
815
830
|
if (config.updateStrategy === "prepend" && fs2.existsSync(outputPath) && contexts.length === 1) {
|
|
816
831
|
const firstContext = contexts[0];
|
|
817
832
|
if (firstContext) {
|
|
@@ -1321,7 +1336,7 @@ async function processWithLLM(context, config) {
|
|
|
1321
1336
|
const activeTasks = Object.entries(tasks).filter(([, enabled]) => enabled).map(([name]) => name);
|
|
1322
1337
|
(0, import_core8.info)(`Running LLM tasks: ${activeTasks.join(", ")}`);
|
|
1323
1338
|
if (tasks.enhance && tasks.categorize) {
|
|
1324
|
-
(0, import_core8.info)("Enhancing and categorizing entries with LLM
|
|
1339
|
+
(0, import_core8.info)("Enhancing and categorizing entries with LLM...");
|
|
1325
1340
|
const result = await enhanceAndCategorize(provider, context.entries, llmContext);
|
|
1326
1341
|
enhanced.entries = result.enhancedEntries;
|
|
1327
1342
|
enhanced.categories = {};
|
|
@@ -1404,6 +1419,10 @@ async function generateWithTemplate(contexts, config, outputPath, dryRun) {
|
|
|
1404
1419
|
(0, import_core8.info)("--- End Preview ---");
|
|
1405
1420
|
return;
|
|
1406
1421
|
}
|
|
1422
|
+
if (outputPath === "-") {
|
|
1423
|
+
process.stdout.write(result.content);
|
|
1424
|
+
return;
|
|
1425
|
+
}
|
|
1407
1426
|
const dir = path6.dirname(outputPath);
|
|
1408
1427
|
if (!fs8.existsSync(dir)) {
|
|
1409
1428
|
fs8.mkdirSync(dir, { recursive: true });
|
package/dist/index.js
CHANGED