conventional-changelog-storm-software 0.1.4 → 0.2.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 (94) hide show
  1. package/README.md +2 -1
  2. package/dist/{chunk-I6KKIB6V.js → chunk-5LCJL5Y4.js} +1 -1
  3. package/dist/{chunk-M7BTBQHL.cjs → chunk-5N2ARSSR.cjs} +2 -2
  4. package/dist/{chunk-2MZWLEPP.js → chunk-6VTXDH3N.js} +2 -2
  5. package/dist/chunk-AZ63WFL3.cjs +323 -0
  6. package/dist/chunk-BYHEPM6H.cjs +9 -0
  7. package/dist/chunk-CLCUOXBI.js +9 -0
  8. package/dist/chunk-DCUDJDI3.js +41 -0
  9. package/dist/chunk-FK6SU6OS.cjs +11 -0
  10. package/dist/chunk-FWRV4KWL.js +55 -0
  11. package/dist/chunk-HTCRBQT2.cjs +2 -0
  12. package/dist/chunk-KZ3J3GGS.cjs +49 -0
  13. package/dist/chunk-MFPYRGZG.js +7 -0
  14. package/dist/chunk-MOSKPEIX.cjs +59 -0
  15. package/dist/chunk-NBWP5FXE.cjs +58 -0
  16. package/dist/chunk-O6KBWG2E.js +44 -0
  17. package/dist/chunk-QQPFD35P.js +316 -0
  18. package/dist/chunk-VDNSOTXE.js +54 -0
  19. package/dist/chunk-X636N6E2.cjs +49 -0
  20. package/dist/{chunk-RR5776TG.cjs → chunk-Y4USM24W.cjs} +1 -1
  21. package/dist/{chunk-KRZANN66.cjs → chunk-ZMGLMEH4.cjs} +2 -2
  22. package/dist/chunk-ZMI3GKXH.js +1 -0
  23. package/dist/commit-types.cjs +4 -4
  24. package/dist/commit-types.d.cts +2 -2
  25. package/dist/commit-types.d.ts +2 -2
  26. package/dist/commit-types.js +1 -1
  27. package/dist/configs/index.cjs +16 -0
  28. package/dist/configs/index.d.cts +425 -0
  29. package/dist/configs/index.d.ts +425 -0
  30. package/dist/configs/index.js +6 -0
  31. package/dist/configs/minimal.cjs +24 -0
  32. package/dist/configs/minimal.d.cts +295 -0
  33. package/dist/configs/minimal.d.ts +295 -0
  34. package/dist/configs/minimal.js +4 -0
  35. package/dist/configs/monorepo.cjs +24 -0
  36. package/dist/configs/monorepo.d.cts +297 -0
  37. package/dist/configs/monorepo.d.ts +297 -0
  38. package/dist/configs/monorepo.js +4 -0
  39. package/dist/index.cjs +2389 -22
  40. package/dist/index.d.cts +8 -6
  41. package/dist/index.d.ts +8 -6
  42. package/dist/index.js +2378 -18
  43. package/dist/parser.cjs +7 -9
  44. package/dist/parser.js +8 -3
  45. package/dist/types/commit-types.cjs +1 -1
  46. package/dist/types/commit-types.d.cts +2 -2
  47. package/dist/types/commit-types.d.ts +2 -2
  48. package/dist/types/commitlint.cjs +11 -0
  49. package/dist/types/commitlint.d.cts +30 -0
  50. package/dist/types/commitlint.d.ts +30 -0
  51. package/dist/types/commitlint.js +1 -0
  52. package/dist/types/config.cjs +1 -1
  53. package/dist/types/index.cjs +10 -2
  54. package/dist/types/index.d.cts +4 -1
  55. package/dist/types/index.d.ts +4 -1
  56. package/dist/types/index.js +3 -1
  57. package/dist/types/misc.cjs +1 -1
  58. package/dist/types/preset.cjs +1 -1
  59. package/dist/types/preset.d.cts +39 -2
  60. package/dist/types/preset.d.ts +39 -2
  61. package/dist/types/write.cjs +1 -1
  62. package/dist/utilities/constants.cjs +13 -21
  63. package/dist/utilities/constants.d.cts +17 -35
  64. package/dist/utilities/constants.d.ts +17 -35
  65. package/dist/utilities/constants.js +2 -2
  66. package/dist/utilities/helpers.cjs +8 -8
  67. package/dist/utilities/helpers.js +3 -3
  68. package/dist/utilities/index.cjs +39 -29
  69. package/dist/utilities/index.d.cts +4 -4
  70. package/dist/utilities/index.d.ts +4 -4
  71. package/dist/utilities/index.js +10 -4
  72. package/dist/utilities/nx-scopes.cjs +29 -0
  73. package/dist/utilities/nx-scopes.d.cts +15 -0
  74. package/dist/utilities/nx-scopes.d.ts +15 -0
  75. package/dist/utilities/nx-scopes.js +7 -0
  76. package/dist/whatBump.cjs +45 -10
  77. package/dist/whatBump.js +46 -4
  78. package/dist/writer.cjs +156 -9
  79. package/dist/writer.js +154 -4
  80. package/package.json +33 -4
  81. package/dist/chunk-63544DKM.js +0 -153
  82. package/dist/chunk-DL5576FZ.cjs +0 -10
  83. package/dist/chunk-HVVJTAOT.cjs +0 -160
  84. package/dist/chunk-IJLTWVLG.js +0 -57
  85. package/dist/chunk-LPCM2SVA.js +0 -45
  86. package/dist/chunk-O35EG2LQ.js +0 -8
  87. package/dist/chunk-UK5DQTL2.cjs +0 -47
  88. package/dist/chunk-WMU6N5SY.cjs +0 -2360
  89. package/dist/chunk-YBJMQHWU.cjs +0 -67
  90. package/dist/chunk-YU35WA2X.js +0 -2353
  91. package/dist/utilities/options.cjs +0 -14
  92. package/dist/utilities/options.d.cts +0 -12
  93. package/dist/utilities/options.d.ts +0 -12
  94. package/dist/utilities/options.js +0 -4
package/README.md CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-0.1.2-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-0.1.3-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
@@ -40,6 +40,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
40
40
 
41
41
  <!-- START doctoc -->
42
42
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
43
+
43
44
  ## Table of Contents
44
45
 
45
46
  - [Storm Software's Conventional Changelog Package](#storm-softwares-conventional-changelog-package)
@@ -1,4 +1,4 @@
1
- import { DATETIME_LENGTH } from './chunk-IJLTWVLG.js';
1
+ import { DATETIME_LENGTH } from './chunk-DCUDJDI3.js';
2
2
 
3
3
  // src/utilities/helpers.ts
4
4
  function hasIntersection(a, b) {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  // src/commit-types.ts
4
- var COMMIT_TYPES = {
4
+ var DEFAULT_COMMIT_TYPES = {
5
5
  /* --- Bumps version when selected --- */
6
6
  "chore": {
7
7
  "description": "Other changes that don't modify src or test files",
@@ -131,4 +131,4 @@ var COMMIT_TYPES = {
131
131
  }
132
132
  };
133
133
 
134
- exports.COMMIT_TYPES = COMMIT_TYPES;
134
+ exports.DEFAULT_COMMIT_TYPES = DEFAULT_COMMIT_TYPES;
@@ -1,5 +1,5 @@
1
1
  // src/commit-types.ts
2
- var COMMIT_TYPES = {
2
+ var DEFAULT_COMMIT_TYPES = {
3
3
  /* --- Bumps version when selected --- */
4
4
  "chore": {
5
5
  "description": "Other changes that don't modify src or test files",
@@ -129,4 +129,4 @@ var COMMIT_TYPES = {
129
129
  }
130
130
  };
131
131
 
132
- export { COMMIT_TYPES };
132
+ export { DEFAULT_COMMIT_TYPES };
@@ -0,0 +1,323 @@
1
+ 'use strict';
2
+
3
+ var chunkY4USM24W_cjs = require('./chunk-Y4USM24W.cjs');
4
+ var promises = require('fs/promises');
5
+ var path = require('path');
6
+ var url = require('url');
7
+ var compareFunc = require('compare-func');
8
+
9
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
+
11
+ var compareFunc__default = /*#__PURE__*/_interopDefault(compareFunc);
12
+
13
+ // ../../node_modules/.pnpm/conventional-changelog-conventionalcommits@9.1.0/node_modules/conventional-changelog-conventionalcommits/src/constants.js
14
+ var DEFAULT_COMMIT_TYPES = Object.freeze([
15
+ {
16
+ type: "feat",
17
+ section: "Features"
18
+ },
19
+ {
20
+ type: "feature",
21
+ section: "Features"
22
+ },
23
+ {
24
+ type: "fix",
25
+ section: "Bug Fixes"
26
+ },
27
+ {
28
+ type: "perf",
29
+ section: "Performance Improvements"
30
+ },
31
+ {
32
+ type: "revert",
33
+ section: "Reverts"
34
+ },
35
+ {
36
+ type: "docs",
37
+ section: "Documentation",
38
+ hidden: true
39
+ },
40
+ {
41
+ type: "style",
42
+ section: "Styles",
43
+ hidden: true
44
+ },
45
+ {
46
+ type: "chore",
47
+ section: "Miscellaneous Chores",
48
+ hidden: true
49
+ },
50
+ {
51
+ type: "refactor",
52
+ section: "Code Refactoring",
53
+ hidden: true
54
+ },
55
+ {
56
+ type: "test",
57
+ section: "Tests",
58
+ hidden: true
59
+ },
60
+ {
61
+ type: "build",
62
+ section: "Build System",
63
+ hidden: true
64
+ },
65
+ {
66
+ type: "ci",
67
+ section: "Continuous Integration",
68
+ hidden: true
69
+ }
70
+ ].map(Object.freeze));
71
+
72
+ // ../../node_modules/.pnpm/conventional-changelog-conventionalcommits@9.1.0/node_modules/conventional-changelog-conventionalcommits/src/parser.js
73
+ function createParserOpts(config) {
74
+ return {
75
+ headerPattern: /^(\w*)(?:\((.*)\))?!?: (.*)$/,
76
+ breakingHeaderPattern: /^(\w*)(?:\((.*)\))?!: (.*)$/,
77
+ headerCorrespondence: [
78
+ "type",
79
+ "scope",
80
+ "subject"
81
+ ],
82
+ noteKeywords: ["BREAKING CHANGE", "BREAKING-CHANGE"],
83
+ revertPattern: /^(?:Revert|revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w*)\./i,
84
+ revertCorrespondence: ["header", "hash"],
85
+ issuePrefixes: config?.issuePrefixes || ["#"]
86
+ };
87
+ }
88
+
89
+ // ../../node_modules/.pnpm/conventional-changelog-conventionalcommits@9.1.0/node_modules/conventional-changelog-conventionalcommits/src/utils.js
90
+ function hasIntersection(a, b) {
91
+ if (!a || !b) {
92
+ return false;
93
+ }
94
+ let listA = a;
95
+ let listB = b;
96
+ if (!Array.isArray(listA)) {
97
+ listA = [listA];
98
+ }
99
+ if (!Array.isArray(listB)) {
100
+ listB = [listB];
101
+ }
102
+ return listA.some((item) => listB.includes(item));
103
+ }
104
+ function matchScope(config = {}, commit) {
105
+ const {
106
+ scope: targetScope,
107
+ scopeOnly = false
108
+ } = config;
109
+ const includesScope = hasIntersection(
110
+ commit.scope?.split(","),
111
+ targetScope
112
+ );
113
+ return !targetScope || scopeOnly && includesScope || !scopeOnly && (!commit.scope || includesScope);
114
+ }
115
+
116
+ // ../../node_modules/.pnpm/conventional-changelog-conventionalcommits@9.1.0/node_modules/conventional-changelog-conventionalcommits/src/writer.js
117
+ var dirname = url.fileURLToPath(new URL(".", chunkY4USM24W_cjs.importMetaUrl));
118
+ var COMMIT_HASH_LENGTH = 7;
119
+ var releaseAsRegex = /release-as:\s*\w*@?([0-9]+\.[0-9]+\.[0-9a-z]+(-[0-9a-z.]+)?)\s*/i;
120
+ var owner = "{{#if this.owner}}{{~this.owner}}{{else}}{{~@root.owner}}{{/if}}";
121
+ var host = "{{~@root.host}}";
122
+ var repository = "{{#if this.repository}}{{~this.repository}}{{else}}{{~@root.repository}}{{/if}}";
123
+ async function createWriterOpts(config) {
124
+ const finalConfig = {
125
+ types: DEFAULT_COMMIT_TYPES,
126
+ issueUrlFormat: "{{host}}/{{owner}}/{{repository}}/issues/{{id}}",
127
+ commitUrlFormat: "{{host}}/{{owner}}/{{repository}}/commit/{{hash}}",
128
+ compareUrlFormat: "{{host}}/{{owner}}/{{repository}}/compare/{{previousTag}}...{{currentTag}}",
129
+ userUrlFormat: "{{host}}/{{user}}",
130
+ issuePrefixes: ["#"],
131
+ ...config
132
+ };
133
+ const commitUrlFormat = expandTemplate(finalConfig.commitUrlFormat, {
134
+ host,
135
+ owner,
136
+ repository
137
+ });
138
+ const compareUrlFormat = expandTemplate(finalConfig.compareUrlFormat, {
139
+ host,
140
+ owner,
141
+ repository
142
+ });
143
+ const issueUrlFormat = expandTemplate(finalConfig.issueUrlFormat, {
144
+ host,
145
+ owner,
146
+ repository,
147
+ id: "{{this.issue}}",
148
+ prefix: "{{this.prefix}}"
149
+ });
150
+ const [
151
+ template,
152
+ header,
153
+ commit,
154
+ footer
155
+ ] = await Promise.all([
156
+ promises.readFile(path.resolve(dirname, "./templates/template.hbs"), "utf-8"),
157
+ promises.readFile(path.resolve(dirname, "./templates/header.hbs"), "utf-8"),
158
+ promises.readFile(path.resolve(dirname, "./templates/commit.hbs"), "utf-8"),
159
+ promises.readFile(path.resolve(dirname, "./templates/footer.hbs"), "utf-8")
160
+ ]);
161
+ const writerOpts = getWriterOpts(finalConfig);
162
+ writerOpts.mainTemplate = template;
163
+ writerOpts.headerPartial = header.replace(/{{compareUrlFormat}}/g, compareUrlFormat);
164
+ writerOpts.commitPartial = commit.replace(/{{commitUrlFormat}}/g, commitUrlFormat).replace(/{{issueUrlFormat}}/g, issueUrlFormat);
165
+ writerOpts.footerPartial = footer;
166
+ return writerOpts;
167
+ }
168
+ function getWriterOpts(config) {
169
+ const commitGroupOrder = config.types.flatMap((t) => t.section).filter((t) => t);
170
+ return {
171
+ transform: (commit, context) => {
172
+ let discard = true;
173
+ const issues = [];
174
+ const entry = findTypeEntry(config.types, commit);
175
+ if (commit.footer && releaseAsRegex.test(commit.footer) || commit.body && releaseAsRegex.test(commit.body)) {
176
+ discard = false;
177
+ }
178
+ const notes = commit.notes.map((note) => {
179
+ discard = false;
180
+ return {
181
+ ...note,
182
+ title: "BREAKING CHANGES"
183
+ };
184
+ });
185
+ if (
186
+ // breaking changes attached to any type are still displayed.
187
+ discard && (entry === void 0 || entry.hidden) || !matchScope(config, commit)
188
+ ) {
189
+ return void 0;
190
+ }
191
+ const type = entry ? entry.section : commit.type;
192
+ const scope = commit.scope === "*" || config.scope ? "" : commit.scope;
193
+ const shortHash = typeof commit.hash === "string" ? commit.hash.substring(0, COMMIT_HASH_LENGTH) : commit.shortHash;
194
+ let { subject } = commit;
195
+ if (typeof subject === "string") {
196
+ const issueRegEx = `(${config.issuePrefixes.join("|")})([a-z0-9]+)`;
197
+ const re = new RegExp(issueRegEx, "g");
198
+ subject = subject.replace(re, (_, prefix, issue) => {
199
+ issues.push(prefix + issue);
200
+ const url = expandTemplate(config.issueUrlFormat, {
201
+ host: context.host,
202
+ owner: context.owner,
203
+ repository: context.repository,
204
+ id: issue,
205
+ prefix
206
+ });
207
+ return `[${prefix}${issue}](${url})`;
208
+ });
209
+ subject = subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g, (_, user) => {
210
+ if (user.includes("/")) {
211
+ return `@${user}`;
212
+ }
213
+ const usernameUrl = expandTemplate(config.userUrlFormat, {
214
+ host: context.host,
215
+ owner: context.owner,
216
+ repository: context.repository,
217
+ user
218
+ });
219
+ return `[@${user}](${usernameUrl})`;
220
+ });
221
+ }
222
+ const references = commit.references.filter((reference) => !issues.includes(reference.prefix + reference.issue));
223
+ return {
224
+ notes,
225
+ type,
226
+ scope,
227
+ shortHash,
228
+ subject,
229
+ references
230
+ };
231
+ },
232
+ groupBy: "type",
233
+ // the groupings of commit messages, e.g., Features vs., Bug Fixes, are
234
+ // sorted based on their probable importance:
235
+ commitGroupsSort: (a, b) => {
236
+ const gRankA = commitGroupOrder.indexOf(a.title);
237
+ const gRankB = commitGroupOrder.indexOf(b.title);
238
+ return gRankA - gRankB;
239
+ },
240
+ commitsSort: ["scope", "subject"],
241
+ noteGroupsSort: "title",
242
+ notesSort: compareFunc__default.default
243
+ };
244
+ }
245
+ function findTypeEntry(types, commit) {
246
+ const typeKey = (commit.revert ? "revert" : commit.type || "").toLowerCase();
247
+ return types.find((entry) => {
248
+ if (entry.type !== typeKey) {
249
+ return false;
250
+ }
251
+ if (entry.scope && entry.scope !== commit.scope) {
252
+ return false;
253
+ }
254
+ return true;
255
+ });
256
+ }
257
+ function expandTemplate(template, context) {
258
+ let expanded = template;
259
+ Object.keys(context).forEach((key) => {
260
+ expanded = expanded.replace(new RegExp(`{{${key}}}`, "g"), context[key]);
261
+ });
262
+ return expanded;
263
+ }
264
+
265
+ // ../../node_modules/.pnpm/conventional-changelog-conventionalcommits@9.1.0/node_modules/conventional-changelog-conventionalcommits/src/whatBump.js
266
+ function createWhatBump(config = {}) {
267
+ const {
268
+ types = DEFAULT_COMMIT_TYPES,
269
+ bumpStrict = false
270
+ } = config;
271
+ const hiddenTypes = bumpStrict && types.reduce((hiddenTypes2, type) => {
272
+ if (type.hidden) {
273
+ hiddenTypes2.push(type.type);
274
+ }
275
+ return hiddenTypes2;
276
+ }, []);
277
+ return function whatBump(commits) {
278
+ let level = 2;
279
+ let breakings = 0;
280
+ let features = 0;
281
+ let bugfixes = 0;
282
+ commits.forEach((commit) => {
283
+ if (!matchScope(config, commit)) {
284
+ return;
285
+ }
286
+ if (commit.notes.length > 0) {
287
+ breakings += commit.notes.length;
288
+ level = 0;
289
+ } else if (commit.type === "feat" || commit.type === "feature") {
290
+ features += 1;
291
+ if (level === 2) {
292
+ level = 1;
293
+ }
294
+ } else if (bumpStrict && !hiddenTypes.includes(commit.type)) {
295
+ bugfixes += 1;
296
+ }
297
+ });
298
+ if (config?.preMajor && level < 2) {
299
+ level++;
300
+ } else if (bumpStrict && level === 2 && !breakings && !features && !bugfixes) {
301
+ return null;
302
+ }
303
+ return {
304
+ level,
305
+ reason: breakings === 1 ? `There is ${breakings} BREAKING CHANGE and ${features} features` : `There are ${breakings} BREAKING CHANGES and ${features} features`
306
+ };
307
+ };
308
+ }
309
+
310
+ // ../../node_modules/.pnpm/conventional-changelog-conventionalcommits@9.1.0/node_modules/conventional-changelog-conventionalcommits/src/index.js
311
+ async function createPreset(config) {
312
+ return {
313
+ commits: {
314
+ ignore: config?.ignoreCommits,
315
+ merges: false
316
+ },
317
+ parser: createParserOpts(config),
318
+ writer: await createWriterOpts(config),
319
+ whatBump: createWhatBump(config)
320
+ };
321
+ }
322
+
323
+ exports.createPreset = createPreset;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var chunkNBWP5FXE_cjs = require('./chunk-NBWP5FXE.cjs');
4
+ var chunkMOSKPEIX_cjs = require('./chunk-MOSKPEIX.cjs');
5
+
6
+ // src/configs/index.ts
7
+ var COMMIT_CONFIGS = { minimal: chunkNBWP5FXE_cjs.minimal_default, monorepo: chunkMOSKPEIX_cjs.monorepo_default };
8
+
9
+ exports.COMMIT_CONFIGS = COMMIT_CONFIGS;
@@ -0,0 +1,9 @@
1
+ // src/types/commitlint.ts
2
+ var RuleConfigSeverity = /* @__PURE__ */ ((RuleConfigSeverity2) => {
3
+ RuleConfigSeverity2[RuleConfigSeverity2["Disabled"] = 0] = "Disabled";
4
+ RuleConfigSeverity2[RuleConfigSeverity2["Warning"] = 1] = "Warning";
5
+ RuleConfigSeverity2[RuleConfigSeverity2["Error"] = 2] = "Error";
6
+ return RuleConfigSeverity2;
7
+ })(RuleConfigSeverity || {});
8
+
9
+ export { RuleConfigSeverity };
@@ -0,0 +1,41 @@
1
+ import { DEFAULT_COMMIT_TYPES } from './chunk-6VTXDH3N.js';
2
+
3
+ // src/utilities/constants.ts
4
+ var CHANGELOG_COMMIT_TYPES_OBJECT = Object.freeze(
5
+ Object.entries(DEFAULT_COMMIT_TYPES).reduce(
6
+ (ret, [key, commitType]) => {
7
+ ret[key] = {
8
+ ...commitType.changelog,
9
+ type: key,
10
+ section: commitType.changelog?.title || commitType.title,
11
+ hidden: commitType.changelog?.hidden
12
+ };
13
+ return ret;
14
+ },
15
+ {}
16
+ )
17
+ );
18
+ var CHANGELOG_COMMIT_TYPES = [
19
+ CHANGELOG_COMMIT_TYPES_OBJECT.feat,
20
+ CHANGELOG_COMMIT_TYPES_OBJECT.fix,
21
+ CHANGELOG_COMMIT_TYPES_OBJECT.chore,
22
+ CHANGELOG_COMMIT_TYPES_OBJECT.deps,
23
+ CHANGELOG_COMMIT_TYPES_OBJECT.docs,
24
+ CHANGELOG_COMMIT_TYPES_OBJECT.style,
25
+ CHANGELOG_COMMIT_TYPES_OBJECT.refactor,
26
+ CHANGELOG_COMMIT_TYPES_OBJECT.perf,
27
+ CHANGELOG_COMMIT_TYPES_OBJECT.build,
28
+ CHANGELOG_COMMIT_TYPES_OBJECT.ci,
29
+ CHANGELOG_COMMIT_TYPES_OBJECT.test
30
+ ];
31
+ var CHANGELOG_COMMIT_TYPE_ORDER = CHANGELOG_COMMIT_TYPES.map(
32
+ (entry) => entry.type
33
+ );
34
+ var CHANGELOG_COMMIT_SECTION_ORDER = CHANGELOG_COMMIT_TYPES.map(
35
+ (entry) => entry.section
36
+ );
37
+ var HASH_SHORT_LENGTH = 7;
38
+ var HEADER_MAX_LENGTH = 100;
39
+ var DATETIME_LENGTH = 10;
40
+
41
+ export { CHANGELOG_COMMIT_SECTION_ORDER, CHANGELOG_COMMIT_TYPES, CHANGELOG_COMMIT_TYPES_OBJECT, CHANGELOG_COMMIT_TYPE_ORDER, DATETIME_LENGTH, HASH_SHORT_LENGTH, HEADER_MAX_LENGTH };
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ // src/types/commitlint.ts
4
+ var RuleConfigSeverity = /* @__PURE__ */ ((RuleConfigSeverity2) => {
5
+ RuleConfigSeverity2[RuleConfigSeverity2["Disabled"] = 0] = "Disabled";
6
+ RuleConfigSeverity2[RuleConfigSeverity2["Warning"] = 1] = "Warning";
7
+ RuleConfigSeverity2[RuleConfigSeverity2["Error"] = 2] = "Error";
8
+ return RuleConfigSeverity2;
9
+ })(RuleConfigSeverity || {});
10
+
11
+ exports.RuleConfigSeverity = RuleConfigSeverity;
@@ -0,0 +1,55 @@
1
+ import { CHANGELOG_COMMIT_TYPES } from './chunk-DCUDJDI3.js';
2
+ import { DEFAULT_COMMIT_TYPES } from './chunk-6VTXDH3N.js';
3
+
4
+ // src/configs/monorepo.ts
5
+ var changelogs = {
6
+ props: {
7
+ ignoreCommits: void 0,
8
+ types: CHANGELOG_COMMIT_TYPES,
9
+ bumpStrict: true,
10
+ scope: ["monorepo"],
11
+ scopeOnly: true
12
+ }
13
+ };
14
+ var commitlint = {
15
+ helpUrl: "https://developer.stormsoftware.com/commitlint/monorepo",
16
+ rules: {
17
+ "body-leading-blank": [1 /* Warning */, "always"],
18
+ "body-max-length": [2 /* Error */, "always", 600],
19
+ "footer-leading-blank": [1 /* Warning */, "always"],
20
+ "footer-max-line-length": [2 /* Error */, "always", 150],
21
+ "header-max-length": [2 /* Error */, "always", 150],
22
+ "header-trim": [2 /* Error */, "always"],
23
+ "subject-case": [2 /* Error */, "always", ["sentence-case"]],
24
+ "subject-empty": [2 /* Error */, "never"],
25
+ "subject-full-stop": [2 /* Error */, "never", "."],
26
+ "subject-max-length": [2 /* Error */, "always", 150],
27
+ "subject-min-length": [2 /* Error */, "always", 3],
28
+ "type-case": [2 /* Error */, "always", "kebab-case"],
29
+ "type-empty": [2 /* Error */, "never"],
30
+ "type-enum": [
31
+ 2 /* Error */,
32
+ "always",
33
+ Object.keys(DEFAULT_COMMIT_TYPES)
34
+ ],
35
+ "type-max-length": [2 /* Error */, "always", 20],
36
+ "type-min-length": [2 /* Error */, "always", 3],
37
+ "scope-case": [2 /* Error */, "always", ["kebab-case"]],
38
+ "scope-empty": [2 /* Error */, "never"]
39
+ },
40
+ settings: {
41
+ enableMultipleScopes: false,
42
+ disableEmoji: true,
43
+ breakingChangePrefix: "\u{1F4A3} ",
44
+ closedIssuePrefix: "\u2705 ",
45
+ format: "{type}({scope}): {emoji}{subject}"
46
+ }
47
+ };
48
+ var config = {
49
+ types: DEFAULT_COMMIT_TYPES,
50
+ changelogs,
51
+ commitlint
52
+ };
53
+ var monorepo_default = config;
54
+
55
+ export { changelogs, commitlint, monorepo_default };
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+
@@ -0,0 +1,49 @@
1
+ 'use strict';
2
+
3
+ var chunk5N2ARSSR_cjs = require('./chunk-5N2ARSSR.cjs');
4
+
5
+ // src/utilities/constants.ts
6
+ var CHANGELOG_COMMIT_TYPES_OBJECT = Object.freeze(
7
+ Object.entries(chunk5N2ARSSR_cjs.DEFAULT_COMMIT_TYPES).reduce(
8
+ (ret, [key, commitType]) => {
9
+ ret[key] = {
10
+ ...commitType.changelog,
11
+ type: key,
12
+ section: commitType.changelog?.title || commitType.title,
13
+ hidden: commitType.changelog?.hidden
14
+ };
15
+ return ret;
16
+ },
17
+ {}
18
+ )
19
+ );
20
+ var CHANGELOG_COMMIT_TYPES = [
21
+ CHANGELOG_COMMIT_TYPES_OBJECT.feat,
22
+ CHANGELOG_COMMIT_TYPES_OBJECT.fix,
23
+ CHANGELOG_COMMIT_TYPES_OBJECT.chore,
24
+ CHANGELOG_COMMIT_TYPES_OBJECT.deps,
25
+ CHANGELOG_COMMIT_TYPES_OBJECT.docs,
26
+ CHANGELOG_COMMIT_TYPES_OBJECT.style,
27
+ CHANGELOG_COMMIT_TYPES_OBJECT.refactor,
28
+ CHANGELOG_COMMIT_TYPES_OBJECT.perf,
29
+ CHANGELOG_COMMIT_TYPES_OBJECT.build,
30
+ CHANGELOG_COMMIT_TYPES_OBJECT.ci,
31
+ CHANGELOG_COMMIT_TYPES_OBJECT.test
32
+ ];
33
+ var CHANGELOG_COMMIT_TYPE_ORDER = CHANGELOG_COMMIT_TYPES.map(
34
+ (entry) => entry.type
35
+ );
36
+ var CHANGELOG_COMMIT_SECTION_ORDER = CHANGELOG_COMMIT_TYPES.map(
37
+ (entry) => entry.section
38
+ );
39
+ var HASH_SHORT_LENGTH = 7;
40
+ var HEADER_MAX_LENGTH = 100;
41
+ var DATETIME_LENGTH = 10;
42
+
43
+ exports.CHANGELOG_COMMIT_SECTION_ORDER = CHANGELOG_COMMIT_SECTION_ORDER;
44
+ exports.CHANGELOG_COMMIT_TYPES = CHANGELOG_COMMIT_TYPES;
45
+ exports.CHANGELOG_COMMIT_TYPES_OBJECT = CHANGELOG_COMMIT_TYPES_OBJECT;
46
+ exports.CHANGELOG_COMMIT_TYPE_ORDER = CHANGELOG_COMMIT_TYPE_ORDER;
47
+ exports.DATETIME_LENGTH = DATETIME_LENGTH;
48
+ exports.HASH_SHORT_LENGTH = HASH_SHORT_LENGTH;
49
+ exports.HEADER_MAX_LENGTH = HEADER_MAX_LENGTH;
@@ -0,0 +1,7 @@
1
+ import { minimal_default } from './chunk-VDNSOTXE.js';
2
+ import { monorepo_default } from './chunk-FWRV4KWL.js';
3
+
4
+ // src/configs/index.ts
5
+ var COMMIT_CONFIGS = { minimal: minimal_default, monorepo: monorepo_default };
6
+
7
+ export { COMMIT_CONFIGS };
@@ -0,0 +1,59 @@
1
+ 'use strict';
2
+
3
+ var chunkKZ3J3GGS_cjs = require('./chunk-KZ3J3GGS.cjs');
4
+ var chunk5N2ARSSR_cjs = require('./chunk-5N2ARSSR.cjs');
5
+
6
+ // src/configs/monorepo.ts
7
+ var changelogs = {
8
+ props: {
9
+ ignoreCommits: void 0,
10
+ types: chunkKZ3J3GGS_cjs.CHANGELOG_COMMIT_TYPES,
11
+ bumpStrict: true,
12
+ scope: ["monorepo"],
13
+ scopeOnly: true
14
+ }
15
+ };
16
+ var commitlint = {
17
+ helpUrl: "https://developer.stormsoftware.com/commitlint/monorepo",
18
+ rules: {
19
+ "body-leading-blank": [1 /* Warning */, "always"],
20
+ "body-max-length": [2 /* Error */, "always", 600],
21
+ "footer-leading-blank": [1 /* Warning */, "always"],
22
+ "footer-max-line-length": [2 /* Error */, "always", 150],
23
+ "header-max-length": [2 /* Error */, "always", 150],
24
+ "header-trim": [2 /* Error */, "always"],
25
+ "subject-case": [2 /* Error */, "always", ["sentence-case"]],
26
+ "subject-empty": [2 /* Error */, "never"],
27
+ "subject-full-stop": [2 /* Error */, "never", "."],
28
+ "subject-max-length": [2 /* Error */, "always", 150],
29
+ "subject-min-length": [2 /* Error */, "always", 3],
30
+ "type-case": [2 /* Error */, "always", "kebab-case"],
31
+ "type-empty": [2 /* Error */, "never"],
32
+ "type-enum": [
33
+ 2 /* Error */,
34
+ "always",
35
+ Object.keys(chunk5N2ARSSR_cjs.DEFAULT_COMMIT_TYPES)
36
+ ],
37
+ "type-max-length": [2 /* Error */, "always", 20],
38
+ "type-min-length": [2 /* Error */, "always", 3],
39
+ "scope-case": [2 /* Error */, "always", ["kebab-case"]],
40
+ "scope-empty": [2 /* Error */, "never"]
41
+ },
42
+ settings: {
43
+ enableMultipleScopes: false,
44
+ disableEmoji: true,
45
+ breakingChangePrefix: "\u{1F4A3} ",
46
+ closedIssuePrefix: "\u2705 ",
47
+ format: "{type}({scope}): {emoji}{subject}"
48
+ }
49
+ };
50
+ var config = {
51
+ types: chunk5N2ARSSR_cjs.DEFAULT_COMMIT_TYPES,
52
+ changelogs,
53
+ commitlint
54
+ };
55
+ var monorepo_default = config;
56
+
57
+ exports.changelogs = changelogs;
58
+ exports.commitlint = commitlint;
59
+ exports.monorepo_default = monorepo_default;