@lobehub/chat 1.43.2 → 1.43.3

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.43.3](https://github.com/lobehub/lobe-chat/compare/v1.43.2...v1.43.3)
6
+
7
+ <sup>Released on **2025-01-04**</sup>
8
+
9
+ #### ♻ Code Refactoring
10
+
11
+ - **misc**: Upgrade `@clerk/nextjs` to v6.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Code refactoring
19
+
20
+ - **misc**: Upgrade `@clerk/nextjs` to v6, closes [#5291](https://github.com/lobehub/lobe-chat/issues/5291) ([de09895](https://github.com/lobehub/lobe-chat/commit/de09895))
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.43.2](https://github.com/lobehub/lobe-chat/compare/v1.43.1...v1.43.2)
6
31
 
7
32
  <sup>Released on **2025-01-04**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,13 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "improvements": [
5
+ "Upgrade @clerk/nextjs to v6."
6
+ ]
7
+ },
8
+ "date": "2025-01-04",
9
+ "version": "1.43.3"
10
+ },
2
11
  {
3
12
  "children": {
4
13
  "fixes": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.43.2",
3
+ "version": "1.43.3",
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",
@@ -115,7 +115,7 @@
115
115
  "@baiducloud/qianfan": "^0.1.9",
116
116
  "@cfworker/json-schema": "^4.0.0",
117
117
  "@clerk/localizations": "^3.3.0",
118
- "@clerk/nextjs": "^5.7.5",
118
+ "@clerk/nextjs": "^6.9.6",
119
119
  "@clerk/themes": "^2.1.37",
120
120
  "@codesandbox/sandpack-react": "^2.19.9",
121
121
  "@cyntler/react-doc-viewer": "^1.17.0",
@@ -44,6 +44,7 @@ const Clerk = memo(({ children }: PropsWithChildren) => {
44
44
  return (
45
45
  <ClerkProvider
46
46
  appearance={updatedAppearance}
47
+ dynamic
47
48
  localization={localization}
48
49
  signUpUrl={!enableClerkSignUp ? '/login' : '/signup'} // Redirect sign-up to sign-in if disabled
49
50
  >
package/src/middleware.ts CHANGED
@@ -54,8 +54,8 @@ const isProtectedRoute = createRouteMatcher([
54
54
 
55
55
  export default authEnv.NEXT_PUBLIC_ENABLE_CLERK_AUTH
56
56
  ? clerkMiddleware(
57
- (auth, req) => {
58
- if (isProtectedRoute(req)) auth().protect();
57
+ async (auth, req) => {
58
+ if (isProtectedRoute(req)) await auth.protect();
59
59
  },
60
60
  {
61
61
  // https://github.com/lobehub/lobe-chat/pull/3084
@@ -5,7 +5,7 @@ import NextAuthEdge from '@/libs/next-auth/edge';
5
5
 
6
6
  export const getUserAuth = async () => {
7
7
  if (enableClerk) {
8
- const clerkAuth = auth();
8
+ const clerkAuth = await auth();
9
9
 
10
10
  const userId = clerkAuth.userId;
11
11
  return { clerkAuth: auth, userId };