Skip to main content

codemap-javascript

A JavaScript / JSX indexer for CodeMap, distributed as an independent PyPI package.

What this package covers

Extension Grammar Notes
.js tree-sitter-javascript Plain JavaScript
.jsx tree-sitter-javascript React-style JSX (the grammar handles JSX natively)
.mjs tree-sitter-javascript ES module
.cjs tree-sitter-javascript CommonJS module

A single grammar instance handles all four extensions — .jsx is not a separate grammar in tree-sitter-javascript.

Install

pip install codemap-javascript

After installation, codemap doctor lists javascript alongside the built-in indexers (ADR-004 + ADR-L001).

What it captures

Backed by tree-sitter-javascript. Single-file, no cross-file resolution:

AST node Symbol kind SymbolID descriptor
function_declaration function <path>/name().
class_declaration class <path>/Cls#
method_definition (inside class) method <path>/Cls#name().
Top-level const / let / var variable <path>/Name.

Edges:

  • import_statement is read for future cross-module bridge consumption, but no edge is emitted at the module top-level (parity with the TypeScript plugin).

SymbolID encoding

scip-javascript . . . src/app/Service.js/UserService#login().
└─────────────┘     └──────────────────────────────────────┘
     scheme              file → namespaces / type / method

Why a separate plugin (vs. extending codemap-typescript)

TypeScript is a syntactic superset of JavaScript, so tree-sitter-typescript can parse most .js / .jsx files. We ship a dedicated plugin instead for three reasons:

  1. Clean dependency: codemap-javascript does not depend on tree-sitter-typescript. Users who only have JavaScript code do not need the larger grammar.
  2. JS-specific error recovery: when a .js file has a syntax error, the JavaScript grammar's error nodes point at JS-shaped tokens rather than TS-shaped ones, which produces tighter diagnostics.
  3. Independent versioning: JS language updates (decorators, class fields, RegExp v flag) can ship at their own cadence without bumping the TypeScript plugin.

For pure type-extraction purposes the two plugins produce equivalent symbol output for .js / .jsx files. Install whichever matches your codebase; install both if you have a mixed code-base.

Tests

pip install -e ".[dev]"
pytest

Limits / next steps

  • No cross-file import resolution. A javascript_cross_module bridge, sibling to python_cross_module, would be a future addition.
  • Arrow functions assigned to top-level const are indexed as variable, not function — matching the TypeScript plugin. Named arrow detection across both plugins is a v0.2.x improvement.
  • JSX-specific component patterns are not yet captured beyond the underlying function/class symbols.

License

MIT — same as the host project.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codemap_javascript-0.4.10.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codemap_javascript-0.4.10-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file codemap_javascript-0.4.10.tar.gz.

File metadata

  • Download URL: codemap_javascript-0.4.10.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for codemap_javascript-0.4.10.tar.gz
Algorithm Hash digest
SHA256 3527a91580b318913f2955894d2e9ad0760f65ad4c52c4f55a28accccbe9c5f4
MD5 02f0a5da20e56308da51559858e41137
BLAKE2b-256 cc8d991e2ca13b0bdaaa28ad0b62dbb216813f6ef6505cc32dbfca8b1101ec59

See more details on using hashes here.

Provenance

The following attestation bundles were made for codemap_javascript-0.4.10.tar.gz:

Publisher: publish.yml on qxbyte/codemap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file codemap_javascript-0.4.10-py3-none-any.whl.

File metadata

File hashes

Hashes for codemap_javascript-0.4.10-py3-none-any.whl
Algorithm Hash digest
SHA256 552137d3d82da1b24eb120dc4d37dcedd017a887c72ca3345921dd6b086e06dd
MD5 26c47662ee83ee11bf3b25e917d60d76
BLAKE2b-256 a3c58fcc3f0d074103121e3a94173aba256c3d039793327dfe7874f77000e6e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for codemap_javascript-0.4.10-py3-none-any.whl:

Publisher: publish.yml on qxbyte/codemap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.10 This release

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page