@lobehub/lobehub 2.0.0-next.176 â 2.0.0-next.178
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/.github/workflows/bundle-analyzer.yml +115 -0
- package/CHANGELOG.md +51 -0
- package/changelog/v1.json +10 -0
- package/package.json +1 -1
- package/scripts/prebuild.mts +7 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
name: Bundle Analyzer
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
actions: write
|
|
9
|
+
|
|
10
|
+
env:
|
|
11
|
+
NODE_VERSION: 24.11.1
|
|
12
|
+
BUN_VERSION: 1.2.23
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
bundle-analyzer:
|
|
16
|
+
name: Analyze Bundle Size
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout repository
|
|
21
|
+
uses: actions/checkout@v5
|
|
22
|
+
|
|
23
|
+
- name: Setup Node.js
|
|
24
|
+
uses: actions/setup-node@v6
|
|
25
|
+
with:
|
|
26
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
27
|
+
|
|
28
|
+
- name: Setup Bun
|
|
29
|
+
uses: oven-sh/setup-bun@v2
|
|
30
|
+
with:
|
|
31
|
+
bun-version: ${{ env.BUN_VERSION }}
|
|
32
|
+
|
|
33
|
+
- name: Setup pnpm
|
|
34
|
+
uses: pnpm/action-setup@v4
|
|
35
|
+
|
|
36
|
+
- name: Install dependencies
|
|
37
|
+
run: pnpm i
|
|
38
|
+
|
|
39
|
+
- name: Ensure lockfile exists
|
|
40
|
+
run: |
|
|
41
|
+
# Temporarily override .npmrc lockfile=false setting
|
|
42
|
+
# to generate pnpm-lock.yaml for reproducible builds
|
|
43
|
+
if [ ! -f "pnpm-lock.yaml" ]; then
|
|
44
|
+
echo "Generating pnpm-lock.yaml..."
|
|
45
|
+
# Create temporary .npmrc override
|
|
46
|
+
mv .npmrc .npmrc.bak
|
|
47
|
+
echo "lockfile=true" > .npmrc
|
|
48
|
+
cat .npmrc.bak >> .npmrc
|
|
49
|
+
pnpm i
|
|
50
|
+
mv .npmrc.bak .npmrc
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
- name: Generate build secrets
|
|
54
|
+
id: generate-secret
|
|
55
|
+
run: echo "secret=$(openssl rand -base64 32)" >> $GITHUB_OUTPUT
|
|
56
|
+
|
|
57
|
+
- name: Build with bundle analyzer
|
|
58
|
+
run: bun run build:analyze || true
|
|
59
|
+
env:
|
|
60
|
+
NODE_OPTIONS: --max-old-space-size=8192
|
|
61
|
+
KEY_VAULTS_SECRET: ${{ secrets.KEY_VAULTS_SECRET || steps.generate-secret.outputs.secret }}
|
|
62
|
+
|
|
63
|
+
- name: Prepare analyzer reports
|
|
64
|
+
run: |
|
|
65
|
+
mkdir -p bundle-report
|
|
66
|
+
# Copy analyzer HTML reports if they exist
|
|
67
|
+
if [ -d ".next/analyze" ]; then
|
|
68
|
+
cp -r .next/analyze/* bundle-report/ || true
|
|
69
|
+
fi
|
|
70
|
+
# Also check if reports are in .vercel/output
|
|
71
|
+
if [ -d ".vercel/output/.next/analyze" ]; then
|
|
72
|
+
cp -r .vercel/output/.next/analyze/* bundle-report/ || true
|
|
73
|
+
fi
|
|
74
|
+
# Include pnpm lockfile for reproducible builds
|
|
75
|
+
if [ -f "pnpm-lock.yaml" ]; then
|
|
76
|
+
cp pnpm-lock.yaml bundle-report/pnpm-lock.yaml
|
|
77
|
+
echo "Copied pnpm-lock.yaml to bundle-report"
|
|
78
|
+
else
|
|
79
|
+
echo "Warning: pnpm-lock.yaml not found"
|
|
80
|
+
fi
|
|
81
|
+
# Create a summary with build metadata
|
|
82
|
+
echo "# Bundle Analysis Report" > bundle-report/README.md
|
|
83
|
+
echo "" >> bundle-report/README.md
|
|
84
|
+
echo "**Build Date:** $(date -u +"%Y-%m-%d %H:%M:%S UTC")" >> bundle-report/README.md
|
|
85
|
+
echo "**Commit:** ${{ github.sha }}" >> bundle-report/README.md
|
|
86
|
+
echo "**Branch:** ${{ github.ref_name }}" >> bundle-report/README.md
|
|
87
|
+
echo "" >> bundle-report/README.md
|
|
88
|
+
echo "## How to view" >> bundle-report/README.md
|
|
89
|
+
echo "" >> bundle-report/README.md
|
|
90
|
+
echo "1. Download the \`bundle-report\` artifact from this workflow run" >> bundle-report/README.md
|
|
91
|
+
echo "2. Extract the archive" >> bundle-report/README.md
|
|
92
|
+
echo "3. Open \`client.html\` and \`server.html\` in your browser" >> bundle-report/README.md
|
|
93
|
+
echo "" >> bundle-report/README.md
|
|
94
|
+
echo "## Files in this report" >> bundle-report/README.md
|
|
95
|
+
echo "" >> bundle-report/README.md
|
|
96
|
+
echo "- \`client.html\` - Client-side bundle analysis" >> bundle-report/README.md
|
|
97
|
+
echo "- \`server.html\` - Server-side bundle analysis" >> bundle-report/README.md
|
|
98
|
+
echo "- \`pnpm-lock.yaml\` - pnpm lockfile (for reproducible builds)" >> bundle-report/README.md
|
|
99
|
+
|
|
100
|
+
- name: Upload bundle analyzer reports
|
|
101
|
+
uses: actions/upload-artifact@v4
|
|
102
|
+
with:
|
|
103
|
+
name: bundle-report-${{ github.run_id }}
|
|
104
|
+
path: bundle-report/
|
|
105
|
+
retention-days: 30
|
|
106
|
+
if-no-files-found: warn
|
|
107
|
+
|
|
108
|
+
- name: Create summary comment
|
|
109
|
+
run: |
|
|
110
|
+
echo "## Bundle Analysis Complete :chart_with_upwards_trend:" >> $GITHUB_STEP_SUMMARY
|
|
111
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
112
|
+
echo "- **Commit:** \`${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY
|
|
113
|
+
echo "- **Artifact:** \`bundle-report-${{ github.run_id }}\`" >> $GITHUB_STEP_SUMMARY
|
|
114
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
115
|
+
echo "Download the artifact to view the detailed bundle analysis reports." >> $GITHUB_STEP_SUMMARY
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 2.0.0-next.178](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.177...v2.0.0-next.178)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2025-12-24**</sup>
|
|
8
|
+
|
|
9
|
+
#### đ Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **ci**: Always continue build to upload bundle analyzer report, skip backend routes in bundle analyzer build.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **ci**: Always continue build to upload bundle analyzer report, closes [#10946](https://github.com/lobehub/lobe-chat/issues/10946) ([8d37811](https://github.com/lobehub/lobe-chat/commit/8d37811))
|
|
21
|
+
- **ci**: Skip backend routes in bundle analyzer build, closes [#10944](https://github.com/lobehub/lobe-chat/issues/10944) ([0276b87](https://github.com/lobehub/lobe-chat/commit/0276b87))
|
|
22
|
+
|
|
23
|
+
</details>
|
|
24
|
+
|
|
25
|
+
<div align="right">
|
|
26
|
+
|
|
27
|
+
[](#readme-top)
|
|
28
|
+
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
## [Version 2.0.0-next.177](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.176...v2.0.0-next.177)
|
|
32
|
+
|
|
33
|
+
<sup>Released on **2025-12-24**</sup>
|
|
34
|
+
|
|
35
|
+
#### ⨠Features
|
|
36
|
+
|
|
37
|
+
- **ci**: Add bundle analyzer workflow.
|
|
38
|
+
|
|
39
|
+
<br/>
|
|
40
|
+
|
|
41
|
+
<details>
|
|
42
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
43
|
+
|
|
44
|
+
#### What's improved
|
|
45
|
+
|
|
46
|
+
- **ci**: Add bundle analyzer workflow, closes [#10932](https://github.com/lobehub/lobe-chat/issues/10932) ([c470cfb](https://github.com/lobehub/lobe-chat/commit/c470cfb))
|
|
47
|
+
|
|
48
|
+
</details>
|
|
49
|
+
|
|
50
|
+
<div align="right">
|
|
51
|
+
|
|
52
|
+
[](#readme-top)
|
|
53
|
+
|
|
54
|
+
</div>
|
|
55
|
+
|
|
5
56
|
## [Version 2.0.0-next.176](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.175...v2.0.0-next.176)
|
|
6
57
|
|
|
7
58
|
<sup>Released on **2025-12-23**</sup>
|
package/changelog/v1.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/lobehub",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.178",
|
|
4
4
|
"description": "LobeHub - an open-source,comprehensive AI Agent 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",
|
package/scripts/prebuild.mts
CHANGED
|
@@ -4,11 +4,18 @@ import { rm } from 'node:fs/promises';
|
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
|
|
6
6
|
const isDesktop = process.env.NEXT_PUBLIC_IS_DESKTOP_APP === '1';
|
|
7
|
+
const isBundleAnalyzer = process.env.ANALYZE === 'true' && process.env.CI === 'true';
|
|
7
8
|
|
|
8
9
|
dotenv.config();
|
|
9
10
|
// ĺĺťşéčŚćé¤ççšć§ć ĺ°
|
|
10
11
|
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
|
11
12
|
const partialBuildPages = [
|
|
13
|
+
// no need for bundle analyzer (frontend only)
|
|
14
|
+
{
|
|
15
|
+
name: 'backend-routes',
|
|
16
|
+
disabled: isBundleAnalyzer,
|
|
17
|
+
paths: ['src/app/(backend)'],
|
|
18
|
+
],
|
|
12
19
|
// no need for desktop
|
|
13
20
|
// {
|
|
14
21
|
// name: 'changelog',
|