From ac90038ec7002c9045434ad4f9d82ed4ddf8e244 Mon Sep 17 00:00:00 2001 From: Haydn Paterson Date: Thu, 17 Oct 2024 14:19:42 +0900 Subject: [PATCH] Revision 0.33.17 (#1042) * Use Constant Initializer on Hash Size * Version * ChangeLog --- changelog/0.33.0.md | 4 ++++ package-lock.json | 4 ++-- package.json | 2 +- src/value/hash/hash.ts | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/changelog/0.33.0.md b/changelog/0.33.0.md index dbdff7da1..e07a964ef 100644 --- a/changelog/0.33.0.md +++ b/changelog/0.33.0.md @@ -1,4 +1,8 @@ ### 0.33.0 +- [Revision 0.33.17](https://github.com/sinclairzx81/typebox/pull/1042) + - [1041](https://github.com/sinclairzx81/typebox/issues/1041) Avoid Exponentiation operator on Value.Hash +- [Revision 0.33.16](https://github.com/sinclairzx81/typebox/pull/1015) + - [1015](https://github.com/sinclairzx81/typebox/issues/1015) Add sub error iterators to ValueError - [Revision 0.33.15](https://github.com/sinclairzx81/typebox/pull/1025) - [1024](https://github.com/sinclairzx81/typebox/issues/1024) Fix to correctly resolve default Dates - [Revision 0.33.14](https://github.com/sinclairzx81/typebox/pull/1019) diff --git a/package-lock.json b/package-lock.json index d61c9a896..f05528cca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@sinclair/typebox", - "version": "0.33.16", + "version": "0.33.17", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@sinclair/typebox", - "version": "0.33.16", + "version": "0.33.17", "license": "MIT", "devDependencies": { "@arethetypeswrong/cli": "^0.13.2", diff --git a/package.json b/package.json index 0d2987917..505014947 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sinclair/typebox", - "version": "0.33.16", + "version": "0.33.17", "description": "Json Schema Type Builder with Static Type Resolution for TypeScript", "keywords": [ "typescript", diff --git a/src/value/hash/hash.ts b/src/value/hash/hash.ts index 2a173423c..eb86c7c72 100644 --- a/src/value/hash/hash.ts +++ b/src/value/hash/hash.ts @@ -57,7 +57,7 @@ enum ByteMarker { // State // ------------------------------------------------------------------ let Accumulator = BigInt('14695981039346656037') -const [Prime, Size] = [BigInt('1099511628211'), BigInt('2') ** BigInt('64')] +const [Prime, Size] = [BigInt('1099511628211'), BigInt('18446744073709551616' /* 2 ^ 64 */)] const Bytes = Array.from({ length: 256 }).map((_, i) => BigInt(i)) const F64 = new Float64Array(1) const F64In = new DataView(F64.buffer)