hyperjumptech / monika

Monika is a command line application to monitor every part of your web app using a simple YAML configuration file. Get alert not only when your site is down but also when it's slow.
https://monika.hyperjump.tech
MIT License
605 stars 67 forks source link

Convert CommonJS to ECMAScript Modules (ESM) #1230

Open haricnugraha opened 10 months ago

haricnugraha commented 10 months ago

As the Node.js community moves toward ESM, I am looking to switch the project from CommonJS to ECMAScript Modules (ESM). This change is essential to take advantage of ESM's improved support for static analysis, tree shaking, and more reliable code structuring.

Read more:

haricnugraha commented 8 months ago

I've tried to convert the code to ESM. I've successfully converted it, able to run it. But I can't run the test. You can see the code here. I suspect there is a problem with Mocha. I got the following error.

Screenshot 2024-03-25 at 2 07 32 PM