From 80654146a2fe221cfedadac815b7242ac3145dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Wed, 22 Oct 2025 17:53:36 +0200 Subject: [PATCH] pl-hooks: update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk --- packages/pl-api/package.json | 2 +- packages/pl-hooks/lib/importer.ts | 2 +- packages/pl-hooks/lib/normalizers/notification.ts | 2 +- packages/pl-hooks/lib/normalizers/status.ts | 1 - packages/pl-hooks/package.json | 4 ++-- packages/pl-hooks/vite.config.ts | 1 + pnpm-lock.yaml | 3 ++- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/pl-api/package.json b/packages/pl-api/package.json index a4f14c9b1..0e961d289 100644 --- a/packages/pl-api/package.json +++ b/packages/pl-api/package.json @@ -1,6 +1,6 @@ { "name": "pl-api", - "version": "1.0.0-rc.91", + "version": "1.0.0-rc.92", "type": "module", "homepage": "https://codeberg.org/mkljczk/pl-fe/src/branch/develop/packages/pl-api", "repository": { diff --git a/packages/pl-hooks/lib/importer.ts b/packages/pl-hooks/lib/importer.ts index fea450318..19a735d7e 100644 --- a/packages/pl-hooks/lib/importer.ts +++ b/packages/pl-hooks/lib/importer.ts @@ -85,7 +85,7 @@ const importEntities = (entities: { processAccount(status.account); } - if (status.quote) processStatus(status.quote); + if (status.quote && 'quoted_status' in status.quote && status.quote.quoted_status) processStatus(status.quote.quoted_status); if (status.reblog) processStatus(status.reblog); if (status.poll) polls[status.poll.id] = status.poll; if (status.group) groups[status.group.id] = status.group; diff --git a/packages/pl-hooks/lib/normalizers/notification.ts b/packages/pl-hooks/lib/normalizers/notification.ts index d89cc2b90..b9dfddb2b 100644 --- a/packages/pl-hooks/lib/normalizers/notification.ts +++ b/packages/pl-hooks/lib/normalizers/notification.ts @@ -70,7 +70,7 @@ const normalizeNotification = (notification: BaseNotification | DeduplicatedNoti status_id: string; } | { - type: 'status' | 'reblog' | 'favourite' | 'poll' | 'update' | 'event_reminder'; + type: 'status' | 'reblog' | 'favourite' | 'poll' | 'update' | 'event_reminder' | 'quote' | 'quoted_update'; status_id: string; } | { diff --git a/packages/pl-hooks/lib/normalizers/status.ts b/packages/pl-hooks/lib/normalizers/status.ts index 8727dde33..767a9f9de 100644 --- a/packages/pl-hooks/lib/normalizers/status.ts +++ b/packages/pl-hooks/lib/normalizers/status.ts @@ -58,7 +58,6 @@ const normalizeStatus = ({ account, accounts, reblog, poll, group, quote, ...sta expectsCard: false, showFiltered: null as null | boolean, ...status, - quote_id: quote?.id || status.quote_id || null, mentions, filtered: status.filtered?.map(result => result.filter.title), event, diff --git a/packages/pl-hooks/package.json b/packages/pl-hooks/package.json index a5f682f48..d9e308b91 100644 --- a/packages/pl-hooks/package.json +++ b/packages/pl-hooks/package.json @@ -1,6 +1,6 @@ { "name": "pl-hooks", - "version": "0.0.13", + "version": "0.0.14", "type": "module", "homepage": "https://codeberg.org/mkljczk/pl-fe/src/branch/develop/packages/pl-hooks", "repository": { @@ -33,7 +33,7 @@ "vite-plugin-dts": "^4.2.1" }, "dependencies": { - "@tanstack/react-query": "^5.59.16", + "@tanstack/react-query": "^5.84.1", "lodash": "^4.17.21", "pl-api": "workspace:*", "react": "^18.3.1", diff --git a/packages/pl-hooks/vite.config.ts b/packages/pl-hooks/vite.config.ts index 92b263f3a..1b9f65735 100644 --- a/packages/pl-hooks/vite.config.ts +++ b/packages/pl-hooks/vite.config.ts @@ -26,5 +26,6 @@ export default defineConfig({ alias: [ { find: 'pl-hooks', replacement: fileURLToPath(new URL('./lib', import.meta.url)) }, ], + dedupe: ['valibot'], }, }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b21718904..d0e04923f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -588,7 +588,7 @@ importers: packages/pl-hooks: dependencies: '@tanstack/react-query': - specifier: ^5.59.16 + specifier: ^5.84.1 version: 5.84.1(react@18.3.1) lodash: specifier: ^4.17.21 @@ -4256,6 +4256,7 @@ packages: intersection-observer@0.12.2: resolution: {integrity: sha512-7m1vEcPCxXYI8HqnL8CKI6siDyD+eIWSwgB3DZA+ZTogxk9I4CDnj4wilt9x/+/QbHI4YG5YZNmC6458/e9Ktg==} + deprecated: The Intersection Observer polyfill is no longer needed and can safely be removed. Intersection Observer has been Baseline since 2019. intl-messageformat@10.7.16: resolution: {integrity: sha512-UmdmHUmp5CIKKjSoE10la5yfU+AYJAaiYLsodbjL4lji83JNvgOQUjGaGhGrpFCb0Uh7sl7qfP1IyILa8Z40ug==}