@altopelago/sansa 0.14.1 → 0.14.2
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 +10 -0
- package/conformance/cts-claims.json +1 -1
- package/docs/api-contract.md +6 -0
- package/docs/capabilities.json +1 -1
- package/package.json +1 -1
- package/src/index.js +23 -5
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,16 @@ versions may still include breaking changes when the SANSA specifications move.
|
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
|
+
## 0.14.2 - 2026-10-16
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Preserved scalar value families in JavaScript Query when a host namespace
|
|
15
|
+
exposes portable PascalCase representation kinds such as `DateTimeLiteral`
|
|
16
|
+
or `WTCDateTimeLiteral`. Temporal bindings now reach temporal functions rather
|
|
17
|
+
than being mistaken for strings; other portable scalar families retain their
|
|
18
|
+
distinct comparison domains without changing representation-kind filters.
|
|
19
|
+
|
|
10
20
|
## 0.14.1 - 2026-10-16
|
|
11
21
|
|
|
12
22
|
### Fixed
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"claim_format": "aeonite.cts-claims.v1",
|
|
3
3
|
"repository": "AltoPelago/sansa",
|
|
4
4
|
"implementation": "@altopelago/sansa",
|
|
5
|
-
"implementation_version": "0.14.
|
|
5
|
+
"implementation_version": "0.14.2",
|
|
6
6
|
"cts_repository": "aeonite-org/aeonite-cts",
|
|
7
7
|
"cts_protocol": "cts.protocol.v1",
|
|
8
8
|
"claims": [
|
package/docs/api-contract.md
CHANGED
|
@@ -888,6 +888,12 @@ For simple hosts, bindings may expose fields directly:
|
|
|
888
888
|
|
|
889
889
|
`scalarKind`, `valueKind`, or `literalKind` may be used by host-neutral fixtures to preserve scalar forms that JSON cannot express directly, such as `nan`, `infinity`, and explicit `null`. `nullReason` carries the surfaced AEON null reason, such as `notSet` or `notApplicable`.
|
|
890
890
|
|
|
891
|
+
Query also recognizes the portable scalar representation names directly, including
|
|
892
|
+
`DateLiteral`, `TimeLiteral`, `DateTimeLiteral`, `WTCDateTimeLiteral` and
|
|
893
|
+
`SymbolicLiteral`, whether supplied by a namespace's `representationKind()` hook
|
|
894
|
+
or a binding field. This internal value-family classification does not rename
|
|
895
|
+
the exposed representation kinds or change `%RepresentationKind` filters.
|
|
896
|
+
|
|
891
897
|
Exact member and position selectors select direct children. This implementation caps position indexes and position range endpoints at `999999`; SANSA v1 portability requires implementations to support at least one million addressable positions, expressed as indexes `0` through `999999` inclusive. Larger accepted values are implementation-defined and non-portable. Implementations that accept larger values should surface `SANSA_NON_PORTABLE_POSITION_INDEX` when their host API supports non-fatal diagnostics. Position ranges select inclusive positional children exposed by the host binding; open start means position `0`, open end means through the final exposed positional child, and reversed ranges resolve to an empty binding set. `.^` selects an exposed parent binding, resolves empty at the effective resolution root unless stricter policy is requested, and fails explicitly when parent traversal is unsupported or forbidden. `.*` returns direct children. `.**` returns descendants in deterministic preorder, excluding the current binding. Descendant expansion follows structural children only; it does not implicitly enter attribute or local address spaces. `.("pattern")` selects direct children whose binding name matches the complete glob pattern, where `?` matches one Unicode code point and `*` matches zero or more Unicode code points. Within the decoded pattern payload, `\?`, `\*`, and `\\` match literal question mark, asterisk, and backslash characters respectively. Pattern matching operates on the exact exposed binding name without normalization or locale-sensitive comparison.
|
|
892
898
|
|
|
893
899
|
`#name` filters the current binding set by semantic type. The default matcher accepts exact semantic type names and base names before `<...>` or `[...]`. `%name` filters the current binding set by representation kind.
|
package/docs/capabilities.json
CHANGED
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -6493,15 +6493,33 @@ function isContainerBinding(namespace, binding) {
|
|
|
6493
6493
|
return containerKindFromBinding(namespace, binding) !== undefined;
|
|
6494
6494
|
}
|
|
6495
6495
|
|
|
6496
|
+
const PORTABLE_SCALAR_QUERY_KINDS = new Map([
|
|
6497
|
+
['StringLiteral', 'string'],
|
|
6498
|
+
['NumberLiteral', 'number'],
|
|
6499
|
+
['BooleanLiteral', 'boolean'],
|
|
6500
|
+
['ToggleLiteral', 'toggle'],
|
|
6501
|
+
['HexLiteral', 'hex'],
|
|
6502
|
+
['RadixLiteral', 'radix'],
|
|
6503
|
+
['EncodingLiteral', 'encoding'],
|
|
6504
|
+
['SeparatorLiteral', 'separator'],
|
|
6505
|
+
['SymbolicLiteral', 'symbol'],
|
|
6506
|
+
['SansaAddressLiteral', 'sansaAddress'],
|
|
6507
|
+
['DateLiteral', 'date'],
|
|
6508
|
+
['TimeLiteral', 'time'],
|
|
6509
|
+
['DateTimeLiteral', 'datetime'],
|
|
6510
|
+
['WTCDateTimeLiteral', 'wtc'],
|
|
6511
|
+
['NullLiteral', 'null'],
|
|
6512
|
+
['NaNLiteral', 'nan'],
|
|
6513
|
+
['InfinityLiteral', 'infinity'],
|
|
6514
|
+
]);
|
|
6515
|
+
|
|
6496
6516
|
function getBindingScalarKind(namespace, binding) {
|
|
6497
6517
|
const actual = typeof namespace.representationKind === 'function'
|
|
6498
6518
|
? namespace.representationKind(binding)
|
|
6499
6519
|
: binding.scalarKind ?? binding.valueKind ?? binding.literalKind ?? binding.representationKind ?? binding.kind ?? binding.type;
|
|
6500
|
-
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
if (actual === 'SymbolicLiteral') return 'symbol';
|
|
6504
|
-
return typeof actual === 'string' ? lowerFirst(actual) : undefined;
|
|
6520
|
+
return typeof actual === 'string'
|
|
6521
|
+
? PORTABLE_SCALAR_QUERY_KINDS.get(actual) ?? lowerFirst(actual)
|
|
6522
|
+
: undefined;
|
|
6505
6523
|
}
|
|
6506
6524
|
|
|
6507
6525
|
function getBindingSemanticType(namespace, binding) {
|