@releasekit/notes 0.21.0 → 0.22.0

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.
@@ -76,6 +76,23 @@ var VersionCargoConfigSchema = z.object({
76
76
  });
77
77
  var VersionConfigSchema = z.object({
78
78
  tagTemplate: z.string().default("v{version}"),
79
+ /**
80
+ * Optional secondary tag template for an internal "baseline" marker that records the
81
+ * release commit on the source branch. Use this when `tagTemplate` resolves to a tag that
82
+ * gets force-moved off the source branch by a downstream step (for example, a GitHub
83
+ * Action distributing built artifacts at the version tag) — the baseline tag stays on the
84
+ * release commit so version-bump and changelog calculations can still find the previous
85
+ * release in the working branch's history.
86
+ *
87
+ * Supports `${packageName}`, `${prefix}`, `${version}` substitutions. Leave unset for
88
+ * single-tag workflows (the default).
89
+ */
90
+ baselineTagTemplate: z.string().refine((tpl) => tpl.includes("${version}"), {
91
+ message: (
92
+ // biome-ignore lint/suspicious/noTemplateCurlyInString: documenting the expected placeholder syntax to the user
93
+ 'baselineTagTemplate must contain a ${version} placeholder so the prefix can be derived (e.g. "release/${prefix}${version}").'
94
+ )
95
+ }).optional(),
79
96
  packageSpecificTags: z.boolean().default(false),
80
97
  preset: z.string().default("conventional"),
81
98
  sync: z.boolean().default(true),
@@ -1611,12 +1628,17 @@ function makeValidator2(entries, context) {
1611
1628
  if (!zodResult.success) {
1612
1629
  return { valid: false, error: `Schema error: ${zodResult.error.message}` };
1613
1630
  }
1614
- if (zodResult.data.entries.length !== entries.length) {
1631
+ const receivedCount = zodResult.data.entries.length;
1632
+ if (receivedCount < entries.length) {
1615
1633
  return {
1616
1634
  valid: false,
1617
- error: `Expected ${entries.length} entries, got ${zodResult.data.entries.length}`
1635
+ error: `Expected ${entries.length} entries, got ${receivedCount} (entries missing \u2014 cannot proceed)`
1618
1636
  };
1619
1637
  }
1638
+ if (receivedCount > entries.length) {
1639
+ warn(`LLM returned ${receivedCount} entries for ${entries.length} inputs; truncating to expected count.`);
1640
+ zodResult.data.entries.length = entries.length;
1641
+ }
1620
1642
  const categoryNames = context.categories?.map((c) => c.name);
1621
1643
  if (categoryNames?.length) {
1622
1644
  const invalid = zodResult.data.entries.filter((e) => !categoryNames.includes(e.category)).map((e) => e.category);
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createNotesCommand
4
- } from "./chunk-VLRGPIOB.js";
4
+ } from "./chunk-U7DE6XZR.js";
5
5
  import {
6
6
  readPackageVersion
7
7
  } from "./chunk-QCJ545PJ.js";
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  runPipeline,
19
19
  saveAuth,
20
20
  versionOutputToChangelogInput
21
- } from "./chunk-VLRGPIOB.js";
21
+ } from "./chunk-U7DE6XZR.js";
22
22
  import {
23
23
  aggregateToRoot,
24
24
  detectMonorepo,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@releasekit/notes",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "description": "Release notes and changelog generation with LLM-powered enhancement and flexible templating",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",