@autotelic/joggle 0.4.0 → 0.4.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/dist/check.js +8 -0
- package/package.json +1 -1
package/dist/check.js
CHANGED
|
@@ -242,6 +242,14 @@ export const checkRepository = Effect.fn("joggle.check")(function* (options) {
|
|
|
242
242
|
const known = options.mergeBaseline === true ? yield* readBaseline(fs, path, target) : undefined;
|
|
243
243
|
const identities = known === undefined ? fresh : [...known, ...fresh];
|
|
244
244
|
yield* writeBaseline(fs, path, target, identities);
|
|
245
|
+
// An empty ledger is still a ledger: without this line a caller's merge step has to
|
|
246
|
+
// infer "nothing new" from an empty array, or worse, from a file it never looked for.
|
|
247
|
+
if (fresh.length === 0) {
|
|
248
|
+
notes.push({
|
|
249
|
+
ruleId: "joggle",
|
|
250
|
+
reason: `wrote 0 identities to ${target}: nothing new to accept`,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
245
253
|
}
|
|
246
254
|
return notes.length === 0
|
|
247
255
|
? { ...report, diagnostics }
|