You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.mts and .mjs files are not indexed at all. These are the standard TypeScript / JavaScript ES module file extensions (.mts = TS ESM, .mjs = JS ESM, TS handbook). tree-sitter-typescript/javascript parse them identically to .ts/.js, so this looks like a file-discovery glob omission rather than a parser limitation.
For Node.js codebases that use the explicit ESM extensions (very common in modern Node 20/22 backends, CLIs, and tooling), this means the entire backend is invisible to the graph while the .ts/.tsx frontend indexes perfectly.
Reproduction
On a monorepo whose backend/CLI/packages are authored in .mts:
codegraph init -i .
codegraph status # languages show only tsx / typescript — no .mts
codegraph files | grep -c '\.mts'# -> 0
codegraph query "<a symbol that lives in a .mts file>"# -> No results found
Evidence (real repo)
A repo with 133 git-tracked .mts files:
codegraph status → Files: 196, languages: tsx 103, typescript 64 — zero .mts
codegraph files | grep -c '\.mts' → 0
codegraph query for symbols known to live in .mts files → No results found
codegraph query "Client" (a .tsx symbol) → works perfectly, returns Clients.tsx:26, ClientDTO, ClientCard with file:line
So discovery + parsing + search all work for .ts/.tsx; .mts/.mjs are simply never picked up.
Expected
.mts and .mjs are discovered and parsed the same as .ts / .js (and .cts/.cjs for completeness — the CommonJS explicit extensions).
Notes
There is no index flag (--include / extension list) and no documented config (see Document config or create a json schema for it #283) to add extensions as a workaround, so end users can't opt in manually.
Likely a one-line addition to the file-discovery extension set + language mapping.
Summary
.mtsand.mjsfiles are not indexed at all. These are the standard TypeScript / JavaScript ES module file extensions (.mts= TS ESM,.mjs= JS ESM, TS handbook). tree-sitter-typescript/javascript parse them identically to.ts/.js, so this looks like a file-discovery glob omission rather than a parser limitation.For Node.js codebases that use the explicit ESM extensions (very common in modern Node 20/22 backends, CLIs, and tooling), this means the entire backend is invisible to the graph while the
.ts/.tsxfrontend indexes perfectly.Reproduction
On a monorepo whose backend/CLI/packages are authored in
.mts:Evidence (real repo)
A repo with 133 git-tracked
.mtsfiles:codegraph status→Files: 196, languages:tsx 103,typescript 64— zero.mtscodegraph files | grep -c '\.mts'→ 0codegraph queryfor symbols known to live in.mtsfiles →No results foundcodegraph query "Client"(a.tsxsymbol) → works perfectly, returnsClients.tsx:26,ClientDTO,ClientCardwith file:lineSo discovery + parsing + search all work for
.ts/.tsx;.mts/.mjsare simply never picked up.Expected
.mtsand.mjsare discovered and parsed the same as.ts/.js(and.cts/.cjsfor completeness — the CommonJS explicit extensions).Notes
indexflag (--include/ extension list) and no documented config (see Document config or create a json schema for it #283) to add extensions as a workaround, so end users can't opt in manually.Environment
v0.9.3(standalone installer, bundled runtime)