issuewatcher-mcp 0.2.4 → 0.2.5

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.
@@ -75,16 +75,16 @@ export async function discoverDependencies(source, registry, opts, now = Date.no
75
75
  .slice(0, opts.maxDependencies);
76
76
  let lookupFailures = 0;
77
77
  const lookupsEnd = Date.now() + (opts.registryBudgetMs ?? 8_000);
78
- const resolved = await inPool(ranked, 12, async (dep) => {
78
+ const lookup = async (dep) => {
79
79
  let timer;
80
80
  try {
81
81
  const remaining = Math.max(0, lookupsEnd - Date.now());
82
82
  const budget = new Promise((_, reject) => {
83
83
  timer = setTimeout(() => reject(new Error("registry lookups ran out of time")), remaining);
84
84
  });
85
- const lookup = registry.resolve(dep.ecosystem, dep.pkg);
86
- lookup.catch(() => undefined); // the race may already be lost; a late failure is not news
87
- return await Promise.race([lookup, budget]);
85
+ const pending = registry.resolve(dep.ecosystem, dep.pkg);
86
+ pending.catch(() => undefined); // the race may already be lost; a late failure is not news
87
+ return await Promise.race([pending, budget]);
88
88
  }
89
89
  catch (err) {
90
90
  lookupFailures++;
@@ -94,7 +94,18 @@ export async function discoverDependencies(source, registry, opts, now = Date.no
94
94
  finally {
95
95
  clearTimeout(timer);
96
96
  }
97
+ };
98
+ // One pool per registry: a slow PyPI must not hold the slots that npm lookups need (D-053).
99
+ const resolved = new Array(ranked.length).fill(null);
100
+ const byEcosystem = new Map();
101
+ ranked.forEach((dep, index) => {
102
+ const group = byEcosystem.get(dep.ecosystem) ?? [];
103
+ group.push({ dep, index });
104
+ byEcosystem.set(dep.ecosystem, group);
97
105
  });
106
+ await Promise.all([...byEcosystem.entries()].map(([ecosystem, group]) => inPool(group, ecosystem === "npm" ? 10 : 4, async ({ dep, index }) => {
107
+ resolved[index] = await lookup(dep);
108
+ })));
98
109
  const map = {};
99
110
  ranked.forEach((dep, i) => {
100
111
  const repo = resolved[i];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "issuewatcher-mcp",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "MCP server that ranks new GitHub issues for your AI assistant: what to pick up, and what may break your projects.",
5
5
  "mcpName": "io.github.mac146/issuewatcher",
6
6
  "license": "MIT",