librechat: 0.7.9 -> 0.8.0

This commit is contained in:
Simao Gomes Viana
2025-10-30 15:53:16 +01:00
parent 22f6fb046d
commit e75998fe12
3 changed files with 88 additions and 35 deletions
@@ -0,0 +1,68 @@
diff --git a/client/package.json b/client/package.json
index f96aefa2d..ef3050f72 100644
--- a/client/package.json
+++ b/client/package.json
@@ -121,7 +121,7 @@
"@tanstack/react-query-devtools": "^4.29.0",
"@testing-library/dom": "^9.3.0",
"@testing-library/jest-dom": "^5.16.5",
- "@testing-library/react": "^14.0.0",
+ "@testing-library/react": "^14.3.1",
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^29.5.14",
"@types/js-cookie": "^3.0.6",
diff --git a/package-lock.json b/package-lock.json
index 5b484fd55..7cbc13f49 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -20,6 +20,7 @@
"@eslint/js": "^9.20.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@playwright/test": "^1.50.1",
+ "@testing-library/react": "^14.3.1",
"@types/react-virtualized": "^9.22.0",
"caniuse-lite": "^1.0.30001741",
"cross-env": "^7.0.3",
@@ -2718,7 +2719,7 @@
"@tanstack/react-query-devtools": "^4.29.0",
"@testing-library/dom": "^9.3.0",
"@testing-library/jest-dom": "^5.16.5",
- "@testing-library/react": "^14.0.0",
+ "@testing-library/react": "^14.3.1",
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^29.5.14",
"@types/js-cookie": "^3.0.6",
@@ -51744,7 +51745,7 @@
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"@tanstack/react-query": "^4.28.0",
- "@testing-library/react": "^14.0.0",
+ "@testing-library/react": "^16.3.0",
"@types/react": "^18.2.11",
"@types/react-dom": "^18.2.4",
"caniuse-lite": "^1.0.30001741",
diff --git a/package.json b/package.json
index 693de111d..5e58ab1f0 100644
--- a/package.json
+++ b/package.json
@@ -99,6 +99,7 @@
"@eslint/js": "^9.20.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@playwright/test": "^1.50.1",
+ "@testing-library/react": "^14.3.1",
"@types/react-virtualized": "^9.22.0",
"caniuse-lite": "^1.0.30001741",
"cross-env": "^7.0.3",
diff --git a/packages/client/package.json b/packages/client/package.json
index 71aac0c29..ab6fabca1 100644
--- a/packages/client/package.json
+++ b/packages/client/package.json
@@ -75,7 +75,7 @@
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"@tanstack/react-query": "^4.28.0",
- "@testing-library/react": "^14.0.0",
+ "@testing-library/react": "^16.3.0",
"@types/react": "^18.2.11",
"@types/react-dom": "^18.2.4",
"caniuse-lite": "^1.0.30001741",
@@ -1,26 +0,0 @@
diff --git a/packages/data-schemas/src/config/meiliLogger.ts b/packages/data-schemas/src/config/meiliLogger.ts
index 0d4d39475..c38560d35 100644
--- a/packages/data-schemas/src/config/meiliLogger.ts
+++ b/packages/data-schemas/src/config/meiliLogger.ts
@@ -2,7 +2,7 @@ import path from 'path';
import winston from 'winston';
import 'winston-daily-rotate-file';
-const logDir = path.join(__dirname, '..', '..', '..', 'api', 'logs');
+const logDir = path.join('.', 'logs');
const { NODE_ENV, DEBUG_LOGGING = 'false' } = process.env;
diff --git a/packages/data-schemas/src/config/winston.ts b/packages/data-schemas/src/config/winston.ts
index 7e5287296..dd68614bc 100644
--- a/packages/data-schemas/src/config/winston.ts
+++ b/packages/data-schemas/src/config/winston.ts
@@ -3,7 +3,7 @@ import winston from 'winston';
import 'winston-daily-rotate-file';
import { redactFormat, redactMessage, debugTraverse, jsonTruncateFormat } from './parsers';
-const logDir = path.join(__dirname, '..', '..', '..', 'api', 'logs');
+const logDir = path.join('.', 'logs');
const { NODE_ENV, DEBUG_LOGGING, CONSOLE_JSON, DEBUG_CONSOLE } = process.env;
+20 -9
View File
@@ -1,6 +1,7 @@
{
lib,
buildNpmPackage,
fetchNpmDeps,
fetchFromGitHub,
pkg-config,
node-gyp,
@@ -10,13 +11,13 @@
buildNpmPackage rec {
pname = "librechat";
version = "0.7.9";
version = "0.8.0";
src = fetchFromGitHub {
owner = "danny-avila";
repo = "LibreChat";
tag = "v${version}";
hash = "sha256-0HEb8tFpiTjfN+RpwizK5POWsz5cRicSdZwYPmUaLDA=";
hash = "sha256-DTmb9J2nsMy6f+V6BgRtFgpTwOi9OQnvikSx4QZQ0HI=";
};
patches = [
@@ -35,13 +36,20 @@ buildNpmPackage rec {
# directory as well. Again, we patch this to be relative to the current working
# directory instead.
./0003-upload-paths.patch
# Since 0.7.9, there are two more files that try to write logs to the package
# directory. We patch the log directory to target the current working directory
# instead for these two as well.
./0004-logs-v079.patch
# The npm dependencies are causing issues with the build. The package @testing-library/react
# appears to not be included in NPM deps, even though it is present in the project
# This patch fixes this by placing the dependency in different files and regenerating the
# lock file.
./0004-fix-deps-v080.patch
];
npmDepsHash = "sha256-tOxanPXry52lD39xlT6rqKVF+Pk6m3FpTv/8wctKAWY=";
npmDepsHash = "sha256-97cEw6VD7FoVayrxClHuS1iUcQmDw7/aUoUV6ektvOY=";
npmDeps = fetchNpmDeps {
inherit src;
name = "${pname}-${version}-npm-deps-patched";
hash = npmDepsHash;
patches = [ ./0004-fix-deps-v080.patch ];
};
nativeBuildInputs = [
pkg-config
@@ -58,12 +66,15 @@ buildNpmPackage rec {
npmBuildScript = "frontend";
npmPruneFlags = [ "--production" ];
# For reasons beyond my understanding, the api directory disappears after the build finishes.
# Hence, starting LibreChat fails with a "module not found" error due to a broken symlink.
# For reasons beyond my understanding, the api and client directory disappears after the build finishes.
# Hence, the build fails with broken symlinks and if the symlink is removed,
# starting LibreChat fails with a "module not found" error.
# This is a fixup that copies the missing files to the appropriate location.
preFixup = ''
mkdir -p $out/lib/node_modules/LibreChat/packages/api
cp -R packages/api/dist/. $out/lib/node_modules/LibreChat/packages/api
mkdir -p $out/lib/node_modules/LibreChat/packages/client
cp -R packages/client/dist/. $out/lib/node_modules/LibreChat/packages/client
'';
passthru = {