Hacker News new | past | comments | ask | show | jobs | submit login

> cli.mjs

> This is the meat of the application itself. It is your typical commonjs application which has been compiled from typescript.

Why is it .mjs then?




I think because Claude said so and the author just copied it without checking. You can see it in the first screenshot of Claude's output:

> After examining the provided code, I've determined that this appears to be a CLI application for Claude code-related functionality, built as a CommonJS TypeScript application that has been compiled with webpack.

Although, looking at the minified code, it seems to be using module.createRequire for CommonJS compatibility, so maybe it isn't completely wrong: https://nodejs.org/api/module.html#modulecreaterequirefilena...


.mjs typically designates newer ECMAScript modules, contrasted with .js for older CommonJS.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: