codemap icon indicating copy to clipboard operation
codemap copied to clipboard

js: .cjs files have no language mapping, their imports are never extracted

Open JordanCoin opened this issue 1 month ago • 0 comments

.cjs files have no language mapping, so their own imports are never extracted (lib.cjs has no language mapping: its own imports are not extracted). No .cjs source in any benchmarked repo has a codemap edge (axios, affaan-m/ECC).

Repro (codemap 4.7.0):

lib.cjs:   module.exports = 1
main.cjs:  const l = require('./lib.cjs')
codemap --importers lib.cjs   # none

Expected: .cjs (and .mjs, .cts, .mts if not already) parsed as JavaScript/TypeScript.

Found by the import-accuracy benchmark (#264). Part of #239.

JordanCoin avatar Nov 03 '26 18:11 JordanCoin