Skip to content

Build your personal knowledge base with Trilium Notes

chore(server): fix some more dependencies to JSON

Elian Doran6b07908cf7b6
diff --git a/apps/client/package.json b/apps/client/package.json
index 9af6a84973..06dd7fb53b 100644
--- a/apps/client/package.json
+++ b/apps/client/package.json
@@ -37,7 +37,7 @@
"bootstrap": "5.3.8",
"boxicons": "2.1.4",
"clsx": "2.1.1",
- "color": "5.0.3",
+ "color": "5.0.3",
"debounce": "3.0.0",
"draggabilly": "3.0.0",
"force-graph": "1.51.0",
diff --git a/apps/server/spec/setup.ts b/apps/server/spec/setup.ts
index 74e7ff7465..4d002369cf 100644
--- a/apps/server/spec/setup.ts
+++ b/apps/server/spec/setup.ts
@@ -1,7 +1,7 @@
import { beforeAll } from "vitest";
import i18next from "i18next";
import { join } from "path";
-import dayjs from "dayjs";
+import { setDayjsLocale } from "@triliumnext/commons";
// Initialize environment variables.
process.env.TRILIUM_DATA_DIR = join(__dirname, "db");
@@ -25,6 +25,5 @@ beforeAll(async () => {
});
// Initialize dayjs
- await import("dayjs/locale/en.js");
- dayjs.locale("en");
+ await setDayjsLocale("en");
});
diff --git a/apps/server/src/services/i18n.ts b/apps/server/src/services/i18n.ts
index 5da578c88b..f77ec93ef6 100644
--- a/apps/server/src/services/i18n.ts
+++ b/apps/server/src/services/i18n.ts
@@ -4,8 +4,7 @@ import sql_init from "./sql_init.js";
import { join } from "path";
import { getResourceDir } from "./utils.js";
import hidden_subtree from "./hidden_subtree.js";
-import { LOCALES, setDayjsLocale, type Locale, type LOCALE_IDS } from "@triliumnext/commons";
-import dayjs, { Dayjs } from "dayjs";
+import { dayjs, LOCALES, setDayjsLocale, type Dayjs, type Locale, type LOCALE_IDS } from "@triliumnext/commons";
export async function initializeTranslations() {
const resourceDir = getResourceDir();