@avi2dg/checks 0.24.0 → 0.24.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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Every release of `@avi2dg/checks`, newest first, written by the release from its conventional commits.
|
|
4
4
|
|
|
5
|
+
## 0.24.1
|
|
6
|
+
|
|
7
|
+
Released 2026-09-27.
|
|
8
|
+
|
|
9
|
+
### Fixes
|
|
10
|
+
|
|
11
|
+
- **scripts:** let checks-changelog release a repository that gains its version late [#79](https://github.com/avi2d/checks/pull/79)
|
|
12
|
+
|
|
5
13
|
## 0.24.0
|
|
6
14
|
|
|
7
15
|
Released 2026-09-27.
|
|
@@ -20,6 +20,7 @@ A release with no conventional commit worth listing keeps only its heading and i
|
|
|
20
20
|
|
|
21
21
|
It reads `package.json`, `CHANGELOG.md` and the git history from the repository root.
|
|
22
22
|
It finds releases in the version bumps of `package.json` across all of `HEAD` ancestry, so a checkout without tags writes the same file.
|
|
23
|
+
It reads a commit whose `package.json` is missing or has no version as unversioned, so the commit that adds the version is the first release and a repository that adopts a version late still writes its changelog.
|
|
23
24
|
It refuses a shallow checkout, since the releases reach back past its history.
|
|
24
25
|
It refuses a `package.json` with no repository address, since each entry links its pull request under it.
|
|
25
26
|
It refuses a repository address that is no `https` address once `git+`, a trailing slash and `.git` are dropped, since a pull request link needs one.
|
package/package.json
CHANGED
|
@@ -24,9 +24,14 @@ const decodeManifestJson = Schema.decodeUnknownEffect(
|
|
|
24
24
|
),
|
|
25
25
|
);
|
|
26
26
|
|
|
27
|
+
const decodeVersionJson = Schema.decodeUnknownEffect(Schema.fromJsonString(Schema.Struct({ version: Schema.optional(Schema.String) })));
|
|
28
|
+
|
|
27
29
|
const decodeManifest = (text: string, source: string) =>
|
|
28
30
|
decodeManifestJson(text).pipe(Effect.mapError((cause) => new ChangelogUnreadable({ message: `${source}: ${cause.message}` })));
|
|
29
31
|
|
|
32
|
+
const decodeVersion = (text: string, source: string) =>
|
|
33
|
+
decodeVersionJson(text).pipe(Effect.mapError((cause) => new ChangelogUnreadable({ message: `${source}: ${cause.message}` })));
|
|
34
|
+
|
|
30
35
|
const today = DateTime.nowInCurrentZone.pipe(DateTime.withCurrentZoneLocal, Effect.map(DateTime.formatIsoDate));
|
|
31
36
|
|
|
32
37
|
function repositoryWebUrl(repository: string): string | undefined {
|
|
@@ -38,7 +43,9 @@ function repositoryWebUrl(repository: string): string | undefined {
|
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
const versionAt = Effect.fn("versionAt")(function* (root: string, sha: string) {
|
|
41
|
-
|
|
46
|
+
const blob = (yield* git(["ls-tree", "--object-only", sha, "--", MANIFEST], root)).trim();
|
|
47
|
+
if (blob === "") return undefined;
|
|
48
|
+
return (yield* decodeVersion(yield* git(["cat-file", "blob", blob], root), `${MANIFEST} at ${sha}`)).version;
|
|
42
49
|
});
|
|
43
50
|
|
|
44
51
|
const readBumps = Effect.fn("readBumps")(function* (root: string) {
|
|
@@ -51,6 +58,7 @@ const readBumps = Effect.fn("readBumps")(function* (root: string) {
|
|
|
51
58
|
const [sha, date, parent] = line.split(FIELD);
|
|
52
59
|
if (sha === undefined || date === undefined || parent === undefined) continue;
|
|
53
60
|
const version = yield* versionAt(root, sha);
|
|
61
|
+
if (version === undefined) continue;
|
|
54
62
|
if (parent === "" || (yield* versionAt(root, parent)) !== version) bumps.push({ sha, version, date });
|
|
55
63
|
}
|
|
56
64
|
return bumps;
|