mirror of
https://github.com/doocs/cose.git
synced 2026-08-28 23:02:10 +08:00
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:
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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
@@ -12,6 +12,6 @@
|
||||
"test": "node --test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.0.0"
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,9 +45,4 @@ async function fillJianshuContent(content, waitFor, setInputValue) {
|
||||
}
|
||||
}
|
||||
|
||||
// 导出
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = { JianshuPlatform, fillJianshuContent }
|
||||
}
|
||||
|
||||
export { JianshuPlatform, fillJianshuContent }
|
||||
|
||||
Generated
+1295
-2462
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,8 @@
|
||||
packages:
|
||||
- 'apps/*'
|
||||
- 'packages/*'
|
||||
allowBuilds:
|
||||
core-js: false
|
||||
dtrace-provider: false
|
||||
esbuild: true
|
||||
spawn-sync: false
|
||||
|
||||
Reference in New Issue
Block a user