@savvy-web/silk 1.3.9 → 1.3.11

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.
Files changed (30) hide show
  1. package/changesets-changelog.cjs +9204 -685
  2. package/changesets-changelog.d.cts +120 -29
  3. package/changesets-changelog.d.ts +120 -29
  4. package/changesets-markdownlint.cjs +9204 -685
  5. package/changesets-markdownlint.d.cts +120 -29
  6. package/changesets-markdownlint.d.ts +120 -29
  7. package/package.json +11 -11
  8. package/packages/silk-effects/dist/dev/pkg/changesets/api/transformer.cjs +24 -30
  9. package/packages/silk-effects/dist/dev/pkg/changesets/api/transformer.js +24 -30
  10. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/formatting.cjs +4 -10
  11. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/formatting.js +4 -10
  12. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/getDependencyReleaseLine.cjs +13 -9
  13. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/getDependencyReleaseLine.js +13 -9
  14. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/getReleaseLine.cjs +8 -8
  15. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/getReleaseLine.js +8 -8
  16. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/index.cjs +1 -1
  17. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/index.js +1 -1
  18. package/packages/silk-effects/dist/dev/pkg/changesets/index.cjs +12 -2
  19. package/packages/silk-effects/dist/dev/pkg/changesets/index.js +9 -3
  20. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/deduplicate-items.cjs +11 -9
  21. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/deduplicate-items.js +11 -9
  22. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/maintenance-note.cjs +61 -0
  23. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/maintenance-note.js +61 -0
  24. package/packages/silk-effects/dist/dev/pkg/changesets/remark/presets.cjs +1 -1
  25. package/packages/silk-effects/dist/dev/pkg/changesets/remark/presets.js +1 -1
  26. package/packages/silk-effects/dist/dev/pkg/changesets/services/maintenance-reason.cjs +68 -0
  27. package/packages/silk-effects/dist/dev/pkg/changesets/services/maintenance-reason.js +66 -0
  28. package/packages/silk-effects/dist/dev/pkg/changesets/services/release-planner.cjs +75 -16
  29. package/packages/silk-effects/dist/dev/pkg/changesets/services/release-planner.js +76 -17
  30. package/tsconfig/node/dist/tsconfig.tsbuildinfo +1 -1
@@ -2,12 +2,8 @@ import remarkGfm from "../../../../../../../node_modules/.pnpm/remark-gfm@4.0.1/
2
2
  import remarkParse from "../../../../../../../node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.js";
3
3
  import remarkStringify from "../../../../../../../node_modules/.pnpm/remark-stringify@11.0.0/node_modules/remark-stringify/lib/index.js";
4
4
  import { unified } from "../../../../../../../node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.js";
5
- import { ContributorFootnotesPlugin } from "../remark/plugins/contributor-footnotes.js";
6
- import { DeduplicateItemsPlugin } from "../remark/plugins/deduplicate-items.js";
7
- import { IssueLinkRefsPlugin } from "../remark/plugins/issue-link-refs.js";
8
- import { MergeSectionsPlugin } from "../remark/plugins/merge-sections.js";
9
- import { NormalizeFormatPlugin } from "../remark/plugins/normalize-format.js";
10
- import { ReorderSectionsPlugin } from "../remark/plugins/reorder-sections.js";
5
+ import { MaintenanceNotePlugin } from "../remark/plugins/maintenance-note.js";
6
+ import { SilkChangesetTransformPreset } from "../remark/presets.js";
11
7
  import { readFileSync, writeFileSync } from "node:fs";
12
8
 
13
9
  //#region ../silk-effects/dist/dev/pkg/changesets/api/transformer.js
@@ -24,23 +20,13 @@ import { readFileSync, writeFileSync } from "node:fs";
24
20
  * Static class for post-processing CHANGELOG.md files.
25
21
  *
26
22
  * Implements the third layer of the three-layer pipeline by running
27
- * six remark transform plugins in a fixed order to clean up, normalize,
28
- * and enhance changelog output produced by the formatter layer.
23
+ * the {@link SilkChangesetTransformPreset} plugins (currently seven) in a
24
+ * fixed order to clean up, normalize, and enhance changelog output produced
25
+ * by the formatter layer.
29
26
  *
30
27
  * @remarks
31
- * The six plugins run in this order:
32
- *
33
- * 1. **MergeSectionsPlugin** -- merges duplicate section headings (e.g., two
34
- * "Features" sections from separate changesets are combined into one)
35
- * 2. **ReorderSectionsPlugin** -- reorders sections by category priority
36
- * (Breaking Changes first, Other last) using the {@link Categories} priority values
37
- * 3. **DeduplicateItemsPlugin** -- removes duplicate list items within a section
38
- * 4. **ContributorFootnotesPlugin** -- converts inline contributor mentions
39
- * into footnote references for cleaner formatting
40
- * 5. **IssueLinkRefsPlugin** -- converts inline issue/PR links into markdown
41
- * reference-style links collected at the bottom of the document
42
- * 6. **NormalizeFormatPlugin** -- applies consistent formatting (spacing,
43
- * trailing newlines, heading levels)
28
+ * See {@link SilkChangesetTransformPreset} for the ordered plugin list and
29
+ * the rationale behind each plugin's position.
44
30
  *
45
31
  * The transformer operates on the full CHANGELOG.md content (all versions),
46
32
  * not just the latest release block. It is idempotent -- running it multiple
@@ -100,20 +86,27 @@ var ChangelogTransformer = class ChangelogTransformer {
100
86
  /* v8 ignore next -- private constructor prevents direct instantiation */
101
87
  constructor() {}
102
88
  /**
103
- * Transform CHANGELOG markdown content by running all six transform plugins.
89
+ * Transform CHANGELOG markdown content by running the
90
+ * {@link SilkChangesetTransformPreset} plugins.
104
91
  *
105
92
  * @remarks
106
93
  * The input is parsed with `remark-parse` and `remark-gfm` (for table
107
- * support), processed through all six plugins in order, and stringified
108
- * back to markdown. The operation is synchronous and idempotent.
94
+ * support), processed through every plugin in {@link SilkChangesetTransformPreset}
95
+ * in order, and stringified back to markdown. The operation is synchronous
96
+ * and idempotent.
109
97
  *
110
98
  * @param content - Raw CHANGELOG markdown string (may contain multiple
111
99
  * version blocks, GFM tables, footnotes, and reference links)
112
- * @returns The transformed markdown string with sections merged, reordered,
113
- * deduplicated, and normalized
100
+ * @param options - Optional transformation options, including maintenance note configuration
101
+ * @returns The transformed markdown string with dependency tables aggregated,
102
+ * sections merged, reordered, deduplicated, and normalized
114
103
  */
115
- static transformContent(content) {
116
- const file = unified().use(remarkParse).use(remarkGfm).use(MergeSectionsPlugin).use(ReorderSectionsPlugin).use(DeduplicateItemsPlugin).use(ContributorFootnotesPlugin).use(IssueLinkRefsPlugin).use(NormalizeFormatPlugin).use(remarkStringify).processSync(content);
104
+ static transformContent(content, options) {
105
+ const processor = unified().use(remarkParse).use(remarkGfm);
106
+ for (const plugin of SilkChangesetTransformPreset) processor.use(plugin);
107
+ if (options?.maintenance) processor.use(MaintenanceNotePlugin, options.maintenance);
108
+ processor.use(remarkStringify);
109
+ const file = processor.processSync(content);
117
110
  return String(file);
118
111
  }
119
112
  /**
@@ -129,10 +122,11 @@ var ChangelogTransformer = class ChangelogTransformer {
129
122
  * when invoked without the `--dry-run` or `--check` flags.
130
123
  *
131
124
  * @param filePath - Absolute or relative path to the CHANGELOG.md file
125
+ * @param options - Optional transformation options, including maintenance note configuration
132
126
  */
133
- static transformFile(filePath) {
127
+ static transformFile(filePath, options) {
134
128
  const content = readFileSync(filePath, "utf-8");
135
- writeFileSync(filePath, ChangelogTransformer.transformContent(content), "utf-8");
129
+ writeFileSync(filePath, ChangelogTransformer.transformContent(content, options), "utf-8");
136
130
  }
137
131
  };
138
132
 
@@ -26,8 +26,8 @@ const ISSUE_CATEGORIES = [
26
26
  /**
27
27
  * Format a changelog entry into a markdown string with GitHub links.
28
28
  *
29
- * Produces a commit-link prefix (shortened to 7 characters) followed by the
30
- * summary text and any issue references, each rendered as GitHub links.
29
+ * Produces the summary text followed by any issue references, each
30
+ * rendered as GitHub links.
31
31
  *
32
32
  * @remarks
33
33
  * The output does **not** include a leading `- ` list marker — the caller
@@ -37,13 +37,11 @@ const ISSUE_CATEGORIES = [
37
37
  *
38
38
  * Output format examples:
39
39
  *
40
- * With commit: `[short-hash](commit-url) Summary text`
40
+ * Without issues: `Summary text`
41
41
  *
42
42
  * With issues: `Summary text` followed by `Closes: [#1](issue-url)`
43
43
  *
44
- * With both: `[short-hash](commit-url) Summary text` followed by `Fixes: [#2](issue-url)`
45
- *
46
- * @param entry - The changelog entry containing commit, summary, and issue data
44
+ * @param entry - The changelog entry containing summary and issue data
47
45
  * @param options - Must include `repo` in `owner/repo` format for link generation
48
46
  * @returns Formatted markdown string (without leading `- `)
49
47
  *
@@ -51,10 +49,6 @@ const ISSUE_CATEGORIES = [
51
49
  */
52
50
  function formatChangelogEntry(entry, options) {
53
51
  const parts = [];
54
- if (entry.commit) {
55
- const shortHash = entry.commit.substring(0, 7);
56
- parts.push(`[\`${shortHash}\`](https://github.com/${options.repo}/commit/${entry.commit})`);
57
- }
58
52
  parts.push(entry.summary.trim());
59
53
  const issueLinks = [];
60
54
  for (const { key, label } of ISSUE_CATEGORIES) {
@@ -26,8 +26,8 @@ const ISSUE_CATEGORIES = [
26
26
  /**
27
27
  * Format a changelog entry into a markdown string with GitHub links.
28
28
  *
29
- * Produces a commit-link prefix (shortened to 7 characters) followed by the
30
- * summary text and any issue references, each rendered as GitHub links.
29
+ * Produces the summary text followed by any issue references, each
30
+ * rendered as GitHub links.
31
31
  *
32
32
  * @remarks
33
33
  * The output does **not** include a leading `- ` list marker — the caller
@@ -37,13 +37,11 @@ const ISSUE_CATEGORIES = [
37
37
  *
38
38
  * Output format examples:
39
39
  *
40
- * With commit: `[short-hash](commit-url) Summary text`
40
+ * Without issues: `Summary text`
41
41
  *
42
42
  * With issues: `Summary text` followed by `Closes: [#1](issue-url)`
43
43
  *
44
- * With both: `[short-hash](commit-url) Summary text` followed by `Fixes: [#2](issue-url)`
45
- *
46
- * @param entry - The changelog entry containing commit, summary, and issue data
44
+ * @param entry - The changelog entry containing summary and issue data
47
45
  * @param options - Must include `repo` in `owner/repo` format for link generation
48
46
  * @returns Formatted markdown string (without leading `- `)
49
47
  *
@@ -51,10 +49,6 @@ const ISSUE_CATEGORIES = [
51
49
  */
52
50
  function formatChangelogEntry(entry, options) {
53
51
  const parts = [];
54
- if (entry.commit) {
55
- const shortHash = entry.commit.substring(0, 7);
56
- parts.push(`[\`${shortHash}\`](https://github.com/${options.repo}/commit/${entry.commit})`);
57
- }
58
52
  parts.push(entry.summary.trim());
59
53
  const issueLinks = [];
60
54
  for (const { key, label } of ISSUE_CATEGORIES) {
@@ -15,11 +15,14 @@ let effect = require("effect");
15
15
  * handles the "Updated dependencies" section that Changesets appends
16
16
  * when a package's dependencies are bumped as part of a release.
17
17
  *
18
- * The output is a GFM (GitHub Flavored Markdown) table with columns:
19
- * `Dependency`, `Type`, `Action`, `From`, `To`. The dependency type
20
- * is inferred from the consuming package's `package.json` fields
21
- * (`dependencies`, `devDependencies`, `peerDependencies`,
22
- * `optionalDependencies`) via the {@link inferDependencyType} helper.
18
+ * The output is a `### Dependencies` h3 heading followed by a GFM
19
+ * (GitHub Flavored Markdown) table with columns: `Dependency`, `Type`,
20
+ * `Action`, `From`, `To`. The dependency type is inferred from the
21
+ * consuming package's `package.json` fields (`dependencies`,
22
+ * `devDependencies`, `peerDependencies`, `optionalDependencies`) via
23
+ * the {@link inferDependencyType} helper. Downstream, the heading is
24
+ * consumed by `AggregateDependencyTablesPlugin`, which locates and
25
+ * merges per-package dependency tables during changelog assembly.
23
26
  *
24
27
  * ### Dependency type inference
25
28
  *
@@ -85,7 +88,8 @@ function inferDependencyType(dep) {
85
88
  * The function maps each `ModCompWithPackage` entry to a `DependencyTableRow`,
86
89
  * inferring the dependency type from the consuming package's `package.json`,
87
90
  * then delegates to `serializeDependencyTableToMarkdown` for GFM table
88
- * rendering. Returns an empty string when no dependencies were updated.
91
+ * rendering, prefixed with a `### Dependencies` heading. Returns an empty
92
+ * string when no dependencies were updated.
89
93
  *
90
94
  * The `_changesets` and `_options` parameters are part of the Changesets API
91
95
  * contract but are not used in the table format. They are retained for
@@ -94,19 +98,19 @@ function inferDependencyType(dep) {
94
98
  * @param _changesets - Changesets that caused the dependency updates (unused in table format)
95
99
  * @param dependenciesUpdated - The list of dependencies that were updated, including old/new versions
96
100
  * @param _options - Validated configuration options (unused in table format)
97
- * @returns An `Effect` that resolves to a formatted markdown table string, or empty string if no dependencies were updated
101
+ * @returns An `Effect` that resolves to a `### Dependencies` heading followed by a formatted markdown table string, or empty string if no dependencies were updated
98
102
  */
99
103
  function getDependencyReleaseLine(_changesets, dependenciesUpdated, _options) {
100
104
  return effect.Effect.gen(function* () {
101
105
  if (dependenciesUpdated.length === 0) return "";
102
106
  yield* require_github.GitHubService;
103
- return require_dependency_table.serializeDependencyTableToMarkdown(dependenciesUpdated.map((dep) => ({
107
+ return `### Dependencies\n\n${require_dependency_table.serializeDependencyTableToMarkdown(dependenciesUpdated.map((dep) => ({
104
108
  dependency: dep.name,
105
109
  type: inferDependencyType(dep),
106
110
  action: "updated",
107
111
  from: dep.oldVersion,
108
112
  to: dep.newVersion
109
- })));
113
+ })))}`;
110
114
  });
111
115
  }
112
116
 
@@ -15,11 +15,14 @@ import { Effect } from "effect";
15
15
  * handles the "Updated dependencies" section that Changesets appends
16
16
  * when a package's dependencies are bumped as part of a release.
17
17
  *
18
- * The output is a GFM (GitHub Flavored Markdown) table with columns:
19
- * `Dependency`, `Type`, `Action`, `From`, `To`. The dependency type
20
- * is inferred from the consuming package's `package.json` fields
21
- * (`dependencies`, `devDependencies`, `peerDependencies`,
22
- * `optionalDependencies`) via the {@link inferDependencyType} helper.
18
+ * The output is a `### Dependencies` h3 heading followed by a GFM
19
+ * (GitHub Flavored Markdown) table with columns: `Dependency`, `Type`,
20
+ * `Action`, `From`, `To`. The dependency type is inferred from the
21
+ * consuming package's `package.json` fields (`dependencies`,
22
+ * `devDependencies`, `peerDependencies`, `optionalDependencies`) via
23
+ * the {@link inferDependencyType} helper. Downstream, the heading is
24
+ * consumed by `AggregateDependencyTablesPlugin`, which locates and
25
+ * merges per-package dependency tables during changelog assembly.
23
26
  *
24
27
  * ### Dependency type inference
25
28
  *
@@ -85,7 +88,8 @@ function inferDependencyType(dep) {
85
88
  * The function maps each `ModCompWithPackage` entry to a `DependencyTableRow`,
86
89
  * inferring the dependency type from the consuming package's `package.json`,
87
90
  * then delegates to `serializeDependencyTableToMarkdown` for GFM table
88
- * rendering. Returns an empty string when no dependencies were updated.
91
+ * rendering, prefixed with a `### Dependencies` heading. Returns an empty
92
+ * string when no dependencies were updated.
89
93
  *
90
94
  * The `_changesets` and `_options` parameters are part of the Changesets API
91
95
  * contract but are not used in the table format. They are retained for
@@ -94,19 +98,19 @@ function inferDependencyType(dep) {
94
98
  * @param _changesets - Changesets that caused the dependency updates (unused in table format)
95
99
  * @param dependenciesUpdated - The list of dependencies that were updated, including old/new versions
96
100
  * @param _options - Validated configuration options (unused in table format)
97
- * @returns An `Effect` that resolves to a formatted markdown table string, or empty string if no dependencies were updated
101
+ * @returns An `Effect` that resolves to a `### Dependencies` heading followed by a formatted markdown table string, or empty string if no dependencies were updated
98
102
  */
99
103
  function getDependencyReleaseLine(_changesets, dependenciesUpdated, _options) {
100
104
  return Effect.gen(function* () {
101
105
  if (dependenciesUpdated.length === 0) return "";
102
106
  yield* GitHubService;
103
- return serializeDependencyTableToMarkdown(dependenciesUpdated.map((dep) => ({
107
+ return `### Dependencies\n\n${serializeDependencyTableToMarkdown(dependenciesUpdated.map((dep) => ({
104
108
  dependency: dep.name,
105
109
  type: inferDependencyType(dep),
106
110
  action: "updated",
107
111
  from: dep.oldVersion,
108
112
  to: dep.newVersion
109
- })));
113
+ })))}`;
110
114
  });
111
115
  }
112
116
 
@@ -21,7 +21,7 @@ let effect = require("effect");
21
21
  *
22
22
  * 1. **Section-aware changesets** — When the changeset summary contains h2
23
23
  * headings (e.g., `## Features`, `## Bug Fixes`), each section is rendered
24
- * as an h3 heading with commit-linked list items beneath it. This mode
24
+ * as an h3 heading with list items beneath it. This mode
25
25
  * produces multi-line output suitable for rich changelogs.
26
26
  *
27
27
  * 2. **Flat-text changesets** — When the summary is plain text without section
@@ -31,7 +31,6 @@ let effect = require("effect");
31
31
  *
32
32
  * In both modes, the formatter:
33
33
  * - Fetches GitHub metadata (PR number, author) via {@link GitHubService}
34
- * - Generates shortened commit hash links (`[abc1234](...)`)
35
34
  * - Extracts and renders issue references (Closes, Fixes, Refs)
36
35
  * - Appends PR and user attribution when available
37
36
  *
@@ -62,7 +61,7 @@ let effect = require("effect");
62
61
  * `Fixes #N`, and `Refs #N` patterns.
63
62
  * 5. **Build attribution** — Format PR link and user credit from GitHub info.
64
63
  * 6. **Section-aware output** — If sections were found, render each as an
65
- * h3 heading with commit-linked list items.
64
+ * h3 heading with list items.
66
65
  * 7. **Flat-text fallback** — Otherwise, produce a single `- entry` line
67
66
  * with the resolved category heading.
68
67
  *
@@ -96,14 +95,16 @@ function getReleaseLine(changeset, versionType, options) {
96
95
  for (const section of parsed.sections) {
97
96
  lines.push(`### ${section.category.heading}`);
98
97
  lines.push("");
99
- const commitPrefix = changeset.commit ? `[\`${changeset.commit.substring(0, 7)}\`](https://github.com/${options.repo}/commit/${changeset.commit}) ` : "";
100
98
  if (section.content) {
101
99
  const contentLines = section.content.split("\n");
102
100
  const firstContentLine = contentLines[0];
103
101
  if (firstContentLine.startsWith("- ") || firstContentLine.startsWith("* ")) {
104
- lines.push(`${firstContentLine.substring(0, 2)}${commitPrefix}${firstContentLine.substring(2)}`);
102
+ lines.push(firstContentLine);
105
103
  lines.push(...contentLines.slice(1));
106
- } else lines.push(`- ${commitPrefix}${section.content}`);
104
+ } else {
105
+ lines.push(`- ${firstContentLine}`);
106
+ lines.push(...contentLines.slice(1).map((line) => line.length > 0 ? ` ${line}` : line));
107
+ }
107
108
  }
108
109
  lines.push("");
109
110
  }
@@ -112,8 +113,7 @@ function getReleaseLine(changeset, versionType, options) {
112
113
  return `- ${require_formatting.formatChangelogEntry({
113
114
  type: require_index.resolveCommitType(commitMsg.type ?? versionType, commitMsg.scope, commitMsg.breaking).heading,
114
115
  summary: changeset.summary,
115
- issues: issueRefs,
116
- ...changeset.commit ? { commit: changeset.commit } : {}
116
+ issues: issueRefs
117
117
  }, { repo: options.repo })}${attribution}`;
118
118
  });
119
119
  }
@@ -21,7 +21,7 @@ import { Effect, Schema } from "effect";
21
21
  *
22
22
  * 1. **Section-aware changesets** — When the changeset summary contains h2
23
23
  * headings (e.g., `## Features`, `## Bug Fixes`), each section is rendered
24
- * as an h3 heading with commit-linked list items beneath it. This mode
24
+ * as an h3 heading with list items beneath it. This mode
25
25
  * produces multi-line output suitable for rich changelogs.
26
26
  *
27
27
  * 2. **Flat-text changesets** — When the summary is plain text without section
@@ -31,7 +31,6 @@ import { Effect, Schema } from "effect";
31
31
  *
32
32
  * In both modes, the formatter:
33
33
  * - Fetches GitHub metadata (PR number, author) via {@link GitHubService}
34
- * - Generates shortened commit hash links (`[abc1234](...)`)
35
34
  * - Extracts and renders issue references (Closes, Fixes, Refs)
36
35
  * - Appends PR and user attribution when available
37
36
  *
@@ -62,7 +61,7 @@ import { Effect, Schema } from "effect";
62
61
  * `Fixes #N`, and `Refs #N` patterns.
63
62
  * 5. **Build attribution** — Format PR link and user credit from GitHub info.
64
63
  * 6. **Section-aware output** — If sections were found, render each as an
65
- * h3 heading with commit-linked list items.
64
+ * h3 heading with list items.
66
65
  * 7. **Flat-text fallback** — Otherwise, produce a single `- entry` line
67
66
  * with the resolved category heading.
68
67
  *
@@ -96,14 +95,16 @@ function getReleaseLine(changeset, versionType, options) {
96
95
  for (const section of parsed.sections) {
97
96
  lines.push(`### ${section.category.heading}`);
98
97
  lines.push("");
99
- const commitPrefix = changeset.commit ? `[\`${changeset.commit.substring(0, 7)}\`](https://github.com/${options.repo}/commit/${changeset.commit}) ` : "";
100
98
  if (section.content) {
101
99
  const contentLines = section.content.split("\n");
102
100
  const firstContentLine = contentLines[0];
103
101
  if (firstContentLine.startsWith("- ") || firstContentLine.startsWith("* ")) {
104
- lines.push(`${firstContentLine.substring(0, 2)}${commitPrefix}${firstContentLine.substring(2)}`);
102
+ lines.push(firstContentLine);
105
103
  lines.push(...contentLines.slice(1));
106
- } else lines.push(`- ${commitPrefix}${section.content}`);
104
+ } else {
105
+ lines.push(`- ${firstContentLine}`);
106
+ lines.push(...contentLines.slice(1).map((line) => line.length > 0 ? ` ${line}` : line));
107
+ }
107
108
  }
108
109
  lines.push("");
109
110
  }
@@ -112,8 +113,7 @@ function getReleaseLine(changeset, versionType, options) {
112
113
  return `- ${formatChangelogEntry({
113
114
  type: resolveCommitType(commitMsg.type ?? versionType, commitMsg.scope, commitMsg.breaking).heading,
114
115
  summary: changeset.summary,
115
- issues: issueRefs,
116
- ...changeset.commit ? { commit: changeset.commit } : {}
116
+ issues: issueRefs
117
117
  }, { repo: options.repo })}${attribution}`;
118
118
  });
119
119
  }
@@ -40,7 +40,7 @@ let effect = require("effect");
40
40
  * config is decoded through `ChangesetOptionsSchema`.
41
41
  * 2. **Release line formatting** — each changeset is formatted by
42
42
  * `getReleaseLine`, which resolves GitHub metadata, parses sections,
43
- * and produces structured markdown with commit links and attribution.
43
+ * and produces structured markdown with attribution.
44
44
  * 3. **Dependency table formatting** — bulk dependency updates are
45
45
  * formatted by `getDependencyReleaseLine` into a markdown table.
46
46
  *
@@ -40,7 +40,7 @@ import { Effect, Layer } from "effect";
40
40
  * config is decoded through `ChangesetOptionsSchema`.
41
41
  * 2. **Release line formatting** — each changeset is formatted by
42
42
  * `getReleaseLine`, which resolves GitHub metadata, parses sections,
43
- * and produces structured markdown with commit links and attribution.
43
+ * and produces structured markdown with attribution.
44
44
  * 3. **Dependency table formatting** — bulk dependency updates are
45
45
  * formatted by `getDependencyReleaseLine` into a markdown table.
46
46
  *
@@ -19,12 +19,15 @@ const require_heading_hierarchy = require('./remark/rules/heading-hierarchy.cjs'
19
19
  const require_required_sections = require('./remark/rules/required-sections.cjs');
20
20
  const require_uncategorized_content = require('./remark/rules/uncategorized-content.cjs');
21
21
  const require_linter = require('./api/linter.cjs');
22
+ const require_maintenance_note = require('./remark/plugins/maintenance-note.cjs');
23
+ const require_aggregate_dependency_tables = require('./remark/plugins/aggregate-dependency-tables.cjs');
22
24
  const require_contributor_footnotes = require('./remark/plugins/contributor-footnotes.cjs');
23
25
  const require_deduplicate_items = require('./remark/plugins/deduplicate-items.cjs');
24
26
  const require_issue_link_refs = require('./remark/plugins/issue-link-refs.cjs');
25
27
  const require_merge_sections = require('./remark/plugins/merge-sections.cjs');
26
28
  const require_normalize_format = require('./remark/plugins/normalize-format.cjs');
27
29
  const require_reorder_sections = require('./remark/plugins/reorder-sections.cjs');
30
+ const require_presets = require('./remark/presets.cjs');
28
31
  const require_transformer = require('./api/transformer.cjs');
29
32
  const require_config_inspector = require('./services/config-inspector.cjs');
30
33
  const require_branch_analyzer = require('./services/branch-analyzer.cjs');
@@ -33,6 +36,7 @@ const require_dep_diff = require('./utils/dep-diff.cjs');
33
36
  const require_git = require('./utils/git.cjs');
34
37
  const require_publishability = require('./utils/publishability.cjs');
35
38
  const require_deps_regen = require('./services/deps-regen.cjs');
39
+ const require_maintenance_reason = require('./services/maintenance-reason.cjs');
36
40
  const require_version_files$1 = require('./utils/version-files.cjs');
37
41
  const require_release_planner = require('./services/release-planner.cjs');
38
42
  const require_types = require('./categories/types.cjs');
@@ -45,8 +49,6 @@ const require_heading_hierarchy$1 = require('./markdownlint/rules/heading-hierar
45
49
  const require_required_sections$1 = require('./markdownlint/rules/required-sections.cjs');
46
50
  const require_uncategorized_content$1 = require('./markdownlint/rules/uncategorized-content.cjs');
47
51
  const require_index$1 = require('./markdownlint/index.cjs');
48
- const require_aggregate_dependency_tables = require('./remark/plugins/aggregate-dependency-tables.cjs');
49
- const require_presets = require('./remark/presets.cjs');
50
52
 
51
53
  //#region ../silk-effects/dist/dev/pkg/changesets/index.js
52
54
  var changesets_exports = /* @__PURE__ */ require_runtime.__exportAll({
@@ -113,6 +115,9 @@ var changesets_exports = /* @__PURE__ */ require_runtime.__exportAll({
113
115
  JsonPathSchema: () => require_version_files.JsonPathSchema,
114
116
  LegacyVersionFileConfigSchema: () => require_version_files.LegacyVersionFileConfigSchema,
115
117
  LegacyVersionFilesSchema: () => require_version_files.LegacyVersionFilesSchema,
118
+ MaintenanceNotePlugin: () => require_maintenance_note.MaintenanceNotePlugin,
119
+ MaintenanceReasonSchema: () => require_maintenance_reason.MaintenanceReasonSchema,
120
+ MaintenanceTriggerSchema: () => require_maintenance_reason.MaintenanceTriggerSchema,
116
121
  MarkdownLive: () => require_markdown.MarkdownLive,
117
122
  MarkdownParseError: () => require_errors.MarkdownParseError,
118
123
  MarkdownParseErrorBase: () => require_errors.MarkdownParseErrorBase,
@@ -159,6 +164,7 @@ var changesets_exports = /* @__PURE__ */ require_runtime.__exportAll({
159
164
  VersionTypeSchema: () => require_git$1.VersionTypeSchema,
160
165
  changelogFunctions: () => require_index.default,
161
166
  computeWorkspaceDependencyDiffs: () => require_dep_diff.computeWorkspaceDependencyDiffs,
167
+ deriveMaintenanceReason: () => require_maintenance_reason.deriveMaintenanceReason,
162
168
  gitMergeBase: () => require_git.gitMergeBase,
163
169
  isPureDependencyChangeset: () => require_deps_regen.isPureDependencyChangeset,
164
170
  listPublishablePackageNames: () => require_publishability.listPublishablePackageNames,
@@ -233,6 +239,9 @@ exports.IssueNumberSchema = require_github$1.IssueNumberSchema;
233
239
  exports.JsonPathSchema = require_version_files.JsonPathSchema;
234
240
  exports.LegacyVersionFileConfigSchema = require_version_files.LegacyVersionFileConfigSchema;
235
241
  exports.LegacyVersionFilesSchema = require_version_files.LegacyVersionFilesSchema;
242
+ exports.MaintenanceNotePlugin = require_maintenance_note.MaintenanceNotePlugin;
243
+ exports.MaintenanceReasonSchema = require_maintenance_reason.MaintenanceReasonSchema;
244
+ exports.MaintenanceTriggerSchema = require_maintenance_reason.MaintenanceTriggerSchema;
236
245
  exports.MarkdownLive = require_markdown.MarkdownLive;
237
246
  exports.MarkdownParseError = require_errors.MarkdownParseError;
238
247
  exports.MarkdownParseErrorBase = require_errors.MarkdownParseErrorBase;
@@ -280,6 +289,7 @@ exports.VersionTypeSchema = require_git$1.VersionTypeSchema;
280
289
  exports.changelogFunctions = require_index.default;
281
290
  exports.changesets_exports = changesets_exports;
282
291
  exports.computeWorkspaceDependencyDiffs = require_dep_diff.computeWorkspaceDependencyDiffs;
292
+ exports.deriveMaintenanceReason = require_maintenance_reason.deriveMaintenanceReason;
283
293
  exports.gitMergeBase = require_git.gitMergeBase;
284
294
  exports.isPureDependencyChangeset = require_deps_regen.isPureDependencyChangeset;
285
295
  exports.listPublishablePackageNames = require_publishability.listPublishablePackageNames;
@@ -19,12 +19,15 @@ import { HeadingHierarchyRule } from "./remark/rules/heading-hierarchy.js";
19
19
  import { RequiredSectionsRule } from "./remark/rules/required-sections.js";
20
20
  import { UncategorizedContentRule } from "./remark/rules/uncategorized-content.js";
21
21
  import { ChangesetLinter } from "./api/linter.js";
22
+ import { MaintenanceNotePlugin } from "./remark/plugins/maintenance-note.js";
23
+ import { AggregateDependencyTablesPlugin } from "./remark/plugins/aggregate-dependency-tables.js";
22
24
  import { ContributorFootnotesPlugin } from "./remark/plugins/contributor-footnotes.js";
23
25
  import { DeduplicateItemsPlugin } from "./remark/plugins/deduplicate-items.js";
24
26
  import { IssueLinkRefsPlugin } from "./remark/plugins/issue-link-refs.js";
25
27
  import { MergeSectionsPlugin } from "./remark/plugins/merge-sections.js";
26
28
  import { NormalizeFormatPlugin } from "./remark/plugins/normalize-format.js";
27
29
  import { ReorderSectionsPlugin } from "./remark/plugins/reorder-sections.js";
30
+ import { SilkChangesetPreset, SilkChangesetTransformPreset } from "./remark/presets.js";
28
31
  import { ChangelogTransformer } from "./api/transformer.js";
29
32
  import { ClassificationReasonSchema, ClassificationSchema, ConfigInspector, ConfigInspectorBase, ConfigInspectorLive, InspectedConfigSchema, ResolvedPackageScopeSchema, ResolvedVersionFileSchema, makeConfigInspectorTest } from "./services/config-inspector.js";
30
33
  import { BranchAnalysisSchema, BranchAnalyzer, BranchAnalyzerBase, BranchAnalyzerLive, BranchFileEntrySchema, FileStatusSchema, makeBranchAnalyzerTest } from "./services/branch-analyzer.js";
@@ -33,6 +36,7 @@ import { computeWorkspaceDependencyDiffs } from "./utils/dep-diff.js";
33
36
  import { gitMergeBase } from "./utils/git.js";
34
37
  import { listPublishablePackageNames } from "./utils/publishability.js";
35
38
  import { DepsRegen, DepsRegenBase, DepsRegenDefault, DepsRegenLive, isPureDependencyChangeset } from "./services/deps-regen.js";
39
+ import { MaintenanceReasonSchema, MaintenanceTriggerSchema, deriveMaintenanceReason } from "./services/maintenance-reason.js";
36
40
  import { VersionFiles } from "./utils/version-files.js";
37
41
  import { ReleasePlanner, ReleasePlannerBase, ReleasePlannerLive, makeReleasePlannerTest } from "./services/release-planner.js";
38
42
  import { SectionCategorySchema } from "./categories/types.js";
@@ -45,8 +49,6 @@ import { HeadingHierarchyRule as HeadingHierarchyRule$1 } from "./markdownlint/r
45
49
  import { RequiredSectionsRule as RequiredSectionsRule$1 } from "./markdownlint/rules/required-sections.js";
46
50
  import { UncategorizedContentRule as UncategorizedContentRule$1 } from "./markdownlint/rules/uncategorized-content.js";
47
51
  import SilkChangesetsRules from "./markdownlint/index.js";
48
- import { AggregateDependencyTablesPlugin } from "./remark/plugins/aggregate-dependency-tables.js";
49
- import { SilkChangesetPreset, SilkChangesetTransformPreset } from "./remark/presets.js";
50
52
 
51
53
  //#region ../silk-effects/dist/dev/pkg/changesets/index.js
52
54
  var changesets_exports = /* @__PURE__ */ __exportAll({
@@ -113,6 +115,9 @@ var changesets_exports = /* @__PURE__ */ __exportAll({
113
115
  JsonPathSchema: () => JsonPathSchema,
114
116
  LegacyVersionFileConfigSchema: () => LegacyVersionFileConfigSchema,
115
117
  LegacyVersionFilesSchema: () => LegacyVersionFilesSchema,
118
+ MaintenanceNotePlugin: () => MaintenanceNotePlugin,
119
+ MaintenanceReasonSchema: () => MaintenanceReasonSchema,
120
+ MaintenanceTriggerSchema: () => MaintenanceTriggerSchema,
116
121
  MarkdownLive: () => MarkdownLive,
117
122
  MarkdownParseError: () => MarkdownParseError,
118
123
  MarkdownParseErrorBase: () => MarkdownParseErrorBase,
@@ -159,6 +164,7 @@ var changesets_exports = /* @__PURE__ */ __exportAll({
159
164
  VersionTypeSchema: () => VersionTypeSchema,
160
165
  changelogFunctions: () => changelogFunctions,
161
166
  computeWorkspaceDependencyDiffs: () => computeWorkspaceDependencyDiffs,
167
+ deriveMaintenanceReason: () => deriveMaintenanceReason,
162
168
  gitMergeBase: () => gitMergeBase,
163
169
  isPureDependencyChangeset: () => isPureDependencyChangeset,
164
170
  listPublishablePackageNames: () => listPublishablePackageNames,
@@ -170,4 +176,4 @@ var changesets_exports = /* @__PURE__ */ __exportAll({
170
176
  });
171
177
 
172
178
  //#endregion
173
- export { AggregateDependencyTablesPlugin, AppliedReleaseEntrySchema, AppliedReleaseSchema, BranchAnalysisSchema, BranchAnalyzer, BranchAnalyzerBase, BranchAnalyzerLive, BranchFileEntrySchema, BumpTypeSchema, Categories, Changelog, ChangelogService, ChangelogServiceBase, ChangelogTransformer, ChangesetIOError, ChangesetIOErrorBase, ChangesetLinter, ChangesetOptionsSchema, ChangesetPreviewSchema, ChangesetSchema, ChangesetSummarySchema, ChangesetValidationError, ChangesetValidationErrorBase, ClassificationReasonSchema, ClassificationSchema, CommitHashSchema, ConfigInspector, ConfigInspectorBase, ConfigInspectorLive, ConfigurationError, ConfigurationErrorBase, ContentStructureRule, ContributorFootnotesPlugin, DeduplicateItemsPlugin, DependencyActionSchema, DependencyTable, DependencyTableFormatRule, DependencyTableRowSchema, DependencyTableSchema, DependencyTableTypeSchema, DependencyTypeSchema, DependencyUpdateSchema, DepsRegen, DepsRegenBase, DepsRegenDefault, DepsRegenLive, FileStatusSchema, GitError, GitErrorBase, GitHubApiError, GitHubApiErrorBase, GitHubInfoSchema, GitHubLive, GitHubService, GitHubServiceBase, GlobSchema, HeadingHierarchyRule, InspectedConfigSchema, IssueLinkRefsPlugin, IssueNumberSchema, JsonPathSchema, LegacyVersionFileConfigSchema, LegacyVersionFilesSchema, MarkdownLive, MarkdownParseError, MarkdownParseErrorBase, MarkdownService, MarkdownServiceBase, ContentStructureRule$1 as MarkdownlintContentStructureRule, DependencyTableFormatRule$1 as MarkdownlintDependencyTableFormatRule, HeadingHierarchyRule$1 as MarkdownlintHeadingHierarchyRule, RequiredSectionsRule$1 as MarkdownlintRequiredSectionsRule, UncategorizedContentRule$1 as MarkdownlintUncategorizedContentRule, MergeSectionsPlugin, NonEmptyString, NormalizeFormatPlugin, PackageScopeSchema, PackagesRecordSchema, PendingChangesetSchema, PositiveInteger, PreviewReleaseSchema, ReleasePlanError, ReleasePlanErrorBase, ReleasePlanner, ReleasePlannerBase, ReleasePlannerLive, ReorderSectionsPlugin, RepoSchema, RequiredSectionsRule, ResolvedPackageScopeSchema, ResolvedVersionFileSchema, SectionCategorySchema, SilkChangesetPreset, SilkChangesetTransformPreset, SilkChangesetsRules, UncategorizedContentRule, UrlOrMarkdownLinkSchema, UsernameSchema, VERSION_RE, VersionFileConfigSchema, VersionFileError, VersionFileErrorBase, VersionFileUpdateRecordSchema, VersionFiles, VersionFilesSchema, VersionOrEmptySchema, VersionTypeSchema, changelogFunctions, changesets_exports, computeWorkspaceDependencyDiffs, gitMergeBase, isPureDependencyChangeset, listPublishablePackageNames, makeBranchAnalyzerTest, makeConfigInspectorTest, makeGitHubTest, makeReleasePlannerTest, serializeDependencyTableToMarkdown };
179
+ export { AggregateDependencyTablesPlugin, AppliedReleaseEntrySchema, AppliedReleaseSchema, BranchAnalysisSchema, BranchAnalyzer, BranchAnalyzerBase, BranchAnalyzerLive, BranchFileEntrySchema, BumpTypeSchema, Categories, Changelog, ChangelogService, ChangelogServiceBase, ChangelogTransformer, ChangesetIOError, ChangesetIOErrorBase, ChangesetLinter, ChangesetOptionsSchema, ChangesetPreviewSchema, ChangesetSchema, ChangesetSummarySchema, ChangesetValidationError, ChangesetValidationErrorBase, ClassificationReasonSchema, ClassificationSchema, CommitHashSchema, ConfigInspector, ConfigInspectorBase, ConfigInspectorLive, ConfigurationError, ConfigurationErrorBase, ContentStructureRule, ContributorFootnotesPlugin, DeduplicateItemsPlugin, DependencyActionSchema, DependencyTable, DependencyTableFormatRule, DependencyTableRowSchema, DependencyTableSchema, DependencyTableTypeSchema, DependencyTypeSchema, DependencyUpdateSchema, DepsRegen, DepsRegenBase, DepsRegenDefault, DepsRegenLive, FileStatusSchema, GitError, GitErrorBase, GitHubApiError, GitHubApiErrorBase, GitHubInfoSchema, GitHubLive, GitHubService, GitHubServiceBase, GlobSchema, HeadingHierarchyRule, InspectedConfigSchema, IssueLinkRefsPlugin, IssueNumberSchema, JsonPathSchema, LegacyVersionFileConfigSchema, LegacyVersionFilesSchema, MaintenanceNotePlugin, MaintenanceReasonSchema, MaintenanceTriggerSchema, MarkdownLive, MarkdownParseError, MarkdownParseErrorBase, MarkdownService, MarkdownServiceBase, ContentStructureRule$1 as MarkdownlintContentStructureRule, DependencyTableFormatRule$1 as MarkdownlintDependencyTableFormatRule, HeadingHierarchyRule$1 as MarkdownlintHeadingHierarchyRule, RequiredSectionsRule$1 as MarkdownlintRequiredSectionsRule, UncategorizedContentRule$1 as MarkdownlintUncategorizedContentRule, MergeSectionsPlugin, NonEmptyString, NormalizeFormatPlugin, PackageScopeSchema, PackagesRecordSchema, PendingChangesetSchema, PositiveInteger, PreviewReleaseSchema, ReleasePlanError, ReleasePlanErrorBase, ReleasePlanner, ReleasePlannerBase, ReleasePlannerLive, ReorderSectionsPlugin, RepoSchema, RequiredSectionsRule, ResolvedPackageScopeSchema, ResolvedVersionFileSchema, SectionCategorySchema, SilkChangesetPreset, SilkChangesetTransformPreset, SilkChangesetsRules, UncategorizedContentRule, UrlOrMarkdownLinkSchema, UsernameSchema, VERSION_RE, VersionFileConfigSchema, VersionFileError, VersionFileErrorBase, VersionFileUpdateRecordSchema, VersionFiles, VersionFilesSchema, VersionOrEmptySchema, VersionTypeSchema, changelogFunctions, changesets_exports, computeWorkspaceDependencyDiffs, deriveMaintenanceReason, gitMergeBase, isPureDependencyChangeset, listPublishablePackageNames, makeBranchAnalyzerTest, makeConfigInspectorTest, makeGitHubTest, makeReleasePlannerTest, serializeDependencyTableToMarkdown };
@@ -7,16 +7,18 @@ const DeduplicateItemsPlugin = () => {
7
7
  const blocks = require_version_blocks.getVersionBlocks(tree);
8
8
  for (const block of blocks) {
9
9
  const sections = require_version_blocks.getBlockSections(tree, block);
10
- for (const section of sections) for (const node of section.contentNodes) {
11
- if (node.type !== "list") continue;
12
- const list = node;
10
+ for (const section of sections) {
13
11
  const seen = /* @__PURE__ */ new Set();
14
- list.children = list.children.filter((item) => {
15
- const text = require_index.toString(item);
16
- if (seen.has(text)) return false;
17
- seen.add(text);
18
- return true;
19
- });
12
+ for (const node of section.contentNodes) {
13
+ if (node.type !== "list") continue;
14
+ const list = node;
15
+ list.children = list.children.filter((item) => {
16
+ const text = require_index.toString(item);
17
+ if (seen.has(text)) return false;
18
+ seen.add(text);
19
+ return true;
20
+ });
21
+ }
20
22
  }
21
23
  }
22
24
  tree.children = tree.children.filter((node) => {
@@ -7,16 +7,18 @@ const DeduplicateItemsPlugin = () => {
7
7
  const blocks = getVersionBlocks(tree);
8
8
  for (const block of blocks) {
9
9
  const sections = getBlockSections(tree, block);
10
- for (const section of sections) for (const node of section.contentNodes) {
11
- if (node.type !== "list") continue;
12
- const list = node;
10
+ for (const section of sections) {
13
11
  const seen = /* @__PURE__ */ new Set();
14
- list.children = list.children.filter((item) => {
15
- const text = toString(item);
16
- if (seen.has(text)) return false;
17
- seen.add(text);
18
- return true;
19
- });
12
+ for (const node of section.contentNodes) {
13
+ if (node.type !== "list") continue;
14
+ const list = node;
15
+ list.children = list.children.filter((item) => {
16
+ const text = toString(item);
17
+ if (seen.has(text)) return false;
18
+ seen.add(text);
19
+ return true;
20
+ });
21
+ }
20
22
  }
21
23
  }
22
24
  tree.children = tree.children.filter((node) => {