@rkmodules/rules 0.0.171 → 0.0.172
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/index.cjs.js +58 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.mjs +58 -8
- package/dist/index.esm.mjs.map +1 -1
- package/dist/lib/Engine/cache.d.ts +6 -1
- package/package.json +1 -1
- package/readme.md +11 -6
|
@@ -2,6 +2,11 @@ import { Tree } from "../DataTree";
|
|
|
2
2
|
import { CacheInfo, ClearCacheOptions, FunctionCall, PrimitiveFunction, RecOfTrees, RunOptions, VarRef } from "./types";
|
|
3
3
|
export declare const cachePath: (path: string[]) => string;
|
|
4
4
|
export declare function sameRecord(a: Record<string, any>, b: Record<string, any>): boolean;
|
|
5
|
+
/** Compare immutable graph configuration, never runtime dependency trees.
|
|
6
|
+
* Preserve key order (interpolation observes it); opaque objects retain identity
|
|
7
|
+
* semantics. Cyclic configurations conservatively miss instead of recursing forever.
|
|
8
|
+
*/
|
|
9
|
+
export declare function sameConfiguration(a: any, b: any, ancestors?: Set<object>): boolean;
|
|
5
10
|
interface PortMemo {
|
|
6
11
|
raw: VarRef;
|
|
7
12
|
paths: string[];
|
|
@@ -45,7 +50,7 @@ export declare class ExecutionCache {
|
|
|
45
50
|
clear(options?: ClearCacheOptions): void;
|
|
46
51
|
visit(run: CacheRun, path: string[]): void;
|
|
47
52
|
finish(run: CacheRun): void;
|
|
48
|
-
interpolate(run: CacheRun, path: string[], raw: Record<string, VarRef>, scope: Record<string, RecOfTrees
|
|
53
|
+
interpolate(run: CacheRun, path: string[], raw: Record<string, VarRef>, scope: Record<string, RecOfTrees>, configuration?: boolean): RecOfTrees;
|
|
49
54
|
key(call: FunctionCall): Record<string, any>;
|
|
50
55
|
get(run: CacheRun, path: string[], kind: CacheInfo["kind"], fn: PrimitiveFunction, call: FunctionCall, inputs: RecOfTrees, params: Record<string, any>): ResultEntry | undefined;
|
|
51
56
|
set(run: CacheRun, path: string[], kind: CacheInfo["kind"], fn: PrimitiveFunction, call: FunctionCall, inputs: RecOfTrees, params: Record<string, any>, result: RecOfTrees, impl: PrimitiveFunction["impl"], createdAt: number): void;
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -377,12 +377,17 @@ execute; their individual primitive children follow these policies.
|
|
|
377
377
|
Treat graph definitions, inputs, parameters, and returned trees as immutable,
|
|
378
378
|
including inside unmarked primitives and event listeners. Do not mutate cached
|
|
379
379
|
outputs or upstream inputs. Update an object/array by replacing its reference.
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
380
|
+
Graph input/output expressions, call parameters, and call metadata use `Object.is`
|
|
381
|
+
first, then recursive value comparison for arrays and plain objects. Reloading an
|
|
382
|
+
unchanged graph from JSON can therefore reuse cached results. Property and array
|
|
383
|
+
order remain significant; opaque objects (such as class instances) retain identity
|
|
384
|
+
semantics, and distinct cyclic configurations conservatively miss.
|
|
385
|
+
Runtime inputs, evaluated defaults, and upstream dependency trees still use identity
|
|
386
|
+
comparison: a new outer input map with the same port values can hit, but a newly
|
|
387
|
+
allocated runtime object/array value misses even if deeply equal. Unchanged graph
|
|
388
|
+
expressions retain their reference paths and skip repeated recursive discovery.
|
|
389
|
+
Function-valued graph input defaults still execute each run before their returned
|
|
390
|
+
values are memoized. In-place mutations are not detected.
|
|
386
391
|
|
|
387
392
|
Caches belong to an engine, root graph/function name, and optional `cacheKey`.
|
|
388
393
|
Nested invocation paths distinguish two uses of the same child graph. Use distinct
|