@weborigami/language 0.4.0 → 0.4.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weborigami/language",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Web Origami expression language compiler and runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./main.js",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"typescript": "5.8.2"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@weborigami/async-tree": "0.4.
|
|
15
|
-
"@weborigami/types": "0.4.
|
|
14
|
+
"@weborigami/async-tree": "0.4.2",
|
|
15
|
+
"@weborigami/types": "0.4.2",
|
|
16
16
|
"watcher": "2.3.1",
|
|
17
17
|
"yaml": "2.7.0"
|
|
18
18
|
},
|
|
@@ -156,14 +156,29 @@ export function entryKey(entry, object = null, eagerProperties = []) {
|
|
|
156
156
|
return trailingSlash.add(key);
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
+
if (!(value instanceof Array)) {
|
|
160
|
+
// Can't be a subtree
|
|
161
|
+
return trailingSlash.remove(key);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// If we're dealing with a getter, work with what that gets
|
|
165
|
+
if (value[0] === ops.getter) {
|
|
166
|
+
value = value[1];
|
|
167
|
+
}
|
|
168
|
+
|
|
159
169
|
// If entry will definitely create a subtree, add a trailing slash
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
170
|
+
if (value[0] === ops.object) {
|
|
171
|
+
// Subtree
|
|
172
|
+
return trailingSlash.add(key);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// See if it looks a merged object
|
|
176
|
+
if (value[1] === "_result" && value[0][0] === ops.object) {
|
|
177
|
+
// Merge
|
|
178
|
+
return trailingSlash.add(key);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return key;
|
|
167
182
|
}
|
|
168
183
|
|
|
169
184
|
function keys(object, eagerProperties, propertyIsEnumerable, entries) {
|
package/src/runtime/jsGlobals.js
CHANGED
|
@@ -18,8 +18,6 @@ const globals = {
|
|
|
18
18
|
AggregateError,
|
|
19
19
|
Array,
|
|
20
20
|
ArrayBuffer,
|
|
21
|
-
// @ts-ignore this exists despite what TypeScript thinks
|
|
22
|
-
AsyncDisposableStack,
|
|
23
21
|
Atomics,
|
|
24
22
|
BigInt,
|
|
25
23
|
BigInt64Array,
|
|
@@ -29,7 +27,6 @@ const globals = {
|
|
|
29
27
|
BroadcastChannel,
|
|
30
28
|
Buffer,
|
|
31
29
|
ByteLengthQueuingStrategy,
|
|
32
|
-
CloseEvent,
|
|
33
30
|
CompressionStream,
|
|
34
31
|
CountQueuingStrategy,
|
|
35
32
|
Crypto,
|
|
@@ -39,16 +36,14 @@ const globals = {
|
|
|
39
36
|
DataView,
|
|
40
37
|
Date,
|
|
41
38
|
DecompressionStream,
|
|
42
|
-
|
|
43
|
-
DisposableStack,
|
|
39
|
+
DisposableStack: globalThis.DisposableStack,
|
|
44
40
|
Error,
|
|
45
41
|
EvalError,
|
|
46
42
|
Event,
|
|
47
43
|
EventTarget,
|
|
48
44
|
File,
|
|
49
45
|
FinalizationRegistry,
|
|
50
|
-
|
|
51
|
-
Float16Array,
|
|
46
|
+
Float16Array: globalThis.Float16Array,
|
|
52
47
|
Float32Array,
|
|
53
48
|
Float64Array,
|
|
54
49
|
FormData,
|
|
@@ -59,8 +54,7 @@ const globals = {
|
|
|
59
54
|
Int32Array,
|
|
60
55
|
Int8Array,
|
|
61
56
|
Intl,
|
|
62
|
-
|
|
63
|
-
Iterator,
|
|
57
|
+
Iterator: globalThis.Iterator,
|
|
64
58
|
JSON,
|
|
65
59
|
Map,
|
|
66
60
|
Math,
|
|
@@ -95,8 +89,7 @@ const globals = {
|
|
|
95
89
|
SharedArrayBuffer,
|
|
96
90
|
String,
|
|
97
91
|
SubtleCrypto,
|
|
98
|
-
|
|
99
|
-
SuppressedError,
|
|
92
|
+
SuppressedError: globalThis.SuppressedError,
|
|
100
93
|
Symbol,
|
|
101
94
|
SyntaxError,
|
|
102
95
|
TextDecoder,
|
|
@@ -108,8 +101,7 @@ const globals = {
|
|
|
108
101
|
TypeError,
|
|
109
102
|
URIError,
|
|
110
103
|
URL,
|
|
111
|
-
|
|
112
|
-
URLPattern,
|
|
104
|
+
URLPattern: globalThis.URLPattern,
|
|
113
105
|
URLSearchParams,
|
|
114
106
|
Uint16Array,
|
|
115
107
|
Uint32Array,
|
|
@@ -119,7 +111,7 @@ const globals = {
|
|
|
119
111
|
WeakRef,
|
|
120
112
|
WeakSet,
|
|
121
113
|
WebAssembly,
|
|
122
|
-
WebSocket,
|
|
114
|
+
WebSocket: globalThis.WebSocket,
|
|
123
115
|
WritableStream,
|
|
124
116
|
WritableStreamDefaultController,
|
|
125
117
|
WritableStreamDefaultWriter,
|