@intellectual-frontiers/libraries 0.2.1 → 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/LICENSE +75 -21
- package/dist/affected.d.ts +15 -2
- package/dist/affected.js +51 -20
- package/dist/dev.d.ts +83 -0
- package/dist/dev.js +359 -0
- package/dist/family.d.ts +58 -0
- package/dist/family.js +125 -0
- package/dist/generate-ontology.js +4 -0
- package/dist/generate-workflows.js +2 -10
- package/dist/install-bun.js +19 -14
- package/dist/libraries.d.ts +8 -0
- package/dist/libraries.js +24 -3
- package/dist/license/standard.d.ts +46 -0
- package/dist/license/standard.js +43 -0
- package/dist/license/third-party.d.ts +25 -0
- package/dist/license/third-party.js +71 -0
- package/dist/license.d.ts +61 -0
- package/dist/license.js +204 -0
- package/dist/link.d.ts +12 -0
- package/dist/link.js +98 -0
- package/dist/pack-library.d.ts +2 -0
- package/dist/pack-library.js +21 -3
- package/dist/pins.d.ts +34 -7
- package/dist/pins.js +36 -9
- package/dist/plan.d.ts +28 -0
- package/dist/plan.js +135 -0
- package/dist/readme.d.ts +59 -0
- package/dist/readme.js +272 -0
- package/dist/releasing.d.ts +176 -0
- package/dist/releasing.js +680 -0
- package/dist/versions.js +4 -7
- package/dist/workflows/definitions.d.ts +33 -30
- package/dist/workflows/definitions.js +201 -278
- package/dist/workflows/model.d.ts +19 -3
- package/dist/workflows/render.js +10 -2
- package/package.json +44 -14
- package/src/affected.ts +56 -17
- package/src/dev.ts +379 -0
- package/src/family.ts +144 -0
- package/src/generate-ontology.ts +4 -0
- package/src/generate-workflows.ts +3 -11
- package/src/install-bun.ts +16 -13
- package/src/libraries.ts +27 -3
- package/src/license/standard.ts +67 -0
- package/src/license/third-party.ts +87 -0
- package/src/license.ts +222 -0
- package/src/link.ts +97 -0
- package/src/pack-library.ts +21 -3
- package/src/pins.ts +55 -10
- package/src/plan.ts +143 -0
- package/src/readme.ts +278 -0
- package/src/releasing.ts +735 -0
- package/src/versions.ts +3 -7
- package/src/workflows/definitions.ts +262 -397
- package/src/workflows/model.ts +15 -3
- package/src/workflows/render.ts +10 -2
package/src/versions.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `versions`, how works are versioned (commons 0026-works-versioning): `check` finds a
|
|
2
|
+
* `versions`, how works are versioned (commons 0026-works-versioning): `check` finds a record that is wrong, an identity that changed and a version that went back since the base (a version grows at the release, `release.ts`, and not at every push), `bump` writes the next
|
|
3
3
|
* version into a work's record, `tag` creates the annotated (and, where Git is set to sign, signed) tag `<slug>-v<version>`, `notes` prints the release notes from the capabilities closed since the
|
|
4
4
|
* last tag, `cite` writes `CITATION.cff` from the record, and `ledger` derives the ledger of releases from the tags.
|
|
5
5
|
*
|
|
@@ -44,7 +44,6 @@ import {
|
|
|
44
44
|
createTag,
|
|
45
45
|
editionFacts,
|
|
46
46
|
findBase,
|
|
47
|
-
changedBetween,
|
|
48
47
|
isAncestor,
|
|
49
48
|
isDirty,
|
|
50
49
|
isRepository,
|
|
@@ -149,7 +148,7 @@ const LEDGER = {
|
|
|
149
148
|
};
|
|
150
149
|
|
|
151
150
|
const HELP_SUMMARY: Readonly<Record<(typeof COMMANDS)[number], string>> = {
|
|
152
|
-
check: "Find a
|
|
151
|
+
check: "Find a record that is wrong, an identity that changed and a version that went back (versions grow at the release).",
|
|
153
152
|
bump: "Write the next version into a work's record.",
|
|
154
153
|
tag: "Create the annotated tag of a work's version.",
|
|
155
154
|
notes: "Print the release notes from the capabilities closed since the last tag.",
|
|
@@ -230,14 +229,11 @@ export async function checkVersions(repo: string, rev = "origin/main"): Promise<
|
|
|
230
229
|
const baseTree =
|
|
231
230
|
base.value.kind === "commit" ? await readTree(repo, base.value.commit) : ok<TreeFacts>({ paths: [], records: new Map() });
|
|
232
231
|
if (baseTree.kind === "err") return notRunBecause(formatGitError(baseTree.error));
|
|
233
|
-
const changed =
|
|
234
|
-
base.value.kind === "commit" ? await changedBetween(repo, base.value.commit, headCommit.value) : ok<readonly string[]>([]);
|
|
235
|
-
if (changed.kind === "err") return notRunBecause(formatGitError(changed.error));
|
|
236
232
|
const editions = await editionFacts(repo, editionsNeeded(head.value, baseTree.value), headCommit.value);
|
|
237
233
|
if (editions.kind === "err") return notRunBecause(formatGitError(editions.error));
|
|
238
234
|
return {
|
|
239
235
|
kind: "judged",
|
|
240
|
-
findings: sortFindings(judgeWorks({ head: head.value, base: baseTree.value, changed:
|
|
236
|
+
findings: sortFindings(judgeWorks({ head: head.value, base: baseTree.value, changed: [], editions: editions.value })),
|
|
241
237
|
works: workFolders(head.value.paths).length,
|
|
242
238
|
from: base.value.kind === "commit" ? `the base ${base.value.commit.slice(0, 12)}` : "no base (the first commit)",
|
|
243
239
|
};
|