chore: upgrade dev deps and fix extension build pipeline (#251)

Upgrade vite/web-ext toolchain to resolve security advisories, configure
pnpm 11 allowBuilds, and ensure popup/offscreen HTML land in dist root.
This commit is contained in:
Libin YANG
2026-06-17 19:19:49 +08:00
committed by GitHub
parent ae0e34957d
commit c876428706
7 changed files with 1316 additions and 2490 deletions
+5 -6
View File
@@ -21,11 +21,10 @@
"devDependencies": {
"cac": "^6.7.14",
"execa": "^9.6.1",
"rimraf": "^5.0.5",
"tsx": "^4.21.0",
"vite": "^5.0.12",
"vite-plugin-static-copy": "^1.0.1",
"web-ext": "^7.11.0",
"ws": "^8.19.0"
"tsx": "^4.22.4",
"vite": "^8.0.16",
"vite-plugin-static-copy": "^4.1.1",
"web-ext": "^10.4.0",
"ws": "^8.21.0"
}
}
+10 -4
View File
@@ -97,10 +97,6 @@ const copyResources = async () => {
from: path.join(rootDir, 'icons'),
to: path.join(rootDir, 'dist/icons'),
},
{
from: path.join(rootDir, 'assets'),
to: path.join(rootDir, 'dist/assets'),
},
{
// Copy platform scripts from core package
from: path.resolve(rootDir, '../../packages/core/src/platforms'),
@@ -122,6 +118,16 @@ const copyResources = async () => {
console.log(` ⚠ Skipped ${path.basename(entry.from)} (not found)`)
}
}
for (const name of ['popup.html', 'offscreen.html'] as const) {
const from = path.join(rootDir, 'src', name)
const to = path.join(rootDir, 'dist', name)
await fs.copyFile(from, to)
console.log(` ✓ Copied ${name}`)
}
// vite-plugin-static-copy v4 may leave stale HTML under dist/src
await fs.rm(path.join(rootDir, 'dist/src'), { recursive: true, force: true })
}
const genManifest = async (options: BuildOptions) => {
-12
View File
@@ -39,18 +39,6 @@ export default defineConfig({
src: 'icons',
dest: '.',
},
{
src: 'src/offscreen.html',
dest: '.',
},
{
src: 'src/popup.html',
dest: '.',
},
{
src: 'assets',
dest: '.',
},
],
}),
],
+1 -1
View File
@@ -12,6 +12,6 @@
"test": "node --test"
},
"devDependencies": {
"typescript": "^5.0.0"
"typescript": "^5.9.3"
}
}
-5
View File
@@ -45,9 +45,4 @@ async function fillJianshuContent(content, waitFor, setInputValue) {
}
}
// 导出
if (typeof module !== 'undefined' && module.exports) {
module.exports = { JianshuPlatform, fillJianshuContent }
}
export { JianshuPlatform, fillJianshuContent }
+1295 -2462
View File
File diff suppressed because it is too large Load Diff
+5
View File
@@ -1,3 +1,8 @@
packages:
- 'apps/*'
- 'packages/*'
allowBuilds:
core-js: false
dtrace-provider: false
esbuild: true
spawn-sync: false