@domorium/validator 1.1.0 → 1.2.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/dist/index.cjs.js +2 -2
- package/dist/index.esm.js +528 -488
- package/dist/parser/ast.d.ts +63 -0
- package/dist/parser/index.d.ts +2 -2
- package/dist/parser/lineIndex.d.ts +9 -0
- package/dist/validator/rule-node.d.ts +3 -0
- package/package.json +1 -1
- package/dist/parser/parser.d.ts +0 -7
- package/dist/parser/visitor.d.ts +0 -43
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.2.0 - 2026-08-07
|
|
6
|
+
|
|
7
|
+
- Keep the spaces that belong to a value. The lexer treated the delimiter after
|
|
8
|
+
a tag as whitespace to skip, so a `NOTE` whose text began with spaces lost
|
|
9
|
+
them, and `CONC` continuations silently changed the text they rejoined.
|
|
10
|
+
- Report a value that begins with a leading space or ends with a trailing one
|
|
11
|
+
correctly rather than validating a string the document never contained.
|
|
12
|
+
- Name at most ten candidates when a payload is not in its permitted set, and
|
|
13
|
+
count the rest, joining them with `", "`. The full list is every matching
|
|
14
|
+
xref in the document, and interpolating it produced a message tens of
|
|
15
|
+
thousands of characters long with no break opportunity in it — enough to
|
|
16
|
+
stretch an editor's diagnostic tooltip past the edge of the screen.
|
|
17
|
+
- `ASTNode` and `ASTToken` now carry `startOffset` and `endOffset`, and their
|
|
18
|
+
`range` is derived from those on access rather than stored. This is what makes
|
|
19
|
+
a large document affordable: a stored range costs three objects per token, and
|
|
20
|
+
that was most of the syntax tree's memory. `range` is `readonly` as a result —
|
|
21
|
+
code that assigned to it must set the offsets instead, and code in a tight loop
|
|
22
|
+
should read the offsets, because reading `range` allocates.
|
|
23
|
+
- Build the syntax tree straight from the token stream instead of walking a
|
|
24
|
+
Chevrotain parse tree first, and index pointer targets once per document
|
|
25
|
+
rather than scanning every pointer for each one. Validation cost no longer
|
|
26
|
+
grows with records times nodes.
|
|
27
|
+
|
|
5
28
|
## 1.1.0 - 2026-08-06
|
|
6
29
|
|
|
7
30
|
- Accept application-defined extension tags (`_XXXX`) instead of reporting them
|