@callidescope/graph 0.0.58 → 0.0.60
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/CHANGELOG.md +18 -0
- package/README.md +26 -26
- package/dist/src/index.d.ts +15 -0
- package/dist/src/index.js +16 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 0.0.60 (2026-11-03)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated callidescope-configuration to 0.0.61
|
|
6
|
+
- Updated callidescope-core to 0.0.60
|
|
7
|
+
|
|
8
|
+
## 0.0.59 (2026-11-03)
|
|
9
|
+
|
|
10
|
+
### 🔥 Performance
|
|
11
|
+
|
|
12
|
+
- **callidescope:** ⚡️ cache file-system probes across a run's programs ([#2098](https://github.com/organizzolini/codebase/pull/2098))
|
|
13
|
+
|
|
14
|
+
### 🧱 Updated Dependencies
|
|
15
|
+
|
|
16
|
+
- Updated callidescope-configuration to 0.0.60
|
|
17
|
+
- Updated callidescope-core to 0.0.59
|
|
18
|
+
|
|
1
19
|
## 0.0.58 (2026-11-03)
|
|
2
20
|
|
|
3
21
|
### 🧱 Updated Dependencies
|
package/README.md
CHANGED
|
@@ -44,13 +44,13 @@ Call stacks traced through `projects/ic-suite/callidescope/callidescope-graph`,
|
|
|
44
44
|
|
|
45
45
|
| Measure | Value |
|
|
46
46
|
| --- | --- |
|
|
47
|
-
| Callables |
|
|
47
|
+
| Callables | 209 |
|
|
48
48
|
| Files | 63 |
|
|
49
|
-
| Calls traced |
|
|
49
|
+
| Calls traced | 201 |
|
|
50
50
|
| Call stacks | 4 |
|
|
51
51
|
| Deepest stack | 5 |
|
|
52
52
|
| Stacks through recursion | 0 |
|
|
53
|
-
| Unfollowable calls |
|
|
53
|
+
| Unfollowable calls | 6 |
|
|
54
54
|
|
|
55
55
|
### Limits
|
|
56
56
|
|
|
@@ -69,11 +69,11 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
69
69
|
🚀 ProgramService.resolveProjectFiles(project: WorkspaceProject): readonly string[] [projects/ic-suite/callidescope/callidescope-graph/src/modules/program/program.service.ts:262]
|
|
70
70
|
└─> ProgramService.buildProgram(args: { project: WorkspaceProject; workspaceRoot: string; }): ProjectProgram [projects/ic-suite/callidescope/callidescope-graph/src/modules/program/program.service.ts:115]
|
|
71
71
|
↳ Builds one project's program, checker, and owned-file set.
|
|
72
|
-
└─> CompilerHostService.createHost(args: { options: ts.CompilerOptions; workspaceRoot: string; }): ts.CompilerHost [projects/ic-suite/callidescope/callidescope-graph/src/modules/program/compiler-host.service.ts:
|
|
72
|
+
└─> CompilerHostService.createHost(args: { options: ts.CompilerOptions; workspaceRoot: string; }): ts.CompilerHost [projects/ic-suite/callidescope/callidescope-graph/src/modules/program/compiler-host.service.ts:119]
|
|
73
73
|
↳ Creates a compiler host that reuses already-parsed source files. `setParentNodes` is on because the rest of the package…
|
|
74
|
-
└─> CompilerHostService.resolveModuleCache(options: ts.CompilerOptions, workspaceRoot: string): ts.ModuleResolutionCache [projects/ic-suite/callidescope/callidescope-graph/src/modules/program/compiler-host.service.ts:
|
|
74
|
+
└─> CompilerHostService.resolveModuleCache(options: ts.CompilerOptions, workspaceRoot: string): ts.ModuleResolutionCache [projects/ic-suite/callidescope/callidescope-graph/src/modules/program/compiler-host.service.ts:79]
|
|
75
75
|
↳ Returns the module resolution cache for one working directory.
|
|
76
|
-
└─> CompilerHostService.createModuleResolutionCache(…)(fileName: string): string [projects/ic-suite/callidescope/callidescope-graph/src/modules/program/compiler-host.service.ts:
|
|
76
|
+
└─> CompilerHostService.createModuleResolutionCache(…)(fileName: string): string [projects/ic-suite/callidescope/callidescope-graph/src/modules/program/compiler-host.service.ts:91]
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
**2. `CallablesService.visit`** — depth 5 · orphan-root
|
|
@@ -150,6 +150,7 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
150
150
|
| `WorkspaceService.findProjectDirectories` | 2 | `WorkspaceService.toWorkspaceRelative`, `WorkspaceService.isExcludedFromScan` | `projects/ic-suite/callidescope/callidescope-graph/src/modules/workspace/workspace.service.ts:66` |
|
|
151
151
|
| `WorkspaceService.walkImportedProjectClosure` | 2 | `WorkspaceService.resolveOwningProject`, `WorkspaceService.isClosureDestination` | `projects/ic-suite/callidescope/callidescope-graph/src/modules/workspace/workspace.service.ts:342` |
|
|
152
152
|
| `FileFilterService.isExcludedByOwningProject` | 2 | `WorkspaceService.resolveOwningProject`, `FileFilterService.some(…)` | `projects/ic-suite/callidescope/callidescope-graph/src/modules/workspace/file-filter.service.ts:60` |
|
|
153
|
+
| `CompilerHostService.createHost` | 2 | `CompilerHostService.resolveModuleCache`, `CompilerHostService.memoize` | `projects/ic-suite/callidescope/callidescope-graph/src/modules/program/compiler-host.service.ts:119` |
|
|
153
154
|
| `ProgramService.readPulledInPaths` | 2 | `ProgramService.toRealPath`, `WorkspaceService.toWorkspaceRelative` | `projects/ic-suite/callidescope/callidescope-graph/src/modules/program/program.service.ts:195` |
|
|
154
155
|
| `ProgramService.resolveProjectFiles` | 2 | `ProgramService.buildProgram`, `ProgramService.readPulledInPaths` | `projects/ic-suite/callidescope/callidescope-graph/src/modules/program/program.service.ts:262` |
|
|
155
156
|
| `CallablesService.visit` | 2 | `CallablesService.isCallableDeclaration`, `CallablesService.describe` | `projects/ic-suite/callidescope/callidescope-graph/src/modules/callables/callables.service.ts:49` |
|
|
@@ -187,8 +188,7 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
187
188
|
| `FileFilterService.buildFileFilter` | 1 | `FileFilterService.listIgnoredFiles` | `projects/ic-suite/callidescope/callidescope-graph/src/modules/workspace/file-filter.service.ts:137` |
|
|
188
189
|
| `FileFilterService.isExcluded` | 1 | `FileFilterService.some(…)` | `projects/ic-suite/callidescope/callidescope-graph/src/modules/workspace/file-filter.service.ts:161` |
|
|
189
190
|
| `FileFilterService.isExcluded` | 1 | `FileFilterService.isExcludedByOwningProject` | `projects/ic-suite/callidescope/callidescope-graph/src/modules/workspace/file-filter.service.ts:206` |
|
|
190
|
-
| `CompilerHostService.resolveModuleCache` | 1 | `CompilerHostService.createModuleResolutionCache(…)` | `projects/ic-suite/callidescope/callidescope-graph/src/modules/program/compiler-host.service.ts:
|
|
191
|
-
| `CompilerHostService.createHost` | 1 | `CompilerHostService.resolveModuleCache` | `projects/ic-suite/callidescope/callidescope-graph/src/modules/program/compiler-host.service.ts:76` |
|
|
191
|
+
| `CompilerHostService.resolveModuleCache` | 1 | `CompilerHostService.createModuleResolutionCache(…)` | `projects/ic-suite/callidescope/callidescope-graph/src/modules/program/compiler-host.service.ts:79` |
|
|
192
192
|
| `ProgramService.map(…)` | 1 | `ProgramService.toRealPath` | `projects/ic-suite/callidescope/callidescope-graph/src/modules/program/program.service.ts:133` |
|
|
193
193
|
| `CallablesService.collect` | 1 | `CallablesService.collectFromProgram` | `projects/ic-suite/callidescope/callidescope-graph/src/modules/callables/callables.service.ts:191` |
|
|
194
194
|
| `ExternalService.isExternal` | 1 | `ExternalService.computeVerdict` | `projects/ic-suite/callidescope/callidescope-graph/src/modules/classes/external.service.ts:64` |
|
|
@@ -635,14 +635,14 @@ graph LR
|
|
|
635
635
|
|
|
636
636
|
### Project
|
|
637
637
|
|
|
638
|
-

|
|
639
|
+

|
|
640
640
|

|
|
641
641
|

|
|
642
642
|
|
|
643
643
|
### Measured Targets
|
|
644
644
|
|
|
645
|
-

|
|
646
646
|
|
|
647
647
|
### TypeScript
|
|
648
648
|
|
|
@@ -651,7 +651,7 @@ graph LR
|
|
|
651
651
|

|
|
652
652
|

|
|
653
653
|

|
|
654
|
-

|
|
655
655
|

|
|
656
656
|
|
|
657
657
|
### JavaScript
|
|
@@ -660,15 +660,15 @@ graph LR
|
|
|
660
660
|

|
|
661
661
|

|
|
662
662
|

|
|
663
|
-

|
|
664
|
+

|
|
665
|
+

|
|
666
|
+

|
|
667
|
+

|
|
668
668
|

|
|
669
669
|

|
|
670
|
-

|
|
671
|
+

|
|
672
672
|

|
|
673
673
|
|
|
674
674
|
### Python
|
|
@@ -824,20 +824,20 @@ graph LR
|
|
|
824
824
|
### Markdown
|
|
825
825
|
|
|
826
826
|

|
|
827
|
-

|
|
828
828
|

|
|
829
|
-

|
|
830
|
+

|
|
831
831
|

|
|
832
832
|

|
|
833
833
|

|
|
834
|
-

|
|
835
|
+

|
|
836
|
+

|
|
837
837
|

|
|
838
838
|

|
|
839
839
|

|
|
840
|
-

|
|
841
841
|

|
|
842
842
|

|
|
843
843
|

|
package/dist/src/index.d.ts
CHANGED
|
@@ -561,7 +561,20 @@ export declare const COMMAND_RUNNER_METHOD_NAME = "run";
|
|
|
561
561
|
*/
|
|
562
562
|
export declare class CompilerHostService {
|
|
563
563
|
constructor();
|
|
564
|
+
/**
|
|
565
|
+
* Answers to the file-system questions module resolution asks, shared by
|
|
566
|
+
* every program of a run.
|
|
567
|
+
*
|
|
568
|
+
* One run probes the same `node_modules` paths once per program — about
|
|
569
|
+
* 370,000 `stat` calls over 21,000 distinct paths for `configuration` — and
|
|
570
|
+
* those probes, not parsing, were most of its time. The tree does not change
|
|
571
|
+
* during a run, so an answer stays right until `clear`.
|
|
572
|
+
*/
|
|
573
|
+
private readonly directoryExistsCache;
|
|
574
|
+
private readonly fileExistsCache;
|
|
575
|
+
private readonly fileTextCache;
|
|
564
576
|
private readonly moduleResolutionCaches;
|
|
577
|
+
private readonly realPathCache;
|
|
565
578
|
/**
|
|
566
579
|
* Keyed on file name and script target together.
|
|
567
580
|
*
|
|
@@ -570,6 +583,8 @@ export declare class CompilerHostService {
|
|
|
570
583
|
* a program that asked for another target is silently wrong.
|
|
571
584
|
*/
|
|
572
585
|
private readonly sourceFileCache;
|
|
586
|
+
/** Wraps a one-argument host method so each distinct argument asks once. */
|
|
587
|
+
private memoize;
|
|
573
588
|
/** Returns the module resolution cache for one working directory. */
|
|
574
589
|
private resolveModuleCache;
|
|
575
590
|
/** Drops every cached source file, for a host that outlives one run. */
|
package/dist/src/index.js
CHANGED
|
@@ -509,8 +509,20 @@ b = __decorate([i({
|
|
|
509
509
|
// src/modules/program/compiler-host.service.ts
|
|
510
510
|
var x = class CompilerHostService {
|
|
511
511
|
constructor() {}
|
|
512
|
+
directoryExistsCache = /* @__PURE__ */ new Map();
|
|
513
|
+
fileExistsCache = /* @__PURE__ */ new Map();
|
|
514
|
+
fileTextCache = /* @__PURE__ */ new Map();
|
|
512
515
|
moduleResolutionCaches = /* @__PURE__ */ new Map();
|
|
516
|
+
realPathCache = /* @__PURE__ */ new Map();
|
|
513
517
|
sourceFileCache = /* @__PURE__ */ new Map();
|
|
518
|
+
memoize(e, t) {
|
|
519
|
+
return (n) => {
|
|
520
|
+
let r = e.get(n);
|
|
521
|
+
if (r !== void 0) return r.answer;
|
|
522
|
+
let i = t(n);
|
|
523
|
+
return e.set(n, { answer: i }), i;
|
|
524
|
+
};
|
|
525
|
+
}
|
|
514
526
|
resolveModuleCache(e, t) {
|
|
515
527
|
let n = this.moduleResolutionCaches.get(t);
|
|
516
528
|
if (n !== void 0) return n;
|
|
@@ -518,7 +530,7 @@ var x = class CompilerHostService {
|
|
|
518
530
|
return this.moduleResolutionCaches.set(t, r), r;
|
|
519
531
|
}
|
|
520
532
|
clear() {
|
|
521
|
-
this.sourceFileCache.clear(), this.moduleResolutionCaches.clear();
|
|
533
|
+
this.sourceFileCache.clear(), this.directoryExistsCache.clear(), this.fileExistsCache.clear(), this.fileTextCache.clear(), this.realPathCache.clear(), this.moduleResolutionCaches.clear();
|
|
522
534
|
}
|
|
523
535
|
createHost(e) {
|
|
524
536
|
let t = o.createCompilerHost(e.options, !0), n = t.getSourceFile.bind(t);
|
|
@@ -529,7 +541,9 @@ var x = class CompilerHostService {
|
|
|
529
541
|
let o = n(e, t);
|
|
530
542
|
return o !== void 0 && this.sourceFileCache.set(i, o), o;
|
|
531
543
|
};
|
|
532
|
-
|
|
544
|
+
t.getSourceFile = readCached, t.fileExists = this.memoize(this.fileExistsCache, t.fileExists.bind(t)), t.readFile = this.memoize(this.fileTextCache, t.readFile.bind(t));
|
|
545
|
+
let r = t.directoryExists?.bind(t), i = t.realpath?.bind(t);
|
|
546
|
+
return r !== void 0 && (t.directoryExists = this.memoize(this.directoryExistsCache, r)), i !== void 0 && (t.realpath = this.memoize(this.realPathCache, i)), t;
|
|
533
547
|
}
|
|
534
548
|
};
|
|
535
549
|
x = __decorate([r(), __decorateMetadata("design:paramtypes", [])], x);
|
package/package.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"url": "https://github.com/organizzolini/codebase/issues"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@callidescope/configuration": "0.0.
|
|
8
|
-
"@callidescope/core": "0.0.
|
|
7
|
+
"@callidescope/configuration": "0.0.61",
|
|
8
|
+
"@callidescope/core": "0.0.60",
|
|
9
9
|
"@nestjs/common": "^11.1.21 || ^12.0.1",
|
|
10
10
|
"pino": "^10.3.1",
|
|
11
11
|
"pino-pretty": "^13.1.3",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"strict": true
|
|
67
67
|
},
|
|
68
68
|
"types": "./dist/src/index.d.ts",
|
|
69
|
-
"version": "0.0.
|
|
69
|
+
"version": "0.0.60"
|
|
70
70
|
}
|