typicode / lowdb

Simple and fast JSON database
MIT License
21.35k stars 918 forks source link

Add CommonJS support #522

Closed saun4app closed 2 years ago

typicode commented 2 years ago

Hi,

Thank you for the PR. For the moment, I'd rather not maintain two versions (ESM and CJS) and let other tools catch up with ESM (see https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c for the reasoning).

Feel free though to use your fork or lowdb v1 which is CJS.

Thanks again for the PR :)

0xBC84 commented 2 years ago

@typicode ESM is causing big problems for me that makes this project unusable, converting to ESM causes other projects to just break completely. As much as I've really enjoyed lowdb, I've had to look for alternatives as I simply can't get it to work and I'd rather not depend on a version that is 2 full versions behind (most likely not receiving updates).

I can see in the issue queue that many other people are running into the same same issue. The PR here seems quite small and doesn't seem to impose a lot of risk. Is it worth giving this PR another look?