Skip to content

armgit / papra

Public Imported from GitHub
0

The minimalistic document archiving platform.

chore(shared): replace lodash memoize with chisels memoizeOnce (#1004)

Corentin Thomassete11fb5352a92
diff --git a/apps/papra-server/src/modules/shared/path.ts b/apps/papra-server/src/modules/shared/path.ts
index 3cb6a017..625a4ae9 100644
--- a/apps/papra-server/src/modules/shared/path.ts
+++ b/apps/papra-server/src/modules/shared/path.ts
@@ -1,7 +1,7 @@
import process from 'node:process';
-import { memoize } from 'lodash-es';
+import { memoizeOnce } from '@corentinth/chisels';
-export const getRootDirPath = memoize(() => process.cwd());
+export const getRootDirPath = memoizeOnce(() => process.cwd());
// Working with libsql, file url can be relative, which is not correct according to RFC 8089, which standardizes the `file` scheme
// see https://github.com/tursodatabase/libsql-client-ts/blob/ee036574f5c23335c8b2d6d0c0e117cbe14bf376/packages/libsql-core/src/uri.ts