@lobehub/chat 1.36.40 → 1.36.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.36.41](https://github.com/lobehub/lobe-chat/compare/v1.36.40...v1.36.41)
6
+
7
+ <sup>Released on **2024-12-21**</sup>
8
+
9
+ #### ♻ Code Refactoring
10
+
11
+ - **misc**: Upgrade react scan.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Code refactoring
19
+
20
+ - **misc**: Upgrade react scan, closes [#5104](https://github.com/lobehub/lobe-chat/issues/5104) ([eed69dd](https://github.com/lobehub/lobe-chat/commit/eed69dd))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
5
30
  ### [Version 1.36.40](https://github.com/lobehub/lobe-chat/compare/v1.36.39...v1.36.40)
6
31
 
7
32
  <sup>Released on **2024-12-20**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,13 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "improvements": [
5
+ "Upgrade react scan."
6
+ ]
7
+ },
8
+ "date": "2024-12-21",
9
+ "version": "1.36.41"
10
+ },
2
11
  {
3
12
  "children": {
4
13
  "improvements": [
package/next.config.mjs CHANGED
@@ -1,9 +1,11 @@
1
1
  import analyzer from '@next/bundle-analyzer';
2
2
  import { withSentryConfig } from '@sentry/nextjs';
3
3
  import withSerwistInit from '@serwist/next';
4
+ import ReactComponentName from 'react-scan/react-component-name/webpack';
4
5
 
5
6
  const isProd = process.env.NODE_ENV === 'production';
6
7
  const buildWithDocker = process.env.DOCKER === 'true';
8
+ const enableReactScan = !!process.env.REACT_SCAN_MONITOR_API_KEY;
7
9
 
8
10
  // if you need to proxy the api endpoint to remote server
9
11
  const API_PROXY_ENDPOINT = process.env.API_PROXY_ENDPOINT || '';
@@ -178,6 +180,10 @@ const nextConfig = {
178
180
  layers: true,
179
181
  };
180
182
 
183
+ if (enableReactScan) {
184
+ config.plugins.push(ReactComponentName({}));
185
+ }
186
+
181
187
  // to fix shikiji compile error
182
188
  // refs: https://github.com/antfu/shikiji/issues/23
183
189
  config.module.rules.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.36.40",
3
+ "version": "1.36.41",
4
4
  "description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
5
5
  "keywords": [
6
6
  "framework",
@@ -202,7 +202,7 @@
202
202
  "react-layout-kit": "^1.9.0",
203
203
  "react-lazy-load": "^4.0.1",
204
204
  "react-pdf": "^9.2.1",
205
- "react-scan": "^0.0.46",
205
+ "react-scan": "^0.0.51",
206
206
  "react-virtuoso": "^4.12.0",
207
207
  "react-wrap-balancer": "^1.1.1",
208
208
  "remark": "^14.0.3",
@@ -1,4 +1,4 @@
1
- import { Monitoring } from 'react-scan/dist/core/monitor/params/next';
1
+ import { Monitoring } from 'react-scan/monitoring/next';
2
2
 
3
3
  interface ReactScanProps {
4
4
  apiKey: string;