v0.10.1 CO2.js goes hybrid
This release is intended to be API compatible with previous releases, but is a hybrid npm module, which now explicitly targets three kinds of platforms with three separate builds
- A browser build using an IIFE
- A CommonJS compatible build for pre-ESM versions of nodejs
- An ES Modules compatible build for modern, ESM compatible javascript runtimes
Full list of changes
- Appease the linter 0af64aa
- Add extra documentation for sanity checking numbers 91360b6
- Clear out v8 vs v9 calcs f8940f5
- add link to docs a15b3c2
- update readme with new installation and build instructions caefcfc
- enable in browser preview to work when loaded in gitpod a854402
- Use base 10 (1000) vs base 2 (1024) for network calcs 929949a
- describe version used in demo 80c0148
- add gitpod config file to build library and open preview in browser 4bcda6d
- update demo b48a88b
- output iife version to /dist e954d6b
- Tidy up for linter, update gitignore for demo 5a40286
- Add demo html 0cd8a4a
- Add esbuild configs for different runtimes f8da869
- Switch to ES import syntax from commonjs b751fd5
- Add notes for changelog 50c0956
- Switch to ES import syntax from commonjs 23880ba
- Run tests on updates to v0.10.0 branch d404535
- Update github action and linting command b547257
- Refactor: Swap url.parse() for WHATWG URL 95075f5
- Summarise SWD constant change in the changelog 7821a4e
- Fix other tests dependent on the updated constants cdd43ca
- Switch the constants to match the SWD page 104fb08
- Obey the damn linter b043297
- Whack up the logging for sanity checking cf38d3b
- Get tests passing with Dryden's new query 3cadafd
- Move assertion beneath co2 calcs ca74b84
- refactor(swd): adding comment a0ec959
- refactor(swd): updating swd test with co2grams comparison 4d42206
- feat(swd): adding old calculations for comparison 2c114b9
- chore: remove empty inline comments 71a2cf8
- test: enable jest rules; fix linting errors 450daca
- test(sustainable-web-design): remove already declared variable 95dd2b5
- refactor: replace unnamed functions with arrow callbacks 566f34c
- build(deps): bump deps; remove unused minimist dep b893b98
- ci: reduce workflow permissions to minimum f7e0c38
- chore(.npmignore): reduce package size a1f426b
- ci: bump github actions 4a8737a