@releasekit/notes 0.44.0 → 0.44.1

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.
@@ -2,8 +2,8 @@ import {
2
2
  aggregateToRoot,
3
3
  detectMonorepo,
4
4
  writeMonorepoChangelogs
5
- } from "./chunk-ZY4HXAQV.js";
6
- import "./chunk-ECBA67PM.js";
5
+ } from "./chunk-YCULLVSG.js";
6
+ import "./chunk-VD3TYCTF.js";
7
7
  export {
8
8
  aggregateToRoot,
9
9
  detectMonorepo,
@@ -14,7 +14,7 @@ import {
14
14
  unwrapEnvelope,
15
15
  warn,
16
16
  writeMarkdown
17
- } from "./chunk-ECBA67PM.js";
17
+ } from "./chunk-VD3TYCTF.js";
18
18
 
19
19
  // ../config/dist/index.js
20
20
  import * as fs from "fs";
@@ -149,7 +149,9 @@ var VersionConfigBaseSchema = z.strictObject({
149
149
  sharedChangelogFloor: z.enum(["union", "sinceLastRelease"]).default("union").describe(
150
150
  `How the "Project-wide changes" block is bounded in package-specific-tag mode. "union" (default): repo-level commits accrue from the union of the releasing packages' ranges, floored by the OLDEST unreleased baseline \u2014 so a genuinely-global commit recurs in every release until the oldest-baselined package is released past it. "sinceLastRelease": floor the block by the single nearest tag reachable across the repo, so global commits already shown by the most recent release don't recur (recommended for per-package-tag monorepos). No effect in sync mode, where one shared tag already consumes repo-level commits on each release.`
151
151
  ),
152
- mainPackage: z.string().optional().describe("Package to use for version determination"),
152
+ mainPackage: z.string().optional().describe(
153
+ "The package a single-mode release versions. In sync mode, the release bumps from this package's version and tag and, without packageSpecificTags, carries its name. The changelog still lists every commit in the release."
154
+ ),
153
155
  skip: z.array(z.string()).optional().describe(
154
156
  'Packages to exclude from versioning (glob patterns or exact names). Private packages ("private": true) are skipped automatically \u2014 see includePrivate \u2014 so they do not need to be listed here.'
155
157
  ),
@@ -367,7 +369,7 @@ var ChangelogConfigSchema = z.strictObject({
367
369
  "How `#NNN` issue/PR refs in the changelog are rendered. Applies to the whole entry \u2014 both the appended label and any bare `#N` carried over from the commit subject into the description (a description ref that also appears in the appended label is de-duplicated away). 'link' (default): the PR and the issues it closed are labelled as `(PR #503 \xB7 closes #500)`, where the PR links to its canonical /pull/ URL with `PR #503` as the visible text \u2014 this keeps the GitHub hovercard but stops the bare-token rich inline card that duplicated the entry; closed issues link to /issues/. An entry with no identifiable PR (a non-squash commit, or a non-GitHub repo) falls back to a plain ref list. 'escape': plain text \\#NNN (no link, no hovercard, no PR/closes labelling). 'strip': refs are removed entirely. Scoped-package / @user mentions in entry text are always neutralised regardless of this setting."
368
370
  ),
369
371
  demoteScopes: z.array(z.string()).default([...DEFAULT_DEMOTE_SCOPES]).describe(
370
- 'Conventional-commit scopes whose changelog entries move to a trailing "Dependencies & version bumps" subsection instead of mixing with Added / Fixed / Changed. A breaking change still comes first, under Breaking. Applies to the release preview comment and the standing-PR changelogs (each releasable row and the "Show all changes" footer). Entries are moved, not dropped, so the de-duplicated change count is unchanged. Default: ["deps", "deps-dev"], the scopes Dependabot uses. Set to [] to render every scope inline.'
372
+ 'Conventional-commit scopes whose changelog entries move to a trailing "Dependencies & version bumps" subsection instead of mixing with Added / Changed / Fixed. A breaking change still comes first, under Breaking. Applies to the release preview comment and the standing-PR changelogs (each releasable row and the "Show all changes" footer). Entries are moved, not dropped, so the de-duplicated change count is unchanged. Default: ["deps", "deps-dev"], the scopes Dependabot uses. Set to [] to render every scope inline.'
371
373
  )
372
374
  }).describe("Changelog file configuration");
373
375
  var LLMOptionsSchema = z.strictObject({
@@ -505,10 +507,6 @@ var ReleaseNotesConfigSchema = z.strictObject({
505
507
  "First-release placeholder intro, shown when a package has no prior version (previousVersion is null). Default-on with a factual line; set to false to disable."
506
508
  )
507
509
  }).describe("Release notes configuration");
508
- var NotesInputConfigSchema = z.strictObject({
509
- source: z.string().optional(),
510
- file: z.string().optional()
511
- });
512
510
  var NotesConfigSchema = z.strictObject({
513
511
  changelog: z.union([z.literal(false).describe("Set to false to disable changelog generation"), ChangelogConfigSchema]).optional().describe("Changelog generation, on by default. Set to false to disable."),
514
512
  releaseNotes: z.union([z.literal(false).describe("Set to false to disable release notes"), ReleaseNotesConfigSchema]).optional().describe(
@@ -577,7 +575,7 @@ var StandingPrConfigSchema = z.strictObject({
577
575
  'Extra actors authorized regardless of permission level: GitHub usernames, or "@org/team-slug" to authorize a whole team. Team-membership checks need a token with read:org scope (a PAT or GitHub App), not the default GITHUB_TOKEN; without it, team entries fail closed \u2014 the 403 is surfaced as a warning and the actor is not authorized.'
578
576
  ),
579
577
  enforceMergeAuthor: z.boolean().default(true).describe(
580
- "Refuse to publish the standing PR when the actor who merged it is not authorized (defense-in-depth behind a branch-protection ruleset, which is the primary merge gate). Set false to rely on branch protection alone."
578
+ "Refuse to publish the standing PR when the actor who merged it is not authorized or cannot be determined (defense-in-depth behind a branch-protection ruleset, which is the primary merge gate). Set false to rely on branch protection alone."
581
579
  )
582
580
  }).optional().describe(
583
581
  "Restrict who can steer the standing PR \u2014 its selection checkboxes, per-row channel toggles, release labels, and merge. Omit to allow anyone with the GitHub permission GitHub itself requires for each action."
@@ -589,7 +587,7 @@ var StandingPrConfigSchema = z.strictObject({
589
587
  "How the selection list renders when primaryPackages is set. streamlined: one checkbox per primary, coupled members shown read-only in a collapsed pane, and a held-back primary cascades to its unit. granular: every package keeps its own checkbox, nested under its primary, with no cascade. No effect when primaryPackages is empty."
590
588
  ),
591
589
  combinedChangelogFooter: z.boolean().default(true).describe(
592
- "Append the de-duplicated combined-changelog footer to the standing PR: every change listed once, flat across packages and grouped by change type (Added/Fixed/Changed), breaking changes first. It complements the per-row changelogs co-located with each releasable row. Set false to suppress this redundant per-package summary \u2014 the per-row changelogs remain, project-wide (shared) changes are still shown in their own block, and sync releases (which have no per-row changelogs) always show the combined changelog regardless of this setting."
590
+ "Append the de-duplicated combined-changelog footer to the standing PR: every change listed once, flat across packages and grouped by change type (Added/Changed/Fixed), breaking changes first. Set false to rely on the per-row changelogs; project-wide (shared) changes still show in their own block. Sync releases, which have no per-row changelogs, always show the footer."
593
591
  ),
594
592
  channelToggle: z.boolean().default(false).describe(
595
593
  "Add a per-row channel toggle to the standing-PR selection list: a nested checkbox under each releasable row to ship a stable package as a prerelease (\u2192 X.Y.Z-next.0 on the `next` dist-tag) or graduate a prerelease package to its stable base \u2014 shifting just that package (and its group) without narrowing the release. Off by default so repos that do not need it keep the tight one-line-per-package list. A held-back (unticked) row hides its channel toggle. A sync release, which ships as one unit, instead gets a single graduate-to-stable checkbox under its queued changes when it is on a prerelease line."
@@ -1258,7 +1256,9 @@ var GitHubForge = class {
1258
1256
  labels: labelNames(data.labels),
1259
1257
  headSha: data.head?.sha,
1260
1258
  headRef: data.head?.ref,
1261
- baseRef: data.base?.ref
1259
+ baseRef: data.base?.ref,
1260
+ mergeCommitSha: data.merge_commit_sha ?? void 0,
1261
+ mergedBy: data.merged_by ? { login: data.merged_by.login, type: data.merged_by.type } : void 0
1262
1262
  };
1263
1263
  }
1264
1264
  async createPullRequest(pr) {
@@ -3550,7 +3550,7 @@ async function runPipeline(input, config, dryRun, pipelineOptions) {
3550
3550
  const dir = releaseNotesConfig.file.dir;
3551
3551
  info(`Generating release notes \u2192 ${dir}`);
3552
3552
  try {
3553
- const { detectMonorepo } = await import("./aggregator-N733ZTAA.js");
3553
+ const { detectMonorepo } = await import("./aggregator-JHRFNT67.js");
3554
3554
  const nested = detectMonorepo(process.cwd()).isMonorepo || contexts.length > 1;
3555
3555
  const renderContent = (ctx) => {
3556
3556
  if (releaseNotesConfig.templates?.path) {
@@ -3614,7 +3614,7 @@ async function processInput(inputJson, config, dryRun, pipelineOptions) {
3614
3614
  return runPipeline(input, config, dryRun, pipelineOptions);
3615
3615
  }
3616
3616
  async function writeMonorepoFiles(contexts, config, dryRun, fileName, refs) {
3617
- const { detectMonorepo, writeMonorepoChangelogs } = await import("./aggregator-N733ZTAA.js");
3617
+ const { detectMonorepo, writeMonorepoChangelogs } = await import("./aggregator-JHRFNT67.js");
3618
3618
  const cwd = process.cwd();
3619
3619
  const detected = detectMonorepo(cwd);
3620
3620
  if (!detected.isMonorepo) {
@@ -8,6 +8,9 @@ import { fileURLToPath } from "url";
8
8
  import chalk from "chalk";
9
9
  import { minimatch } from "minimatch";
10
10
  import * as path3 from "path";
11
+ import * as fs3 from "fs";
12
+ import * as os from "os";
13
+ import * as path4 from "path";
11
14
  var CODE_SPAN_OR_COMMENT_OPEN = /(?<!(?<!\\)\\(?:\\\\)*)`[^`]*`|<!--/g;
12
15
  function escapeCommentOpeners(text, opts) {
13
16
  return text.replace(CODE_SPAN_OR_COMMENT_OPEN, (match) => {
@@ -97,16 +100,16 @@ function removeDescriptionRefs(text, refs) {
97
100
  var BREAKING_SECTION = "Breaking";
98
101
  var DEMOTED_SECTION = "Dependencies & version bumps";
99
102
  var CHANGELOG_TYPE_LABELS = {
100
- feat: "Added",
101
- fix: "Fixed",
102
103
  added: "Added",
104
+ feat: "Added",
103
105
  changed: "Changed",
104
106
  deprecated: "Deprecated",
105
107
  removed: "Removed",
106
108
  fixed: "Fixed",
109
+ fix: "Fixed",
110
+ security: "Security",
107
111
  perf: "Performance",
108
112
  refactor: "Refactored",
109
- security: "Security",
110
113
  docs: "Documentation",
111
114
  chore: "Chores",
112
115
  test: "Tests",
@@ -119,7 +122,7 @@ var CHANGELOG_LABEL_ORDER = [...new Set(Object.values(CHANGELOG_TYPE_LABELS))];
119
122
  function changelogTypeLabel(type) {
120
123
  return Object.hasOwn(CHANGELOG_TYPE_LABELS, type) ? CHANGELOG_TYPE_LABELS[type] : type.charAt(0).toUpperCase() + type.slice(1);
121
124
  }
122
- function groupChangelogSections(items, entryOf, { labelOrder = CHANGELOG_LABEL_ORDER, demoteScopes = [] } = {}) {
125
+ function groupChangelogSections(items, entryOf, { demoteScopes = [] } = {}) {
123
126
  const demote = new Set(demoteScopes);
124
127
  const breaking = [];
125
128
  const demoted = [];
@@ -144,7 +147,7 @@ function groupChangelogSections(items, entryOf, { labelOrder = CHANGELOG_LABEL_O
144
147
  if (breaking.length > 0) {
145
148
  sections.push({ label: BREAKING_SECTION, items: breaking });
146
149
  }
147
- for (const label of labelOrder) {
150
+ for (const label of CHANGELOG_LABEL_ORDER) {
148
151
  const list = byLabel.get(label);
149
152
  if (list) {
150
153
  sections.push({ label, items: list });
@@ -309,13 +312,8 @@ var CODE_TO_EXIT = {
309
312
  PACKAGES_NOT_FOUND: EXIT_CODES.CONFIG_ERROR,
310
313
  PACKAGE_NOT_FOUND: EXIT_CODES.CONFIG_ERROR,
311
314
  WORKSPACE_ERROR: EXIT_CODES.CONFIG_ERROR,
312
- NOT_GIT_REPO: EXIT_CODES.GIT_ERROR,
313
- GIT_PROCESS_ERROR: EXIT_CODES.GIT_ERROR,
314
- TAG_ALREADY_EXISTS: EXIT_CODES.GIT_ERROR,
315
315
  VERSION_CALCULATION_ERROR: EXIT_CODES.VERSION_ERROR,
316
316
  STRICT_REACHABLE_UNREACHABLE: EXIT_CODES.VERSION_ERROR,
317
- NO_COMMIT_MESSAGE: EXIT_CODES.VERSION_ERROR,
318
- NO_FILES: EXIT_CODES.VERSION_ERROR,
319
317
  CARGO_LOCK_SYNC_ERROR: EXIT_CODES.VERSION_ERROR,
320
318
  // @releasekit/publish
321
319
  PIPELINE_STAGE_ERROR: EXIT_CODES.PUBLISH_ERROR,
@@ -367,8 +365,8 @@ function isPathWithinRoot(root, target) {
367
365
  }
368
366
 
369
367
  // src/output/markdown.ts
370
- import * as fs3 from "fs";
371
- import * as path4 from "path";
368
+ import * as fs4 from "fs";
369
+ import * as path5 from "path";
372
370
  var DEFAULT_FIRST_RELEASE_TEXT = "_First release of ${packageName}._";
373
371
  function firstReleaseLine(context, config) {
374
372
  if (!context.isFirstRelease || config === false) {
@@ -377,7 +375,6 @@ function firstReleaseLine(context, config) {
377
375
  const template = config?.text ?? DEFAULT_FIRST_RELEASE_TEXT;
378
376
  return template.replaceAll("${packageName}", context.packageName).replaceAll("${version}", context.version);
379
377
  }
380
- var SECTION_ORDER = ["Added", "Changed", "Deprecated", "Removed", "Fixed", "Security"];
381
378
  function escapeCommitText(text) {
382
379
  return escapeCommentOpeners(escapeChangelogMentions(text), { keepCodeSpans: true });
383
380
  }
@@ -580,7 +577,7 @@ function formatVersion(context, options) {
580
577
  );
581
578
  }
582
579
  } else {
583
- for (const section of groupChangelogSections(context.entries, (e) => e, { labelOrder: SECTION_ORDER })) {
580
+ for (const section of groupChangelogSections(context.entries, (e) => e)) {
584
581
  blocks.push(`### ${section.label}`, section.items.map((entry) => formatEntry(entry, refOpts)).join("\n"));
585
582
  }
586
583
  }
@@ -604,7 +601,7 @@ function renderMarkdown(contexts, options) {
604
601
  return sections.join("\n");
605
602
  }
606
603
  function prependVersions(existingPath, contexts, options) {
607
- const existing = fs3.existsSync(existingPath) ? fs3.readFileSync(existingPath, "utf-8") : "";
604
+ const existing = fs4.existsSync(existingPath) ? fs4.readFileSync(existingPath, "utf-8") : "";
608
605
  if (existing.trim() === "") {
609
606
  return renderMarkdown(contexts, options);
610
607
  }
@@ -632,16 +629,16 @@ function writeMarkdown(outputPath, contexts, config, dryRun, options) {
632
629
  info(content);
633
630
  return;
634
631
  }
635
- const dir = path4.dirname(outputPath);
636
- if (!fs3.existsSync(dir)) {
637
- fs3.mkdirSync(dir, { recursive: true });
632
+ const dir = path5.dirname(outputPath);
633
+ if (!fs4.existsSync(dir)) {
634
+ fs4.mkdirSync(dir, { recursive: true });
638
635
  }
639
636
  if (outputPath === "-") {
640
637
  process.stdout.write(content);
641
638
  return;
642
639
  }
643
640
  const updated = config.updateStrategy === "regenerate" ? content : prependVersions(outputPath, contexts, options);
644
- fs3.writeFileSync(outputPath, updated, "utf-8");
641
+ fs4.writeFileSync(outputPath, updated, "utf-8");
645
642
  success(`${label} written to ${outputPath}`);
646
643
  }
647
644
 
@@ -4,7 +4,7 @@ import {
4
4
  prependVersions,
5
5
  renderMarkdown,
6
6
  success
7
- } from "./chunk-ECBA67PM.js";
7
+ } from "./chunk-VD3TYCTF.js";
8
8
 
9
9
  // src/monorepo/aggregator.ts
10
10
  import * as fs from "fs";
package/dist/cli.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createNotesCommand
4
- } from "./chunk-UAPJMRGO.js";
4
+ } from "./chunk-KTLNPX37.js";
5
5
  import {
6
6
  readPackageVersion
7
- } from "./chunk-ECBA67PM.js";
7
+ } from "./chunk-VD3TYCTF.js";
8
8
 
9
9
  // src/cli.ts
10
10
  import * as fs from "fs";
package/dist/index.d.ts CHANGED
@@ -65,7 +65,8 @@ interface VersionOutput {
65
65
  strategy?: 'sync' | 'single' | 'async' | 'group';
66
66
  updates: VersionPackageUpdate[];
67
67
  changelogs: VersionPackageChangelog[];
68
- /** Entries from commits that touch no package directory. */
68
+ /** Entries from commits that touch no package outside `sharedPackages`, counting the directories a package
69
+ * versions through `cargo.paths` / `pub.paths`. */
69
70
  sharedEntries?: VersionChangelogEntry[];
70
71
  commitMessage?: string;
71
72
  /** Consumer-facing tags from `tagTemplate`. */
@@ -156,7 +157,7 @@ interface PackageChangelog {
156
157
  date: string;
157
158
  entries: ChangelogEntry[];
158
159
  }
159
- type InputSource = 'version' | 'conventional-changelog' | 'git-log' | 'manual';
160
+ type InputSource = 'version';
160
161
  interface ChangelogInput {
161
162
  source: InputSource;
162
163
  packages: PackageChangelog[];
package/dist/index.js CHANGED
@@ -19,12 +19,12 @@ import {
19
19
  runPipeline,
20
20
  saveAuth,
21
21
  versionOutputToChangelogInput
22
- } from "./chunk-UAPJMRGO.js";
22
+ } from "./chunk-KTLNPX37.js";
23
23
  import {
24
24
  aggregateToRoot,
25
25
  detectMonorepo,
26
26
  writeMonorepoChangelogs
27
- } from "./chunk-ZY4HXAQV.js";
27
+ } from "./chunk-YCULLVSG.js";
28
28
  import {
29
29
  debug,
30
30
  formatVersion,
@@ -32,7 +32,7 @@ import {
32
32
  renderMarkdown,
33
33
  success,
34
34
  writeMarkdown
35
- } from "./chunk-ECBA67PM.js";
35
+ } from "./chunk-VD3TYCTF.js";
36
36
 
37
37
  // src/output/json.ts
38
38
  import * as fs from "fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@releasekit/notes",
3
- "version": "0.44.0",
3
+ "version": "0.44.1",
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",
@@ -66,7 +66,6 @@
66
66
  "@releasekit/config": "0.0.0",
67
67
  "@releasekit/core": "0.0.0",
68
68
  "@releasekit/forge": "0.0.0",
69
- "@releasekit/git": "0.0.0",
70
69
  "@types/ejs": "^3.1.5",
71
70
  "@types/node": "^26.6.6",
72
71
  "@vitest/coverage-v8": "^5.1.0",