2.0.0
High-level
- The package is now ESM-only. ESM can finally be loaded from common.js on node v20.19+
- Node v20.19 is now the minimum required version
- Package imports now work correctly in bundler-less environments, such as browsers
- Reduces npm package size (traffic consumed): 118KB => 99KB
- Reduces unpacked npm size (on-disk space): 753KB => 458KB
- Make bundle sizes smaller, compared to v1.x
.jsextension must be used for all modules- Old:
@noble/ciphers/aes - New:
@noble/ciphers/aes.js - This simplifies working in browsers natively without transpilers
- Old:
Changes
- webcrypto: move
randomBytesandmanagedNoncetoutils.js - ghash, poly1305, polyval: only allow Uint8Array as hash inputs, prohibit
string - utils: new abytes; remove ahash, toBytes
- Remove modules
_assert(useutils),_microandcrypto(usewebcrypto) - Upgrade typescript compilation env to ts5.9 and es2022
- Massively improve error messages, make them more descriptive
Full Changelog: 1.3.0...2.0.0