chore: 安全升级并完善 CI/测试

- 升级 js-yaml 修复生产依赖漏洞
- 新增 CI:lint/test/build
- 增加书签处理单测与可测性导出"- 生成器补充 config/user 缺失提示
- 增加 lint/format/check 脚本与 Prettier 配置
- 统一行尾策略并支持书签确定性输出"
This commit is contained in:
rbetree
2025-12-22 00:44:51 +08:00
parent 7a7bf361e3
commit 47e4369b09
11 changed files with 286 additions and 18 deletions

View File

@@ -9,7 +9,12 @@
"dev": "node src/generator.js && serve dist -l 5173",
"clean": "node ./scripts/clean.js",
"build": "npm run clean && npm run generate",
"import-bookmarks": "node src/bookmark-processor.js"
"import-bookmarks": "node src/bookmark-processor.js",
"test": "node --test test/*.js",
"lint": "node --check \"src/generator.js\" && node --check \"src/bookmark-processor.js\" && node --check \"src/script.js\"",
"format": "prettier --write \"src/**/*.js\" \"scripts/**/*.js\" \"test/**/*.js\" \".github/**/*.yml\" \"*.{md,json}\" \"config/**/*.md\" \"config/**/*.yml\"",
"format:check": "prettier --check \"src/**/*.js\" \"scripts/**/*.js\" \"test/**/*.js\" \".github/**/*.yml\" \"*.{md,json}\" \"config/**/*.md\" \"config/**/*.yml\"",
"check": "npm run lint && npm test && npm run build"
},
"keywords": [
"navigation",
@@ -19,7 +24,7 @@
"author": "Your Name",
"license": "AGPL-3.0-only",
"dependencies": {
"js-yaml": "^4.1.0",
"js-yaml": "^4.1.1",
"handlebars": "^4.7.8",
"ansi-regex": "^6.0.1",
"ansi-styles": "^6.2.1",
@@ -30,6 +35,7 @@
"mime-db": "^1.52.0"
},
"devDependencies": {
"prettier": "^3.4.2",
"serve": "^14.2.1"
}
}