@noble/hashes
2.4.0 · 27 Aug 2026MIT155.8M / weekRepositoryHomepagenpmAtom feed
2.4.0 is the newest release of 2.x.
In short
8 changed
Release note
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): 152KB => 136KB
Reduces unpacked npm size (on-disk space): 1.1MB => 669KB
Make bundle sizes smaller, compared to v1.x
.jsextension must be used for all modulesOld:
@noble/hashes/sha3New:
@noble/hashes/sha3.jsThis simplifies working in browsers natively without transpilers
Changes
Only allow Uint8Array as hash inputs, prohibit
stringStrict validation checks improve security
To replicate previous behavior, use
utils.utf8ToBytes
Rename / remove some modules for consistency. Previously, sha384 resided in sha512, which was weird
sha256,sha512=>sha2.js(consistent withsha3.js)blake2b,blake2s=>blake2.js(consistent withblake3.js,blake1.js)ripemd160,sha1,md5=>legacy.js(all low-security hashes are there)_assert=>utils.jscryptointernal module got removed: use built-in WebCrypto instead
Improve typescript types & option autocomplete
Upgrade typescript compilation env to ts5.9 and es2022
Massively improve error messages, make them more descriptive
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.