chore(project): 更改包管理为 pnpm 并更新依赖项 (vite 8...)
部署开发环境 / deploy-dev (push) Successful in 2m33s

- 添加 .gitignore 文件以忽略日志、构建产物和编辑器文件
- 在开发环境中设置页面标题为"抖音数据去重 - dev"
- 移除 package.json 中的 engines 字段后重新添加并更新依赖版本
- 升级 Vue、Element Plus、TypeScript 等核心依赖到最新版本
- 更新 README.md 中的项目名称和推荐浏览器设置说明
- 修改 README.md 中的命令示例从 npm 到 pnpm
- 在 tsconfig.app.json 中启用 noUncheckedIndexedAccess 配置
- 将 tsconfig.node.json 继承的配置从 node22 更新为 node24
- 调整 tsconfig.node.json 中的模块解析和类型配置
This commit is contained in:
2026-04-24 13:08:31 +08:00
parent 2786b011a8
commit f774419140
8 changed files with 2449 additions and 3842 deletions
+12 -3
View File
@@ -14,9 +14,6 @@ dist-ssr
coverage coverage
*.local *.local
/cypress/videos/
/cypress/screenshots/
# Editor directories and files # Editor directories and files
.vscode/* .vscode/*
!.vscode/extensions.json !.vscode/extensions.json
@@ -28,3 +25,15 @@ coverage
*.sw? *.sw?
*.tsbuildinfo *.tsbuildinfo
.eslintcache
# Cypress
/cypress/videos/
/cypress/screenshots/
# Vitest
__screenshots__/
# Vite
*.timestamp-*-*.mjs
+17 -5
View File
@@ -4,11 +4,23 @@ This template should help get you started developing with Vue 3 in Vite.
## Recommended IDE Setup ## Recommended IDE Setup
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur). [VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (
and disable Vetur).
## Recommended Browser Setup
- Chromium-based browsers (Chrome, Edge, Brave, etc.):
- [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
- [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
- Firefox:
- [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
- [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/)
## Type Support for `.vue` Imports in TS ## Type Support for `.vue` Imports in TS
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types. TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for
type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the
TypeScript language service aware of `.vue` types.
## Customize configuration ## Customize configuration
@@ -17,17 +29,17 @@ See [Vite Configuration Reference](https://vite.dev/config/).
## Project Setup ## Project Setup
```sh ```sh
npm install pnpm install
``` ```
### Compile and Hot-Reload for Development ### Compile and Hot-Reload for Development
```sh ```sh
npm run dev pnpm dev
``` ```
### Type-Check, Compile and Minify for Production ### Type-Check, Compile and Minify for Production
```sh ```sh
npm run build pnpm build
``` ```
-3804
View File
File diff suppressed because it is too large Load Diff
+18 -17
View File
@@ -3,9 +3,6 @@
"version": "0.0.0", "version": "0.0.0",
"private": true, "private": true,
"type": "module", "type": "module",
"engines": {
"node": "^20.19.0 || >=22.12.0"
},
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "run-p type-check \"build-only {@}\" --", "build": "run-p type-check \"build-only {@}\" --",
@@ -14,22 +11,26 @@
"type-check": "vue-tsc --build" "type-check": "vue-tsc --build"
}, },
"dependencies": { "dependencies": {
"axios": "^1.11.0", "@element-plus/icons-vue": "^2.3.2",
"element-plus": "^2.11.1", "axios": "^1.15.2",
"pinia": "^3.0.3", "element-plus": "^2.13.7",
"pinia-plugin-persistedstate": "^4.5.0", "pinia": "^3.0.4",
"vue": "^3.5.18", "pinia-plugin-persistedstate": "^4.7.1",
"vue-router": "^4.5.1" "vue": "^3.5.32",
"vue-router": "^5.0.4"
}, },
"devDependencies": { "devDependencies": {
"@tsconfig/node22": "^22.0.2", "@tsconfig/node24": "^24.0.4",
"@types/node": "^22.16.5", "@types/node": "^24.12.2",
"@vitejs/plugin-vue": "^6.0.1", "@vitejs/plugin-vue": "^6.0.6",
"@vue/tsconfig": "^0.7.0", "@vue/tsconfig": "^0.9.1",
"npm-run-all2": "^8.0.4", "npm-run-all2": "^8.0.4",
"typescript": "~5.8.0", "typescript": "~6.0.0",
"vite": "^7.0.6", "vite": "^8.0.8",
"vite-plugin-vue-devtools": "^8.0.0", "vite-plugin-vue-devtools": "^8.1.1",
"vue-tsc": "^3.0.4" "vue-tsc": "^3.2.6"
},
"engines": {
"node": "^20.19.0 || >=22.12.0"
} }
} }
+2366
View File
File diff suppressed because it is too large Load Diff
+4
View File
@@ -9,6 +9,10 @@ import 'element-plus/dist/index.css'
const app = createApp(App) const app = createApp(App)
if (import.meta.env.DEV) {
document.title = '抖音数据去重 - dev'
}
app.use(createPinia().use(persistedState)) app.use(createPinia().use(persistedState))
app.use(router) app.use(router)
app.use(ElementPlus) app.use(ElementPlus)
+18 -6
View File
@@ -1,12 +1,24 @@
{ {
"extends": "@vue/tsconfig/tsconfig.dom.json", "extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"], "include": [
"exclude": ["src/**/__tests__/*"], "env.d.ts",
"src/**/*",
"src/**/*.vue"
],
"exclude": [
"src/**/__tests__/*"
],
"compilerOptions": { "compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", // Extra safety for array and object lookups, but may have false positives.
"noUncheckedIndexedAccess": true,
// Path mapping for cleaner imports.
"paths": { "paths": {
"@/*": ["./src/*"] "@/*": [
} "./src/*"
]
},
// `vue-tsc --build` produces a .tsbuildinfo file for incremental type-checking.
// Specified here to keep it out of the root directory.
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo"
} }
} }
+14 -7
View File
@@ -1,19 +1,26 @@
// TSConfig for modules that run in Node.js environment via either transpilation or type-stripping.
{ {
"extends": "@tsconfig/node22/tsconfig.json", "extends": "@tsconfig/node24/tsconfig.json",
"include": [ "include": [
"vite.config.*", "vite.config.*",
"vitest.config.*", "vitest.config.*",
"cypress.config.*", "cypress.config.*",
"nightwatch.conf.*",
"playwright.config.*", "playwright.config.*",
"eslint.config.*" "eslint.config.*"
], ],
"compilerOptions": { "compilerOptions": {
// Most tools use transpilation instead of Node.js's native type-stripping.
// Bundler mode provides a smoother developer experience.
"module": "preserve",
"moduleResolution": "bundler",
// Include Node.js types and avoid accidentally including other `@types/*` packages.
"types": [
"node"
],
// Disable emitting output during `vue-tsc --build`, which is used for type-checking only.
"noEmit": true, "noEmit": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", // `vue-tsc --build` produces a .tsbuildinfo file for incremental type-checking.
// Specified here to keep it out of the root directory.
"module": "ESNext", "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo"
"moduleResolution": "Bundler",
"types": ["node"]
} }
} }