Breaking change: Add type: 'module' and exports to package.json;
change internal CJS path
Refactoring: Switch to ESM
Update: Switch from deprecated request to node-fetch
Testing: Switch to mocha/chai/c8
Testing: Begin binary file coverage
Docs: Add ESM file-server example
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.
type: 'module'
andexports
topackage.json
; change internal CJS pathrequest
tonode-fetch
mocha
/chai
/c8
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.