From 3faa7df20ab8afb0fb1868f040aeb8ccb103c8cb Mon Sep 17 00:00:00 2001 From: "moxey.eth" Date: Mon, 12 Feb 2024 12:57:08 +1100 Subject: [PATCH] chore: update hono-og --- src/package.json | 2 +- src/utils/deserializeJson.ts | 4 ++-- src/utils/serializeJson.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/package.json b/src/package.json index 759b98e2..2623b8e6 100644 --- a/src/package.json +++ b/src/package.json @@ -16,7 +16,7 @@ "@farcaster/core": "^0.13.7", "@noble/curves": "^1.3.0", "happy-dom": "^13.3.8", - "hono-og": "~0.0.2", + "hono-og": "~0.0.3", "immer": "^10.0.3", "lz-string": "^1.5.0", "shiki": "^1.0.0" diff --git a/src/utils/deserializeJson.ts b/src/utils/deserializeJson.ts index aee1caff..ca00eec5 100644 --- a/src/utils/deserializeJson.ts +++ b/src/utils/deserializeJson.ts @@ -1,6 +1,6 @@ -import { decompressFromEncodedURIComponent } from 'lz-string' +import { default as lz } from 'lz-string' export function deserializeJson(data = ''): returnType { if (data === 'undefined') return {} as returnType - return JSON.parse(decompressFromEncodedURIComponent(data)) + return JSON.parse(lz.decompressFromEncodedURIComponent(data)) } diff --git a/src/utils/serializeJson.ts b/src/utils/serializeJson.ts index 0c0918a3..dc7bcdce 100644 --- a/src/utils/serializeJson.ts +++ b/src/utils/serializeJson.ts @@ -1,5 +1,5 @@ -import { compressToEncodedURIComponent } from 'lz-string' +import { default as lz } from 'lz-string' export function serializeJson(data: unknown = {}) { - return compressToEncodedURIComponent(JSON.stringify(data)) + return lz.compressToEncodedURIComponent(JSON.stringify(data)) }