diff --git a/packages/gqty/package.json b/packages/gqty/package.json index 0a35e9f8d..e81ecf98a 100644 --- a/packages/gqty/package.json +++ b/packages/gqty/package.json @@ -78,7 +78,7 @@ "just-safe-get": "^4.2.0", "just-safe-set": "^4.2.1", "multidict": "^1.0.9", - "ohash": "^1.1.4", + "ohash": "^2.0.4", "p-defer": "^3.0.0" }, "devDependencies": { diff --git a/packages/gqty/src/Utils/hash.ts b/packages/gqty/src/Utils/hash.ts index 7818901a9..8904b0bd7 100644 --- a/packages/gqty/src/Utils/hash.ts +++ b/packages/gqty/src/Utils/hash.ts @@ -1,9 +1,9 @@ import memoize from 'just-memoize'; -import { objectHash, sha256 } from 'ohash'; +import { hash as ohash } from 'ohash'; /** * Memoized hash function, with a prefix to avoid starting with a number. */ export const hash = memoize((...args: unknown[]) => - sha256(objectHash(args, { unorderedObjects: false })).replace(/^(\d)/, 'a$1') + ohash(args).replace(/^(\d)/, 'a$1') ); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1d2a07c17..606874e0c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -559,8 +559,8 @@ importers: specifier: ^1.0.9 version: 1.0.9 ohash: - specifier: ^1.1.4 - version: 1.1.4 + specifier: ^2.0.4 + version: 2.0.4 p-defer: specifier: ^3.0.0 version: 3.0.0 @@ -11640,8 +11640,8 @@ packages: resolution: {integrity: sha512-42CPE9AhahZRsMNslczq0ctAEtqk8Eka26QofnqC346BZdHDySk3LWka23LI7ULIw11NmltpiLagIq8gBozxTw==} dev: false - /ohash@1.1.4: - resolution: {integrity: sha512-FlDryZAahJmEF3VR3w1KogSEdWX3WhA5GPakFx4J81kEAiHyLMpdLLElS8n8dfNadMgAne/MywcvmogzscVt4g==} + /ohash@2.0.4: + resolution: {integrity: sha512-ac+SFwzhdHb0hp48/dbR7Jta39qfbuj7t3hApd9uyHS8bisHTfVzSEvjOVgV0L3zG7VR2/7JjkSGimP75D+hOQ==} dev: false /on-exit-leak-free@2.1.2: