@weborigami/language 0.3.4-jse.5 → 0.3.4-jse.6
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.3.4-jse.
|
|
3
|
+
"version": "0.3.4-jse.6",
|
|
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.3.4-jse.
|
|
15
|
-
"@weborigami/types": "0.3.4-jse.
|
|
14
|
+
"@weborigami/async-tree": "0.3.4-jse.6",
|
|
15
|
+
"@weborigami/types": "0.3.4-jse.6",
|
|
16
16
|
"watcher": "2.3.1",
|
|
17
17
|
"yaml": "2.7.0"
|
|
18
18
|
},
|
package/src/compiler/compile.js
CHANGED
|
@@ -7,7 +7,7 @@ function compile(source, options) {
|
|
|
7
7
|
const { front, startRule } = options;
|
|
8
8
|
const mode = options.mode ?? "shell";
|
|
9
9
|
const globals = options.globals ?? jsGlobals;
|
|
10
|
-
const enableCaching = options.
|
|
10
|
+
const enableCaching = options.enableCaching ?? true;
|
|
11
11
|
if (typeof source === "string") {
|
|
12
12
|
source = { text: source };
|
|
13
13
|
}
|
package/src/compiler/optimize.js
CHANGED
|
@@ -26,7 +26,7 @@ const REFERENCE_EXTERNAL = 3;
|
|
|
26
26
|
*/
|
|
27
27
|
export default function optimize(code, options = {}) {
|
|
28
28
|
const globals = options.globals ?? jsGlobals;
|
|
29
|
-
const cache = options.cache
|
|
29
|
+
const cache = options.cache === undefined ? {} : options.cache;
|
|
30
30
|
|
|
31
31
|
// The locals is an array, one item for each function or object context that
|
|
32
32
|
// has been entered. The array grows to the right. The array items are
|