chore(release): single-source app version + add pnpm bump

- WebUI sidebar/login display and OneBot get_version_info now read the
  root package.json version via Vite `define`, removing hardcoded
  literals in webui/src/types.ts and core/onebot/actions/info.ts.
- tools/bump-version.mjs (exposed as `pnpm bump <ver>`) syncs the
  version field across the root and all five workspace packages.
- Bump everything to 1.7.8.
This commit is contained in:
DrSmoothl committed 2026-05-13 16:51:44 +08:00
1 parent c9fa119a50
commit 61e3867197
13 files changed
+79 -10

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "webui",
"private": true,
"version": "0.0.0",
"version": "1.7.8",
"type": "module",
"scripts": {
"dev": "vite",
+1
View File
@@ -0,0 +1 @@
declare const __APP_VERSION__: string;
+2 -1
View File
@@ -1,5 +1,6 @@
export const APP_NAME = 'SnowLuma';
export const APP_VERSION = '0.1.0';
// Injected at build time by Vite from the monorepo root package.json.
export const APP_VERSION = __APP_VERSION__;
export interface QQInfo {
uin: string;
+9
View File
@@ -1,3 +1,4 @@
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { defineConfig } from 'vite';
@@ -6,6 +7,11 @@ import tailwindcss from '@tailwindcss/vite';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
// Single source of truth for the user-facing app version: monorepo root package.json.
const rootPkg = JSON.parse(
fs.readFileSync(path.resolve(__dirname, '../../package.json'), 'utf-8'),
) as { version: string };
export default defineConfig({
plugins: [tailwindcss(), react()],
resolve: {
@@ -13,6 +19,9 @@ export default defineConfig({
'@': path.resolve(__dirname, 'src'),
},
},
define: {
__APP_VERSION__: JSON.stringify(rootPkg.version),
},
server: {
port: 5178,
strictPort: false,