Skip to content

Wave 29: invent-free JS/TS path-mapping (tsconfig paths + package.json imports)#28

Merged
fraware merged 4 commits into
mainfrom
wave/29-js-pathmapping
Jul 21, 2026
Merged

Wave 29: invent-free JS/TS path-mapping (tsconfig paths + package.json imports)#28
fraware merged 4 commits into
mainfrom
wave/29-js-pathmapping

Conversation

@fraware

@fraware fraware commented Jul 21, 2026

Copy link
Copy Markdown
Member

Merge note

Wave 29 JS/TS path-mapping — merge after #25 (base pr/5-optional-cleanup).

Summary - AST worker resolves nearest tsconfig/jsconfig paths and package.json imports (#…) only when the mapped file is unique; still parse-only (not typechecked); bare npm packages stay unmapped - Fixtures under examples/js_toy (@lib/*, #hashMapped) plus tests/test_wave29.py covering unique resolve, ambiguous multi-target omit, and regex non-invent - Docs/notes updated for path-mapping limits (SCHEMA_REFERENCE, usage.md, README, analyzer notes) Stacks on ship tip (PR5). Does not wait for #21–#25 merge. ## Test plan - [x] PYTHONPATH=cli python -m pytest tests/test_wave29.py tests/test_wave21.py tests/test_wave22.py -v- [x]ruff check/ruff formaton touched Python paths - [x]pyrightonjs_analyzer.py+test_wave29.py` - [ ] CI multilang smoke with Node AST worker deps installed

@cursor

cursor Bot commented Jul 21, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@github-actions

Copy link
Copy Markdown

Understand-First PR map delta

Metric Value
Functions added 20
Functions removed 0
Functions modified 3
Complexity net change +143
Complexity total (base → head) 5469 → 5612
Side-effect tag adds (heuristic) 0
Policy breaches 15

Complexity increases

  • cli/ucli/analyzers/js_ast/parse_worker:applyPathPatterns: 0 → 20
  • cli/ucli/analyzers/js_ast/parse_worker:findNearestConfig: 0 → 11
  • cli/ucli/analyzers/js_ast/parse_worker:resolveMappedModule: 0 → 6
  • cli/ucli/analyzers/js_ast/parse_worker:resolveViaPackageImports: 0 → 15
  • cli/ucli/analyzers/js_ast/parse_worker:resolveViaTsconfigPaths: 0 → 17
  • cli/ucli/analyzers/js_ast/parse_worker:stripJsonc: 0 → 20
  • cli/ucli/analyzers/js_ast/parse_worker:trackableSpecifier: 0 → 4
  • cli/ucli/analyzers/js_ast/parse_worker:tryFileCandidates: 0 → 6

Policy breaches

  • cli/ucli/analyzers/js_ast/parse_worker:collectExports: 42 → 40 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:collectRelativeImports: 23 → 21 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:applyPathPatterns: 0 → 20 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:findNearestConfig: 0 → 11 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:resolveMappedModule: 0 → 6 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:resolveViaPackageImports: 0 → 15 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:resolveViaTsconfigPaths: 0 → 17 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:stripJsonc: 0 → 20 (threshold 5)
    Generated by u scan + u diff --old/--new (Python AST + JS/TS best-effort when present).
    Complexity: McCabe for Python; keyword-heuristic for JS/TS — mixed totals are not uniform McCabe.
    Side effects are Python AST heuristics when present; JS maps typically omit them.
    PR comment step is fail-soft; scan/diff above are fail-closed.

@github-actions

Copy link
Copy Markdown

Understand-First PR map delta

Metric Value
Functions added 20
Functions removed 0
Functions modified 3
Complexity net change +143
Complexity total (base → head) 5469 → 5612
Side-effect tag adds (heuristic) 0
Policy breaches 15

Complexity increases

  • cli/ucli/analyzers/js_ast/parse_worker:applyPathPatterns: 0 → 20
  • cli/ucli/analyzers/js_ast/parse_worker:findNearestConfig: 0 → 11
  • cli/ucli/analyzers/js_ast/parse_worker:resolveMappedModule: 0 → 6
  • cli/ucli/analyzers/js_ast/parse_worker:resolveViaPackageImports: 0 → 15
  • cli/ucli/analyzers/js_ast/parse_worker:resolveViaTsconfigPaths: 0 → 17
  • cli/ucli/analyzers/js_ast/parse_worker:stripJsonc: 0 → 20
  • cli/ucli/analyzers/js_ast/parse_worker:trackableSpecifier: 0 → 4
  • cli/ucli/analyzers/js_ast/parse_worker:tryFileCandidates: 0 → 6

Policy breaches

  • cli/ucli/analyzers/js_ast/parse_worker:collectExports: 42 → 40 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:collectRelativeImports: 23 → 21 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:applyPathPatterns: 0 → 20 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:findNearestConfig: 0 → 11 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:resolveMappedModule: 0 → 6 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:resolveViaPackageImports: 0 → 15 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:resolveViaTsconfigPaths: 0 → 17 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:stripJsonc: 0 → 20 (threshold 5)
    Generated by u scan + u diff --old/--new (Python AST + JS/TS best-effort when present).
    Complexity: McCabe for Python; keyword-heuristic for JS/TS — mixed totals are not uniform McCabe.
    Side effects are Python AST heuristics when present; JS maps typically omit them.
    PR comment step is fail-soft; scan/diff above are fail-closed.

@fraware
fraware changed the base branch from pr/5-optional-cleanup to main July 21, 2026 06:44
fraware added 3 commits July 20, 2026 23:45
Resolve JS/TS path aliases only from proven tsconfig paths and package imports (Wave 29).
Cover hash-mapped and tsconfig path imports for invent-free resolution.
Prevent regressions in alias resolution and unmapped negative cases.
@fraware
fraware force-pushed the wave/29-js-pathmapping branch from e2a5747 to 3ed68fe Compare July 21, 2026 06:46
Update README, usage, and schema notes for Wave 29.
@fraware
fraware force-pushed the wave/29-js-pathmapping branch from 3ed68fe to a98e156 Compare July 21, 2026 06:46
@fraware
fraware merged commit ae12074 into main Jul 21, 2026
3 of 6 checks passed
@github-actions

Copy link
Copy Markdown

Understand-First PR map delta

Metric Value
Functions added 20
Functions removed 0
Functions modified 3
Complexity net change +143
Complexity total (base → head) 5948 → 6091
Side-effect tag adds (heuristic) 0
Policy breaches 15

Complexity increases

  • cli/ucli/analyzers/js_ast/parse_worker:applyPathPatterns: 0 → 20
  • cli/ucli/analyzers/js_ast/parse_worker:findNearestConfig: 0 → 11
  • cli/ucli/analyzers/js_ast/parse_worker:resolveMappedModule: 0 → 6
  • cli/ucli/analyzers/js_ast/parse_worker:resolveViaPackageImports: 0 → 15
  • cli/ucli/analyzers/js_ast/parse_worker:resolveViaTsconfigPaths: 0 → 17
  • cli/ucli/analyzers/js_ast/parse_worker:stripJsonc: 0 → 20
  • cli/ucli/analyzers/js_ast/parse_worker:trackableSpecifier: 0 → 4
  • cli/ucli/analyzers/js_ast/parse_worker:tryFileCandidates: 0 → 6

Policy breaches

  • cli/ucli/analyzers/js_ast/parse_worker:collectExports: 42 → 40 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:collectRelativeImports: 23 → 21 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:applyPathPatterns: 0 → 20 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:findNearestConfig: 0 → 11 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:resolveMappedModule: 0 → 6 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:resolveViaPackageImports: 0 → 15 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:resolveViaTsconfigPaths: 0 → 17 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:stripJsonc: 0 → 20 (threshold 5)
    Generated by u scan + u diff --old/--new (Python AST + JS/TS best-effort when present).
    Complexity: McCabe for Python; keyword-heuristic for JS/TS — mixed totals are not uniform McCabe.
    Side effects are Python AST heuristics when present; JS maps typically omit them.
    PR comment step is fail-soft; scan/diff above are fail-closed.

1 similar comment
@github-actions

Copy link
Copy Markdown

Understand-First PR map delta

Metric Value
Functions added 20
Functions removed 0
Functions modified 3
Complexity net change +143
Complexity total (base → head) 5948 → 6091
Side-effect tag adds (heuristic) 0
Policy breaches 15

Complexity increases

  • cli/ucli/analyzers/js_ast/parse_worker:applyPathPatterns: 0 → 20
  • cli/ucli/analyzers/js_ast/parse_worker:findNearestConfig: 0 → 11
  • cli/ucli/analyzers/js_ast/parse_worker:resolveMappedModule: 0 → 6
  • cli/ucli/analyzers/js_ast/parse_worker:resolveViaPackageImports: 0 → 15
  • cli/ucli/analyzers/js_ast/parse_worker:resolveViaTsconfigPaths: 0 → 17
  • cli/ucli/analyzers/js_ast/parse_worker:stripJsonc: 0 → 20
  • cli/ucli/analyzers/js_ast/parse_worker:trackableSpecifier: 0 → 4
  • cli/ucli/analyzers/js_ast/parse_worker:tryFileCandidates: 0 → 6

Policy breaches

  • cli/ucli/analyzers/js_ast/parse_worker:collectExports: 42 → 40 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:collectRelativeImports: 23 → 21 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:applyPathPatterns: 0 → 20 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:findNearestConfig: 0 → 11 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:resolveMappedModule: 0 → 6 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:resolveViaPackageImports: 0 → 15 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:resolveViaTsconfigPaths: 0 → 17 (threshold 5)
  • cli/ucli/analyzers/js_ast/parse_worker:stripJsonc: 0 → 20 (threshold 5)
    Generated by u scan + u diff --old/--new (Python AST + JS/TS best-effort when present).
    Complexity: McCabe for Python; keyword-heuristic for JS/TS — mixed totals are not uniform McCabe.
    Side effects are Python AST heuristics when present; JS maps typically omit them.
    PR comment step is fail-soft; scan/diff above are fail-closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant