rman 2.44.0 → 2.44.1

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.0';
1
+ export const version = '2.44.1';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rman",
3
3
  "description": "Repository manager",
4
- "version": "2.44.0",
4
+ "version": "2.44.1",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
7
7
  "dependencies": {
@@ -36,7 +36,7 @@ export declare namespace ChangeHashService {
36
36
  * ever documenting them, and the registry now reports 1.5.0 - starting from the tag alone would
37
37
  * silently skip everything the file never recorded. The boundary becomes the merge-base of the
38
38
  * two, so the result always covers at least as much as the file is missing. Has no effect when
39
- * the file doesn't exist. */
39
+ * the file doesn't exist, or when no tag was found (nothing released, so nothing to widen). */
40
40
  catchUpFile?: string;
41
41
  }
42
42
  /**
@@ -112,9 +112,10 @@ export declare namespace ChangeHashService {
112
112
  * real release history but no `rman`-created tags), whatever this package's **own ecosystem**
113
113
  * reports as its published version (`Plugin.publishedVersion`), mapped to a git tag via
114
114
  * `.rmanrc changelog.tagPattern` and used only if that tag actually exists. Either way, if
115
- * `catchUpFile` is given and exists, the result is widened to also cover anything that file
116
- * hasn't caught up on yet (see its doc comment). Returns `undefined` when nothing can be resolved
117
- * at all (never tagged *and* never published, no catch-up file - a genuinely first-ever release) -
115
+ * `catchUpFile` is given and exists, a tag found that way is widened to also cover anything that
116
+ * file hasn't caught up on yet (see its doc comment). Returns `undefined` when nothing can be
117
+ * resolved (never tagged *and* never published - a genuinely first-ever release, whatever files
118
+ * already exist) -
118
119
  * callers should fall back to their own default in that case (e.g. the whole history, since
119
120
  * nothing has ever been released).
120
121
  */
@@ -140,9 +140,10 @@ export var ChangeHashService;
140
140
  * real release history but no `rman`-created tags), whatever this package's **own ecosystem**
141
141
  * reports as its published version (`Plugin.publishedVersion`), mapped to a git tag via
142
142
  * `.rmanrc changelog.tagPattern` and used only if that tag actually exists. Either way, if
143
- * `catchUpFile` is given and exists, the result is widened to also cover anything that file
144
- * hasn't caught up on yet (see its doc comment). Returns `undefined` when nothing can be resolved
145
- * at all (never tagged *and* never published, no catch-up file - a genuinely first-ever release) -
143
+ * `catchUpFile` is given and exists, a tag found that way is widened to also cover anything that
144
+ * file hasn't caught up on yet (see its doc comment). Returns `undefined` when nothing can be
145
+ * resolved (never tagged *and* never published - a genuinely first-ever release, whatever files
146
+ * already exist) -
146
147
  * callers should fall back to their own default in that case (e.g. the whole history, since
147
148
  * nothing has ever been released).
148
149
  */
@@ -161,11 +162,16 @@ export var ChangeHashService;
161
162
  tagHash = (await git.tagExists(tag)) ? tag : undefined;
162
163
  }
163
164
  }
164
- const fileHash = options.catchUpFile ? await git.lastCommitTouching(options.catchUpFile) : undefined;
165
- if (!fileHash)
165
+ /** **The file only ever widens a tag's boundary.** With no tag there is nothing to widen: the
166
+ * package has never been released, so its whole history is unreleased (`undefined`). Taking
167
+ * the file's last commit there narrowed it instead - reported from panates/fhir: a CHANGELOG.md
168
+ * holding only `# Changelog`, committed while adopting rman, made the first release document
169
+ * only the commits after it, which was none, and `changelog` then said "No unreleased
170
+ * changes" for a repository that had never released. A hand-written history from before rman
171
+ * is what `changelog.startingAt` is for. */
172
+ const fileHash = tagHash && options.catchUpFile ? await git.lastCommitTouching(options.catchUpFile) : undefined;
173
+ if (!tagHash || !fileHash)
166
174
  return tagHash;
167
- if (!tagHash)
168
- return fileHash;
169
175
  return (await git.mergeBase(tagHash, fileHash)) ?? tagHash;
170
176
  }
171
177
  ChangeHashService.detect = detect;