chore(server): fix some more dependencies to JSON

This commit is contained in:
Elian Doran 2025-12-04 08:45:10 +02:00
parent 2985bd0a1c
commit 6b07908cf7
No known key found for this signature in database
3 changed files with 4 additions and 6 deletions

View File

@ -37,7 +37,7 @@
"bootstrap": "5.3.8", "bootstrap": "5.3.8",
"boxicons": "2.1.4", "boxicons": "2.1.4",
"clsx": "2.1.1", "clsx": "2.1.1",
"color": "5.0.3", "color": "5.0.3",
"debounce": "3.0.0", "debounce": "3.0.0",
"draggabilly": "3.0.0", "draggabilly": "3.0.0",
"force-graph": "1.51.0", "force-graph": "1.51.0",

View File

@ -1,7 +1,7 @@
import { beforeAll } from "vitest"; import { beforeAll } from "vitest";
import i18next from "i18next"; import i18next from "i18next";
import { join } from "path"; import { join } from "path";
import dayjs from "dayjs"; import { setDayjsLocale } from "@triliumnext/commons";
// Initialize environment variables. // Initialize environment variables.
process.env.TRILIUM_DATA_DIR = join(__dirname, "db"); process.env.TRILIUM_DATA_DIR = join(__dirname, "db");
@ -25,6 +25,5 @@ beforeAll(async () => {
}); });
// Initialize dayjs // Initialize dayjs
await import("dayjs/locale/en.js"); await setDayjsLocale("en");
dayjs.locale("en");
}); });

View File

@ -4,8 +4,7 @@ import sql_init from "./sql_init.js";
import { join } from "path"; import { join } from "path";
import { getResourceDir } from "./utils.js"; import { getResourceDir } from "./utils.js";
import hidden_subtree from "./hidden_subtree.js"; import hidden_subtree from "./hidden_subtree.js";
import { LOCALES, setDayjsLocale, type Locale, type LOCALE_IDS } from "@triliumnext/commons"; import { dayjs, LOCALES, setDayjsLocale, type Dayjs, type Locale, type LOCALE_IDS } from "@triliumnext/commons";
import dayjs, { Dayjs } from "dayjs";
export async function initializeTranslations() { export async function initializeTranslations() {
const resourceDir = getResourceDir(); const resourceDir = getResourceDir();