@savvy-web/silk 2.0.0 → 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 (155) hide show
  1. package/README.md +7 -5
  2. package/changesets-changelog.cjs +10 -4
  3. package/changesets-changelog.js +54057 -1
  4. package/changesets-markdownlint.cjs +10 -4
  5. package/changesets-markdownlint.js +54057 -1
  6. package/package.json +5 -4
  7. package/tsconfig/node/dist/tsconfig.tsbuildinfo +1 -1
  8. package/_virtual/_rolldown/runtime.cjs +0 -45
  9. package/_virtual/_rolldown/runtime.js +0 -45
  10. package/packages/silk-effects/dist/dev/pkg/_virtual/_rolldown/runtime.cjs +0 -15
  11. package/packages/silk-effects/dist/dev/pkg/_virtual/_rolldown/runtime.js +0 -14
  12. package/packages/silk-effects/dist/dev/pkg/changesets/api/categories.cjs +0 -247
  13. package/packages/silk-effects/dist/dev/pkg/changesets/api/categories.js +0 -247
  14. package/packages/silk-effects/dist/dev/pkg/changesets/api/changelog.cjs +0 -134
  15. package/packages/silk-effects/dist/dev/pkg/changesets/api/changelog.js +0 -134
  16. package/packages/silk-effects/dist/dev/pkg/changesets/api/dependency-table.cjs +0 -163
  17. package/packages/silk-effects/dist/dev/pkg/changesets/api/dependency-table.js +0 -163
  18. package/packages/silk-effects/dist/dev/pkg/changesets/api/linter.cjs +0 -170
  19. package/packages/silk-effects/dist/dev/pkg/changesets/api/linter.js +0 -170
  20. package/packages/silk-effects/dist/dev/pkg/changesets/api/transformer.cjs +0 -134
  21. package/packages/silk-effects/dist/dev/pkg/changesets/api/transformer.js +0 -134
  22. package/packages/silk-effects/dist/dev/pkg/changesets/categories/index.cjs +0 -317
  23. package/packages/silk-effects/dist/dev/pkg/changesets/categories/index.js +0 -299
  24. package/packages/silk-effects/dist/dev/pkg/changesets/categories/types.cjs +0 -65
  25. package/packages/silk-effects/dist/dev/pkg/changesets/categories/types.js +0 -65
  26. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/formatting.cjs +0 -114
  27. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/formatting.js +0 -113
  28. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/getDependencyReleaseLine.cjs +0 -118
  29. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/getDependencyReleaseLine.js +0 -118
  30. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/getReleaseLine.cjs +0 -122
  31. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/getReleaseLine.js +0 -122
  32. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/index.cjs +0 -97
  33. package/packages/silk-effects/dist/dev/pkg/changesets/changelog/index.js +0 -97
  34. package/packages/silk-effects/dist/dev/pkg/changesets/constants.cjs +0 -43
  35. package/packages/silk-effects/dist/dev/pkg/changesets/constants.js +0 -42
  36. package/packages/silk-effects/dist/dev/pkg/changesets/errors.cjs +0 -386
  37. package/packages/silk-effects/dist/dev/pkg/changesets/errors.js +0 -371
  38. package/packages/silk-effects/dist/dev/pkg/changesets/index.cjs +0 -300
  39. package/packages/silk-effects/dist/dev/pkg/changesets/index.js +0 -179
  40. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/index.cjs +0 -34
  41. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/index.js +0 -29
  42. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/content-structure.cjs +0 -98
  43. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/content-structure.js +0 -98
  44. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/dependency-table-format.cjs +0 -170
  45. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/dependency-table-format.js +0 -170
  46. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/heading-hierarchy.cjs +0 -61
  47. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/heading-hierarchy.js +0 -61
  48. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/required-sections.cjs +0 -54
  49. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/required-sections.js +0 -54
  50. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/uncategorized-content.cjs +0 -54
  51. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/uncategorized-content.js +0 -54
  52. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/utils.cjs +0 -31
  53. package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/utils.js +0 -30
  54. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/aggregate-dependency-tables.cjs +0 -47
  55. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/aggregate-dependency-tables.js +0 -47
  56. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/contributor-footnotes.cjs +0 -123
  57. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/contributor-footnotes.js +0 -123
  58. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/deduplicate-items.cjs +0 -32
  59. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/deduplicate-items.js +0 -32
  60. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/issue-link-refs.cjs +0 -59
  61. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/issue-link-refs.js +0 -59
  62. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/maintenance-note.cjs +0 -61
  63. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/maintenance-note.js +0 -61
  64. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/merge-sections.cjs +0 -43
  65. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/merge-sections.js +0 -43
  66. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/normalize-format.cjs +0 -47
  67. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/normalize-format.js +0 -47
  68. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/reorder-sections.cjs +0 -34
  69. package/packages/silk-effects/dist/dev/pkg/changesets/remark/plugins/reorder-sections.js +0 -34
  70. package/packages/silk-effects/dist/dev/pkg/changesets/remark/presets.cjs +0 -120
  71. package/packages/silk-effects/dist/dev/pkg/changesets/remark/presets.js +0 -119
  72. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/content-structure.cjs +0 -22
  73. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/content-structure.js +0 -22
  74. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/dependency-table-format.cjs +0 -40
  75. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/dependency-table-format.js +0 -40
  76. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/heading-hierarchy.cjs +0 -19
  77. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/heading-hierarchy.js +0 -19
  78. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/required-sections.cjs +0 -17
  79. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/required-sections.js +0 -17
  80. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/uncategorized-content.cjs +0 -31
  81. package/packages/silk-effects/dist/dev/pkg/changesets/remark/rules/uncategorized-content.js +0 -31
  82. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/changeset.cjs +0 -148
  83. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/changeset.js +0 -145
  84. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/dependency-table.cjs +0 -203
  85. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/dependency-table.js +0 -198
  86. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/git.cjs +0 -69
  87. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/git.js +0 -68
  88. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/github.cjs +0 -177
  89. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/github.js +0 -174
  90. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/options.cjs +0 -183
  91. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/options.js +0 -181
  92. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/package-scope.cjs +0 -129
  93. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/package-scope.js +0 -127
  94. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/primitives.cjs +0 -72
  95. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/primitives.js +0 -71
  96. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/release-plan.cjs +0 -62
  97. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/release-plan.js +0 -56
  98. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/version-files.cjs +0 -154
  99. package/packages/silk-effects/dist/dev/pkg/changesets/schemas/version-files.js +0 -150
  100. package/packages/silk-effects/dist/dev/pkg/changesets/services/branch-analyzer.cjs +0 -300
  101. package/packages/silk-effects/dist/dev/pkg/changesets/services/branch-analyzer.js +0 -294
  102. package/packages/silk-effects/dist/dev/pkg/changesets/services/changelog.cjs +0 -50
  103. package/packages/silk-effects/dist/dev/pkg/changesets/services/changelog.js +0 -49
  104. package/packages/silk-effects/dist/dev/pkg/changesets/services/config-inspector.cjs +0 -489
  105. package/packages/silk-effects/dist/dev/pkg/changesets/services/config-inspector.js +0 -481
  106. package/packages/silk-effects/dist/dev/pkg/changesets/services/deps-regen.cjs +0 -375
  107. package/packages/silk-effects/dist/dev/pkg/changesets/services/deps-regen.js +0 -371
  108. package/packages/silk-effects/dist/dev/pkg/changesets/services/github.cjs +0 -160
  109. package/packages/silk-effects/dist/dev/pkg/changesets/services/github.js +0 -157
  110. package/packages/silk-effects/dist/dev/pkg/changesets/services/maintenance-reason.cjs +0 -68
  111. package/packages/silk-effects/dist/dev/pkg/changesets/services/maintenance-reason.js +0 -66
  112. package/packages/silk-effects/dist/dev/pkg/changesets/services/markdown.cjs +0 -87
  113. package/packages/silk-effects/dist/dev/pkg/changesets/services/markdown.js +0 -85
  114. package/packages/silk-effects/dist/dev/pkg/changesets/services/release-planner.cjs +0 -352
  115. package/packages/silk-effects/dist/dev/pkg/changesets/services/release-planner.js +0 -348
  116. package/packages/silk-effects/dist/dev/pkg/changesets/utils/commit-parser.cjs +0 -81
  117. package/packages/silk-effects/dist/dev/pkg/changesets/utils/commit-parser.js +0 -80
  118. package/packages/silk-effects/dist/dev/pkg/changesets/utils/dep-diff.cjs +0 -111
  119. package/packages/silk-effects/dist/dev/pkg/changesets/utils/dep-diff.js +0 -111
  120. package/packages/silk-effects/dist/dev/pkg/changesets/utils/dependency-table.cjs +0 -351
  121. package/packages/silk-effects/dist/dev/pkg/changesets/utils/dependency-table.js +0 -347
  122. package/packages/silk-effects/dist/dev/pkg/changesets/utils/git.cjs +0 -51
  123. package/packages/silk-effects/dist/dev/pkg/changesets/utils/git.js +0 -51
  124. package/packages/silk-effects/dist/dev/pkg/changesets/utils/issue-refs.cjs +0 -102
  125. package/packages/silk-effects/dist/dev/pkg/changesets/utils/issue-refs.js +0 -101
  126. package/packages/silk-effects/dist/dev/pkg/changesets/utils/jsonpath.cjs +0 -178
  127. package/packages/silk-effects/dist/dev/pkg/changesets/utils/jsonpath.js +0 -175
  128. package/packages/silk-effects/dist/dev/pkg/changesets/utils/logger.cjs +0 -51
  129. package/packages/silk-effects/dist/dev/pkg/changesets/utils/logger.js +0 -50
  130. package/packages/silk-effects/dist/dev/pkg/changesets/utils/markdown-link.cjs +0 -59
  131. package/packages/silk-effects/dist/dev/pkg/changesets/utils/markdown-link.js +0 -57
  132. package/packages/silk-effects/dist/dev/pkg/changesets/utils/publishability.cjs +0 -50
  133. package/packages/silk-effects/dist/dev/pkg/changesets/utils/publishability.js +0 -50
  134. package/packages/silk-effects/dist/dev/pkg/changesets/utils/remark-pipeline.cjs +0 -81
  135. package/packages/silk-effects/dist/dev/pkg/changesets/utils/remark-pipeline.js +0 -79
  136. package/packages/silk-effects/dist/dev/pkg/changesets/utils/section-parser.cjs +0 -94
  137. package/packages/silk-effects/dist/dev/pkg/changesets/utils/section-parser.js +0 -94
  138. package/packages/silk-effects/dist/dev/pkg/changesets/utils/strip-frontmatter.cjs +0 -47
  139. package/packages/silk-effects/dist/dev/pkg/changesets/utils/strip-frontmatter.js +0 -46
  140. package/packages/silk-effects/dist/dev/pkg/changesets/utils/version-blocks.cjs +0 -110
  141. package/packages/silk-effects/dist/dev/pkg/changesets/utils/version-blocks.js +0 -108
  142. package/packages/silk-effects/dist/dev/pkg/changesets/utils/version-files.cjs +0 -336
  143. package/packages/silk-effects/dist/dev/pkg/changesets/utils/version-files.js +0 -336
  144. package/packages/silk-effects/dist/dev/pkg/changesets/vendor/github-info.cjs +0 -77
  145. package/packages/silk-effects/dist/dev/pkg/changesets/vendor/github-info.js +0 -77
  146. package/packages/silk-effects/dist/dev/pkg/errors/ChangesetConfigError.cjs +0 -21
  147. package/packages/silk-effects/dist/dev/pkg/errors/ChangesetConfigError.js +0 -21
  148. package/packages/silk-effects/dist/dev/pkg/schemas/VersioningSchemas.cjs +0 -101
  149. package/packages/silk-effects/dist/dev/pkg/schemas/VersioningSchemas.js +0 -99
  150. package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfig.cjs +0 -81
  151. package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfig.js +0 -80
  152. package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfigReader.cjs +0 -109
  153. package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfigReader.js +0 -108
  154. package/packages/silk-effects/dist/dev/pkg/services/SilkPublishability.cjs +0 -238
  155. package/packages/silk-effects/dist/dev/pkg/services/SilkPublishability.js +0 -236
@@ -1,45 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
9
- var __exportAll = (all, no_symbols) => {
10
- let target = {};
11
- for (var name in all) {
12
- __defProp(target, name, {
13
- get: all[name],
14
- enumerable: true
15
- });
16
- }
17
- if (!no_symbols) {
18
- __defProp(target, Symbol.toStringTag, { value: "Module" });
19
- }
20
- return target;
21
- };
22
- var __copyProps = (to, from, except, desc) => {
23
- if (from && typeof from === "object" || typeof from === "function") {
24
- for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
25
- key = keys[i];
26
- if (!__hasOwnProp.call(to, key) && key !== except) {
27
- __defProp(to, key, {
28
- get: ((k) => from[k]).bind(null, key),
29
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
30
- });
31
- }
32
- }
33
- }
34
- return to;
35
- };
36
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
37
- value: mod,
38
- enumerable: true
39
- }) : target, mod));
40
-
41
- //#endregion
42
-
43
- exports.__commonJSMin = __commonJSMin;
44
- exports.__exportAll = __exportAll;
45
- exports.__toESM = __toESM;
@@ -1,45 +0,0 @@
1
- import { createRequire } from "node:module";
2
-
3
- //#region \0rolldown/runtime.js
4
- var __create = Object.create;
5
- var __defProp = Object.defineProperty;
6
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
- var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getProtoOf = Object.getPrototypeOf;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
11
- var __exportAll = (all, no_symbols) => {
12
- let target = {};
13
- for (var name in all) {
14
- __defProp(target, name, {
15
- get: all[name],
16
- enumerable: true
17
- });
18
- }
19
- if (!no_symbols) {
20
- __defProp(target, Symbol.toStringTag, { value: "Module" });
21
- }
22
- return target;
23
- };
24
- var __copyProps = (to, from, except, desc) => {
25
- if (from && typeof from === "object" || typeof from === "function") {
26
- for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
27
- key = keys[i];
28
- if (!__hasOwnProp.call(to, key) && key !== except) {
29
- __defProp(to, key, {
30
- get: ((k) => from[k]).bind(null, key),
31
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
32
- });
33
- }
34
- }
35
- }
36
- return to;
37
- };
38
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
39
- value: mod,
40
- enumerable: true
41
- }) : target, mod));
42
- var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
43
-
44
- //#endregion
45
- export { __commonJSMin, __exportAll, __require, __toESM };
@@ -1,15 +0,0 @@
1
-
2
- //#region ../silk-effects/dist/dev/pkg/_virtual/_rolldown/runtime.js
3
- var __defProp = Object.defineProperty;
4
- var __exportAll = (all, no_symbols) => {
5
- let target = {};
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
10
- if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
11
- return target;
12
- };
13
-
14
- //#endregion
15
- exports.__exportAll = __exportAll;
@@ -1,14 +0,0 @@
1
- //#region ../silk-effects/dist/dev/pkg/_virtual/_rolldown/runtime.js
2
- var __defProp = Object.defineProperty;
3
- var __exportAll = (all, no_symbols) => {
4
- let target = {};
5
- for (var name in all) __defProp(target, name, {
6
- get: all[name],
7
- enumerable: true
8
- });
9
- if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
- return target;
11
- };
12
-
13
- //#endregion
14
- export { __exportAll };
@@ -1,247 +0,0 @@
1
- const require_index = require('../categories/index.cjs');
2
-
3
- //#region ../silk-effects/dist/dev/pkg/changesets/api/categories.js
4
- /**
5
- * Class-based API wrapper for section categories.
6
- *
7
- * Provides a static class interface that bridges to the underlying
8
- * Effect-native category functions for higher-level consumers.
9
- *
10
- * @internal
11
- */
12
- /**
13
- * Static class wrapper for section category operations.
14
- *
15
- * Provides methods for resolving conventional commit types to changelog
16
- * section categories, validating section headings, and accessing the
17
- * canonical set of 13 section categories used throughout the pipeline.
18
- *
19
- * @remarks
20
- * This class wraps the pure functions and constants from the internal
21
- * `categories/` module. Each {@link SectionCategory} is defined by the
22
- * {@link SectionCategorySchema} Effect Schema, which provides runtime
23
- * validation at system boundaries. The class itself is stateless; all
24
- * methods and properties are `static`.
25
- *
26
- * Categories control how changelog entries are grouped and ordered.
27
- * Lower priority numbers appear first in the output. The 13 built-in
28
- * categories cover all conventional commit types plus special cases
29
- * like dependency updates and breaking changes.
30
- *
31
- * @example Looking up categories from commit metadata
32
- * ```typescript
33
- * import { Categories } from "\@savvy-web/changesets";
34
- * import type { SectionCategory } from "\@savvy-web/changesets";
35
- *
36
- * // Resolve a conventional commit type to its category
37
- * const feature: SectionCategory = Categories.fromCommitType("feat");
38
- * // feature.heading === "Features"
39
- * // feature.priority === 2
40
- *
41
- * // Breaking changes always win regardless of commit type
42
- * const breaking: SectionCategory = Categories.fromCommitType("fix", undefined, true);
43
- * // breaking.heading === "Breaking Changes"
44
- * // breaking.priority === 1
45
- *
46
- * // The special scope "deps" on "chore" maps to Dependencies
47
- * const deps: SectionCategory = Categories.fromCommitType("chore", "deps");
48
- * // deps.heading === "Dependencies"
49
- * ```
50
- *
51
- * @example Validating section headings
52
- * ```typescript
53
- * import { Categories } from "\@savvy-web/changesets";
54
- *
55
- * const headings: readonly string[] = Categories.allHeadings();
56
- * // ["Breaking Changes", "Features", "Bug Fixes", ...]
57
- *
58
- * const valid: boolean = Categories.isValidHeading("Bug Fixes");
59
- * // true
60
- *
61
- * const unknown: boolean = Categories.isValidHeading("Miscellaneous");
62
- * // false
63
- * ```
64
- *
65
- * @example Reverse-lookup from heading text
66
- * ```typescript
67
- * import { Categories } from "\@savvy-web/changesets";
68
- * import type { SectionCategory } from "\@savvy-web/changesets";
69
- *
70
- * const category: SectionCategory | undefined = Categories.fromHeading("Features");
71
- * if (category) {
72
- * const commitTypes: readonly string[] = category.commitTypes;
73
- * // ["feat"]
74
- * }
75
- * ```
76
- *
77
- * @see {@link SectionCategory} for the category shape (heading, priority, commitTypes, description)
78
- * @see {@link SectionCategorySchema} for the Effect Schema that validates category data
79
- *
80
- * @public
81
- */
82
- var Categories = class {
83
- constructor() {}
84
- /**
85
- * Breaking changes -- backward-incompatible changes (priority 1).
86
- *
87
- * @remarks
88
- * Mapped from any commit type when the `breaking` flag is `true`.
89
- * Always appears first in changelog output.
90
- */
91
- static BREAKING_CHANGES = require_index.BREAKING_CHANGES;
92
- /**
93
- * Features -- new functionality (priority 2).
94
- *
95
- * @remarks
96
- * Mapped from the `feat` commit type.
97
- */
98
- static FEATURES = require_index.FEATURES;
99
- /**
100
- * Bug Fixes -- bug corrections (priority 3).
101
- *
102
- * @remarks
103
- * Mapped from the `fix` commit type.
104
- */
105
- static BUG_FIXES = require_index.BUG_FIXES;
106
- /**
107
- * Performance -- performance improvements (priority 4).
108
- *
109
- * @remarks
110
- * Mapped from the `perf` commit type.
111
- */
112
- static PERFORMANCE = require_index.PERFORMANCE;
113
- /**
114
- * Documentation -- documentation changes (priority 5).
115
- *
116
- * @remarks
117
- * Mapped from the `docs` commit type.
118
- */
119
- static DOCUMENTATION = require_index.DOCUMENTATION;
120
- /**
121
- * Refactoring -- code restructuring (priority 6).
122
- *
123
- * @remarks
124
- * Mapped from the `refactor` commit type.
125
- */
126
- static REFACTORING = require_index.REFACTORING;
127
- /**
128
- * Tests -- test additions or modifications (priority 7).
129
- *
130
- * @remarks
131
- * Mapped from the `test` commit type.
132
- */
133
- static TESTS = require_index.TESTS;
134
- /**
135
- * Build System -- build configuration changes (priority 8).
136
- *
137
- * @remarks
138
- * Mapped from the `build` commit type.
139
- */
140
- static BUILD_SYSTEM = require_index.BUILD_SYSTEM;
141
- /**
142
- * CI -- continuous integration changes (priority 9).
143
- *
144
- * @remarks
145
- * Mapped from the `ci` commit type.
146
- */
147
- static CI = require_index.CI;
148
- /**
149
- * Dependencies -- dependency updates (priority 10).
150
- *
151
- * @remarks
152
- * Mapped from `chore(deps)` and similar dependency-scoped commits.
153
- */
154
- static DEPENDENCIES = require_index.DEPENDENCIES;
155
- /**
156
- * Maintenance -- general maintenance (priority 11).
157
- *
158
- * @remarks
159
- * Mapped from the `chore` commit type (without the `deps` scope).
160
- */
161
- static MAINTENANCE = require_index.MAINTENANCE;
162
- /**
163
- * Reverts -- reverted changes (priority 12).
164
- *
165
- * @remarks
166
- * Mapped from the `revert` commit type.
167
- */
168
- static REVERTS = require_index.REVERTS;
169
- /**
170
- * Other -- uncategorized changes (priority 13).
171
- *
172
- * @remarks
173
- * Fallback category for unrecognized commit types. Always appears
174
- * last in changelog output.
175
- */
176
- static OTHER = require_index.OTHER;
177
- /**
178
- * All 13 categories ordered by priority (ascending, 1-13).
179
- *
180
- * @remarks
181
- * This array is frozen and sorted from highest priority (Breaking Changes)
182
- * to lowest (Other). Useful for iterating over categories in display order.
183
- */
184
- static ALL = require_index.CATEGORIES;
185
- /**
186
- * Resolve a conventional commit type to its section category.
187
- *
188
- * @remarks
189
- * Resolution follows a precedence chain:
190
- *
191
- * 1. If `breaking` is `true`, always returns {@link Categories.BREAKING_CHANGES}
192
- * 2. If `type` is `"chore"` and `scope` is `"deps"`, returns {@link Categories.DEPENDENCIES}
193
- * 3. Otherwise, looks up `type` in the `commitTypes` arrays of all categories
194
- * 4. Falls back to {@link Categories.OTHER} for unrecognized types
195
- *
196
- * @param type - The conventional commit type (e.g., `"feat"`, `"fix"`, `"chore"`)
197
- * @param scope - Optional commit scope (e.g., `"deps"` from `chore(deps):`)
198
- * @param breaking - Whether the commit includes a breaking change indicator (`!`)
199
- * @returns The resolved {@link SectionCategory}
200
- */
201
- static fromCommitType(type, scope, breaking) {
202
- return require_index.resolveCommitType(type, scope, breaking);
203
- }
204
- /**
205
- * Look up a category by its section heading text.
206
- *
207
- * @remarks
208
- * Comparison is case-insensitive. For example, both `"Bug Fixes"` and
209
- * `"bug fixes"` will match {@link Categories.BUG_FIXES}.
210
- *
211
- * @param heading - The heading text (e.g., `"Features"`, `"Bug Fixes"`)
212
- * @returns The matching {@link SectionCategory}, or `undefined` if the heading
213
- * does not correspond to any known category
214
- */
215
- static fromHeading(heading) {
216
- return require_index.fromHeading(heading);
217
- }
218
- /**
219
- * Get all valid section heading strings in priority order.
220
- *
221
- * @remarks
222
- * Returns the `heading` field from each category in {@link Categories.ALL},
223
- * preserving priority order. Useful for building validation sets or
224
- * rendering category pickers.
225
- *
226
- * @returns Readonly array of heading strings (e.g., `["Breaking Changes", "Features", ...]`)
227
- */
228
- static allHeadings() {
229
- return require_index.allHeadings();
230
- }
231
- /**
232
- * Check whether a heading string matches a known category.
233
- *
234
- * @remarks
235
- * Comparison is case-insensitive. Equivalent to
236
- * `Categories.fromHeading(heading) !== undefined`.
237
- *
238
- * @param heading - The heading text to validate
239
- * @returns `true` if the heading matches a known category, `false` otherwise
240
- */
241
- static isValidHeading(heading) {
242
- return require_index.isValidHeading(heading);
243
- }
244
- };
245
-
246
- //#endregion
247
- exports.Categories = Categories;
@@ -1,247 +0,0 @@
1
- import { BREAKING_CHANGES, BUG_FIXES, BUILD_SYSTEM, CATEGORIES, CI, DEPENDENCIES, DOCUMENTATION, FEATURES, MAINTENANCE, OTHER, PERFORMANCE, REFACTORING, REVERTS, TESTS, allHeadings, fromHeading, isValidHeading, resolveCommitType } from "../categories/index.js";
2
-
3
- //#region ../silk-effects/dist/dev/pkg/changesets/api/categories.js
4
- /**
5
- * Class-based API wrapper for section categories.
6
- *
7
- * Provides a static class interface that bridges to the underlying
8
- * Effect-native category functions for higher-level consumers.
9
- *
10
- * @internal
11
- */
12
- /**
13
- * Static class wrapper for section category operations.
14
- *
15
- * Provides methods for resolving conventional commit types to changelog
16
- * section categories, validating section headings, and accessing the
17
- * canonical set of 13 section categories used throughout the pipeline.
18
- *
19
- * @remarks
20
- * This class wraps the pure functions and constants from the internal
21
- * `categories/` module. Each {@link SectionCategory} is defined by the
22
- * {@link SectionCategorySchema} Effect Schema, which provides runtime
23
- * validation at system boundaries. The class itself is stateless; all
24
- * methods and properties are `static`.
25
- *
26
- * Categories control how changelog entries are grouped and ordered.
27
- * Lower priority numbers appear first in the output. The 13 built-in
28
- * categories cover all conventional commit types plus special cases
29
- * like dependency updates and breaking changes.
30
- *
31
- * @example Looking up categories from commit metadata
32
- * ```typescript
33
- * import { Categories } from "\@savvy-web/changesets";
34
- * import type { SectionCategory } from "\@savvy-web/changesets";
35
- *
36
- * // Resolve a conventional commit type to its category
37
- * const feature: SectionCategory = Categories.fromCommitType("feat");
38
- * // feature.heading === "Features"
39
- * // feature.priority === 2
40
- *
41
- * // Breaking changes always win regardless of commit type
42
- * const breaking: SectionCategory = Categories.fromCommitType("fix", undefined, true);
43
- * // breaking.heading === "Breaking Changes"
44
- * // breaking.priority === 1
45
- *
46
- * // The special scope "deps" on "chore" maps to Dependencies
47
- * const deps: SectionCategory = Categories.fromCommitType("chore", "deps");
48
- * // deps.heading === "Dependencies"
49
- * ```
50
- *
51
- * @example Validating section headings
52
- * ```typescript
53
- * import { Categories } from "\@savvy-web/changesets";
54
- *
55
- * const headings: readonly string[] = Categories.allHeadings();
56
- * // ["Breaking Changes", "Features", "Bug Fixes", ...]
57
- *
58
- * const valid: boolean = Categories.isValidHeading("Bug Fixes");
59
- * // true
60
- *
61
- * const unknown: boolean = Categories.isValidHeading("Miscellaneous");
62
- * // false
63
- * ```
64
- *
65
- * @example Reverse-lookup from heading text
66
- * ```typescript
67
- * import { Categories } from "\@savvy-web/changesets";
68
- * import type { SectionCategory } from "\@savvy-web/changesets";
69
- *
70
- * const category: SectionCategory | undefined = Categories.fromHeading("Features");
71
- * if (category) {
72
- * const commitTypes: readonly string[] = category.commitTypes;
73
- * // ["feat"]
74
- * }
75
- * ```
76
- *
77
- * @see {@link SectionCategory} for the category shape (heading, priority, commitTypes, description)
78
- * @see {@link SectionCategorySchema} for the Effect Schema that validates category data
79
- *
80
- * @public
81
- */
82
- var Categories = class {
83
- constructor() {}
84
- /**
85
- * Breaking changes -- backward-incompatible changes (priority 1).
86
- *
87
- * @remarks
88
- * Mapped from any commit type when the `breaking` flag is `true`.
89
- * Always appears first in changelog output.
90
- */
91
- static BREAKING_CHANGES = BREAKING_CHANGES;
92
- /**
93
- * Features -- new functionality (priority 2).
94
- *
95
- * @remarks
96
- * Mapped from the `feat` commit type.
97
- */
98
- static FEATURES = FEATURES;
99
- /**
100
- * Bug Fixes -- bug corrections (priority 3).
101
- *
102
- * @remarks
103
- * Mapped from the `fix` commit type.
104
- */
105
- static BUG_FIXES = BUG_FIXES;
106
- /**
107
- * Performance -- performance improvements (priority 4).
108
- *
109
- * @remarks
110
- * Mapped from the `perf` commit type.
111
- */
112
- static PERFORMANCE = PERFORMANCE;
113
- /**
114
- * Documentation -- documentation changes (priority 5).
115
- *
116
- * @remarks
117
- * Mapped from the `docs` commit type.
118
- */
119
- static DOCUMENTATION = DOCUMENTATION;
120
- /**
121
- * Refactoring -- code restructuring (priority 6).
122
- *
123
- * @remarks
124
- * Mapped from the `refactor` commit type.
125
- */
126
- static REFACTORING = REFACTORING;
127
- /**
128
- * Tests -- test additions or modifications (priority 7).
129
- *
130
- * @remarks
131
- * Mapped from the `test` commit type.
132
- */
133
- static TESTS = TESTS;
134
- /**
135
- * Build System -- build configuration changes (priority 8).
136
- *
137
- * @remarks
138
- * Mapped from the `build` commit type.
139
- */
140
- static BUILD_SYSTEM = BUILD_SYSTEM;
141
- /**
142
- * CI -- continuous integration changes (priority 9).
143
- *
144
- * @remarks
145
- * Mapped from the `ci` commit type.
146
- */
147
- static CI = CI;
148
- /**
149
- * Dependencies -- dependency updates (priority 10).
150
- *
151
- * @remarks
152
- * Mapped from `chore(deps)` and similar dependency-scoped commits.
153
- */
154
- static DEPENDENCIES = DEPENDENCIES;
155
- /**
156
- * Maintenance -- general maintenance (priority 11).
157
- *
158
- * @remarks
159
- * Mapped from the `chore` commit type (without the `deps` scope).
160
- */
161
- static MAINTENANCE = MAINTENANCE;
162
- /**
163
- * Reverts -- reverted changes (priority 12).
164
- *
165
- * @remarks
166
- * Mapped from the `revert` commit type.
167
- */
168
- static REVERTS = REVERTS;
169
- /**
170
- * Other -- uncategorized changes (priority 13).
171
- *
172
- * @remarks
173
- * Fallback category for unrecognized commit types. Always appears
174
- * last in changelog output.
175
- */
176
- static OTHER = OTHER;
177
- /**
178
- * All 13 categories ordered by priority (ascending, 1-13).
179
- *
180
- * @remarks
181
- * This array is frozen and sorted from highest priority (Breaking Changes)
182
- * to lowest (Other). Useful for iterating over categories in display order.
183
- */
184
- static ALL = CATEGORIES;
185
- /**
186
- * Resolve a conventional commit type to its section category.
187
- *
188
- * @remarks
189
- * Resolution follows a precedence chain:
190
- *
191
- * 1. If `breaking` is `true`, always returns {@link Categories.BREAKING_CHANGES}
192
- * 2. If `type` is `"chore"` and `scope` is `"deps"`, returns {@link Categories.DEPENDENCIES}
193
- * 3. Otherwise, looks up `type` in the `commitTypes` arrays of all categories
194
- * 4. Falls back to {@link Categories.OTHER} for unrecognized types
195
- *
196
- * @param type - The conventional commit type (e.g., `"feat"`, `"fix"`, `"chore"`)
197
- * @param scope - Optional commit scope (e.g., `"deps"` from `chore(deps):`)
198
- * @param breaking - Whether the commit includes a breaking change indicator (`!`)
199
- * @returns The resolved {@link SectionCategory}
200
- */
201
- static fromCommitType(type, scope, breaking) {
202
- return resolveCommitType(type, scope, breaking);
203
- }
204
- /**
205
- * Look up a category by its section heading text.
206
- *
207
- * @remarks
208
- * Comparison is case-insensitive. For example, both `"Bug Fixes"` and
209
- * `"bug fixes"` will match {@link Categories.BUG_FIXES}.
210
- *
211
- * @param heading - The heading text (e.g., `"Features"`, `"Bug Fixes"`)
212
- * @returns The matching {@link SectionCategory}, or `undefined` if the heading
213
- * does not correspond to any known category
214
- */
215
- static fromHeading(heading) {
216
- return fromHeading(heading);
217
- }
218
- /**
219
- * Get all valid section heading strings in priority order.
220
- *
221
- * @remarks
222
- * Returns the `heading` field from each category in {@link Categories.ALL},
223
- * preserving priority order. Useful for building validation sets or
224
- * rendering category pickers.
225
- *
226
- * @returns Readonly array of heading strings (e.g., `["Breaking Changes", "Features", ...]`)
227
- */
228
- static allHeadings() {
229
- return allHeadings();
230
- }
231
- /**
232
- * Check whether a heading string matches a known category.
233
- *
234
- * @remarks
235
- * Comparison is case-insensitive. Equivalent to
236
- * `Categories.fromHeading(heading) !== undefined`.
237
- *
238
- * @param heading - The heading text to validate
239
- * @returns `true` if the heading matches a known category, `false` otherwise
240
- */
241
- static isValidHeading(heading) {
242
- return isValidHeading(heading);
243
- }
244
- };
245
-
246
- //#endregion
247
- export { Categories };