@telorun/analyzer 0.49.0 → 0.49.1
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.
|
@@ -30,6 +30,17 @@ export declare class Loader {
|
|
|
30
30
|
* set-membership against a previous graph walk's modules without
|
|
31
31
|
* triggering an extra source read. */
|
|
32
32
|
canonicalize(url: string): string | undefined;
|
|
33
|
+
/** Drop every memo for `url` so the next `loadFile` reads it from the source
|
|
34
|
+
* chain again — the parsed file in each variant, plus every request URL that
|
|
35
|
+
* canonicalised to it (a module reached under several refs must not stay
|
|
36
|
+
* reachable through one of them).
|
|
37
|
+
*
|
|
38
|
+
* `loadFile`'s fast path assumes a file's contents do not change under a
|
|
39
|
+
* single Loader, which holds until something invalidates one deliberately:
|
|
40
|
+
* `telo check` dropping a manifest whose upstream tag has moved, and watch
|
|
41
|
+
* mode when it returns. Without this the only way to un-cache one file is to
|
|
42
|
+
* discard the whole Loader, taking every unrelated file's memo with it. */
|
|
43
|
+
forget(url: string): void;
|
|
33
44
|
/** Read one file via the source chain and parse it into a LoadedFile.
|
|
34
45
|
* The result is shared with `Loader.fileCache`. Callers that want a
|
|
35
46
|
* private mutable copy must call `parseLoadedFile` directly with the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-loader.d.ts","sourceRoot":"","sources":["../src/manifest-loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,UAAU,EACV,WAAW,EACX,YAAY,EACb,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAwCpB,qBAAa,MAAM;IACjB;;;yEAGqE;IACrE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiC;IAE3D;;;;;8BAK0B;IAC1B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA6B;IAEzD,SAAS,CAAC,OAAO,EAAE,cAAc,EAAE,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B;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;IAyCvE;;;;gEAI4D;IAC5D,OAAO,CAAC,oBAAoB;IAa5B;gFAC4E;IAC5E,OAAO,CAAC,cAAc;IAQtB;;wEAEoE;IAC9D,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IAsB3E;;;qCAGiC;IAC3B,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAiI9E;;;;;;;;sBAQkB;IAClB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM;IAOlE,OAAO,CAAC,6BAA6B;IAarC,OAAO,CAAC,mCAAmC;IAc3C,OAAO,CAAC,2BAA2B;YAkCrB,eAAe;IAmB7B;;;0CAGsC;IAChC,gBAAgB,CACpB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC;QAAE,KAAK,EAAE,WAAW,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CA0B5D"}
|
package/dist/manifest-loader.js
CHANGED
|
@@ -88,6 +88,26 @@ export class Loader {
|
|
|
88
88
|
canonicalize(url) {
|
|
89
89
|
return this.urlToSource.get(url);
|
|
90
90
|
}
|
|
91
|
+
/** Drop every memo for `url` so the next `loadFile` reads it from the source
|
|
92
|
+
* chain again — the parsed file in each variant, plus every request URL that
|
|
93
|
+
* canonicalised to it (a module reached under several refs must not stay
|
|
94
|
+
* reachable through one of them).
|
|
95
|
+
*
|
|
96
|
+
* `loadFile`'s fast path assumes a file's contents do not change under a
|
|
97
|
+
* single Loader, which holds until something invalidates one deliberately:
|
|
98
|
+
* `telo check` dropping a manifest whose upstream tag has moved, and watch
|
|
99
|
+
* mode when it returns. Without this the only way to un-cache one file is to
|
|
100
|
+
* discard the whole Loader, taking every unrelated file's memo with it. */
|
|
101
|
+
forget(url) {
|
|
102
|
+
const source = this.urlToSource.get(url) ?? url;
|
|
103
|
+
for (const [requestUrl, canonical] of this.urlToSource) {
|
|
104
|
+
if (canonical === source)
|
|
105
|
+
this.urlToSource.delete(requestUrl);
|
|
106
|
+
}
|
|
107
|
+
for (const variant of CACHE_VARIANTS) {
|
|
108
|
+
this.fileCache.delete(`${variant}:${source}`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
91
111
|
// --- New API: returns LoadedFile / LoadedModule / LoadedGraph ----------
|
|
92
112
|
/** Read one file via the source chain and parse it into a LoadedFile.
|
|
93
113
|
* The result is shared with `Loader.fileCache`. Callers that want a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telorun/analyzer",
|
|
3
|
-
"version": "0.49.
|
|
3
|
+
"version": "0.49.1",
|
|
4
4
|
"description": "Telo Analyzer - Static manifest validator for Telo manifests.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"telo",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"ajv-formats": "^3.0.1",
|
|
43
43
|
"jsonpath-plus": "^10.3.0",
|
|
44
44
|
"yaml": "^2.8.3",
|
|
45
|
-
"@telorun/templating": "0.11.
|
|
45
|
+
"@telorun/templating": "0.11.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/node": "^20.0.0",
|
|
49
49
|
"typescript": "^5.0.0",
|
|
50
50
|
"vitest": "^2.1.8",
|
|
51
|
-
"@telorun/sdk": "0.
|
|
51
|
+
"@telorun/sdk": "0.62.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@telorun/sdk": "*"
|
package/src/manifest-loader.ts
CHANGED
|
@@ -117,6 +117,26 @@ export class Loader {
|
|
|
117
117
|
return this.urlToSource.get(url);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
/** Drop every memo for `url` so the next `loadFile` reads it from the source
|
|
121
|
+
* chain again — the parsed file in each variant, plus every request URL that
|
|
122
|
+
* canonicalised to it (a module reached under several refs must not stay
|
|
123
|
+
* reachable through one of them).
|
|
124
|
+
*
|
|
125
|
+
* `loadFile`'s fast path assumes a file's contents do not change under a
|
|
126
|
+
* single Loader, which holds until something invalidates one deliberately:
|
|
127
|
+
* `telo check` dropping a manifest whose upstream tag has moved, and watch
|
|
128
|
+
* mode when it returns. Without this the only way to un-cache one file is to
|
|
129
|
+
* discard the whole Loader, taking every unrelated file's memo with it. */
|
|
130
|
+
forget(url: string): void {
|
|
131
|
+
const source = this.urlToSource.get(url) ?? url;
|
|
132
|
+
for (const [requestUrl, canonical] of this.urlToSource) {
|
|
133
|
+
if (canonical === source) this.urlToSource.delete(requestUrl);
|
|
134
|
+
}
|
|
135
|
+
for (const variant of CACHE_VARIANTS) {
|
|
136
|
+
this.fileCache.delete(`${variant}:${source}`);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
120
140
|
// --- New API: returns LoadedFile / LoadedModule / LoadedGraph ----------
|
|
121
141
|
|
|
122
142
|
/** Read one file via the source chain and parse it into a LoadedFile.
|