aontu 0.59.0 → 0.60.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/dist/aontu.d.ts +1 -1
- package/dist/aontu.js +1 -1
- package/dist/hcanon.js +32 -4
- package/dist/hcanon.js.map +1 -1
- package/dist/lsp.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/val/RecurseVal.js +11 -0
- package/dist/val/RecurseVal.js.map +1 -1
- package/dist/val/RefVal.d.ts +1 -0
- package/dist/val/RefVal.js +14 -2
- package/dist/val/RefVal.js.map +1 -1
- package/dist/val/ReferFuncVal.js +24 -10
- package/dist/val/ReferFuncVal.js.map +1 -1
- package/package.json +1 -1
- package/src/aontu.ts +1 -1
- package/src/hcanon.ts +32 -4
- package/src/val/RecurseVal.ts +11 -0
- package/src/val/RefVal.ts +16 -2
- package/src/val/ReferFuncVal.ts +24 -10
package/dist/aontu.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ import { render, renderValue, renderProfile } from './render';
|
|
|
21
21
|
import { desugarTemplate, resugarTemplate, markerFor } from './template';
|
|
22
22
|
import { format, unifiedDiff } from './format';
|
|
23
23
|
export type { LintFinding, FormatReport, FormatOptions } from './format';
|
|
24
|
-
declare const VERSION = "0.
|
|
24
|
+
declare const VERSION = "0.60.0";
|
|
25
25
|
declare class Aontu {
|
|
26
26
|
opts: AontuOptions;
|
|
27
27
|
lang: Lang;
|
package/dist/aontu.js
CHANGED
|
@@ -65,7 +65,7 @@ Object.defineProperty(exports, "unifiedDiff", { enumerable: true, get: function
|
|
|
65
65
|
// Kept in step with package.json by the `version` npm lifecycle script,
|
|
66
66
|
// which runs on `npm version` / `npm run repo-bump`. version.test.ts
|
|
67
67
|
// fails if the two ever drift.
|
|
68
|
-
const VERSION = '0.
|
|
68
|
+
const VERSION = '0.60.0';
|
|
69
69
|
exports.VERSION = VERSION;
|
|
70
70
|
// A module file's VALUE, as far as it goes. COLLECTED, not raised: a
|
|
71
71
|
// module file that does not stand up has no `mod.main` to read, and
|
package/dist/hcanon.js
CHANGED
|
@@ -19,6 +19,13 @@ exports.canonHash = canonHash;
|
|
|
19
19
|
// (test/spec/hcanon.tsv). User-facing canon is UNCHANGED — hcanon is a
|
|
20
20
|
// separate rendering.
|
|
21
21
|
//
|
|
22
|
+
// An ALIAS REFERENCE left standing in a spread template renders its
|
|
23
|
+
// EXPANSION through this same walk rather than through the reference's
|
|
24
|
+
// own canon, so a close() or a mark on the aliased value survives into
|
|
25
|
+
// the hash. Without that the wrappers above are absent exactly where
|
|
26
|
+
// the alias filter has already erased the declaration that carried
|
|
27
|
+
// them (BUGS.md §60).
|
|
28
|
+
//
|
|
22
29
|
// The marks PROPAGATE to every descendant at unification (walkMark), so
|
|
23
30
|
// a wrapper is emitted only where a mark STARTS: the walk carries the
|
|
24
31
|
// inherited marks down and a child whose mark the parent already
|
|
@@ -40,10 +47,12 @@ const keyorder_1 = require("./keyorder");
|
|
|
40
47
|
// One node's rendering, carrying the marks the ANCESTORS already
|
|
41
48
|
// wrapped. Bags and junctions recurse structurally (their canon getters
|
|
42
49
|
// render children through plain canon, which would drop a nested
|
|
43
|
-
// close)
|
|
44
|
-
//
|
|
45
|
-
//
|
|
46
|
-
// is
|
|
50
|
+
// close), and so does an expanded alias reference, for the reason its
|
|
51
|
+
// own arm gives. Everything else — scalars, kinds, funcs, constraints,
|
|
52
|
+
// and a reference with nothing to expand — delegates to its own canon,
|
|
53
|
+
// whose text is already in cross-port parity. The non-Val arm mirrors
|
|
54
|
+
// MapVal.canon's raw-peg fallback and is unreachable through an
|
|
55
|
+
// evaluated tree (direct-tested, ADR-002).
|
|
47
56
|
function render(v, inh) {
|
|
48
57
|
if (true !== v?.isVal) {
|
|
49
58
|
return String(v);
|
|
@@ -94,6 +103,25 @@ function render(v, inh) {
|
|
|
94
103
|
else if (true === v.isConjunct || true === v.isDisjunct) {
|
|
95
104
|
s = junctionText(v, true === v.isConjunct ? '&' : '|', inner);
|
|
96
105
|
}
|
|
106
|
+
// AN EXPANDED ALIAS REFERENCE IS RENDERED, NOT DELEGATED (BUGS.md
|
|
107
|
+
// §60). A reference standing after unification is one inside a
|
|
108
|
+
// spread template, and `RefVal.canon` answers with the EXPANSION's
|
|
109
|
+
// plain canon -- which drops exactly what this renderer exists to
|
|
110
|
+
// keep. The declaration carrying `close()` or a mark is erased by
|
|
111
|
+
// the alias filter above, so a `close()` lost here is lost from the
|
|
112
|
+
// hash entirely: `%A = close({n:string})` and `%A = {n:string}`,
|
|
113
|
+
// used as `box: [&: %A]`, hashed to ONE STRING while refusing and
|
|
114
|
+
// admitting `{n:"x",z:1}` respectively -- a change of meaning the
|
|
115
|
+
// pin reported as no change, in the unsafe direction. Recursing
|
|
116
|
+
// through `inner` is what makes the alias form and its longhand
|
|
117
|
+
// twin agree again, which is ALIASES.0.md §4's own requirement.
|
|
118
|
+
//
|
|
119
|
+
// A reference with NO expansion still spells its name: a plain
|
|
120
|
+
// `$.A` names a key the hash form still carries in full, and the
|
|
121
|
+
// knot of a recursive alias inside its own template never gets one.
|
|
122
|
+
else if (true === v.isRef && undefined !== v.expansion) {
|
|
123
|
+
s = render(v.expansion, inner);
|
|
124
|
+
}
|
|
97
125
|
else {
|
|
98
126
|
s = v.canon;
|
|
99
127
|
}
|
package/dist/hcanon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hcanon.js","sourceRoot":"","sources":["../src/hcanon.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;;AAEpD,yEAAyE;AACzE,kEAAkE;AAClE,wEAAwE;AACxE,gBAAgB;AAChB,EAAE;AACF,uEAAuE;AACvE,gCAAgC;AAChC,qEAAqE;AACrE,mCAAmC;AACnC,EAAE;AACF,mEAAmE;AACnE,8CAA8C;AAC9C,wEAAwE;AACxE,uEAAuE;AACvE,sBAAsB;AACtB,EAAE;AACF,wEAAwE;AACxE,sEAAsE;AACtE,iEAAiE;AACjE,qEAAqE;AACrE,mEAAmE;AACnE,eAAe;AACf,EAAE;AACF,iDAAiD;AACjD,yDAAyD;AACzD,kEAAkE;AAClE,sEAAsE;AACtE,gEAAgE;AAChE,qEAAqE;AACrE,wEAAwE;AACxE,sEAAsE;AACtE,yDAAyD;AAEzD,6CAAwC;AAIxC,yCAAyC;AASzC,iEAAiE;AACjE,wEAAwE;AACxE,iEAAiE;AACjE,uEAAuE;AACvE,
|
|
1
|
+
{"version":3,"file":"hcanon.js","sourceRoot":"","sources":["../src/hcanon.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;;AAEpD,yEAAyE;AACzE,kEAAkE;AAClE,wEAAwE;AACxE,gBAAgB;AAChB,EAAE;AACF,uEAAuE;AACvE,gCAAgC;AAChC,qEAAqE;AACrE,mCAAmC;AACnC,EAAE;AACF,mEAAmE;AACnE,8CAA8C;AAC9C,wEAAwE;AACxE,uEAAuE;AACvE,sBAAsB;AACtB,EAAE;AACF,oEAAoE;AACpE,uEAAuE;AACvE,uEAAuE;AACvE,qEAAqE;AACrE,mEAAmE;AACnE,sBAAsB;AACtB,EAAE;AACF,wEAAwE;AACxE,sEAAsE;AACtE,iEAAiE;AACjE,qEAAqE;AACrE,mEAAmE;AACnE,eAAe;AACf,EAAE;AACF,iDAAiD;AACjD,yDAAyD;AACzD,kEAAkE;AAClE,sEAAsE;AACtE,gEAAgE;AAChE,qEAAqE;AACrE,wEAAwE;AACxE,sEAAsE;AACtE,yDAAyD;AAEzD,6CAAwC;AAIxC,yCAAyC;AASzC,iEAAiE;AACjE,wEAAwE;AACxE,iEAAiE;AACjE,sEAAsE;AACtE,uEAAuE;AACvE,uEAAuE;AACvE,sEAAsE;AACtE,gEAAgE;AAChE,2CAA2C;AAC3C,SAAS,MAAM,CAAC,CAAM,EAAE,GAAW;IACjC,IAAI,IAAI,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;QACtB,OAAO,MAAM,CAAC,CAAC,CAAC,CAAA;IAClB,CAAC;IAED,MAAM,KAAK,GAAG,I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4
|
declare const SEVERITY_WARNING = 2;
|
|
5
5
|
declare const SEVERITY_INFORMATION = 3;
|
|
6
6
|
declare const SEVERITY_HINT = 4;
|
|
7
|
-
declare const LSP_VERSION = "0.
|
|
7
|
+
declare const LSP_VERSION = "0.60.0";
|
|
8
8
|
type Position = {
|
|
9
9
|
line: number;
|
|
10
10
|
character: number;
|