From 2c586351fcfddb6f9d2423e18241b14fb880c26b Mon Sep 17 00:00:00 2001 From: byGalax Date: Fri, 15 May 2026 22:43:24 +0200 Subject: [PATCH] fix(shared): expose ./crypto/testBackend in package exports Removes the @shared Vite-alias workaround in userIdentity.test.ts so tsc can resolve the import without an extra paths entry. --- apps/desktop/src/lib/userIdentity.test.ts | 6 +----- packages/shared/package.json | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/desktop/src/lib/userIdentity.test.ts b/apps/desktop/src/lib/userIdentity.test.ts index d5e00c7..ad48706 100644 --- a/apps/desktop/src/lib/userIdentity.test.ts +++ b/apps/desktop/src/lib/userIdentity.test.ts @@ -1,11 +1,7 @@ import { describe, expect, it, beforeEach, vi, beforeAll } from 'vitest'; import { setCryptoBackend } from '@chat-app/shared/crypto'; -// `@chat-app/shared` does not expose `./crypto/testBackend` in its package -// exports map (only `./crypto`). Reach the test backend through the local -// `@shared` Vite alias (configured in apps/desktop/vite.config.ts) so the -// import resolves at test time without modifying the shared package. -import { makeWasmTestBackend } from '@shared/crypto/testBackend'; +import { makeWasmTestBackend } from '@chat-app/shared/crypto/testBackend'; beforeAll(async () => { setCryptoBackend(await makeWasmTestBackend()); }); diff --git a/packages/shared/package.json b/packages/shared/package.json index 759bcc3..0d50bc8 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -10,6 +10,7 @@ ".": "./src/index.ts", "./supabase": "./src/supabase/index.ts", "./crypto": "./src/crypto/index.ts", + "./crypto/testBackend": "./src/crypto/testBackend.ts", "./auth": "./src/auth/index.ts", "./chat": "./src/chat/index.ts", "./admin": "./src/admin/index.ts",