typegraph-mcp 0.9.17 → 0.9.18

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.
Files changed (3) hide show
  1. package/cli.ts +6 -12
  2. package/dist/cli.js +6 -11
  3. package/package.json +1 -1
package/cli.ts CHANGED
@@ -345,18 +345,12 @@ function ensureTsconfigExclude(projectRoot: string): void {
345
345
  fs.writeFileSync(tsconfigPath, updated);
346
346
  } else {
347
347
  // No exclude field — add one before the closing brace
348
- const updated = raw.replace(/(\n)(\s*\})(\s*)$/, '$1 "exclude": ["plugins/**"]\n$2$3');
349
- // If that didn't match (unusual formatting), try simpler approach
350
- if (updated === raw) {
351
- const lastBrace = raw.lastIndexOf("}");
352
- if (lastBrace !== -1) {
353
- const before = raw.slice(0, lastBrace).trimEnd();
354
- const needsComma = !before.endsWith(",") && !before.endsWith("{");
355
- const patched = `${before}${needsComma ? "," : ""}\n "exclude": ["plugins/**"]\n}\n`;
356
- fs.writeFileSync(tsconfigPath, patched);
357
- }
358
- } else {
359
- fs.writeFileSync(tsconfigPath, updated);
348
+ const lastBrace = raw.lastIndexOf("}");
349
+ if (lastBrace !== -1) {
350
+ const before = raw.slice(0, lastBrace).trimEnd();
351
+ const needsComma = !before.endsWith(",") && !before.endsWith("{");
352
+ const patched = `${before}${needsComma ? "," : ""}\n "exclude": ["plugins/**"]\n}\n`;
353
+ fs.writeFileSync(tsconfigPath, patched);
360
354
  }
361
355
  }
362
356
 
package/dist/cli.js CHANGED
@@ -2519,20 +2519,15 @@ function ensureTsconfigExclude(projectRoot2) {
2519
2519
  );
2520
2520
  fs7.writeFileSync(tsconfigPath2, updated);
2521
2521
  } else {
2522
- const updated = raw.replace(/(\n)(\s*\})(\s*)$/, '$1 "exclude": ["plugins/**"]\n$2$3');
2523
- if (updated === raw) {
2524
- const lastBrace = raw.lastIndexOf("}");
2525
- if (lastBrace !== -1) {
2526
- const before = raw.slice(0, lastBrace).trimEnd();
2527
- const needsComma = !before.endsWith(",") && !before.endsWith("{");
2528
- const patched = `${before}${needsComma ? "," : ""}
2522
+ const lastBrace = raw.lastIndexOf("}");
2523
+ if (lastBrace !== -1) {
2524
+ const before = raw.slice(0, lastBrace).trimEnd();
2525
+ const needsComma = !before.endsWith(",") && !before.endsWith("{");
2526
+ const patched = `${before}${needsComma ? "," : ""}
2529
2527
  "exclude": ["plugins/**"]
2530
2528
  }
2531
2529
  `;
2532
- fs7.writeFileSync(tsconfigPath2, patched);
2533
- }
2534
- } else {
2535
- fs7.writeFileSync(tsconfigPath2, updated);
2530
+ fs7.writeFileSync(tsconfigPath2, patched);
2536
2531
  }
2537
2532
  }
2538
2533
  p.log.success('Added "plugins/**" to tsconfig.json exclude (prevents build errors)');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typegraph-mcp",
3
- "version": "0.9.17",
3
+ "version": "0.9.18",
4
4
  "description": "Type-aware codebase navigation for AI coding agents — 14 MCP tools powered by tsserver + oxc",
5
5
  "license": "MIT",
6
6
  "type": "module",