snipara-companion 3.6.0 → 3.6.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.
- package/CHANGELOG.md +6 -0
- package/dist/index.js +6 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Release notes for `snipara-companion`, newest first.
|
|
4
4
|
|
|
5
|
+
## New In 3.6.1
|
|
6
|
+
|
|
7
|
+
- Enforces `--max-nodes` as a strict total traversal budget, including seed
|
|
8
|
+
symbols, so impact analysis cannot exceed the configured graph bound for
|
|
9
|
+
symbol-heavy files.
|
|
10
|
+
|
|
5
11
|
## New In 3.6.0
|
|
6
12
|
|
|
7
13
|
- Upgrades the local code overlay to v2 with TypeScript Compiler API symbols,
|
package/dist/index.js
CHANGED
|
@@ -4226,9 +4226,10 @@ function traverseLocalGraph(manifest, seeds, options) {
|
|
|
4226
4226
|
incoming.set(edge.to, [...incoming.get(edge.to) ?? [], edge]);
|
|
4227
4227
|
outgoing.set(edge.from, [...outgoing.get(edge.from) ?? [], edge]);
|
|
4228
4228
|
}
|
|
4229
|
-
const
|
|
4230
|
-
const
|
|
4231
|
-
const
|
|
4229
|
+
const uniqueSeeds = [...new Set(seeds)];
|
|
4230
|
+
const boundedSeeds = uniqueSeeds.slice(0, options.maxNodes);
|
|
4231
|
+
const visited = new Set(boundedSeeds);
|
|
4232
|
+
const queue = boundedSeeds.map((key) => ({
|
|
4232
4233
|
key,
|
|
4233
4234
|
depth: 0,
|
|
4234
4235
|
path: [key],
|
|
@@ -4236,7 +4237,7 @@ function traverseLocalGraph(manifest, seeds, options) {
|
|
|
4236
4237
|
}));
|
|
4237
4238
|
const nodes = [];
|
|
4238
4239
|
const traversedEdges = [];
|
|
4239
|
-
let truncated =
|
|
4240
|
+
let truncated = boundedSeeds.length < uniqueSeeds.length;
|
|
4240
4241
|
while (queue.length > 0) {
|
|
4241
4242
|
const current = queue.shift();
|
|
4242
4243
|
if (!current || current.depth >= options.depth) continue;
|
|
@@ -4246,7 +4247,7 @@ function traverseLocalGraph(manifest, seeds, options) {
|
|
|
4246
4247
|
];
|
|
4247
4248
|
for (const candidate of candidates) {
|
|
4248
4249
|
if (visited.has(candidate.next)) continue;
|
|
4249
|
-
if (visited.size >= options.maxNodes
|
|
4250
|
+
if (visited.size >= options.maxNodes) {
|
|
4250
4251
|
truncated = true;
|
|
4251
4252
|
queue.length = 0;
|
|
4252
4253
|
break;
|