strom-research 1.1.0 → 1.1.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/core/tree.js CHANGED
@@ -23,7 +23,7 @@ import * as git from "./git.js";
23
23
  import { commitSeal, createKey, fingerprint, loadKey, sha256, signOp } from "./seal.js";
24
24
  import { stringifyCanonical } from "./json.js";
25
25
  export const TREE_FILE = "strom.json";
26
- export const VERSION = "1.1.0";
26
+ export const VERSION = "1.1.1";
27
27
  const GITIGNORE = `# Strom Research — local state and large files are not versioned
28
28
  .strom/
29
29
  /media/
@@ -38,14 +38,17 @@ export const GED_PROFILES = ["standard", "strom"];
38
38
  /** The first Strom version that reads AGE, CAUS, ADDR, _FREL/_MREL and more source notes itself (not released yet). */
39
39
  export const STROM_READS_TAGS = undefined;
40
40
  /**
41
- * The first Strom version that reads a source's REFN, the citation's DATA DATE and the excerpts of entries
42
- * (not released yet). Before it they go only into an export with images, made for that version on purpose.
41
+ * The first Strom version that reads a source's REFN, the citation's DATA DATE and the excerpts of entries.
42
+ * An app of unknown version is taken for today's (stromapp.info serves the latest; an older one only lists
43
+ * the tags it leaves out, nothing is lost).
43
44
  */
44
- export const STROM_READS_EXCERPTS = undefined;
45
- /** Does this Strom read the standard tags, so the notes repeating them can go? */
46
- export function stromReadsTags(version, from = STROM_READS_TAGS) {
47
- if (!from || !version)
45
+ export const STROM_READS_EXCERPTS = "3.1.0";
46
+ /** Does this Strom read the standard tags, so the notes repeating them can go? `unknown`: the answer for an app of unknown version. */
47
+ export function stromReadsTags(version, from = STROM_READS_TAGS, unknown = false) {
48
+ if (!from)
48
49
  return false;
50
+ if (!version)
51
+ return unknown;
49
52
  const n = (v) => v.split(".").map((x) => Number.parseInt(x, 10) || 0);
50
53
  const [a, b] = [n(version), n(from)];
51
54
  for (let i = 0; i < 3; i++)
@@ -78,10 +81,10 @@ export function exportGedcom(tree, opts = {}) {
78
81
  const strict = (opts.for ?? "standard") === "standard";
79
82
  // Strom profile: say in notes what the Strom app does not read from the tags yet.
80
83
  const repeat = !strict && !stromReadsTags(opts.stromVersion);
81
- // The entry's own identity and date: any program; Strom from the version that reads them, or when the file carries
82
- // images of entries (an older app lists the tags it leaves out — only then, never for a file without images).
84
+ // The entry's own identity and date: any program; Strom from the version that reads them (unknown: today's), and
85
+ // always when the file carries images of entries.
83
86
  const carries = !!opts.excerpts && tree.list("source").some((s) => !s.retracted && opts.excerpts(s).length > 0);
84
- const entries = strict || carries || stromReadsTags(opts.stromVersion, STROM_READS_EXCERPTS);
87
+ const entries = strict || carries || stromReadsTags(opts.stromVersion, STROM_READS_EXCERPTS, true);
85
88
  const everyone = tree.list("person");
86
89
  const personById = new Map(everyone.map((p) => [p.id, p]));
87
90
  const eventById = new Map([...everyone, ...tree.list("family")].flatMap((r) => r.events.map((e) => [e.id, e])));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strom-research",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Genealogical research toolkit for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {