feat: extension use the same version as packages

This commit is contained in:
Simon
2026-03-12 00:37:43 +08:00
parent a9f462ed37
commit a74b7542ba
9 changed files with 20 additions and 68 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "@page-agent/ext",
"private": true,
"version": "0.1.17",
"version": "1.5.5",
"type": "module",
"scripts": {
"dev": "wxt",

View File

@@ -110,9 +110,9 @@ export default defineUnlistedScript(() => {
)
}
;(window as any).PAGE_AGENT_EXT_VERSION = __EXT_VERSION__
;(window as any).PAGE_AGENT_EXT_VERSION = __VERSION__
;(window as any).PAGE_AGENT_EXT = {
version: __EXT_VERSION__,
version: __VERSION__,
execute,
stop,
}

View File

@@ -321,10 +321,7 @@ export function ConfigPanel({ config, onSave, onClose }: ConfigPanelProps) {
<div className="flex flex-col items-end">
<span>
Extension <span className="font-mono">v{__EXT_VERSION__}</span>
</span>
<span>
PageAgent <span className="font-mono">v{__CORE_VERSION__}</span>
Version <span className="font-mono">v{__VERSION__}</span>
</span>
</div>
</div>

View File

@@ -1,2 +1 @@
declare const __EXT_VERSION__: string
declare const __CORE_VERSION__: string
declare const __VERSION__: string

View File

@@ -19,8 +19,7 @@ export default defineConfig({
vite: () => ({
plugins: [tailwindcss()],
define: {
__EXT_VERSION__: JSON.stringify(pkg.version),
__CORE_VERSION__: JSON.stringify(pkg.dependencies['@page-agent/core']),
__VERSION__: JSON.stringify(pkg.version),
},
optimizeDeps: {
force: true,