cloudhead / node-static

rfc 2616 compliant HTTP static-file server module, with built-in caching.
MIT License
2.18k stars 245 forks source link

ESM #229

Closed brettz9 closed 2 years ago

brettz9 commented 2 years ago

These changes relate to adding ESM support. Testing ESM required mocha and c8, and using Mocha allowed beginning to test the binary for coverage. In the process also switched from deprecated request used in testing.

Note that the binary file is now safely only added in ESM now since the engines we have already applied is Node 12+. However, for APIs, I added a Rollup routine to continue supporting CJS.

Would be good to get some others to test it out.