Skip to content

Releases: unjs/ohash

v2.0.3

20 Feb 17:24
@pi0 pi0
Compare
Choose a tag to compare

compare changes

🔥 Performance

  • Use node crypto hash when available (#116) (thanks for suggestion from @aquapi ❤️)

🩹 Fixes

  • Workaround for stackblitz (#117)
  • Remove trailing slash from arrays (c2b8250)

v2.0.2

20 Feb 00:28
@pi0 pi0
Compare
Choose a tag to compare

compare changes

📦 Build

  • Mark Serializer as pure to allow tree-shaking (83fe375)

v2.0.1

19 Feb 23:43
@pi0 pi0
Compare
Choose a tag to compare

compare changes

Note

Check out latest docs for usage and examples.

🌟 What is new?

  • 🚀 Speedup with native node:crypto when available using import conditions (#100)
  • 🪴 Serializer rewritten with better stability, performance, and readability (#113)
  • 🧹 Internal cleanups
  • 📦 Package is now ESM-only
    • Install size reduced from 63.3kB to 18.7kB
    • Bundle size for hash reduced from 8.6kB (3.6kB gzip) to 5.5kB (2.6kB gzip) [web] and 2.3kB(1kB gzip) [node]

⚠️ Breaking Changes

  • Package:
    • ⚠️ Package is ESM-only (#105)
    • ⚠️ isEqual and diff utils moved to ohash/utils (#112)
    • ⚠️ murmurHash utility removed (#104)
  • Serializer:
    • ⚠️ objectHash() is renamed serialize() (#107)
    • ⚠️ Serializer is rewritten (#113)
  • Digest:
    • ⚠️ sha256() (hex) is removed, sha256base64() is renamed to digest() (#106)
    • ⚠️ digest() uses standard base64-url encoding (#111)
  • Hash:
    • ⚠️ hash: Avoid truncate (0642ec5)
    • ⚠️ String input to hash will be always serialized (#110)

v2.0.0

19 Feb 23:26
@pi0 pi0
Compare
Choose a tag to compare

Please see v2.0.1

v1.1.4

15 Sep 19:18
@pi0 pi0
Compare
Choose a tag to compare

compare changes

🩹 Fixes

  • murmurHash: Fix murmurHash3 implementation, add tests (#83)

📖 Documentation

  • Improve jsdocs (#74)

❤️ Contributors

v1.1.3

10 Aug 11:10
@pi0 pi0
Compare
Choose a tag to compare

compare changes

🔥 Performance

  • object-hash: Avoid using array to just concatenate the string (#36)
  • object-hash: Avoid toString when we know that the value is already a string (#33)
  • object-hash: Faster isNativeFunction check (#30)
  • object-hash: Faster extract object type from toString (#31)
  • object-hash: Faster object access by avoid string concat (#32)
  • object-hash: Faster circular checking by using map (#34)
  • object-hash: Reuse default options when is not passed (#37)
  • object-hash: Avoid splice method to insert values (#35)

💅 Refactors

  • Simplify diff formatting (8e6cabc)

📖 Documentation

  • Improve jsdoc for objectHash() (#43)

🏡 Chore

  • Add benchmark scripts (#40)
  • Add autofix ci (af19f81)
  • Enable strict type checking (2ed5b67)

❤️ Contributors

Special thanks to @H4ad for working on performance improvements!

  • Pooya Parsa (@pi0)
  • Owen Kieffer-Jones
  • Vinicius Lourenço

v1.1.2

21 Apr 13:46
@pi0 pi0
Compare
Choose a tag to compare

compare changes

🩹 Fixes

  • objectHash: Serialize boolean as bool (186e719)

✅ Tests

❤️ Contributors

  • Pooya Parsa (@pi0)

v1.1.1

19 Apr 16:23
@pi0 pi0
Compare
Choose a tag to compare

compare changes

💅 Refactors

  • Expose diff function types (bc08321)

❤️ Contributors

  • Pooya Parsa (@pi0)

v1.1.0

19 Apr 14:04
@pi0 pi0
Compare
Choose a tag to compare

compare changes

🚀 Enhancements

  • Expose sha256base64 utility (#19)
  • objectHash: Serialize objects with entries (1c8e8b9)
  • objectHash: Support serializing classes with custom toJSON() (331eceb)
  • diff utility (#28)

🩹 Fixes

  • Fix type of SHA256.prototype.toString method (#23)
  • objectHash: Serialize boolean types (7fd580f)

🏡 Chore

  • Add @vitest/coverage-c8 (#24)
  • Update all dependencies (b17fa41)
  • Lint and format with prettier (373eac4)
  • Upgrade node version for ci (9532f47)
  • Update release script (3124feb)

❤️ Contributors

  • Pooya Parsa (@pi0)
  • Nozomu Ikuta
  • Damian Głowala

v0.1.5

19 Apr 15:29
@pi0 pi0
Compare
Choose a tag to compare

Features