gedcomkit 0.1.10__tar.gz → 0.1.12__tar.gz
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.
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/CHANGELOG.md +70 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/Cargo.lock +89 -2
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/Cargo.toml +9 -1
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/PKG-INFO +1 -1
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/README.md +3 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/bindings/gedcomkit-py/Cargo.lock +2 -2
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/bindings/gedcomkit-py/Cargo.toml +1 -1
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/src/build.rs +13 -1
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/src/convert.rs +815 -41
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/src/dates.rs +6 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/src/decode.rs +2 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/src/family.rs +1 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/src/lib.rs +13 -4
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/src/validate.rs +2 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/src/view.rs +16 -2
- gedcomkit-0.1.12/tests/typescript.rs +84 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/tests/vendored_corpus.rs +9 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/LICENSE +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/bindings/gedcomkit-py/LICENSE +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/bindings/gedcomkit-py/README.md +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/bindings/gedcomkit-py/gedcomkit.pyi +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/bindings/gedcomkit-py/src/lib.rs +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom-spec/LICENSE +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom-spec/README.md +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom-spec/cardinalities.tsv +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom-spec/enumerations.tsv +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom-spec/enumerationsets.tsv +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom-spec/grammar.abnf +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom-spec/grammar.gedstruct +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom-spec/payloads.tsv +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom-spec/substructures.tsv +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/age-invalid.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/age-valid.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/atsign.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/char_ascii_1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/char_ascii_2.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/char_utf16be-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/char_utf16be-2.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/char_utf16le-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/char_utf16le-2.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/char_utf8-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/char_utf8-2.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/char_utf8-3.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/date-all.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/date-dual-invalid.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/date-dual-valid.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/enum-ext.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/filename-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/lang-all.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/notes-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/obje-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/obsolete-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/pedi-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/rela_1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/sour-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/tiny-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/5/xref-case.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/age-invalid.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/age-valid.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/atsign.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/char_ascii_1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/char_ascii_2.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/char_utf16be-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/char_utf16be-2.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/char_utf16le-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/char_utf16le-2.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/char_utf8-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/char_utf8-2.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/char_utf8-3.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/date-all.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/date-dual-invalid.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/enum-ext.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/filename-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/lang-all.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/notes-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/obje-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/obsolete-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/pedi-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/rela_1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/sour-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/tiny-1.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/7/xref-case.ged +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/LICENSE +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/gedcom7code/UPSTREAM-README.md +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/zip-interop/README.md +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/zip-interop/python-zip64.gdz +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/fixtures/vendored/zip-interop/python-zipfile.gdz +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/pyproject.toml +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/src/gedzip.rs +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/src/names.rs +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/src/schema.rs +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/src/synthetic.rs +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/src/tags.rs +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/tests/endurance.rs +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/tests/external_charset.rs +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/tests/properties.rs +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/tests/requirement_corpus.rs +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/tests/spec_conformance.rs +0 -0
- {gedcomkit-0.1.10 → gedcomkit-0.1.12}/tests/version_conversion.rs +0 -0
|
@@ -5,6 +5,76 @@ format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
|
|
|
5
5
|
the project uses semantic versioning within the usual pre-1.0 compatibility
|
|
6
6
|
rules.
|
|
7
7
|
|
|
8
|
+
## [0.1.12] - 2026-09-30
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- `convert::to_version_7` / `to_version_7_with` now fold every `CONC`
|
|
13
|
+
continuation into the text it continues. GEDCOM 7.0 removed `CONC` (and
|
|
14
|
+
every line length limit), but the conversion left each one in place, so a
|
|
15
|
+
file converted from 5.5.1 — one that had fitted its lines to 255 bytes
|
|
16
|
+
with `CONC` — was written as "7.0" with thousands of them. The folding is
|
|
17
|
+
`Node::logical_value`'s own, so the value reads exactly as before and a
|
|
18
|
+
space at a split is kept; `CONT` lines stay, and a `CONT` that took a
|
|
19
|
+
`CONC` is the only continuation rewritten. Structures with no `CONC`
|
|
20
|
+
keep their bytes, and a node gives up its own source line only when its own
|
|
21
|
+
payload changed, never because a descendant did. The report gets one
|
|
22
|
+
`CONC` note (converted) per record, with the counts (including structures
|
|
23
|
+
that had no payload, whose text became it), however many lines were folded.
|
|
24
|
+
A `CONC` is left in place, and reported as kept per structure with the
|
|
25
|
+
words "not valid version 7", when: it continues a pointer payload; folding
|
|
26
|
+
would make the text begin with `@` (a pointer, or the unescaped `@` version
|
|
27
|
+
7 forbids); a `CONC` carries an identifier or substructures; it sits under
|
|
28
|
+
a `CONT`/`CONC` line; or the joined line would pass 15 MiB. The
|
|
29
|
+
rewrites of a `DATE`, `FILE`, `FORM` or source medium are likewise
|
|
30
|
+
refused, and reported, when a continuation line of theirs has
|
|
31
|
+
substructures, so nothing is dropped.
|
|
32
|
+
- The folding is linear in the number of continuation lines. A multimedia
|
|
33
|
+
`FORM` moved beneath each `FILE` gives up its source lines (they carry
|
|
34
|
+
their level), so a non-canonically spaced one no longer writes a file that
|
|
35
|
+
fails to read back. `to_version_5_5_1` keeps every `PHRASE` (reported) when
|
|
36
|
+
a date has more than one instead of dropping all but one. A `PHRASE` the
|
|
37
|
+
conversion writes with a leading `@` (a `@#DJULIAN@` calendar escape) has
|
|
38
|
+
it doubled, as 7.0 requires, and a `DATE` whose `CONC` starts with `@` is
|
|
39
|
+
no longer reported as kept before the rewrite that consumes it.
|
|
40
|
+
- `Limits::DEFAULT.line_bytes` is now 16 MiB (was 64 KiB). 7.0 has no line
|
|
41
|
+
limit and no `CONC`, so a long note becomes one long line, and a document
|
|
42
|
+
this crate converts has to read back under its own defaults. It remains a
|
|
43
|
+
bound: the input stays capped by `input_bytes`.
|
|
44
|
+
- `convert::to_version_5_5_1` no longer panics on a 7.0 `PHRASE` with a
|
|
45
|
+
`CONT`: a date or phrase that spans lines, or a phrase with substructures,
|
|
46
|
+
is kept as a `PHRASE` and reported (5.5.1 does not define it).
|
|
47
|
+
- `convert::to_version_5_5_1` fits to 255 bytes the lines of the structures
|
|
48
|
+
it changed (a `DATE` folded back into `INT date (phrase)`, a renamed
|
|
49
|
+
`UID`, a `SNOTE` record made a `NOTE`), by the same `CONC` splitting as
|
|
50
|
+
`Node::fit_line_limit`. A line over 255 bytes in a structure it did not
|
|
51
|
+
change is left as written, since an untouched node is written back byte
|
|
52
|
+
for byte, and is reported as kept with a count per record;
|
|
53
|
+
`Document::wrap_long_lines` fits them on request.
|
|
54
|
+
|
|
55
|
+
## [0.1.11] - 2026-09-28
|
|
56
|
+
|
|
57
|
+
### Added
|
|
58
|
+
|
|
59
|
+
- A `ts` feature (off by default; implies `serde`) that derives
|
|
60
|
+
`ts_rs::TS` on every type the `serde` feature serializes — the views, the
|
|
61
|
+
date, encoding, conversion, and validation reports — so a caller that
|
|
62
|
+
sends them to a TypeScript frontend can generate its types from these
|
|
63
|
+
definitions rather than keep hand-written copies in step. The definitions
|
|
64
|
+
follow the JSON exactly: camelCase field names, `null` for an absent
|
|
65
|
+
value, and unit enums as their variant names. `StructureView::kind`, a
|
|
66
|
+
`&'static str`, is declared as the five words it can hold
|
|
67
|
+
(`"record" | "event" | "attribute" | "structure" | "unknown"`). Pulls in
|
|
68
|
+
`ts-rs` 12 (MIT) and its proc-macro only when enabled.
|
|
69
|
+
|
|
70
|
+
Two things a caller should know. ts-rs declares a 64-bit integer as
|
|
71
|
+
`bigint` by default, while the JSON carries a number: export with
|
|
72
|
+
`Config::with_large_int("number")` (as `tests/typescript.rs` does) for
|
|
73
|
+
definitions that match what `serde_json` writes. And a
|
|
74
|
+
`#[non_exhaustive]` enum becomes a closed TypeScript union, so a variant
|
|
75
|
+
added in a later patch release — additive in Rust — can break an
|
|
76
|
+
exhaustive `switch` in TypeScript until the definitions are regenerated.
|
|
77
|
+
|
|
8
78
|
## [0.1.10] - 2026-09-27
|
|
9
79
|
|
|
10
80
|
### Added
|
|
@@ -35,10 +35,11 @@ dependencies = [
|
|
|
35
35
|
|
|
36
36
|
[[package]]
|
|
37
37
|
name = "gedcomkit"
|
|
38
|
-
version = "0.1.
|
|
38
|
+
version = "0.1.12"
|
|
39
39
|
dependencies = [
|
|
40
40
|
"flate2",
|
|
41
41
|
"serde",
|
|
42
|
+
"ts-rs",
|
|
42
43
|
]
|
|
43
44
|
|
|
44
45
|
[[package]]
|
|
@@ -96,7 +97,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
|
96
97
|
dependencies = [
|
|
97
98
|
"proc-macro2",
|
|
98
99
|
"quote",
|
|
99
|
-
"syn",
|
|
100
|
+
"syn 3.0.5",
|
|
100
101
|
]
|
|
101
102
|
|
|
102
103
|
[[package]]
|
|
@@ -105,6 +106,17 @@ version = "0.3.10"
|
|
|
105
106
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
106
107
|
checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea"
|
|
107
108
|
|
|
109
|
+
[[package]]
|
|
110
|
+
name = "syn"
|
|
111
|
+
version = "2.0.119"
|
|
112
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
113
|
+
checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
|
|
114
|
+
dependencies = [
|
|
115
|
+
"proc-macro2",
|
|
116
|
+
"quote",
|
|
117
|
+
"unicode-ident",
|
|
118
|
+
]
|
|
119
|
+
|
|
108
120
|
[[package]]
|
|
109
121
|
name = "syn"
|
|
110
122
|
version = "3.0.5"
|
|
@@ -116,8 +128,83 @@ dependencies = [
|
|
|
116
128
|
"unicode-ident",
|
|
117
129
|
]
|
|
118
130
|
|
|
131
|
+
[[package]]
|
|
132
|
+
name = "termcolor"
|
|
133
|
+
version = "1.4.1"
|
|
134
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
135
|
+
checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
|
|
136
|
+
dependencies = [
|
|
137
|
+
"winapi-util",
|
|
138
|
+
]
|
|
139
|
+
|
|
140
|
+
[[package]]
|
|
141
|
+
name = "thiserror"
|
|
142
|
+
version = "2.0.21"
|
|
143
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
144
|
+
checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
|
|
145
|
+
dependencies = [
|
|
146
|
+
"thiserror-impl",
|
|
147
|
+
]
|
|
148
|
+
|
|
149
|
+
[[package]]
|
|
150
|
+
name = "thiserror-impl"
|
|
151
|
+
version = "2.0.21"
|
|
152
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
153
|
+
checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
|
|
154
|
+
dependencies = [
|
|
155
|
+
"proc-macro2",
|
|
156
|
+
"quote",
|
|
157
|
+
"syn 3.0.5",
|
|
158
|
+
]
|
|
159
|
+
|
|
160
|
+
[[package]]
|
|
161
|
+
name = "ts-rs"
|
|
162
|
+
version = "12.0.1"
|
|
163
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
164
|
+
checksum = "756050066659291d47a554a9f558125db17428b073c5ffce1daf5dcb0f7231d8"
|
|
165
|
+
dependencies = [
|
|
166
|
+
"thiserror",
|
|
167
|
+
"ts-rs-macros",
|
|
168
|
+
]
|
|
169
|
+
|
|
170
|
+
[[package]]
|
|
171
|
+
name = "ts-rs-macros"
|
|
172
|
+
version = "12.0.1"
|
|
173
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
174
|
+
checksum = "38d90eea51bc7988ef9e674bf80a85ba6804739e535e9cab48e4bb34a8b652aa"
|
|
175
|
+
dependencies = [
|
|
176
|
+
"proc-macro2",
|
|
177
|
+
"quote",
|
|
178
|
+
"syn 2.0.119",
|
|
179
|
+
"termcolor",
|
|
180
|
+
]
|
|
181
|
+
|
|
119
182
|
[[package]]
|
|
120
183
|
name = "unicode-ident"
|
|
121
184
|
version = "1.0.24"
|
|
122
185
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
123
186
|
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
187
|
+
|
|
188
|
+
[[package]]
|
|
189
|
+
name = "winapi-util"
|
|
190
|
+
version = "0.1.11"
|
|
191
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
192
|
+
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
|
193
|
+
dependencies = [
|
|
194
|
+
"windows-sys",
|
|
195
|
+
]
|
|
196
|
+
|
|
197
|
+
[[package]]
|
|
198
|
+
name = "windows-link"
|
|
199
|
+
version = "0.2.1"
|
|
200
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
201
|
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
202
|
+
|
|
203
|
+
[[package]]
|
|
204
|
+
name = "windows-sys"
|
|
205
|
+
version = "0.61.2"
|
|
206
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
207
|
+
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
|
208
|
+
dependencies = [
|
|
209
|
+
"windows-link",
|
|
210
|
+
]
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# was checked on crates.io, npm, and PyPI before the initial release.
|
|
4
4
|
[package]
|
|
5
5
|
name = "gedcomkit"
|
|
6
|
-
version = "0.1.
|
|
6
|
+
version = "0.1.12"
|
|
7
7
|
description = "A byte-preserving GEDCOM document model: decoding, parsing, readings, version conversion, plausibility checks, and the GEDZIP container, for GEDCOM 5.5 through 7.x."
|
|
8
8
|
edition = "2024"
|
|
9
9
|
# The true minimum, not the workspace's toolchain: a parser library is a leaf
|
|
@@ -42,6 +42,11 @@ gedzip = ["dep:flate2"]
|
|
|
42
42
|
# Serialization of the read-only views, for callers that send them somewhere —
|
|
43
43
|
# a webview, a JSON API. Off by default: a parser needs no serializer.
|
|
44
44
|
serde = ["dep:serde"]
|
|
45
|
+
# TypeScript definitions of those same serialized shapes (`ts_rs::TS` on every
|
|
46
|
+
# type `serde` serializes), for a caller that generates its frontend's types
|
|
47
|
+
# from them rather than writing them by hand. Off by default, and meant for a
|
|
48
|
+
# build step or a test rather than a shipped binary.
|
|
49
|
+
ts = ["serde", "dep:ts-rs"]
|
|
45
50
|
# Generates a deterministic synthetic tree of any size, for performance and
|
|
46
51
|
# stress fixtures. Off by default: nothing an application ships needs it.
|
|
47
52
|
fixture = []
|
|
@@ -50,6 +55,9 @@ fixture = []
|
|
|
50
55
|
# `rust_backend` keeps deflate in pure Rust, so no system zlib is needed.
|
|
51
56
|
flate2 = { version = "1.1.2", default-features = false, features = ["rust_backend"], optional = true }
|
|
52
57
|
serde = { version = "1", features = ["derive"], optional = true }
|
|
58
|
+
# MIT; its default `serde-compat` reads the serde attributes, so the
|
|
59
|
+
# definitions follow the JSON the `serde` feature writes.
|
|
60
|
+
ts-rs = { version = "12.0.1", optional = true }
|
|
53
61
|
|
|
54
62
|
[lints.rust]
|
|
55
63
|
unsafe_code = "forbid"
|
|
@@ -198,6 +198,9 @@ than dropped.
|
|
|
198
198
|
`default-features = false` the parser core has **no dependencies at all**.
|
|
199
199
|
- `serde` — `Serialize` on the views and reports, for callers that send them
|
|
200
200
|
to a webview or over a wire. Off by default.
|
|
201
|
+
- `ts` — TypeScript definitions of those same serialized shapes
|
|
202
|
+
(`ts_rs::TS`), for a caller that generates its frontend's types from them.
|
|
203
|
+
Implies `serde`. Off by default.
|
|
201
204
|
- `fixture` — a deterministic, corpus-shaped synthetic tree generator of any
|
|
202
205
|
size, for performance and stress tests. Off by default.
|
|
203
206
|
|
|
@@ -35,7 +35,7 @@ dependencies = [
|
|
|
35
35
|
|
|
36
36
|
[[package]]
|
|
37
37
|
name = "gedcomkit"
|
|
38
|
-
version = "0.1.
|
|
38
|
+
version = "0.1.12"
|
|
39
39
|
dependencies = [
|
|
40
40
|
"flate2",
|
|
41
41
|
"serde",
|
|
@@ -43,7 +43,7 @@ dependencies = [
|
|
|
43
43
|
|
|
44
44
|
[[package]]
|
|
45
45
|
name = "gedcomkit-py"
|
|
46
|
-
version = "0.1.
|
|
46
|
+
version = "0.1.12"
|
|
47
47
|
dependencies = [
|
|
48
48
|
"gedcomkit",
|
|
49
49
|
"pyo3",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# abi3 keeps it to one wheel per platform across Python versions.
|
|
3
3
|
[package]
|
|
4
4
|
name = "gedcomkit-py"
|
|
5
|
-
version = "0.1.
|
|
5
|
+
version = "0.1.12"
|
|
6
6
|
description = "Python bindings for gedcomkit: an archival-grade GEDCOM library — byte-preserving round-trip, encoding detection, GEDCOM 5.5 through 7.x, GEDZIP."
|
|
7
7
|
edition = "2024"
|
|
8
8
|
rust-version = "1.88"
|
|
@@ -171,6 +171,7 @@ impl NodeSpec {
|
|
|
171
171
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
|
172
172
|
#[non_exhaustive]
|
|
173
173
|
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
|
|
174
|
+
#[cfg_attr(feature = "ts", derive(ts_rs::TS))]
|
|
174
175
|
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
|
|
175
176
|
pub struct WrappedLine {
|
|
176
177
|
/// The record, by cross-reference identifier — or by tag, for the header
|
|
@@ -342,6 +343,17 @@ impl Node {
|
|
|
342
343
|
}
|
|
343
344
|
|
|
344
345
|
fn fit_node(node: &mut Node, level: usize, max_line: usize) -> bool {
|
|
346
|
+
fit_node_inner(node, level, max_line, true)
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/// [`Node::fit_line_limit`] for this node's own lines only — its payload and
|
|
350
|
+
/// the `CONT`/`CONC` run continuing it — leaving every other substructure as it
|
|
351
|
+
/// is. For a conversion that changed this node and no other.
|
|
352
|
+
pub(crate) fn fit_own_lines(node: &mut Node, level: usize, max_line: usize) -> bool {
|
|
353
|
+
fit_node_inner(node, level, max_line, false)
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
fn fit_node_inner(node: &mut Node, level: usize, max_line: usize, recurse: bool) -> bool {
|
|
345
357
|
let run_len = node
|
|
346
358
|
.children
|
|
347
359
|
.iter()
|
|
@@ -396,7 +408,7 @@ fn fit_node(node: &mut Node, level: usize, max_line: usize) -> bool {
|
|
|
396
408
|
|
|
397
409
|
let inserted = output.len();
|
|
398
410
|
node.children.splice(0..0, output);
|
|
399
|
-
for child in node.children.iter_mut().skip(inserted) {
|
|
411
|
+
for child in node.children.iter_mut().skip(inserted).filter(|_| recurse) {
|
|
400
412
|
changed |= fit_node(child, level + 1, max_line);
|
|
401
413
|
}
|
|
402
414
|
changed
|