From 103af99879b8370fa548f4f09241f7854bd1efc7 Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Fri, 18 Jul 2025 22:38:24 +0200 Subject: [PATCH] feat: update package.json and rollup.config.js to include jotai and enhance bundling configuration --- client/package.json | 4 +- package-lock.json | 67 ++++++++++++++++++++++++-------- packages/client/package.json | 58 +++++++++++++++++++++------ packages/client/rollup.config.js | 8 +++- 4 files changed, 105 insertions(+), 32 deletions(-) diff --git a/client/package.json b/client/package.json index 5c66799d38..65723fe6df 100644 --- a/client/package.json +++ b/client/package.json @@ -71,6 +71,7 @@ "i18next": "^24.2.2", "i18next-browser-languagedetector": "^8.0.3", "input-otp": "^1.4.2", + "jotai": "^2.12.5", "js-cookie": "^3.0.5", "librechat-data-provider": "*", "lodash": "^4.17.21", @@ -110,9 +111,6 @@ "tailwindcss-radix": "^2.8.0", "zod": "^3.22.4" }, - "peerDependencies": { - "jotai": "^2.12.5" - }, "devDependencies": { "@babel/plugin-transform-runtime": "^7.22.15", "@babel/preset-env": "^7.22.15", diff --git a/package-lock.json b/package-lock.json index c586b5d11d..f0c0270031 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2781,6 +2781,7 @@ "i18next": "^24.2.2", "i18next-browser-languagedetector": "^8.0.3", "input-otp": "^1.4.2", + "jotai": "^2.12.5", "js-cookie": "^3.0.5", "librechat-data-provider": "*", "lodash": "^4.17.21", @@ -2859,9 +2860,6 @@ "vite-plugin-compression2": "^1.3.3", "vite-plugin-node-polyfills": "^0.23.0", "vite-plugin-pwa": "^0.21.2" - }, - "peerDependencies": { - "jotai": "^2.12.5" } }, "client/node_modules/@babel/compat-data": { @@ -36684,7 +36682,6 @@ "resolved": "https://registry.npmjs.org/jotai/-/jotai-2.12.5.tgz", "integrity": "sha512-G8m32HW3lSmcz/4mbqx0hgJIQ0ekndKWiYP7kWVKi0p6saLXdSoye+FZiOFyonnd7Q482LCzm8sMDl7Ar1NWDw==", "license": "MIT", - "peer": true, "engines": { "node": ">=12.20.0" }, @@ -49860,19 +49857,62 @@ "packages/client": { "name": "@librechat/client", "version": "0.1.0", + "dependencies": { + "class-variance-authority": "^0.6.0", + "clsx": "^1.2.1", + "input-otp": "^1.4.2", + "librechat-data-provider": "*", + "lucide-react": "^0.394.0", + "match-sorter": "^6.3.4", + "rc-input-number": "^7.4.2", + "tailwind-merge": "^1.9.1" + }, "devDependencies": { + "@ariakit/react": "^0.4.15", + "@ariakit/react-core": "^0.4.17", + "@headlessui/react": "^2.1.2", + "@radix-ui/react-accordion": "^1.1.2", + "@radix-ui/react-alert-dialog": "^1.0.2", + "@radix-ui/react-checkbox": "^1.0.3", + "@radix-ui/react-collapsible": "^1.0.3", + "@radix-ui/react-dialog": "^1.0.2", + "@radix-ui/react-dropdown-menu": "^2.1.1", + "@radix-ui/react-hover-card": "^1.0.5", + "@radix-ui/react-icons": "^1.3.0", + "@radix-ui/react-label": "^2.0.0", + "@radix-ui/react-progress": "^1.1.2", + "@radix-ui/react-select": "^2.0.0", + "@radix-ui/react-separator": "^1.0.3", + "@radix-ui/react-slider": "^1.1.1", + "@radix-ui/react-slot": "^1.0.0", + "@radix-ui/react-switch": "^1.0.3", + "@radix-ui/react-tabs": "^1.0.3", + "@radix-ui/react-toast": "^1.1.5", + "@react-spring/web": "^9.7.5", "@rollup/plugin-alias": "^5.1.0", "@rollup/plugin-commonjs": "^25.0.2", "@rollup/plugin-node-resolve": "^15.0.0", "@rollup/plugin-replace": "^5.0.5", "@rollup/plugin-terser": "^0.4.4", "@tailwindcss/typography": "^0.5.10", + "@tanstack/react-query": "^4.28.0", + "@tanstack/react-table": "^8.11.7", + "@tanstack/react-virtual": "^3.0.0", "@testing-library/react": "^16.3.0", "@types/react": "^18.0.0", "@types/react-dom": "^18.0.0", "autoprefixer": "^10.4.20", + "framer-motion": "^11.5.4", + "i18next": "^24.2.2", + "i18next-browser-languagedetector": "^8.0.3", + "jotai": "^2.12.5", "postcss": "^8.4.31", + "react": "^18.2.0", + "react-dom": "^18.2.0", "react-hook-form": "^7.60.0", + "react-i18next": "^15.4.0", + "react-resizable-panels": "^3.0.2", + "react-textarea-autosize": "^8.4.0", "rimraf": "^5.0.1", "rollup": "^4.0.0", "rollup-plugin-peer-deps-external": "^2.2.4", @@ -49904,26 +49944,19 @@ "@radix-ui/react-tabs": "^1.0.3", "@radix-ui/react-toast": "^1.1.5", "@react-spring/web": "^9.7.5", - "@tanstack/react-query": "^4.28.0", + "@tanstack/react-query": "^4.28.0 || ^5.0.0", "@tanstack/react-table": "^8.11.7", - "class-variance-authority": "^0.6.0", - "clsx": "^1.2.1", + "@tanstack/react-virtual": "^3.0.0", "framer-motion": "^11.5.4", "i18next": "^24.2.2", "i18next-browser-languagedetector": "^8.0.3", - "input-otp": "^1.4.2", "jotai": "^2.12.5", - "librechat-data-provider": "*", - "lucide-react": "^0.394.0", - "match-sorter": "^6.3.4", - "rc-input-number": "^7.4.2", - "react": "^18.2.0", - "react-dom": "^18.2.0", + "react": "^18.2.0 || ^19.0.0", + "react-dom": "^18.2.0 || ^19.0.0", + "react-hook-form": "^7.60.0", "react-i18next": "^15.4.0", "react-resizable-panels": "^3.0.2", - "react-textarea-autosize": "^8.4.0", - "recoil": "^0.7.7", - "tailwind-merge": "^1.9.1" + "react-textarea-autosize": "^8.4.0" } }, "packages/client/node_modules/@testing-library/dom": { diff --git a/packages/client/package.json b/packages/client/package.json index 58eb74c3a0..275fec15a1 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -22,6 +22,11 @@ "dev": "rollup -c -w --bundleConfigAsCjs" }, "peerDependencies": { + "react": "^18.2.0 || ^19.0.0", + "react-dom": "^18.2.0 || ^19.0.0", + "@tanstack/react-query": "^4.28.0 || ^5.0.0", + "jotai": "^2.12.5", + "react-hook-form": "^7.60.0", "@ariakit/react": "^0.4.15", "@ariakit/react-core": "^0.4.17", "@headlessui/react": "^2.1.2", @@ -43,28 +48,55 @@ "@radix-ui/react-tabs": "^1.0.3", "@radix-ui/react-toast": "^1.1.5", "@react-spring/web": "^9.7.5", - "@tanstack/react-query": "^4.28.0", "@tanstack/react-table": "^8.11.7", "@tanstack/react-virtual": "^3.0.0", - "class-variance-authority": "^0.6.0", - "clsx": "^1.2.1", "framer-motion": "^11.5.4", "i18next": "^24.2.2", "i18next-browser-languagedetector": "^8.0.3", + "react-i18next": "^15.4.0", + "react-resizable-panels": "^3.0.2", + "react-textarea-autosize": "^8.4.0" + }, + "dependencies": { + "class-variance-authority": "^0.6.0", + "clsx": "^1.2.1", "input-otp": "^1.4.2", - "jotai": "^2.12.5", "librechat-data-provider": "*", "lucide-react": "^0.394.0", "match-sorter": "^6.3.4", "rc-input-number": "^7.4.2", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-i18next": "^15.4.0", - "react-resizable-panels": "^3.0.2", - "react-textarea-autosize": "^8.4.0", "tailwind-merge": "^1.9.1" }, "devDependencies": { + "@ariakit/react": "^0.4.15", + "@ariakit/react-core": "^0.4.17", + "@headlessui/react": "^2.1.2", + "@radix-ui/react-accordion": "^1.1.2", + "@radix-ui/react-alert-dialog": "^1.0.2", + "@radix-ui/react-checkbox": "^1.0.3", + "@radix-ui/react-collapsible": "^1.0.3", + "@radix-ui/react-dialog": "^1.0.2", + "@radix-ui/react-dropdown-menu": "^2.1.1", + "@radix-ui/react-hover-card": "^1.0.5", + "@radix-ui/react-icons": "^1.3.0", + "@radix-ui/react-label": "^2.0.0", + "@radix-ui/react-progress": "^1.1.2", + "@radix-ui/react-select": "^2.0.0", + "@radix-ui/react-separator": "^1.0.3", + "@radix-ui/react-slider": "^1.1.1", + "@radix-ui/react-slot": "^1.0.0", + "@radix-ui/react-switch": "^1.0.3", + "@radix-ui/react-tabs": "^1.0.3", + "@radix-ui/react-toast": "^1.1.5", + "@react-spring/web": "^9.7.5", + "@tanstack/react-table": "^8.11.7", + "@tanstack/react-virtual": "^3.0.0", + "framer-motion": "^11.5.4", + "i18next": "^24.2.2", + "i18next-browser-languagedetector": "^8.0.3", + "react-i18next": "^15.4.0", + "react-resizable-panels": "^3.0.2", + "react-textarea-autosize": "^8.4.0", "@rollup/plugin-alias": "^5.1.0", "@rollup/plugin-commonjs": "^25.0.2", "@rollup/plugin-node-resolve": "^15.0.0", @@ -76,7 +108,6 @@ "@types/react-dom": "^18.0.0", "autoprefixer": "^10.4.20", "postcss": "^8.4.31", - "react-hook-form": "^7.60.0", "rimraf": "^5.0.1", "rollup": "^4.0.0", "rollup-plugin-peer-deps-external": "^2.2.4", @@ -84,6 +115,11 @@ "rollup-plugin-typescript2": "^0.35.0", "tailwindcss": "^3.4.1", "tailwindcss-animate": "^1.0.5", - "typescript": "^5.0.0" + "typescript": "^5.0.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "@tanstack/react-query": "^4.28.0", + "jotai": "^2.12.5", + "react-hook-form": "^7.60.0" } } diff --git a/packages/client/rollup.config.js b/packages/client/rollup.config.js index 242808d7f7..66d7092c3b 100644 --- a/packages/client/rollup.config.js +++ b/packages/client/rollup.config.js @@ -21,6 +21,8 @@ const plugins = [ }), resolve({ extensions: ['.js', '.jsx', '.ts', '.tsx'], + browser: true, + preferBuiltins: false, }), replace({ 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production'), @@ -65,7 +67,11 @@ export default { exports: 'named', }, ], - external: [...Object.keys(pkg.peerDependencies || {}), 'react/jsx-runtime'], + external: [ + ...Object.keys(pkg.peerDependencies || {}), + 'react/jsx-runtime', + 'react/jsx-dev-runtime', + ], preserveSymlinks: true, plugins, onwarn(warning, warn) {