npm / cjs-module-lexer
cjs-module-lexer
What changed in cjs-module-lexer 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-24.
1 security3 performance1 tooling1 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initcjs-module-lexer 26 changes
Security 1
Parser stack bounds are guarded.
Performance 3
Class checks are skipped for unrelated identifiers to improve performance.
Identifier and number runs are skipped to improve performance.
UTF-16 source copies are faster.
Tooling 1
lexer.d.mts is now published, making the type declarations available to package consumers.
Fixes and other changes 1
Wasm is initialized automatically before parsing, so callers no longer need to initialize it first.