agents-md-gen 0.6.0 → 0.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 CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.1
4
+
5
+ - Detect Rush monorepos (`rush.json`, including the `//` line
6
+ comments Rush's own tooling writes into it).
7
+
3
8
  ## 0.6.0
4
9
 
5
10
  - Detect Swift packages (`Package.swift`, XCTest detection).
package/README.md CHANGED
@@ -63,8 +63,8 @@ docker run --rm -v "$PWD":/workdir ghcr.io/peshino2012/agents-md-gen
63
63
  - **PHP** — Composer, Laravel/Symfony detection, PHPUnit
64
64
  - **.NET/C#** — NuGet, xUnit/NUnit/MSTest detection
65
65
  - **Swift** — Swift Package Manager, XCTest detection
66
- - **Monorepos** — Turborepo, Nx, Lerna, npm/yarn/pnpm workspaces, listing
67
- each detected sub-package
66
+ - **Monorepos** — Turborepo, Nx, Lerna, Rush, npm/yarn/pnpm workspaces,
67
+ listing each detected sub-package
68
68
  - CI (GitHub Actions), license, and top-level project structure
69
69
 
70
70
  ## GitHub Action
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents-md-gen",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Generate a solid AGENTS.md / CLAUDE.md for any repo by detecting its stack, commands, and structure",
5
5
  "license": "MIT",
6
6
  "funding": {
package/src/detect.js CHANGED
@@ -368,7 +368,27 @@ function detectDocker(root) {
368
368
  return { dockerfile, compose: compose || null };
369
369
  }
370
370
 
371
+ function readJsonWithComments(root, ...segments) {
372
+ const text = readText(root, ...segments);
373
+ if (!text) return null;
374
+ try {
375
+ // rush.json commonly ships with // line comments, which aren't valid JSON.
376
+ return JSON.parse(text.replace(/^\s*\/\/.*$/gm, ''));
377
+ } catch {
378
+ return null;
379
+ }
380
+ }
381
+
371
382
  function detectMonorepo(root) {
383
+ const rush = readJsonWithComments(root, 'rush.json');
384
+ if (rush && Array.isArray(rush.projects)) {
385
+ const packages = rush.projects
386
+ .map((p) => p.packageName)
387
+ .filter(Boolean)
388
+ .sort();
389
+ return { tool: 'Rush', packages };
390
+ }
391
+
372
392
  const pkg = readJson(root, 'package.json');
373
393
  const patterns = [];
374
394