From 186e719a63a2895ea0d911bd694ee7db3034a3d6 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Fri, 21 Apr 2023 15:45:58 +0200 Subject: [PATCH 1/3] fix(objectHash): serialize `boolean` as `bool` resolves #29 --- src/object-hash.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/object-hash.ts b/src/object-hash.ts index e78c914..5c8c223 100644 --- a/src/object-hash.ts +++ b/src/object-hash.ts @@ -208,7 +208,7 @@ function createHasher(options: HashOptions) { return write("error:" + err.toString()); }, _boolean(bool) { - return write("boolean:" + bool.toString()); + return write("bool:" + bool.toString()); }, _string(string) { write("string:" + string.length + ":"); From 52830c886d220215cee3ca537c54de121e83da48 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Fri, 21 Apr 2023 15:46:27 +0200 Subject: [PATCH 2/3] test: update snapshots --- test/index.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/index.test.ts b/test/index.test.ts index c784c70..20d3fdf 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -7,7 +7,7 @@ describe("objectHash", () => { expect( objectHash({ foo: "bar", bar: new Date(0), bool: false }) ).toMatchInlineSnapshot( - '"object:3:string:3:bar:string:24:1970-01-01T00:00:00.000Z,string:4:bool:boolean:false,string:3:foo:string:3:bar,"' + '"object:3:string:3:bar:string:24:1970-01-01T00:00:00.000Z,string:4:bool:bool:false,string:3:foo:string:3:bar,"' ); }); From 23431de44a6db55bddcf8897775f0cd62b7e4817 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Fri, 21 Apr 2023 15:46:38 +0200 Subject: [PATCH 3/3] chore(release): v1.1.2 --- CHANGELOG.md | 17 +++++++++++++++++ package.json | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04fa74a..a320084 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,23 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## v1.1.2 + +[compare changes](https://github.com/unjs/ohash/compare/v1.1.1...v1.1.2) + + +### 🩹 Fixes + + - **objectHash:** Serialize `boolean` as `bool` ([186e719](https://github.com/unjs/ohash/commit/186e719)) + +### ✅ Tests + + - Update snapshots ([52830c8](https://github.com/unjs/ohash/commit/52830c8)) + +### ❤️ Contributors + +- Pooya Parsa ([@pi0](http://github.com/pi0)) + ## v1.1.1 [compare changes](https://github.com/unjs/ohash/compare/v1.1.0...v1.1.1) diff --git a/package.json b/package.json index 1aaad3b..0fd1972 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ohash", - "version": "1.1.1", + "version": "1.1.2", "description": "Super fast hashing library based on murmurhash3 written in Vanilla JS", "repository": "unjs/ohash", "license": "MIT",