@domorium/validator 1.0.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 +16 -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 +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
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
|
+
|
|
5
21
|
## 1.0.0 - 2026-08-05
|
|
6
22
|
|
|
7
23
|
- First stable release. `GedcomDocument` and the diagnostic shapes it returns are
|
|
@@ -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;
|