@savvy-web/silk 1.3.11 → 2.1.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.
Files changed (159) hide show
  1. package/README.md +7 -5
  2. package/changesets-changelog.cjs +39298 -96760
  3. package/changesets-changelog.d.cts +24 -14
  4. package/changesets-changelog.d.ts +24 -14
  5. package/changesets-changelog.js +54057 -1
  6. package/changesets-markdownlint.cjs +39295 -96757
  7. package/changesets-markdownlint.d.cts +24 -14
  8. package/changesets-markdownlint.d.ts +24 -14
  9. package/changesets-markdownlint.js +54057 -1
  10. package/package.json +6 -5
  11. package/tsconfig/node/dist/tsconfig.tsbuildinfo +1 -1
  12. package/_virtual/_rolldown/runtime.cjs +0 -45
  13. package/_virtual/_rolldown/runtime.js +0 -45
  14. package/packages/silk-effects/dist/dev/pkg/_virtual/_rolldown/runtime.cjs +0 -15
  15. package/packages/silk-effects/dist/dev/pkg/_virtual/_rolldown/runtime.js +0 -14
  16. package/packages/silk-effects/dist/dev/pkg/changesets/api/categories.cjs +0 -247
  17. package/packages/silk-effects/dist/dev/pkg/changesets/api/categories.js +0 -247
  18. package/packages/silk-effects/dist/dev/pkg/changesets/api/changelog.cjs +0 -134
  19. package/packages/silk-effects/dist/dev/pkg/changesets/api/changelog.js +0 -134
  20. package/packages/silk-effects/dist/dev/pkg/changesets/api/dependency-table.cjs +0 -163
  21. package/packages/silk-effects/dist/dev/pkg/changesets/api/dependency-table.js +0 -163
  22. package/packages/silk-effects/dist/dev/pkg/changesets/api/linter.cjs +0 -170
  23. package/packages/silk-effects/dist/dev/pkg/changesets/api/linter.js +0 -170
  24. package/packages/silk-effects/dist/dev/pkg/changesets/api/transformer.cjs +0 -134
  25. package/packages/silk-effects/dist/dev/pkg/changesets/api/transformer.js +0 -134
  26. package/packages/silk-effects/dist/dev/pkg/changesets/categories/index.cjs +0 -317
  27. package/packages/silk-effects/dist/dev/pkg/changesets/categories/index.js +0 -299
  28. package/packages/silk-effects/dist/dev/pkg/changesets/categories/types.cjs +0 -65
  29. package/packages/silk-effects/dist/dev/pkg/changesets/categories/types.js +0 -65
  30. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/formatting.cjs +0 -114
  31. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/formatting.js +0 -113
  32. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/getDependencyReleaseLine.cjs +0 -118
  33. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/getDependencyReleaseLine.js +0 -118
  34. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/getReleaseLine.cjs +0 -122
  35. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/getReleaseLine.js +0 -122
  36. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/index.cjs +0 -97
  37. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/index.js +0 -97
  38. package/packages/silk-effects/dist/dev/pkg/changesets/constants.cjs +0 -43
  39. package/packages/silk-effects/dist/dev/pkg/changesets/constants.js +0 -42
  40. package/packages/silk-effects/dist/dev/pkg/changesets/errors.cjs +0 -386
  41. package/packages/silk-effects/dist/dev/pkg/changesets/errors.js +0 -371
  42. package/packages/silk-effects/dist/dev/pkg/changesets/index.cjs +0 -300
  43. package/packages/silk-effects/dist/dev/pkg/changesets/index.js +0 -179
  44. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/index.cjs +0 -34
  45. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/index.js +0 -29
  46. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/content-structure.cjs +0 -98
  47. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/content-structure.js +0 -98
  48. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/dependency-table-format.cjs +0 -170
  49. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/dependency-table-format.js +0 -170
  50. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/heading-hierarchy.cjs +0 -61
  51. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/heading-hierarchy.js +0 -61
  52. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/required-sections.cjs +0 -54
  53. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/required-sections.js +0 -54
  54. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/uncategorized-content.cjs +0 -54
  55. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/uncategorized-content.js +0 -54
  56. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/utils.cjs +0 -31
  57. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/utils.js +0 -30
  58. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/aggregate-dependency-tables.cjs +0 -47
  59. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/aggregate-dependency-tables.js +0 -47
  60. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/contributor-footnotes.cjs +0 -123
  61. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/contributor-footnotes.js +0 -123
  62. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/deduplicate-items.cjs +0 -32
  63. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/deduplicate-items.js +0 -32
  64. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/issue-link-refs.cjs +0 -59
  65. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/issue-link-refs.js +0 -59
  66. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/maintenance-note.cjs +0 -61
  67. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/maintenance-note.js +0 -61
  68. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/merge-sections.cjs +0 -43
  69. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/merge-sections.js +0 -43
  70. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/normalize-format.cjs +0 -47
  71. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/normalize-format.js +0 -47
  72. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/reorder-sections.cjs +0 -34
  73. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/reorder-sections.js +0 -34
  74. package/packages/silk-effects/dist/dev/pkg/changesets/remark/presets.cjs +0 -120
  75. package/packages/silk-effects/dist/dev/pkg/changesets/remark/presets.js +0 -119
  76. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/content-structure.cjs +0 -22
  77. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/content-structure.js +0 -22
  78. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/dependency-table-format.cjs +0 -40
  79. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/dependency-table-format.js +0 -40
  80. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/heading-hierarchy.cjs +0 -19
  81. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/heading-hierarchy.js +0 -19
  82. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/required-sections.cjs +0 -17
  83. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/required-sections.js +0 -17
  84. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/uncategorized-content.cjs +0 -31
  85. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/uncategorized-content.js +0 -31
  86. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/changeset.cjs +0 -148
  87. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/changeset.js +0 -145
  88. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/dependency-table.cjs +0 -203
  89. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/dependency-table.js +0 -198
  90. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/git.cjs +0 -69
  91. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/git.js +0 -68
  92. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/github.cjs +0 -177
  93. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/github.js +0 -174
  94. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/options.cjs +0 -183
  95. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/options.js +0 -181
  96. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/package-scope.cjs +0 -129
  97. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/package-scope.js +0 -127
  98. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/primitives.cjs +0 -72
  99. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/primitives.js +0 -71
  100. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/release-plan.cjs +0 -62
  101. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/release-plan.js +0 -56
  102. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/version-files.cjs +0 -154
  103. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/version-files.js +0 -150
  104. package/packages/silk-effects/dist/dev/pkg/changesets/services/branch-analyzer.cjs +0 -300
  105. package/packages/silk-effects/dist/dev/pkg/changesets/services/branch-analyzer.js +0 -294
  106. package/packages/silk-effects/dist/dev/pkg/changesets/services/changelog.cjs +0 -50
  107. package/packages/silk-effects/dist/dev/pkg/changesets/services/changelog.js +0 -49
  108. package/packages/silk-effects/dist/dev/pkg/changesets/services/config-inspector.cjs +0 -489
  109. package/packages/silk-effects/dist/dev/pkg/changesets/services/config-inspector.js +0 -481
  110. package/packages/silk-effects/dist/dev/pkg/changesets/services/deps-regen.cjs +0 -375
  111. package/packages/silk-effects/dist/dev/pkg/changesets/services/deps-regen.js +0 -371
  112. package/packages/silk-effects/dist/dev/pkg/changesets/services/github.cjs +0 -160
  113. package/packages/silk-effects/dist/dev/pkg/changesets/services/github.js +0 -157
  114. package/packages/silk-effects/dist/dev/pkg/changesets/services/maintenance-reason.cjs +0 -68
  115. package/packages/silk-effects/dist/dev/pkg/changesets/services/maintenance-reason.js +0 -66
  116. package/packages/silk-effects/dist/dev/pkg/changesets/services/markdown.cjs +0 -87
  117. package/packages/silk-effects/dist/dev/pkg/changesets/services/markdown.js +0 -85
  118. package/packages/silk-effects/dist/dev/pkg/changesets/services/release-planner.cjs +0 -338
  119. package/packages/silk-effects/dist/dev/pkg/changesets/services/release-planner.js +0 -334
  120. package/packages/silk-effects/dist/dev/pkg/changesets/utils/commit-parser.cjs +0 -81
  121. package/packages/silk-effects/dist/dev/pkg/changesets/utils/commit-parser.js +0 -80
  122. package/packages/silk-effects/dist/dev/pkg/changesets/utils/dep-diff.cjs +0 -111
  123. package/packages/silk-effects/dist/dev/pkg/changesets/utils/dep-diff.js +0 -111
  124. package/packages/silk-effects/dist/dev/pkg/changesets/utils/dependency-table.cjs +0 -351
  125. package/packages/silk-effects/dist/dev/pkg/changesets/utils/dependency-table.js +0 -347
  126. package/packages/silk-effects/dist/dev/pkg/changesets/utils/git.cjs +0 -51
  127. package/packages/silk-effects/dist/dev/pkg/changesets/utils/git.js +0 -51
  128. package/packages/silk-effects/dist/dev/pkg/changesets/utils/issue-refs.cjs +0 -102
  129. package/packages/silk-effects/dist/dev/pkg/changesets/utils/issue-refs.js +0 -101
  130. package/packages/silk-effects/dist/dev/pkg/changesets/utils/jsonpath.cjs +0 -178
  131. package/packages/silk-effects/dist/dev/pkg/changesets/utils/jsonpath.js +0 -175
  132. package/packages/silk-effects/dist/dev/pkg/changesets/utils/logger.cjs +0 -51
  133. package/packages/silk-effects/dist/dev/pkg/changesets/utils/logger.js +0 -50
  134. package/packages/silk-effects/dist/dev/pkg/changesets/utils/markdown-link.cjs +0 -59
  135. package/packages/silk-effects/dist/dev/pkg/changesets/utils/markdown-link.js +0 -57
  136. package/packages/silk-effects/dist/dev/pkg/changesets/utils/publishability.cjs +0 -50
  137. package/packages/silk-effects/dist/dev/pkg/changesets/utils/publishability.js +0 -50
  138. package/packages/silk-effects/dist/dev/pkg/changesets/utils/remark-pipeline.cjs +0 -81
  139. package/packages/silk-effects/dist/dev/pkg/changesets/utils/remark-pipeline.js +0 -79
  140. package/packages/silk-effects/dist/dev/pkg/changesets/utils/section-parser.cjs +0 -94
  141. package/packages/silk-effects/dist/dev/pkg/changesets/utils/section-parser.js +0 -94
  142. package/packages/silk-effects/dist/dev/pkg/changesets/utils/strip-frontmatter.cjs +0 -47
  143. package/packages/silk-effects/dist/dev/pkg/changesets/utils/strip-frontmatter.js +0 -46
  144. package/packages/silk-effects/dist/dev/pkg/changesets/utils/version-blocks.cjs +0 -110
  145. package/packages/silk-effects/dist/dev/pkg/changesets/utils/version-blocks.js +0 -108
  146. package/packages/silk-effects/dist/dev/pkg/changesets/utils/version-files.cjs +0 -336
  147. package/packages/silk-effects/dist/dev/pkg/changesets/utils/version-files.js +0 -336
  148. package/packages/silk-effects/dist/dev/pkg/changesets/vendor/github-info.cjs +0 -55
  149. package/packages/silk-effects/dist/dev/pkg/changesets/vendor/github-info.js +0 -55
  150. package/packages/silk-effects/dist/dev/pkg/errors/ChangesetConfigError.cjs +0 -21
  151. package/packages/silk-effects/dist/dev/pkg/errors/ChangesetConfigError.js +0 -21
  152. package/packages/silk-effects/dist/dev/pkg/schemas/VersioningSchemas.cjs +0 -101
  153. package/packages/silk-effects/dist/dev/pkg/schemas/VersioningSchemas.js +0 -99
  154. package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfig.cjs +0 -81
  155. package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfig.js +0 -80
  156. package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfigReader.cjs +0 -109
  157. package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfigReader.js +0 -108
  158. package/packages/silk-effects/dist/dev/pkg/services/SilkPublishability.cjs +0 -238
  159. package/packages/silk-effects/dist/dev/pkg/services/SilkPublishability.js +0 -236
@@ -1,134 +0,0 @@
1
- const require_index = require('../changelog/index.cjs');
2
-
3
- //#region ../silk-effects/dist/dev/pkg/changesets/api/changelog.js
4
- /**
5
- * Class-based API wrapper for changelog formatting.
6
- *
7
- * Provides a static class interface that delegates to the underlying
8
- * Changesets API-compatible default export.
9
- *
10
- * @internal
11
- */
12
- /**
13
- * Static class wrapper for changelog formatting operations.
14
- *
15
- * Delegates to the Changesets-compatible `getReleaseLine` and
16
- * `getDependencyReleaseLine` functions. Internally, these use the
17
- * {@link ChangelogService} Effect service layer, which coordinates
18
- * the {@link GitHubService} (for commit/PR metadata) and
19
- * {@link MarkdownService} (for AST manipulation) to produce
20
- * structured changelog entries.
21
- *
22
- * @remarks
23
- * This class provides the same formatting capabilities as the
24
- * `\@savvy-web/changesets/changelog` subpath export, but through a
25
- * class-based API rather than the Changesets default-export convention.
26
- * The underlying formatter parses conventional commit prefixes from the
27
- * changeset summary to determine the section category (via
28
- * {@link Categories}), resolves GitHub metadata (authors, PR links,
29
- * commit hashes), and produces markdown output grouped by category.
30
- *
31
- * The `options` parameter must include a `repo` field in `"owner/repo"`
32
- * format (e.g., `"savvy-web/changesets"`) so that GitHub links can be
33
- * constructed. Additional options are defined by {@link ChangesetOptionsSchema}.
34
- *
35
- * @example Formatting a single changeset release line
36
- * ```typescript
37
- * import { Changelog } from "\@savvy-web/changesets";
38
- *
39
- * const changeset = {
40
- * id: "brave-pandas-learn",
41
- * summary: "feat: add token refresh endpoint",
42
- * releases: [{ name: "\@savvy-web/auth", type: "minor" as const }],
43
- * commit: "abc1234567890abcdef1234567890abcdef123456",
44
- * };
45
- *
46
- * const line: string = await Changelog.formatReleaseLine(changeset, "minor", {
47
- * repo: "savvy-web/auth",
48
- * });
49
- * // line contains a markdown bullet under the "Features" section heading
50
- * ```
51
- *
52
- * @example Formatting dependency update lines
53
- * ```typescript
54
- * import { Changelog } from "\@savvy-web/changesets";
55
- *
56
- * const changesets = [
57
- * {
58
- * id: "cool-dogs-fly",
59
- * summary: "chore(deps): update effect to 3.20.0",
60
- * releases: [{ name: "\@savvy-web/core", type: "patch" as const }],
61
- * commit: "def4567890abcdef1234567890abcdef456789ab",
62
- * },
63
- * ];
64
- *
65
- * const dependenciesUpdated = [
66
- * {
67
- * name: "\@savvy-web/utils",
68
- * type: "patch" as const,
69
- * oldVersion: "1.2.0",
70
- * newVersion: "1.2.1",
71
- * changesets: ["cool-dogs-fly"],
72
- * packageJson: { name: "\@savvy-web/utils", version: "1.2.1" },
73
- * },
74
- * ];
75
- *
76
- * const depLines: string = await Changelog.formatDependencyReleaseLine(
77
- * changesets,
78
- * dependenciesUpdated,
79
- * { repo: "savvy-web/core" },
80
- * );
81
- * // depLines contains a markdown table of dependency changes
82
- * ```
83
- *
84
- * @see {@link ChangelogService} for the underlying Effect service
85
- * @see {@link Categories} for how commit types map to section headings
86
- * @see {@link ChangesetOptionsSchema} for the full options schema
87
- *
88
- * @public
89
- */
90
- var Changelog = class {
91
- /* v8 ignore next -- private constructor prevents direct instantiation */
92
- constructor() {}
93
- /**
94
- * Format a single changeset into a changelog release line.
95
- *
96
- * @remarks
97
- * Parses the changeset summary for a conventional commit prefix
98
- * (e.g., `"feat: ..."`, `"fix!: ..."`), resolves the corresponding
99
- * {@link SectionCategory}, and produces a markdown bullet item with
100
- * optional GitHub metadata (author, PR link, commit hash).
101
- *
102
- * @param changeset - The changeset to format, including its `id`, `summary`,
103
- * `releases` array, and optional `commit` hash
104
- * @param versionType - The semantic version bump type (`"major"`, `"minor"`, or `"patch"`)
105
- * @param options - Configuration object; must include `repo` in `"owner/repo"` format.
106
- * Pass `null` to use defaults (no GitHub link resolution).
107
- * @returns A promise resolving to the formatted markdown string
108
- */
109
- static formatReleaseLine(changeset, versionType, options) {
110
- return require_index.default.getReleaseLine(changeset, versionType, options);
111
- }
112
- /**
113
- * Format dependency update release lines into a markdown table.
114
- *
115
- * @remarks
116
- * Generates a structured dependency table showing package names,
117
- * version transitions, and dependency types. The table is placed
118
- * under the "Dependencies" section heading in the changelog.
119
- *
120
- * @param changesets - The changesets that triggered the dependency updates
121
- * @param dependenciesUpdated - Array of updated dependencies with their
122
- * old/new versions and package metadata
123
- * @param options - Configuration object; must include `repo` in `"owner/repo"` format.
124
- * Pass `null` to use defaults.
125
- * @returns A promise resolving to the formatted markdown string containing
126
- * the dependency update table
127
- */
128
- static formatDependencyReleaseLine(changesets, dependenciesUpdated, options) {
129
- return require_index.default.getDependencyReleaseLine(changesets, dependenciesUpdated, options);
130
- }
131
- };
132
-
133
- //#endregion
134
- exports.Changelog = Changelog;
@@ -1,134 +0,0 @@
1
- import changelogFunctions from "../changelog/index.js";
2
-
3
- //#region ../silk-effects/dist/dev/pkg/changesets/api/changelog.js
4
- /**
5
- * Class-based API wrapper for changelog formatting.
6
- *
7
- * Provides a static class interface that delegates to the underlying
8
- * Changesets API-compatible default export.
9
- *
10
- * @internal
11
- */
12
- /**
13
- * Static class wrapper for changelog formatting operations.
14
- *
15
- * Delegates to the Changesets-compatible `getReleaseLine` and
16
- * `getDependencyReleaseLine` functions. Internally, these use the
17
- * {@link ChangelogService} Effect service layer, which coordinates
18
- * the {@link GitHubService} (for commit/PR metadata) and
19
- * {@link MarkdownService} (for AST manipulation) to produce
20
- * structured changelog entries.
21
- *
22
- * @remarks
23
- * This class provides the same formatting capabilities as the
24
- * `\@savvy-web/changesets/changelog` subpath export, but through a
25
- * class-based API rather than the Changesets default-export convention.
26
- * The underlying formatter parses conventional commit prefixes from the
27
- * changeset summary to determine the section category (via
28
- * {@link Categories}), resolves GitHub metadata (authors, PR links,
29
- * commit hashes), and produces markdown output grouped by category.
30
- *
31
- * The `options` parameter must include a `repo` field in `"owner/repo"`
32
- * format (e.g., `"savvy-web/changesets"`) so that GitHub links can be
33
- * constructed. Additional options are defined by {@link ChangesetOptionsSchema}.
34
- *
35
- * @example Formatting a single changeset release line
36
- * ```typescript
37
- * import { Changelog } from "\@savvy-web/changesets";
38
- *
39
- * const changeset = {
40
- * id: "brave-pandas-learn",
41
- * summary: "feat: add token refresh endpoint",
42
- * releases: [{ name: "\@savvy-web/auth", type: "minor" as const }],
43
- * commit: "abc1234567890abcdef1234567890abcdef123456",
44
- * };
45
- *
46
- * const line: string = await Changelog.formatReleaseLine(changeset, "minor", {
47
- * repo: "savvy-web/auth",
48
- * });
49
- * // line contains a markdown bullet under the "Features" section heading
50
- * ```
51
- *
52
- * @example Formatting dependency update lines
53
- * ```typescript
54
- * import { Changelog } from "\@savvy-web/changesets";
55
- *
56
- * const changesets = [
57
- * {
58
- * id: "cool-dogs-fly",
59
- * summary: "chore(deps): update effect to 3.20.0",
60
- * releases: [{ name: "\@savvy-web/core", type: "patch" as const }],
61
- * commit: "def4567890abcdef1234567890abcdef456789ab",
62
- * },
63
- * ];
64
- *
65
- * const dependenciesUpdated = [
66
- * {
67
- * name: "\@savvy-web/utils",
68
- * type: "patch" as const,
69
- * oldVersion: "1.2.0",
70
- * newVersion: "1.2.1",
71
- * changesets: ["cool-dogs-fly"],
72
- * packageJson: { name: "\@savvy-web/utils", version: "1.2.1" },
73
- * },
74
- * ];
75
- *
76
- * const depLines: string = await Changelog.formatDependencyReleaseLine(
77
- * changesets,
78
- * dependenciesUpdated,
79
- * { repo: "savvy-web/core" },
80
- * );
81
- * // depLines contains a markdown table of dependency changes
82
- * ```
83
- *
84
- * @see {@link ChangelogService} for the underlying Effect service
85
- * @see {@link Categories} for how commit types map to section headings
86
- * @see {@link ChangesetOptionsSchema} for the full options schema
87
- *
88
- * @public
89
- */
90
- var Changelog = class {
91
- /* v8 ignore next -- private constructor prevents direct instantiation */
92
- constructor() {}
93
- /**
94
- * Format a single changeset into a changelog release line.
95
- *
96
- * @remarks
97
- * Parses the changeset summary for a conventional commit prefix
98
- * (e.g., `"feat: ..."`, `"fix!: ..."`), resolves the corresponding
99
- * {@link SectionCategory}, and produces a markdown bullet item with
100
- * optional GitHub metadata (author, PR link, commit hash).
101
- *
102
- * @param changeset - The changeset to format, including its `id`, `summary`,
103
- * `releases` array, and optional `commit` hash
104
- * @param versionType - The semantic version bump type (`"major"`, `"minor"`, or `"patch"`)
105
- * @param options - Configuration object; must include `repo` in `"owner/repo"` format.
106
- * Pass `null` to use defaults (no GitHub link resolution).
107
- * @returns A promise resolving to the formatted markdown string
108
- */
109
- static formatReleaseLine(changeset, versionType, options) {
110
- return changelogFunctions.getReleaseLine(changeset, versionType, options);
111
- }
112
- /**
113
- * Format dependency update release lines into a markdown table.
114
- *
115
- * @remarks
116
- * Generates a structured dependency table showing package names,
117
- * version transitions, and dependency types. The table is placed
118
- * under the "Dependencies" section heading in the changelog.
119
- *
120
- * @param changesets - The changesets that triggered the dependency updates
121
- * @param dependenciesUpdated - Array of updated dependencies with their
122
- * old/new versions and package metadata
123
- * @param options - Configuration object; must include `repo` in `"owner/repo"` format.
124
- * Pass `null` to use defaults.
125
- * @returns A promise resolving to the formatted markdown string containing
126
- * the dependency update table
127
- */
128
- static formatDependencyReleaseLine(changesets, dependenciesUpdated, options) {
129
- return changelogFunctions.getDependencyReleaseLine(changesets, dependenciesUpdated, options);
130
- }
131
- };
132
-
133
- //#endregion
134
- export { Changelog };
@@ -1,163 +0,0 @@
1
- const require_dependency_table = require('../utils/dependency-table.cjs');
2
-
3
- //#region ../silk-effects/dist/dev/pkg/changesets/api/dependency-table.js
4
- /**
5
- * Static class for dependency table manipulation.
6
- *
7
- * Wraps the internal utility functions that operate on dependency tables --
8
- * the structured markdown tables that appear in the "Dependencies" section
9
- * of changelogs. Each row in a dependency table represents a single package
10
- * change with its name, type, action, and version transition.
11
- *
12
- * @remarks
13
- * The typical workflow for processing dependency tables is:
14
- *
15
- * 1. **Parse** an mdast `Table` node into typed {@link DependencyTableRow} objects
16
- * 2. **Collapse** duplicate rows (same package updated multiple times) into single entries
17
- * 3. **Sort** rows by dependency type, then alphabetically by package name
18
- * 4. **Serialize** back to an mdast `Table` node or directly to a markdown string
19
- *
20
- * The {@link DependencyTable.aggregate} method combines the collapse and sort
21
- * steps into a single call, which is the most common usage pattern.
22
- *
23
- * Each {@link DependencyTableRow} is validated by the {@link DependencyTableRowSchema}
24
- * Effect Schema at system boundaries, ensuring that dependency names, types,
25
- * actions, and version strings conform to expected formats.
26
- *
27
- * @example Parse, aggregate, and serialize a dependency table
28
- * ```typescript
29
- * import { DependencyTable } from "\@savvy-web/changesets";
30
- * import type { DependencyTableRow } from "\@savvy-web/changesets";
31
- * import type { Table } from "mdast";
32
- *
33
- * // Given an mdast Table node from a parsed CHANGELOG
34
- * declare const tableNode: Table;
35
- *
36
- * // Parse into typed rows
37
- * const rows: DependencyTableRow[] = DependencyTable.parse(tableNode);
38
- *
39
- * // Collapse duplicates and sort by type, then name
40
- * const aggregated: DependencyTableRow[] = DependencyTable.aggregate(rows);
41
- *
42
- * // Serialize back to an mdast Table node for further AST manipulation
43
- * const outputNode: Table = DependencyTable.serialize(aggregated);
44
- *
45
- * // Or serialize directly to a markdown string
46
- * const markdown: string = DependencyTable.toMarkdown(aggregated);
47
- * ```
48
- *
49
- * @example Step-by-step collapse and sort
50
- * ```typescript
51
- * import { DependencyTable } from "\@savvy-web/changesets";
52
- * import type { DependencyTableRow } from "\@savvy-web/changesets";
53
- *
54
- * declare const rows: DependencyTableRow[];
55
- *
56
- * // Collapse duplicate entries (same package appears multiple times)
57
- * const collapsed: DependencyTableRow[] = DependencyTable.collapse(rows);
58
- *
59
- * // Sort by dependency type, then alphabetically by name
60
- * const sorted: DependencyTableRow[] = DependencyTable.sort(collapsed);
61
- * ```
62
- *
63
- * @see {@link DependencyTableRow} for the row shape (dependency, type, action, from, to)
64
- * @see {@link DependencyTableRowSchema} for the Effect Schema that validates row data
65
- * @see {@link DependencyTableSchema} for the non-empty array schema
66
- *
67
- * @public
68
- */
69
- var DependencyTable = class {
70
- /* v8 ignore next -- private constructor prevents direct instantiation */
71
- constructor() {}
72
- /**
73
- * Parse an mdast `Table` node into typed dependency table rows.
74
- *
75
- * @remarks
76
- * Extracts the text content from each table cell and maps it to the
77
- * corresponding {@link DependencyTableRow} fields. The first row is
78
- * treated as the header and skipped. Rows that do not have the expected
79
- * number of columns are ignored.
80
- *
81
- * @param tableNode - An mdast `Table` node from a parsed markdown AST
82
- * @returns Array of {@link DependencyTableRow} objects, one per data row
83
- */
84
- static parse(tableNode) {
85
- return require_dependency_table.parseDependencyTable(tableNode);
86
- }
87
- /**
88
- * Serialize typed dependency table rows into an mdast `Table` node.
89
- *
90
- * @remarks
91
- * Produces a well-formed mdast `Table` with a header row
92
- * (`Dependency | Type | Action | From | To`) followed by one data row
93
- * per input entry. The resulting node can be inserted into a remark AST
94
- * for further processing or stringification.
95
- *
96
- * @param rows - Array of {@link DependencyTableRow} objects to serialize
97
- * @returns An mdast `Table` node ready for AST insertion
98
- */
99
- static serialize(rows) {
100
- return require_dependency_table.serializeDependencyTable(rows);
101
- }
102
- /**
103
- * Serialize typed dependency table rows directly to a markdown string.
104
- *
105
- * @remarks
106
- * Convenience method that combines {@link DependencyTable.serialize} with
107
- * remark stringification. Produces a GFM-compatible markdown table string.
108
- *
109
- * @param rows - Array of {@link DependencyTableRow} objects to render
110
- * @returns A markdown string containing the formatted table
111
- */
112
- static toMarkdown(rows) {
113
- return require_dependency_table.serializeDependencyTableToMarkdown(rows);
114
- }
115
- /**
116
- * Collapse duplicate dependency rows into single entries.
117
- *
118
- * @remarks
119
- * When a package appears in multiple rows (e.g., updated in separate
120
- * changesets), this method merges them by keeping the earliest `from`
121
- * version and the latest `to` version, producing a single row that
122
- * represents the net change.
123
- *
124
- * @param rows - Array of {@link DependencyTableRow} objects, possibly with duplicates
125
- * @returns A new array with duplicate packages collapsed into single rows
126
- */
127
- static collapse(rows) {
128
- return require_dependency_table.collapseDependencyRows(rows);
129
- }
130
- /**
131
- * Sort dependency rows by action, type, and package name.
132
- *
133
- * @remarks
134
- * Applies a three-level stable sort:
135
- * 1. **Action** — `removed` first, then `updated`, then `added`
136
- * 2. **Type** — alphabetically (e.g., `config` before `dependency`)
137
- * 3. **Dependency name** — alphabetically within each action+type group
138
- *
139
- * @param rows - Array of {@link DependencyTableRow} objects to sort
140
- * @returns A new array sorted by action, type, then name
141
- */
142
- static sort(rows) {
143
- return require_dependency_table.sortDependencyRows(rows);
144
- }
145
- /**
146
- * Collapse duplicate rows and then sort the result.
147
- *
148
- * @remarks
149
- * Equivalent to calling {@link DependencyTable.collapse} followed by
150
- * {@link DependencyTable.sort}. This is the recommended method for
151
- * preparing dependency table data for final output, as it produces
152
- * a clean, deduplicated, and consistently ordered table.
153
- *
154
- * @param rows - Array of {@link DependencyTableRow} objects to aggregate
155
- * @returns A new array with duplicates collapsed and rows sorted
156
- */
157
- static aggregate(rows) {
158
- return require_dependency_table.sortDependencyRows(require_dependency_table.collapseDependencyRows(rows));
159
- }
160
- };
161
-
162
- //#endregion
163
- exports.DependencyTable = DependencyTable;
@@ -1,163 +0,0 @@
1
- import { collapseDependencyRows, parseDependencyTable, serializeDependencyTable, serializeDependencyTableToMarkdown, sortDependencyRows } from "../utils/dependency-table.js";
2
-
3
- //#region ../silk-effects/dist/dev/pkg/changesets/api/dependency-table.js
4
- /**
5
- * Static class for dependency table manipulation.
6
- *
7
- * Wraps the internal utility functions that operate on dependency tables --
8
- * the structured markdown tables that appear in the "Dependencies" section
9
- * of changelogs. Each row in a dependency table represents a single package
10
- * change with its name, type, action, and version transition.
11
- *
12
- * @remarks
13
- * The typical workflow for processing dependency tables is:
14
- *
15
- * 1. **Parse** an mdast `Table` node into typed {@link DependencyTableRow} objects
16
- * 2. **Collapse** duplicate rows (same package updated multiple times) into single entries
17
- * 3. **Sort** rows by dependency type, then alphabetically by package name
18
- * 4. **Serialize** back to an mdast `Table` node or directly to a markdown string
19
- *
20
- * The {@link DependencyTable.aggregate} method combines the collapse and sort
21
- * steps into a single call, which is the most common usage pattern.
22
- *
23
- * Each {@link DependencyTableRow} is validated by the {@link DependencyTableRowSchema}
24
- * Effect Schema at system boundaries, ensuring that dependency names, types,
25
- * actions, and version strings conform to expected formats.
26
- *
27
- * @example Parse, aggregate, and serialize a dependency table
28
- * ```typescript
29
- * import { DependencyTable } from "\@savvy-web/changesets";
30
- * import type { DependencyTableRow } from "\@savvy-web/changesets";
31
- * import type { Table } from "mdast";
32
- *
33
- * // Given an mdast Table node from a parsed CHANGELOG
34
- * declare const tableNode: Table;
35
- *
36
- * // Parse into typed rows
37
- * const rows: DependencyTableRow[] = DependencyTable.parse(tableNode);
38
- *
39
- * // Collapse duplicates and sort by type, then name
40
- * const aggregated: DependencyTableRow[] = DependencyTable.aggregate(rows);
41
- *
42
- * // Serialize back to an mdast Table node for further AST manipulation
43
- * const outputNode: Table = DependencyTable.serialize(aggregated);
44
- *
45
- * // Or serialize directly to a markdown string
46
- * const markdown: string = DependencyTable.toMarkdown(aggregated);
47
- * ```
48
- *
49
- * @example Step-by-step collapse and sort
50
- * ```typescript
51
- * import { DependencyTable } from "\@savvy-web/changesets";
52
- * import type { DependencyTableRow } from "\@savvy-web/changesets";
53
- *
54
- * declare const rows: DependencyTableRow[];
55
- *
56
- * // Collapse duplicate entries (same package appears multiple times)
57
- * const collapsed: DependencyTableRow[] = DependencyTable.collapse(rows);
58
- *
59
- * // Sort by dependency type, then alphabetically by name
60
- * const sorted: DependencyTableRow[] = DependencyTable.sort(collapsed);
61
- * ```
62
- *
63
- * @see {@link DependencyTableRow} for the row shape (dependency, type, action, from, to)
64
- * @see {@link DependencyTableRowSchema} for the Effect Schema that validates row data
65
- * @see {@link DependencyTableSchema} for the non-empty array schema
66
- *
67
- * @public
68
- */
69
- var DependencyTable = class {
70
- /* v8 ignore next -- private constructor prevents direct instantiation */
71
- constructor() {}
72
- /**
73
- * Parse an mdast `Table` node into typed dependency table rows.
74
- *
75
- * @remarks
76
- * Extracts the text content from each table cell and maps it to the
77
- * corresponding {@link DependencyTableRow} fields. The first row is
78
- * treated as the header and skipped. Rows that do not have the expected
79
- * number of columns are ignored.
80
- *
81
- * @param tableNode - An mdast `Table` node from a parsed markdown AST
82
- * @returns Array of {@link DependencyTableRow} objects, one per data row
83
- */
84
- static parse(tableNode) {
85
- return parseDependencyTable(tableNode);
86
- }
87
- /**
88
- * Serialize typed dependency table rows into an mdast `Table` node.
89
- *
90
- * @remarks
91
- * Produces a well-formed mdast `Table` with a header row
92
- * (`Dependency | Type | Action | From | To`) followed by one data row
93
- * per input entry. The resulting node can be inserted into a remark AST
94
- * for further processing or stringification.
95
- *
96
- * @param rows - Array of {@link DependencyTableRow} objects to serialize
97
- * @returns An mdast `Table` node ready for AST insertion
98
- */
99
- static serialize(rows) {
100
- return serializeDependencyTable(rows);
101
- }
102
- /**
103
- * Serialize typed dependency table rows directly to a markdown string.
104
- *
105
- * @remarks
106
- * Convenience method that combines {@link DependencyTable.serialize} with
107
- * remark stringification. Produces a GFM-compatible markdown table string.
108
- *
109
- * @param rows - Array of {@link DependencyTableRow} objects to render
110
- * @returns A markdown string containing the formatted table
111
- */
112
- static toMarkdown(rows) {
113
- return serializeDependencyTableToMarkdown(rows);
114
- }
115
- /**
116
- * Collapse duplicate dependency rows into single entries.
117
- *
118
- * @remarks
119
- * When a package appears in multiple rows (e.g., updated in separate
120
- * changesets), this method merges them by keeping the earliest `from`
121
- * version and the latest `to` version, producing a single row that
122
- * represents the net change.
123
- *
124
- * @param rows - Array of {@link DependencyTableRow} objects, possibly with duplicates
125
- * @returns A new array with duplicate packages collapsed into single rows
126
- */
127
- static collapse(rows) {
128
- return collapseDependencyRows(rows);
129
- }
130
- /**
131
- * Sort dependency rows by action, type, and package name.
132
- *
133
- * @remarks
134
- * Applies a three-level stable sort:
135
- * 1. **Action** — `removed` first, then `updated`, then `added`
136
- * 2. **Type** — alphabetically (e.g., `config` before `dependency`)
137
- * 3. **Dependency name** — alphabetically within each action+type group
138
- *
139
- * @param rows - Array of {@link DependencyTableRow} objects to sort
140
- * @returns A new array sorted by action, type, then name
141
- */
142
- static sort(rows) {
143
- return sortDependencyRows(rows);
144
- }
145
- /**
146
- * Collapse duplicate rows and then sort the result.
147
- *
148
- * @remarks
149
- * Equivalent to calling {@link DependencyTable.collapse} followed by
150
- * {@link DependencyTable.sort}. This is the recommended method for
151
- * preparing dependency table data for final output, as it produces
152
- * a clean, deduplicated, and consistently ordered table.
153
- *
154
- * @param rows - Array of {@link DependencyTableRow} objects to aggregate
155
- * @returns A new array with duplicates collapsed and rows sorted
156
- */
157
- static aggregate(rows) {
158
- return sortDependencyRows(collapseDependencyRows(rows));
159
- }
160
- };
161
-
162
- //#endregion
163
- export { DependencyTable };