@domorium/validator 0.2.0 → 1.1.0
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 +23 -0
- package/README.md +6 -0
- package/dist/completion/completion.d.ts +2 -0
- package/dist/document/gedcomDocument.d.ts +1 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.esm.js +300 -225
- package/dist/validator/extensions.d.ts +21 -0
- package/dist/validator/rule-node.d.ts +1 -1
- package/dist/validator/validate.d.ts +3 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@domorium/validator` are documented here.
|
|
4
4
|
|
|
5
|
+
## 1.1.0 - 2026-08-06
|
|
6
|
+
|
|
7
|
+
- Accept application-defined extension tags (`_XXXX`) instead of reporting them
|
|
8
|
+
as unknown. Their subtrees are not validated: an extension's payload and
|
|
9
|
+
permitted substructures are defined by whoever authored it. See
|
|
10
|
+
[ADR-0008](../../docs/adr/0008-extension-tag-validation.md).
|
|
11
|
+
- Read `HEAD.SCHMA` declarations, and report a GEDCOM 7 extension tag that is
|
|
12
|
+
used without one as `VAL008`. GEDCOM 5.5.1 documents, which have no SCHMA
|
|
13
|
+
structure, are unaffected.
|
|
14
|
+
- Report a tag declared twice in `HEAD.SCHMA` as `VAL009`, and validate that
|
|
15
|
+
each declaration is an underscore-prefixed tag followed by an absolute URI.
|
|
16
|
+
- Resolve the declared URI of an extension tag through `getLabel`, and offer
|
|
17
|
+
declared extension tags from `getCompletions`.
|
|
18
|
+
- Stop offering root record tags as completions inside a subtree whose parent
|
|
19
|
+
type cannot be resolved.
|
|
20
|
+
|
|
21
|
+
## 1.0.0 - 2026-08-05
|
|
22
|
+
|
|
23
|
+
- First stable release. `GedcomDocument` and the diagnostic shapes it returns are
|
|
24
|
+
now the package's committed public API: a breaking change to them requires a
|
|
25
|
+
major version.
|
|
26
|
+
- No behavioral change from 0.2.0.
|
|
27
|
+
|
|
5
28
|
## 0.2.0 - 2026-08-03
|
|
6
29
|
|
|
7
30
|
- Move the package from `@gedcom/validator` to `@domorium/validator` as part of
|
package/README.md
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
# @domorium/validator
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@domorium/validator)
|
|
4
|
+
[](https://github.com/lavich/domorium/blob/main/LICENSE)
|
|
5
|
+
|
|
3
6
|
GEDCOM 5.5.1 and 7.0 parser and validator. Parses `.ged` files into an AST and validates structure, cardinality, and payload types against the official GEDCOM specification schemas.
|
|
4
7
|
|
|
8
|
+
Part of [Domorium](https://github.com/lavich/domorium) — GEDCOM editor tooling for
|
|
9
|
+
the browser, Obsidian, VS Code, and JetBrains IDEs.
|
|
10
|
+
|
|
5
11
|
## Install
|
|
6
12
|
|
|
7
13
|
```bash
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ASTNode } from "../parser";
|
|
2
2
|
import type { Position } from "../types/position";
|
|
3
3
|
import { type GedcomScheme } from "../schemes/schema-types";
|
|
4
|
+
import type { ExtensionContext } from "../validator/extensions";
|
|
4
5
|
export interface GedcomCompletion {
|
|
5
6
|
label: string;
|
|
6
7
|
kind: "tag" | "enum" | "pointer";
|
|
@@ -10,6 +11,7 @@ interface CompletionContext {
|
|
|
10
11
|
nodes: ASTNode[];
|
|
11
12
|
pointers: Map<string, ASTNode[]>;
|
|
12
13
|
scheme: GedcomScheme;
|
|
14
|
+
extensions: ExtensionContext;
|
|
13
15
|
isGedcom7: boolean;
|
|
14
16
|
position: Position;
|
|
15
17
|
lineText: string;
|