rman 2.44.1 → 2.45.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.
package/constants.js CHANGED
@@ -1 +1 @@
1
- export const version = '2.44.1';
1
+ export const version = '2.45.0';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rman",
3
3
  "description": "Repository manager",
4
- "version": "2.44.1",
4
+ "version": "2.45.0",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
7
7
  "dependencies": {
@@ -201,6 +201,12 @@ export declare abstract class VersionPlanService {
201
201
  * owns. A planner for a repository writing them differently overrides this.
202
202
  */
203
203
  protected detectBump(commits: CommitInfo[], scheme: VersionScheme): string;
204
+ /**
205
+ * Whether `commit` releases every package although it changes none of them: a `Release-As:`
206
+ * footer `scheme` recognizes, on a commit that touches no file under any package in
207
+ * `packageDirs` - an empty commit, or one changing only root files.
208
+ */
209
+ protected releasesEveryPackage(commit: CommitInfo, scheme: VersionScheme, packageDirs: readonly string[]): boolean;
204
210
  /** `.rmanrc group` (cascaded): `true` (the default - see `resolveConfig`'s cascade, this is what a
205
211
  * package inherits when nobody sets it at all) puts a package in the one implicit repo-wide
206
212
  * group; a non-empty string joins exactly the other packages sharing that string, regardless of
@@ -160,6 +160,13 @@ export class VersionPlanService {
160
160
  });
161
161
  }
162
162
  const commitMessage = repository.rootPackage.config?.version?.commitMessage;
163
+ /** Every package's directory, the root excluded - what `releasesEveryPackage` checks a commit
164
+ * against. All of the repository's, not this run's filtered ones: a commit under a package the
165
+ * run left out still belongs to that package. */
166
+ const packageDirs = repository
167
+ .getPackages()
168
+ .filter(pkg => pkg !== repository.rootPackage)
169
+ .map(pkg => pkg.dirname);
163
170
  const changeByPackage = new Map();
164
171
  await Promise.all(eligible.map(async (pkg) => {
165
172
  if (explicitVersion) {
@@ -170,7 +177,8 @@ export class VersionPlanService {
170
177
  const commits = since ? await git.listCommits({ hash: since }) : await git.listAllCommits();
171
178
  const homes = homesOf(pkg);
172
179
  const under = (dir, f) => !path.relative(dir, f).startsWith('..');
173
- const belongsToPkg = (c) => c.files.some(f => homes.some(dir => under(dir, f)));
180
+ const belongsToPkg = (c) => c.files.some(f => homes.some(dir => under(dir, f))) ||
181
+ this.releasesEveryPackage(c, pkg.versionScheme, packageDirs);
174
182
  const real = commits.filter(c => belongsToPkg(c) && !ConventionalCommitsService.isReleaseCommit(c.subject, commitMessage));
175
183
  if (!real.length)
176
184
  return;
@@ -509,6 +517,28 @@ export class VersionPlanService {
509
517
  }
510
518
  return scheme.highestBump(asked);
511
519
  }
520
+ /**
521
+ * Whether `commit` releases every package although it changes none of them: a `Release-As:`
522
+ * footer `scheme` recognizes, on a commit that touches no file under any package in
523
+ * `packageDirs` - an empty commit, or one changing only root files.
524
+ */
525
+ /* **A footer on such a commit used to be silently ignored.** A commit counted for a package only
526
+ * when it changed files under it, so the common `git commit --allow-empty -m "chore: release" -m
527
+ * "Release-As: major"` reached no package and the release came out sized by the other commits.
528
+ * Found while reproducing panates/fhir's first-release report: 0.1.0-beta.1 instead of
529
+ * 1.0.0-beta.1. The user's choice (2026-11-24): such a commit counts for every package, so in a
530
+ * repository with several groups it releases all of them - it names no group, and dropping it
531
+ * with a warning was the alternative turned down.
532
+ *
533
+ * Only with a footer the scheme recognizes: an unknown word (another tool's `Release-As: 1.2.3`)
534
+ * would otherwise turn a root-only commit into a patch release of every package, since
535
+ * `detectBump` reads an unrecognized footer as no footer and falls back to the commit's type. */
536
+ releasesEveryPackage(commit, scheme, packageDirs) {
537
+ const override = ConventionalCommitsService.parseReleaseAs(commit.body);
538
+ if (!override || !scheme.bumpNames.includes(override))
539
+ return false;
540
+ return !commit.files.some(f => packageDirs.some(dir => !path.relative(dir, f).startsWith('..')));
541
+ }
512
542
  /** `.rmanrc group` (cascaded): `true` (the default - see `resolveConfig`'s cascade, this is what a
513
543
  * package inherits when nobody sets it at all) puts a package in the one implicit repo-wide
514
544
  * group; a non-empty string joins exactly the other packages sharing that string, regardless of