ucn 3.8.12 → 3.8.14

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 (44) hide show
  1. package/.claude/skills/ucn/SKILL.md +3 -1
  2. package/.github/workflows/ci.yml +15 -3
  3. package/.github/workflows/publish.yml +20 -8
  4. package/README.md +1 -0
  5. package/cli/index.js +165 -246
  6. package/core/analysis.js +1400 -0
  7. package/core/build-worker.js +194 -0
  8. package/core/cache.js +105 -7
  9. package/core/callers.js +194 -64
  10. package/core/deadcode.js +22 -66
  11. package/core/discovery.js +9 -54
  12. package/core/execute.js +139 -54
  13. package/core/graph.js +615 -0
  14. package/core/output/analysis-ext.js +271 -0
  15. package/core/output/analysis.js +491 -0
  16. package/core/output/extraction.js +188 -0
  17. package/core/output/find.js +355 -0
  18. package/core/output/graph.js +399 -0
  19. package/core/output/refactoring.js +293 -0
  20. package/core/output/reporting.js +331 -0
  21. package/core/output/search.js +307 -0
  22. package/core/output/shared.js +271 -0
  23. package/core/output/tracing.js +416 -0
  24. package/core/output.js +15 -3293
  25. package/core/parallel-build.js +165 -0
  26. package/core/project.js +299 -3633
  27. package/core/registry.js +59 -0
  28. package/core/reporting.js +258 -0
  29. package/core/search.js +890 -0
  30. package/core/stacktrace.js +1 -1
  31. package/core/tracing.js +631 -0
  32. package/core/verify.js +10 -13
  33. package/eslint.config.js +43 -0
  34. package/jsconfig.json +10 -0
  35. package/languages/go.js +21 -2
  36. package/languages/html.js +8 -0
  37. package/languages/index.js +102 -40
  38. package/languages/java.js +13 -0
  39. package/languages/javascript.js +17 -1
  40. package/languages/python.js +14 -0
  41. package/languages/rust.js +13 -0
  42. package/languages/utils.js +1 -1
  43. package/mcp/server.js +45 -28
  44. package/package.json +8 -3
@@ -178,7 +178,7 @@ ucn [target] <command> [name] [--flags]
178
178
  | `--detailed` | Show full symbol listing per file in `toc` |
179
179
  | `--top-level` | Show only top-level functions in `toc` (exclude nested/indented) |
180
180
  | `--top=N` | Limit result count (default: 10 for most commands) |
181
- | `--limit=N` | Limit result count for `find`, `usages`, `search`, `deadcode`, `api`, `toc` |
181
+ | `--limit=N` | Limit result count for `find`, `usages`, `search`, `deadcode`, `api`, `toc`, `entrypoints`, `diff-impact` |
182
182
  | `--max-files=N` | Max files to index (for large projects with 10K+ files) |
183
183
  | `--max-lines=N` | Max source lines for `class` (large classes show summary by default) |
184
184
  | `--case-sensitive` | Case-sensitive text search (default: case-insensitive) |
@@ -200,6 +200,8 @@ ucn [target] <command> [name] [--flags]
200
200
  | `--decorator=<name>` | Structural search: filter by decorator/annotation (e.g., `--decorator=Route`) |
201
201
  | `--exported` | Structural search: only exported/public symbols |
202
202
  | `--unused` | Structural search: only symbols with zero callers |
203
+ | `--no-follow-symlinks` | Don't follow symbolic links during file discovery |
204
+ | `--workers=N` | Parallel build workers (auto-detect by default; `0` to disable; env: `UCN_WORKERS`) |
203
205
 
204
206
  ## Workflow Integration
205
207
 
@@ -13,7 +13,7 @@ jobs:
13
13
  matrix:
14
14
  node-version: [18, 20, 22]
15
15
  steps:
16
- - uses: actions/checkout@v4
16
+ - uses: actions/checkout@v5
17
17
 
18
18
  - name: Configure git identity for tests
19
19
  run: |
@@ -21,7 +21,7 @@ jobs:
21
21
  git config --global user.name "CI"
22
22
 
23
23
  - name: Use Node.js ${{ matrix.node-version }}
24
- uses: actions/setup-node@v4
24
+ uses: actions/setup-node@v5
25
25
  with:
26
26
  node-version: ${{ matrix.node-version }}
27
27
  cache: npm
@@ -30,4 +30,16 @@ jobs:
30
30
  run: npm ci
31
31
 
32
32
  - name: Run tests
33
- run: npm test
33
+ run: npm test 2>&1 | tee test-output.txt
34
+
35
+ - name: Update test count badge
36
+ if: matrix.node-version == 22 && github.ref == 'refs/heads/main' && github.event_name == 'push'
37
+ run: |
38
+ PASS=$(grep '# pass ' test-output.txt | tail -1 | awk '{print $3}')
39
+ TOTAL=$(grep '# tests ' test-output.txt | tail -1 | awk '{print $3}')
40
+ echo "{\"schemaVersion\":1,\"label\":\"tests\",\"message\":\"${PASS}/${TOTAL} passing\",\"color\":\"brightgreen\"}" > badge.json
41
+ curl -s -X PATCH \
42
+ -H "Authorization: token ${{ secrets.GIST_TOKEN }}" \
43
+ -H "Accept: application/vnd.github+json" \
44
+ https://api.github.com/gists/0e10a790e16ab61ddd233e05645e203e \
45
+ -d "{\"files\":{\"ucn-tests.json\":{\"content\":$(cat badge.json | python3 -c 'import sys,json; print(json.dumps(sys.stdin.read()))')}}}"
@@ -3,7 +3,6 @@ name: Publish
3
3
  on:
4
4
  push:
5
5
  tags: ['v*']
6
- workflow_dispatch:
7
6
 
8
7
  permissions:
9
8
  contents: read
@@ -13,14 +12,14 @@ jobs:
13
12
  test:
14
13
  runs-on: ubuntu-latest
15
14
  steps:
16
- - uses: actions/checkout@v4
15
+ - uses: actions/checkout@v5
17
16
 
18
17
  - name: Configure git identity for tests
19
18
  run: |
20
19
  git config --global user.email "ci@github.com"
21
20
  git config --global user.name "CI"
22
21
 
23
- - uses: actions/setup-node@v4
22
+ - uses: actions/setup-node@v5
24
23
  with:
25
24
  node-version: 22
26
25
  cache: npm
@@ -32,9 +31,15 @@ jobs:
32
31
  needs: test
33
32
  runs-on: ubuntu-latest
34
33
  steps:
35
- - uses: actions/checkout@v4
34
+ - uses: actions/checkout@v5
36
35
 
37
- - uses: actions/setup-node@v4
36
+ - name: Set version from tag
37
+ run: |
38
+ VERSION="${GITHUB_REF_NAME#v}"
39
+ npm version "$VERSION" --no-git-tag-version
40
+ sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" server.json
41
+
42
+ - uses: actions/setup-node@v5
38
43
  with:
39
44
  node-version: 22
40
45
  registry-url: https://registry.npmjs.org
@@ -51,14 +56,21 @@ jobs:
51
56
  contents: read
52
57
  id-token: write
53
58
  steps:
54
- - uses: actions/checkout@v4
59
+ - uses: actions/checkout@v5
55
60
 
56
- - uses: actions/setup-node@v4
61
+ - name: Set version from tag
62
+ run: |
63
+ VERSION="${GITHUB_REF_NAME#v}"
64
+ sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" server.json
65
+
66
+ - uses: actions/setup-node@v5
57
67
  with:
58
68
  node-version: 22
59
69
 
60
70
  - name: Install mcp-publisher
61
- run: npm install -g mcp-publisher
71
+ run: |
72
+ curl -sL https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_linux_amd64.tar.gz | tar xz
73
+ sudo mv mcp-publisher /usr/local/bin/
62
74
 
63
75
  - name: Authenticate with MCP Registry via OIDC
64
76
  run: mcp-publisher login github-oidc
package/README.md CHANGED
@@ -5,6 +5,7 @@ See what code does before you touch it.
5
5
  Find symbols, trace callers, check impact, pick the right tests, extract code and spot what's dead - from the terminal.
6
6
 
7
7
  [![npm](https://img.shields.io/npm/v/ucn)](https://www.npmjs.com/package/ucn)
8
+ [![tests](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/mleoca/0e10a790e16ab61ddd233e05645e203e/raw/ucn-tests.json)](https://github.com/mleoca/ucn/actions/workflows/ci.yml)
8
9
  [![license](https://img.shields.io/npm/l/ucn)](LICENSE)
9
10
 
10
11
  All commands, one engine, three surfaces: