Skip to content

Commit 8785834

Browse files
committed
even more IPF tests
1 parent 433abfd commit 8785834

File tree

14 files changed

+433
-26
lines changed

14 files changed

+433
-26
lines changed

bun.lockb

357 Bytes
Binary file not shown.

exampleVault/.md

Whitespace-only changes.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
},
5656
"dependencies": {
5757
"@lemons_dev/parsinom": "^0.0.11",
58+
"itertools-ts": "^1.27.0",
5859
"mathjs": "^12.0.0"
5960
}
6061
}

src/metadata/MetadataManager.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import {
1414
import { PropUtils } from '../utils/prop/PropUtils';
1515
import { type PropPath } from '../utils/prop/PropPath';
1616

17-
export const metadataCacheUpdateCycleThreshold = 5; // {syncInterval (200)} * 5 = 1s
18-
export const metadataCacheInactiveCycleThreshold = 5 * 60; // {syncInterval (200)} * 5 * 60 = 1 minute
17+
export const METADATA_CACHE_UPDATE_CYCLE_THRESHOLD = 5; // {syncInterval (200)} * 5 = 1s
18+
export const METADATA_CACHE_INACTIVE_CYCLE_THRESHOLD = 5 * 60; // {syncInterval (200)} * 5 * 60 = 1 minute
1919

2020
/**
2121
* Checks if bind target `b` should receive an update when bind target `a` changes.
@@ -127,7 +127,7 @@ export class MetadataManager {
127127
extraCache: extraCache,
128128
metadata: metadata,
129129
subscriptions: [subscription],
130-
cyclesSinceLastChange: metadataCacheUpdateCycleThreshold + 1, // +1, so that is it bigger than the threshold
130+
cyclesSinceLastChange: METADATA_CACHE_UPDATE_CYCLE_THRESHOLD + 1, // +1, so that is it bigger than the threshold
131131
cyclesSinceInactive: 0,
132132
inactive: false,
133133
changed: false,
@@ -357,7 +357,7 @@ export class MetadataManager {
357357
if (cacheEntry.inactive) {
358358
cacheEntry.cyclesSinceInactive += 1;
359359
}
360-
if (cacheEntry.cyclesSinceInactive > metadataCacheInactiveCycleThreshold) {
360+
if (cacheEntry.cyclesSinceInactive > METADATA_CACHE_INACTIVE_CYCLE_THRESHOLD) {
361361
markedForDelete.push(filePath);
362362
}
363363
}
@@ -430,7 +430,7 @@ export class MetadataManager {
430430
}
431431

432432
// don't update if the user recently changed the cache
433-
if (fileCache.cyclesSinceLastChange < metadataCacheUpdateCycleThreshold) {
433+
if (fileCache.cyclesSinceLastChange < METADATA_CACHE_UPDATE_CYCLE_THRESHOLD) {
434434
return;
435435
}
436436

0 commit comments

Comments
 (0)