-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ESM syntax, and update deps to support it #26
Conversation
In order to update the developer docs with some guidance for Deno, I had to look into updating CO2.js, and then into updating this url2green library, because the build was failing when installing Deno. I'll also open an issue on CO2.js to reflect the change I think might be needed in |
@fershad this was the dependency that kept failing when I tried to npm install i the dev dependencies of co2.js. Would you mind casting an eye over this, and if there are no changes required, merge it in? I'd like to publish a new release to npm if possible, to see if it resolves the issue with co2.js |
This switches from the commonjs require() syntax to the newer ESM import syntax. Jest did not work with the ESM syntax, so I updated the Jest config to use esbuild to transpile the ESM syntax to commonjs, so Jest can still run the tests. We do this in the main CO2.js package, to it seemed an ok precedent to follow.
This updates this to run CI tests for PRs made against master as well as main. it also updates the github actions to use new versions
Wew update ES lint to check against ECMAScript 2020, and use the new config format
d83134d
to
b3d175e
Compare
hey @fershad this would still be nice to have reviewed but I think the recent patch release of 0.4.1 means that this can be decoupled from getting the new release of CO2.js out the door. |
This switches from the commonjs require() syntax to the newer ESM import syntax.
Jest did not work with the ESM syntax, so I updated the Jest config to use esbuild to transpile the ESM syntax to commonjs, so Jest can still run the tests.
We do this in the main CO2.js package, to it seemed an ok precedent to follow.
This also updates better-sqlite, to use a new version which seems to offer pre-builds, as of #1002 on the better sqlite repo - WiseLibs/better-sqlite3#1002
I think this would remove the need to compile it on a range of machines, including apple silicon macs.