@storm-software/git-tools 2.132.4 → 2.132.7

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.
package/bin/git.cjs CHANGED
@@ -41,6 +41,7 @@ var yaml = require('yaml');
41
41
  var printChanges = require('nx/src/command-line/release/utils/print-changes');
42
42
  var shared = require('nx/src/command-line/release/utils/shared');
43
43
  var utils = require('nx/src/tasks-runner/utils');
44
+ var zod = require('zod');
44
45
  var execCommand = require('nx/src/command-line/release/utils/exec-command');
45
46
  var git = require('nx/src/command-line/release/utils/git');
46
47
  var semver = require('semver');
@@ -110,130 +111,130 @@ function stringifyCargoToml(cargoToml) {
110
111
  // ../conventional-changelog/src/commit-types.ts
111
112
  var DEFAULT_COMMIT_TYPES = {
112
113
  /* --- Bumps version when selected --- */
113
- "chore": {
114
- "description": "Other changes that don't modify src or test files",
115
- "title": "Chore",
116
- "emoji": "\u2699\uFE0F ",
117
- "semverBump": "patch",
118
- "changelog": {
119
- "title": "Miscellaneous",
120
- "hidden": false
114
+ chore: {
115
+ description: "Other changes that don't modify src or test files",
116
+ title: "Chore",
117
+ emoji: "\u2699\uFE0F ",
118
+ semverBump: "patch",
119
+ changelog: {
120
+ title: "Miscellaneous",
121
+ hidden: false
121
122
  }
122
123
  },
123
- "fix": {
124
- "description": "A change that resolves an issue previously identified with the package",
125
- "title": "Bug Fix",
126
- "emoji": "\u{1FAB2} ",
127
- "semverBump": "patch",
128
- "changelog": {
129
- "title": "Bug Fixes",
130
- "hidden": false
124
+ fix: {
125
+ description: "A change that resolves an issue previously identified with the package",
126
+ title: "Bug Fix",
127
+ emoji: "\u{1FAB2} ",
128
+ semverBump: "patch",
129
+ changelog: {
130
+ title: "Bug Fixes",
131
+ hidden: false
131
132
  }
132
133
  },
133
- "feat": {
134
- "description": "A change that adds a new feature to the package",
135
- "title": "Feature",
136
- "emoji": "\u{1F511} ",
137
- "semverBump": "minor",
138
- "changelog": {
139
- "title": "Features",
140
- "hidden": false
134
+ feat: {
135
+ description: "A change that adds a new feature to the package",
136
+ title: "Feature",
137
+ emoji: "\u{1F511} ",
138
+ semverBump: "minor",
139
+ changelog: {
140
+ title: "Features",
141
+ hidden: false
141
142
  }
142
143
  },
143
- "ci": {
144
- "description": "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
145
- "title": "Continuous Integration",
146
- "emoji": "\u{1F9F0} ",
147
- "semverBump": "patch",
148
- "changelog": {
149
- "title": "Continuous Integration",
150
- "hidden": false
144
+ ci: {
145
+ description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
146
+ title: "Continuous Integration",
147
+ emoji: "\u{1F9F0} ",
148
+ semverBump: "patch",
149
+ changelog: {
150
+ title: "Continuous Integration",
151
+ hidden: false
151
152
  }
152
153
  },
153
- "refactor": {
154
- "description": "A code change that neither fixes a bug nor adds a feature",
155
- "title": "Code Refactoring",
156
- "emoji": "\u{1F9EA} ",
157
- "semverBump": "patch",
158
- "changelog": {
159
- "title": "Source Code Improvements",
160
- "hidden": false
154
+ refactor: {
155
+ description: "A code change that neither fixes a bug nor adds a feature",
156
+ title: "Code Refactoring",
157
+ emoji: "\u{1F9EA} ",
158
+ semverBump: "patch",
159
+ changelog: {
160
+ title: "Source Code Improvements",
161
+ hidden: false
161
162
  }
162
163
  },
163
- "style": {
164
- "description": "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
165
- "title": "Style Improvements",
166
- "emoji": "\u{1F48E} ",
167
- "semverBump": "patch",
168
- "changelog": {
169
- "title": "Style Improvements",
170
- "hidden": false
164
+ style: {
165
+ description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
166
+ title: "Style Improvements",
167
+ emoji: "\u{1F48E} ",
168
+ semverBump: "patch",
169
+ changelog: {
170
+ title: "Style Improvements",
171
+ hidden: false
171
172
  }
172
173
  },
173
- "perf": {
174
- "description": "A code change that improves performance",
175
- "title": "Performance Improvement",
176
- "emoji": "\u23F1\uFE0F ",
177
- "semverBump": "patch",
178
- "changelog": {
179
- "title": "Performance Improvements",
180
- "hidden": false
174
+ perf: {
175
+ description: "A code change that improves performance",
176
+ title: "Performance Improvement",
177
+ emoji: "\u23F1\uFE0F ",
178
+ semverBump: "patch",
179
+ changelog: {
180
+ title: "Performance Improvements",
181
+ hidden: false
181
182
  }
182
183
  },
183
184
  /* --- Does not bump version when selected --- */
184
- "docs": {
185
- "description": "A change that only includes documentation updates",
186
- "title": "Documentation",
187
- "emoji": "\u{1F4DC} ",
188
- "semverBump": "none",
189
- "changelog": {
190
- "title": "Documentation",
191
- "hidden": false
185
+ docs: {
186
+ description: "A change that only includes documentation updates",
187
+ title: "Documentation",
188
+ emoji: "\u{1F4DC} ",
189
+ semverBump: "none",
190
+ changelog: {
191
+ title: "Documentation",
192
+ hidden: false
192
193
  }
193
194
  },
194
- "test": {
195
- "description": "Adding missing tests or correcting existing tests",
196
- "title": "Testing",
197
- "emoji": "\u{1F6A8} ",
198
- "semverBump": "none",
199
- "changelog": {
200
- "title": "Testing",
201
- "hidden": true
195
+ test: {
196
+ description: "Adding missing tests or correcting existing tests",
197
+ title: "Testing",
198
+ emoji: "\u{1F6A8} ",
199
+ semverBump: "none",
200
+ changelog: {
201
+ title: "Testing",
202
+ hidden: true
202
203
  }
203
204
  },
204
205
  /* --- Not included in commitlint but included in changelog --- */
205
- "deps": {
206
- "description": "Changes that add, update, or remove dependencies. This includes devDependencies and peerDependencies",
207
- "title": "Dependencies",
208
- "emoji": "\u{1F4E6} ",
209
- "hidden": true,
210
- "semverBump": "patch",
211
- "changelog": {
212
- "title": "Dependency Upgrades",
213
- "hidden": false
206
+ deps: {
207
+ description: "Changes that add, update, or remove dependencies. This includes devDependencies and peerDependencies",
208
+ title: "Dependencies",
209
+ emoji: "\u{1F4E6} ",
210
+ hidden: true,
211
+ semverBump: "patch",
212
+ changelog: {
213
+ title: "Dependency Upgrades",
214
+ hidden: false
214
215
  }
215
216
  },
216
217
  /* --- Not included in commitlint or changelog --- */
217
- "build": {
218
- "description": "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
219
- "title": "Build",
220
- "emoji": "\u{1F6E0} ",
221
- "hidden": true,
222
- "semverBump": "none",
223
- "changelog": {
224
- "title": "Build",
225
- "hidden": true
218
+ build: {
219
+ description: "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
220
+ title: "Build",
221
+ emoji: "\u{1F6E0} ",
222
+ hidden: true,
223
+ semverBump: "none",
224
+ changelog: {
225
+ title: "Build",
226
+ hidden: true
226
227
  }
227
228
  },
228
- "release": {
229
- "description": "Publishing a commit containing a newly released version",
230
- "title": "Publish Release",
231
- "emoji": "\u{1F680} ",
232
- "hidden": true,
233
- "semverBump": "none",
234
- "changelog": {
235
- "title": "Publish Release",
236
- "hidden": true
229
+ release: {
230
+ description: "Publishing a commit containing a newly released version",
231
+ title: "Publish Release",
232
+ emoji: "\u{1F680} ",
233
+ hidden: true,
234
+ semverBump: "none",
235
+ changelog: {
236
+ title: "Publish Release",
237
+ hidden: true
237
238
  }
238
239
  }
239
240
  };
@@ -2439,6 +2440,51 @@ function titleCase(input2) {
2439
2440
  }
2440
2441
 
2441
2442
  // src/utilities/changelog-utils.ts
2443
+ var ChangelogItemType = zod.z.enum([
2444
+ "chore",
2445
+ "fix",
2446
+ "feat",
2447
+ "refactor",
2448
+ "style",
2449
+ "perf",
2450
+ "deps"
2451
+ ]);
2452
+ var ChangelogBaseItemSchema = zod.z.object({
2453
+ type: ChangelogItemType,
2454
+ scope: zod.z.string(),
2455
+ description: zod.z.string()
2456
+ });
2457
+ var ChangelogMinimalItemSchema = ChangelogBaseItemSchema.extend({
2458
+ type: zod.z.enum(["chore", "refactor", "style", "perf"])
2459
+ });
2460
+ var ChangelogFixItemSchema = ChangelogBaseItemSchema.extend({
2461
+ type: zod.z.enum(["fix"]),
2462
+ issue: zod.z.string()
2463
+ });
2464
+ var ChangelogDepsUpdateItemSchema = ChangelogBaseItemSchema.extend({
2465
+ package: zod.z.string(),
2466
+ version: zod.z.string()
2467
+ });
2468
+ var ChangelogDepsItemSchema = ChangelogBaseItemSchema.extend({
2469
+ type: zod.z.enum(["deps"]),
2470
+ updates: zod.z.array(ChangelogDepsUpdateItemSchema)
2471
+ });
2472
+ var ChangelogFeatItemSchema = ChangelogBaseItemSchema.extend({
2473
+ type: zod.z.enum(["feat"]),
2474
+ feature: zod.z.string()
2475
+ });
2476
+ var ChangelogItemSchema = zod.z.union([
2477
+ ChangelogMinimalItemSchema,
2478
+ ChangelogFixItemSchema,
2479
+ ChangelogDepsItemSchema,
2480
+ ChangelogFeatItemSchema
2481
+ ]);
2482
+ zod.z.object({
2483
+ version: zod.z.string(),
2484
+ project: zod.z.string(),
2485
+ date: zod.z.date(),
2486
+ changes: zod.z.array(ChangelogItemSchema).default([])
2487
+ });
2442
2488
  async function generateChangelogContent(releaseVersion, filepath, newContent, currentContent, project, workspaceConfig) {
2443
2489
  const formatOptions = await prettier.resolveConfig(filepath) ?? {};
2444
2490
  const bannerUrl = typeof workspaceConfig?.release.banner === "string" ? workspaceConfig?.release.banner : workspaceConfig?.release.banner?.url;
@@ -2576,6 +2622,7 @@ async function generateChangelogForProjects({
2576
2622
  }
2577
2623
  const preferDockerVersion = shared.shouldPreferDockerVersionForReleaseGroup(releaseGroup);
2578
2624
  const releaseVersion = new shared.ReleaseVersion({
2625
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
2579
2626
  version: (preferDockerVersion === true || preferDockerVersion === "both") && projectsVersionData[project.name]?.dockerVersion ? projectsVersionData[project.name]?.dockerVersion : projectsVersionData[project.name]?.newVersion,
2580
2627
  releaseTagPattern: releaseGroup.releaseTag.pattern,
2581
2628
  projectName: project.name