@releasekit/notes 0.2.0-next.5 → 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-ADZJSWND.js → chunk-PJAWCB4Q.js} +17 -6
- package/dist/cli.cjs +17 -6
- package/dist/cli.js +1 -1
- package/dist/index.cjs +17 -6
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -520,15 +520,26 @@ Entries:
|
|
|
520
520
|
Output only valid JSON, nothing else:`;
|
|
521
521
|
function buildCustomCategorizePrompt(categories) {
|
|
522
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
|
+
}
|
|
523
537
|
return `You are categorizing changelog entries for a software release.
|
|
524
538
|
|
|
525
|
-
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:
|
|
526
540
|
|
|
527
541
|
Categories:
|
|
528
|
-
${categoryList}
|
|
529
|
-
|
|
530
|
-
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").
|
|
531
|
-
|
|
542
|
+
${categoryList}${scopeInstructions}
|
|
532
543
|
Output a JSON object with two fields:
|
|
533
544
|
- "categories": an object where keys are category names and values are arrays of entry indices (0-based)
|
|
534
545
|
- "scopes": an object where keys are entry indices (as strings) and values are scope labels
|
|
@@ -1263,7 +1274,7 @@ async function processWithLLM(context, config) {
|
|
|
1263
1274
|
const activeTasks = Object.entries(tasks).filter(([, enabled]) => enabled).map(([name]) => name);
|
|
1264
1275
|
info4(`Running LLM tasks: ${activeTasks.join(", ")}`);
|
|
1265
1276
|
if (tasks.enhance && tasks.categorize) {
|
|
1266
|
-
info4("Enhancing and categorizing entries with LLM
|
|
1277
|
+
info4("Enhancing and categorizing entries with LLM...");
|
|
1267
1278
|
const result = await enhanceAndCategorize(provider, context.entries, llmContext);
|
|
1268
1279
|
enhanced.entries = result.enhancedEntries;
|
|
1269
1280
|
enhanced.categories = {};
|
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
|
|
@@ -1275,7 +1286,7 @@ async function processWithLLM(context, config) {
|
|
|
1275
1286
|
const activeTasks = Object.entries(tasks).filter(([, enabled]) => enabled).map(([name]) => name);
|
|
1276
1287
|
(0, import_core8.info)(`Running LLM tasks: ${activeTasks.join(", ")}`);
|
|
1277
1288
|
if (tasks.enhance && tasks.categorize) {
|
|
1278
|
-
(0, import_core8.info)("Enhancing and categorizing entries with LLM
|
|
1289
|
+
(0, import_core8.info)("Enhancing and categorizing entries with LLM...");
|
|
1279
1290
|
const result = await enhanceAndCategorize(provider, context.entries, llmContext);
|
|
1280
1291
|
enhanced.entries = result.enhancedEntries;
|
|
1281
1292
|
enhanced.categories = {};
|
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
|
|
@@ -1325,7 +1336,7 @@ async function processWithLLM(context, config) {
|
|
|
1325
1336
|
const activeTasks = Object.entries(tasks).filter(([, enabled]) => enabled).map(([name]) => name);
|
|
1326
1337
|
(0, import_core8.info)(`Running LLM tasks: ${activeTasks.join(", ")}`);
|
|
1327
1338
|
if (tasks.enhance && tasks.categorize) {
|
|
1328
|
-
(0, import_core8.info)("Enhancing and categorizing entries with LLM
|
|
1339
|
+
(0, import_core8.info)("Enhancing and categorizing entries with LLM...");
|
|
1329
1340
|
const result = await enhanceAndCategorize(provider, context.entries, llmContext);
|
|
1330
1341
|
enhanced.entries = result.enhancedEntries;
|
|
1331
1342
|
enhanced.categories = {};
|
package/dist/index.js
CHANGED