@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.
@@ -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 (single call)...");
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 (single call)...");
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
@@ -11,7 +11,7 @@ import {
11
11
  runPipeline,
12
12
  saveAuth,
13
13
  writeMonorepoChangelogs
14
- } from "./chunk-ADZJSWND.js";
14
+ } from "./chunk-PJAWCB4Q.js";
15
15
 
16
16
  // src/cli.ts
17
17
  import * as fs from "fs";
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 (single call)...");
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
@@ -24,7 +24,7 @@ import {
24
24
  writeJson,
25
25
  writeMarkdown,
26
26
  writeMonorepoChangelogs
27
- } from "./chunk-ADZJSWND.js";
27
+ } from "./chunk-PJAWCB4Q.js";
28
28
  export {
29
29
  NotesError as ChangelogCreatorError,
30
30
  ConfigError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@releasekit/notes",
3
- "version": "0.2.0-next.5",
3
+ "version": "0.2.0-next.6",
4
4
  "description": "Changelog generation with LLM-powered enhancement and flexible templating",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",