versionary 0.20.0 → 0.20.2

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.
@@ -76,6 +76,7 @@ function groupCommitLines(commits, repoUrl) {
76
76
  const breaking = [];
77
77
  const features = [];
78
78
  const fixes = [];
79
+ const performance = [];
79
80
  const reverts = [];
80
81
  const effectiveCommits = (0, commits_js_1.applyRevertSuppression)(commits);
81
82
  const getRevertedSubject = (commit) => {
@@ -129,13 +130,15 @@ function groupCommitLines(commits, repoUrl) {
129
130
  features.push(line);
130
131
  continue;
131
132
  }
132
- if (commitType === "fix" ||
133
- commitType === "perf" ||
134
- (!isBreaking && type === "patch")) {
133
+ if (commitType === "perf") {
134
+ performance.push(line);
135
+ continue;
136
+ }
137
+ if (commitType === "fix" || (!isBreaking && type === "patch")) {
135
138
  fixes.push(line);
136
139
  }
137
140
  }
138
- return { breaking, features, fixes, reverts };
141
+ return { breaking, features, fixes, performance, reverts };
139
142
  }
140
143
  function renderSimpleReleaseNotes(input, options = {}) {
141
144
  const repoUrl = (0, repo_url_js_1.resolveRepositoryWebBaseUrl)(input.cwd ?? process.cwd());
@@ -154,6 +157,9 @@ function renderSimpleReleaseNotes(input, options = {}) {
154
157
  if (grouped.fixes.length > 0) {
155
158
  sections.push("### Bug Fixes", ...grouped.fixes, "");
156
159
  }
160
+ if (grouped.performance.length > 0) {
161
+ sections.push("### Performance Improvements", ...grouped.performance, "");
162
+ }
157
163
  if (grouped.reverts.length > 0) {
158
164
  sections.push("### Reverts", ...grouped.reverts, "");
159
165
  }
@@ -239,6 +245,9 @@ function renderPackageChangelogSection(input) {
239
245
  if (grouped.fixes.length > 0) {
240
246
  sections.push("### Bug Fixes", ...grouped.fixes, "");
241
247
  }
248
+ if (grouped.performance.length > 0) {
249
+ sections.push("### Performance Improvements", ...grouped.performance, "");
250
+ }
242
251
  if (grouped.reverts.length > 0) {
243
252
  sections.push("### Reverts", ...grouped.reverts, "");
244
253
  }
@@ -276,6 +285,9 @@ function renderRNewsReleaseNotes(input) {
276
285
  if (grouped.fixes.length > 0) {
277
286
  sections.push("## Bug fixes", "", ...grouped.fixes, "");
278
287
  }
288
+ if (grouped.performance.length > 0) {
289
+ sections.push("## Performance improvements", "", ...grouped.performance, "");
290
+ }
279
291
  if (grouped.reverts.length > 0) {
280
292
  sections.push("## Reverts", "", ...grouped.reverts, "");
281
293
  }
@@ -536,9 +536,40 @@ function readPackageNameForManifest(cwd, manifest) {
536
536
  }
537
537
  return readCargoPackageName(cargoTomlRaw, manifest);
538
538
  }
539
+ function expandWorkspaceOnlyManifests(cwd, manifestToVersion) {
540
+ const expanded = {};
541
+ for (const [manifest, version] of Object.entries(manifestToVersion)) {
542
+ const manifestPath = node_path_1.default.join(cwd, manifest);
543
+ if (!node_fs_1.default.existsSync(manifestPath)) {
544
+ expanded[manifest] = version;
545
+ continue;
546
+ }
547
+ const cargoTomlRaw = node_fs_1.default.readFileSync(manifestPath, "utf8");
548
+ const parsed = parseCargoManifest(manifest, cargoTomlRaw);
549
+ if (parsed.packageTable !== null || parsed.workspaceTable === null) {
550
+ expanded[manifest] = version;
551
+ continue;
552
+ }
553
+ const rootDir = node_path_1.default.dirname(manifestPath);
554
+ const memberManifests = resolveWorkspaceMemberManifests(rootDir, parsed.workspaceTable);
555
+ if (memberManifests.length === 0) {
556
+ expanded[manifest] = version;
557
+ continue;
558
+ }
559
+ const manifestDir = normalizeSlashPath(node_path_1.default.posix.dirname(manifest));
560
+ for (const memberManifest of memberManifests) {
561
+ const joined = manifestDir === "." || manifestDir === ""
562
+ ? memberManifest
563
+ : normalizeSlashPath(node_path_1.default.posix.join(manifestDir, memberManifest));
564
+ expanded[joined] = version;
565
+ }
566
+ }
567
+ return expanded;
568
+ }
539
569
  function applyRustWorkspaceDependencyUpdates(cwd, manifestToVersion) {
570
+ const expandedManifestToVersion = expandWorkspaceOnlyManifests(cwd, manifestToVersion);
540
571
  const versionByDependency = new Map();
541
- for (const [manifest, version] of Object.entries(manifestToVersion)) {
572
+ for (const [manifest, version] of Object.entries(expandedManifestToVersion)) {
542
573
  if (!version) {
543
574
  continue;
544
575
  }
@@ -568,8 +599,9 @@ function applyRustWorkspaceDependencyUpdates(cwd, manifestToVersion) {
568
599
  return updatedFiles;
569
600
  }
570
601
  function detectRustDependencyImpact(cwd, manifestToVersion, candidateManifests) {
602
+ const expandedManifestToVersion = expandWorkspaceOnlyManifests(cwd, manifestToVersion);
571
603
  const versionByDependency = new Map();
572
- for (const [manifest, version] of Object.entries(manifestToVersion)) {
604
+ for (const [manifest, version] of Object.entries(expandedManifestToVersion)) {
573
605
  if (!version) {
574
606
  continue;
575
607
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "versionary",
3
- "version": "0.20.0",
3
+ "version": "0.20.2",
4
4
  "description": "Automatic release framework based on conventional commits and semantic versioning",
5
5
  "keywords": [
6
6
  "releasing",