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
{{ message }}
Repository navigation
[Bug]: .cjs files are not indexed (EXTENSION_TO_LANGUAGE has .mjs but no .cjs) #1117
Expected: three files indexed. That means util.cjs::helper, main.cjs::run, the require import, and the run → helper call.
Actual: Full build: 1 files, 2 nodes, 1 edges. Only same.js is indexed.
parser.EXTENSION_TO_LANGUAGE maps .js, .jsx and .mjs to javascript but has no .cjs entry. So detect_language returns None and every build skips the file. The resolver already knows .cjs specifiers (#866 maps them to .cts sources), but a .cjs file itself is never parsed.
Additional context
CommonJS .cjs files are common in packages whose default is ESM, for example Node scripts and git or editor hooks. In such a repository those files get no graph. A one-line fix with tests is ready; I'll open a PR against staging that links this issue.
Activity