Skip to content

2.0.0

Choose a tag to compare

@paulmillr paulmillr released this 25 Aug 15:09
· 44 commits to main since this release
2.0.0
1fb6315

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
  • .js extension must be used for all modules
    • Old: @noble/ciphers/aes
    • New: @noble/ciphers/aes.js
    • This simplifies working in browsers natively without transpilers

Changes

  • webcrypto: move randomBytes and managedNonce to utils.js
  • ghash, poly1305, polyval: only allow Uint8Array as hash inputs, prohibit string
  • utils: new abytes; remove ahash, toBytes
  • Remove modules _assert (use utils), _micro and crypto (use webcrypto)
  • 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