Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

so… for npm, the javascript package manager, using json was a bad design decision?


Yes. Dependency information and script commands are there. Both ought to be able to have comments. Node.js has the ability to load JavaScript, and since it's an installed environment, YAML isn't too much overhead. Both support comments. It can be serialized to JSON if needed.

It can be used more appropriately as a serialization and storage format with npm. It would be a matter of having a script for pushing a package that generates a package.json file from javascript or YAML, and adding it to .gitignore (but not .npmignore) so people see the file with comments enabled.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: