Skip to content

Support Javascript: Codeanalyzer-typescript pin v0.6.0 offers JavaScript support. Python-SDK must make this a supported language. #307

Open

Description

@rahlk

Is your feature request related to a problem? Please describe.

The SDK pins the TypeScript analyzer at an exact version:

pyproject.toml:43    "codeanalyzer-typescript==0.4.3",
pyproject.toml:98    codeanalyzer-typescript = "0.4.3"   # [tool.backend-versions], informational

0.6.0 makes JavaScript analyzable for the first time. On 0.4.3 a JavaScript-only project returns an empty symbol table with exit code 0 — no error, no warning — so any SDK caller pointed at a Node/Express app silently gets nothing back. Measured on OWASP NodeGoat: 0 modules on 0.4.3, 27 modules / 59 callables / 184 call-graph edges on 0.6.0.

This is a plain version bump, not a migration: 0.6.0 is still on the v1 schema, which is what cldk/models/typescript/models.py:445 (TSApplication { symbol_table, call_graph }) already models. Nothing in the model layer changes.

Describe the solution you'd like

  • pyproject.toml:43 → codeanalyzer-typescript==0.6.0
  • pyproject.toml:98 [tool.backend-versions] → 0.6.0 (informational, but it disagreeing with the real pin is how it rots)
  • Add a small JavaScript fixture and an e2e assertion that a .js-only project yields a non-empty symbol table through the SDK — the capability is worthless if nothing proves it arrives
  • Re-run the three SDK gates: mocked, e2e, backend-contract

Describe alternatives you've considered

Not stated in the original issue.

Additional context

Plan

Propagation follow-on from codeanalyzer-typescript #84 / #85 (PR #86). Planning context: roadmap.

Blocked until codeanalyzer-typescript v0.6.0 is published to PyPI.

Scope boundary

Bumps the pin and proves the new capability reaches SDK consumers. This issue does not:

  • migrate the TypeScript model layer to schema v2 — that is the separate, unowned v1→v2/v3 migration (candidate 9 on the roadmap), and 0.6.0 deliberately does not require it;
  • touch the Java or Python analyzer pins;
  • add JavaScript-specific SDK surface — the existing CLDK.typescript(...) facade covers it, since the analyzer emits the same v1 shape for .js as for .ts.

Caveats and known risks

  • Analyzer caches are invalidated by this bump. ANALYZER_VERSION moved in lockstep with the release, which is the only thing that invalidates analysis_cache.json — the per-file source hash cannot see that extraction logic changed. First run after upgrading rebuilds from scratch; expect a slower first analysis, not a failure.
  • Callable counts increase on unchanged TypeScript sources. 0.6.0 materializes this.x = fn and object-literal methods, which were previously absent — this is language-neutral, so TypeScript projects using those idioms gain callables too. Any SDK test asserting an exact callable or edge count against a fixture will need its expected set updated. This is a correction, not a regression: sample-app output is byte-identical, so only fixtures using the dynamic idioms move.
  • --tsc-only still exists (cldk/analysis/commons/backend_config.py:84 documents it as >= 0.4.2), so no config break. Worth noting in passing that on JavaScript it is a bad default — the analyzer's own measurement puts tsc at 53 edges against 184 for the union default.
  • Known analyzer gaps that will surface through the SDK and are not bugs in this bump: CommonJS require/module.exports are not modelled at module level (imports/exports stay empty on CJS input), and method calls on untyped receivers produce no library edge (tracked as codeanalyzer-typescript#87).

Definition of done

  • Both pin sites read 0.6.0 and agree with each other.
  • pytest tests/test_typescript_analysis.py, tests/test_typescript_e2e.py and tests/test_typescript_backend_contract.py all pass against the published 0.6.0 wheel — not a local build.
  • The new JavaScript fixture returns a symbol table whose module set equals the fixture's .js files, asserted as an exact set rather than "non-empty", and that test fails against 0.4.3.

Activity

  1. added
    kind/feature
    on Aug 6, 2026
  2. changed the title [-]chore(deps): bump codeanalyzer-typescript pin 0.4.3 -> 0.6.0 (JavaScript support)[/-] [+]Support Javascript: Codeanalyzer-typescript pin v0.6.0 offers JavaScript support. Python-SDK must make this a supported language.[/+] on Aug 6, 2026
  3. rahlk commented on Sep 4, 2026

    @rahlk
    CollaboratorAuthor

    Folded into leg 3 of codellm-devkit/.github#55 (TypeScript + JavaScript), rather than tracked separately. Spec: 2026-09-03-agent-facing-query-facade.md § 7.

    JavaScript is not additional analyzer work for this SDK — deployed graphs already carry JS_-prefixed relationship types alongside TS_ ones (JS_CALLS, JS_HAS_MODULE), emitted by the same codeanalyzer-typescript binary. So the leg that teaches the TypeScript backend the prefixed v2 vocabulary picks up JavaScript in the same change: the backend's label prefix becomes a class constant, and JavaScript is a second value for it rather than a second backend.

    That leg also carries the eager-initialisation fix and locate/bodies/artifacts, and it is where the recorded 905 empty-result and 602 unresolved-callee incidents clear.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions