Commit 1262e13067f7267831527998063132f7f9f004a2

Authored by xingyu
Committed by GitHub
1 parent c659c14c

升级最新依赖 并修复eslint报错 (#2896)

* chore: update deps

* fix: import.meta.globEager 已过期

* docs: fix doc bugs

* fix: eslint

* fix: lint:prettier

* fix: stylelint

* chore: update deps

* fix: eslint

* refactor: accountdetail setup

* fix: 'Nullable' is not defined

* feat: remove vite-plugin-vue-setup-extend

* chore: remove unplugin-vue-define-options

* fix(component): pageWrapper

use setup

closed #2898

* refactor: PageFooter use setup

---------

Co-authored-by: jinmao88 <50581550+jinmao88@users.noreply.github.com>

Too many changes to show.

To preserve performance only 13 of 94 files are displayed.

.prettierignore
... ... @@ -8,3 +8,5 @@ node_modules
8 8  
9 9 public
10 10 .npmrc
  11 +
  12 +*-lock.yaml
... ...
README.md
... ... @@ -9,7 +9,7 @@
9 9  
10 10 ## Introduction
11 11  
12   -Vue Vben Admin is a free and open source middle and back-end template. Using the latest `vue3`, `vite2`, `TypeScript` and other mainstream technology development, the out-of-the-box middle and back-end front-end solutions can also be used for learning reference.
  12 +Vue Vben Admin is a free and open source middle and back-end template. Using the latest `vue3`, `vite4`, `TypeScript` and other mainstream technology development, the out-of-the-box middle and back-end front-end solutions can also be used for learning reference.
13 13  
14 14 ## Feature
15 15  
... ... @@ -54,7 +54,7 @@ Open the project in Gitpod (free online dev environment for GitHub) and start co
54 54 - [TypeScript](https://www.typescriptlang.org/) - Familiar with the basic syntax of `TypeScript`
55 55 - [Es6+](http://es6.ruanyifeng.com/) - Familiar with es6 basic syntax
56 56 - [Vue-Router-Next](https://next.router.vuejs.org/) - Familiar with the basic use of vue-router
57   -- [Ant-Design-Vue](https://2x.antdv.com/docs/vue/introduce-cn/) - ui basic use
  57 +- [Ant-Design-Vue](https://antdv.com/docs/vue/introduce-cn/) - ui basic use
58 58 - [Mock.js](https://github.com/nuysoft/Mock) - mockjs basic syntax
59 59  
60 60 ## Install and use
... ...
README.zh-CN.md
... ... @@ -9,7 +9,7 @@
9 9  
10 10 ## 简介
11 11  
12   -Vue Vben Admin 是一个免费开源的中后台模版。使用了最新的`vue3`,`vite2`,`TypeScript`等主流技术开发,开箱即用的中后台前端解决方案,也可用于学习参考。
  12 +Vue Vben Admin 是一个免费开源的中后台模版。使用了最新的`vue3`,`vite4`,`TypeScript`等主流技术开发,开箱即用的中后台前端解决方案,也可用于学习参考。
13 13  
14 14 ## 特性
15 15  
... ... @@ -54,7 +54,7 @@ Vue Vben Admin 是一个免费开源的中后台模版。使用了最新的`vue3
54 54 - [TypeScript](https://www.typescriptlang.org/) - 熟悉`TypeScript`基本语法
55 55 - [Es6+](http://es6.ruanyifeng.com/) - 熟悉 es6 基本语法
56 56 - [Vue-Router-Next](https://next.router.vuejs.org/) - 熟悉 vue-router 基本使用
57   -- [Ant-Design-Vue](https://2x.antdv.com/docs/vue/introduce-cn/) - ui 基本使用
  57 +- [Ant-Design-Vue](https://antdv.com/docs/vue/introduce-cn/) - ui 基本使用
58 58 - [Mock.js](https://github.com/nuysoft/Mock) - mockjs 基本语法
59 59  
60 60 ## 安装使用
... ...
apps/test-server/package.json
... ... @@ -11,9 +11,9 @@
11 11 },
12 12 "dependencies": {
13 13 "fs-extra": "^11.1.1",
14   - "koa": "^2.14.1",
  14 + "koa": "^2.14.2",
15 15 "koa-body": "^6.0.1",
16   - "koa-bodyparser": "^4.4.0",
  16 + "koa-bodyparser": "^4.4.1",
17 17 "koa-route": "^3.2.0",
18 18 "koa-router": "^12.0.0",
19 19 "koa-static": "^5.0.0",
... ... @@ -24,13 +24,13 @@
24 24 "@types/koa": "^2.13.6",
25 25 "@types/koa-bodyparser": "^5.0.2",
26 26 "@types/koa-router": "^7.4.4",
27   - "@types/node": "^18.15.11",
  27 + "@types/node": "^20.3.3",
28 28 "nodemon": "^2.0.22",
29 29 "pm2": "^5.3.0",
30   - "rimraf": "^4.4.1",
  30 + "rimraf": "^5.0.1",
31 31 "ts-node": "^10.9.1",
32 32 "tsconfig-paths": "^4.2.0",
33   - "tsup": "^6.7.0",
34   - "typescript": "^5.0.3"
  33 + "tsup": "^7.1.0",
  34 + "typescript": "^5.1.6"
35 35 }
36 36 }
... ...
internal/eslint-config/package.json
... ... @@ -36,14 +36,14 @@
36 36 "stub": "pnpm unbuild --stub"
37 37 },
38 38 "devDependencies": {
39   - "@typescript-eslint/eslint-plugin": "^5.57.1",
40   - "@typescript-eslint/parser": "^5.57.1",
41   - "eslint": "^8.37.0",
  39 + "@typescript-eslint/eslint-plugin": "^5.60.1",
  40 + "@typescript-eslint/parser": "^5.60.1",
  41 + "eslint": "^8.44.0",
42 42 "eslint-config-prettier": "^8.8.0",
43 43 "eslint-plugin-import": "^2.27.5",
44 44 "eslint-plugin-prettier": "^4.2.1",
45 45 "eslint-plugin-simple-import-sort": "^10.0.0",
46   - "eslint-plugin-vue": "^9.10.0",
47   - "vue-eslint-parser": "^9.1.1"
  46 + "eslint-plugin-vue": "^9.15.1",
  47 + "vue-eslint-parser": "^9.3.1"
48 48 }
49 49 }
... ...
internal/stylelint-config/package.json
... ... @@ -31,18 +31,18 @@
31 31 "stub": "pnpm unbuild --stub"
32 32 },
33 33 "devDependencies": {
34   - "postcss": "^8.4.21",
  34 + "postcss": "^8.4.24",
35 35 "postcss-html": "^1.5.0",
36 36 "postcss-less": "^6.0.0",
37 37 "postcss-scss": "^4.0.6",
38   - "prettier": "^2.8.7",
39   - "stylelint": "^15.4.0",
  38 + "prettier": "^2.8.8",
  39 + "stylelint": "^15.9.0",
40 40 "stylelint-config-property-sort-order-smacss": "^9.1.0",
41   - "stylelint-config-recommended": "^11.0.0",
42   - "stylelint-config-recommended-scss": "^9.0.1",
  41 + "stylelint-config-recommended": "^12.0.0",
  42 + "stylelint-config-recommended-scss": "^12.0.0",
43 43 "stylelint-config-recommended-vue": "^1.4.0",
44   - "stylelint-config-standard": "^32.0.0",
45   - "stylelint-config-standard-scss": "^7.0.1",
  44 + "stylelint-config-standard": "^33.0.0",
  45 + "stylelint-config-standard-scss": "^10.0.0",
46 46 "stylelint-order": "^6.0.3",
47 47 "stylelint-prettier": "^3.0.0"
48 48 }
... ...
internal/ts-config/package.json
... ... @@ -19,8 +19,7 @@
19 19 "node-server.json"
20 20 ],
21 21 "dependencies": {
22   - "@types/node": "^18.15.11",
23   - "unplugin-vue-define-options": "^1.3.3",
24   - "vite": "^4.3.0-beta.2"
  22 + "@types/node": "^20.3.3",
  23 + "vite": "^4.3.9"
25 24 }
26 25 }
... ...
internal/ts-config/vue-app.json
... ... @@ -6,6 +6,5 @@
6 6 "jsx": "preserve",
7 7 "lib": ["ESNext", "DOM"],
8 8 "noImplicitAny": false
9   -
10 9 }
11 10 }
... ...
internal/vite-config/package.json
... ... @@ -32,25 +32,24 @@
32 32 },
33 33 "dependencies": {
34 34 "@ant-design/colors": "^7.0.0",
35   - "vite": "^4.3.0-beta.2"
  35 + "vite": "^4.3.9"
36 36 },
37 37 "devDependencies": {
38 38 "@types/fs-extra": "^11.0.1",
39   - "@vitejs/plugin-vue": "^4.1.0",
  39 + "@vitejs/plugin-vue": "^4.2.3",
40 40 "@vitejs/plugin-vue-jsx": "^3.0.1",
41   - "ant-design-vue": "^3.2.17",
42   - "dayjs": "^1.11.7",
43   - "dotenv": "^16.0.3",
  41 + "ant-design-vue": "^3.2.20",
  42 + "dayjs": "^1.11.9",
  43 + "dotenv": "^16.3.1",
44 44 "fs-extra": "^11.1.1",
45 45 "less": "^4.1.3",
46 46 "picocolors": "^1.0.0",
47   - "pkg-types": "^1.0.2",
48   - "rollup-plugin-visualizer": "^5.9.0",
49   - "sass": "^1.60.0",
50   - "unocss": "^0.50.6",
51   - "unplugin-vue-define-options": "^1.3.3",
  47 + "pkg-types": "^1.0.3",
  48 + "rollup-plugin-visualizer": "^5.9.2",
  49 + "sass": "^1.63.6",
  50 + "unocss": "^0.53.4",
52 51 "vite-plugin-compression": "^0.5.1",
53   - "vite-plugin-dts": "^2.2.0",
  52 + "vite-plugin-dts": "^3.0.2",
54 53 "vite-plugin-html": "^3.2.0",
55 54 "vite-plugin-mock": "^2.9.6",
56 55 "vite-plugin-purge-icons": "^0.9.2",
... ...
internal/vite-config/src/plugins/index.ts
1 1 import vue from '@vitejs/plugin-vue';
2 2 import vueJsx from '@vitejs/plugin-vue-jsx';
3   -// @ts-ignore: type unless
4   -import DefineOptions from 'unplugin-vue-define-options/vite';
5 3 import { type PluginOption } from 'vite';
6 4 import purgeIcons from 'vite-plugin-purge-icons';
7 5 import vueSetupExtend from 'vite-plugin-vue-setup-extend';
... ... @@ -22,12 +20,7 @@ interface Options {
22 20 }
23 21  
24 22 async function createPlugins({ isBuild, root, enableMock, compress, enableAnalyze }: Options) {
25   - const vitePlugins: (PluginOption | PluginOption[])[] = [
26   - vue(),
27   - vueJsx(),
28   - vueSetupExtend(),
29   - DefineOptions(),
30   - ];
  23 + const vitePlugins: (PluginOption | PluginOption[])[] = [vue(), vueJsx()];
31 24  
32 25 const appConfigPlugin = await createAppConfigPlugin({ root, isBuild });
33 26 vitePlugins.push(appConfigPlugin);
... ...
mock/_createProductionServer.ts
... ... @@ -16,14 +16,14 @@ import { createProdMockServer } from &#39;vite-plugin-mock/es/createProdMockServer&#39;;
16 16 // return pre;
17 17 // }, [] as any[]);
18 18  
19   -const modules = import.meta.globEager('./**/*.ts');
  19 +const modules = import.meta.glob('./**/*.ts', { eager: true });
20 20  
21 21 const mockModules: any[] = [];
22 22 Object.keys(modules).forEach((key) => {
23 23 if (key.includes('/_')) {
24 24 return;
25 25 }
26   - mockModules.push(...modules[key].default);
  26 + mockModules.push(...(modules as Recordable)[key].default);
27 27 });
28 28  
29 29 /**
... ...
package.json
... ... @@ -68,20 +68,20 @@
68 68 },
69 69 "dependencies": {
70 70 "@ant-design/icons-vue": "^6.1.0",
71   - "@iconify/iconify": "^3.1.0",
72   - "@logicflow/core": "^1.2.1",
73   - "@logicflow/extension": "^1.2.1",
  71 + "@iconify/iconify": "^3.1.1",
  72 + "@logicflow/core": "^1.2.9",
  73 + "@logicflow/extension": "^1.2.9",
74 74 "@vben/hooks": "workspace:*",
75   - "@vue/shared": "^3.2.47",
76   - "@vueuse/core": "^9.13.0",
77   - "@vueuse/shared": "^9.13.0",
78   - "@zxcvbn-ts/core": "^2.2.1",
79   - "ant-design-vue": "^3.2.17",
80   - "axios": "^1.3.5",
  75 + "@vue/shared": "^3.3.4",
  76 + "@vueuse/core": "^10.2.1",
  77 + "@vueuse/shared": "^10.2.1",
  78 + "@zxcvbn-ts/core": "^3.0.2",
  79 + "ant-design-vue": "^3.2.20",
  80 + "axios": "^1.4.0",
81 81 "codemirror": "^5.65.12",
82 82 "cropperjs": "^1.5.13",
83 83 "crypto-js": "^4.1.1",
84   - "dayjs": "^1.11.7",
  84 + "dayjs": "^1.11.9",
85 85 "echarts": "^5.4.2",
86 86 "exceljs": "^4.3.0",
87 87 "intro.js": "^7.0.1",
... ... @@ -89,64 +89,64 @@
89 89 "mockjs": "^1.1.0",
90 90 "nprogress": "^0.2.0",
91 91 "path-to-regexp": "^6.2.1",
92   - "pinia": "2.0.33",
  92 + "pinia": "2.1.4",
93 93 "print-js": "^1.6.0",
94   - "qrcode": "^1.5.1",
95   - "qs": "^6.11.1",
  94 + "qrcode": "^1.5.3",
  95 + "qs": "^6.11.2",
96 96 "resize-observer-polyfill": "^1.5.1",
97 97 "showdown": "^2.1.0",
98 98 "sortablejs": "^1.15.0",
99 99 "tinymce": "^5.10.7",
100   - "vditor": "^3.9.1",
101   - "vue": "^3.2.47",
  100 + "vditor": "^3.9.4",
  101 + "vue": "^3.3.4",
102 102 "vue-i18n": "^9.2.2",
103 103 "vue-json-pretty": "^2.2.4",
104   - "vue-router": "^4.1.6",
105   - "vue-types": "^5.0.2",
  104 + "vue-router": "^4.2.2",
  105 + "vue-types": "^5.1.0",
106 106 "vuedraggable": "^4.1.0",
  107 +
107 108 "vxe-table": "^4.4.5",
  109 +
108 110 "vxe-table-plugin-export-xlsx": "^3.0.4",
109   - "xe-utils": "^3.5.7",
  111 + "xe-utils": "^3.5.11",
110 112 "xlsx": "^0.18.5"
111 113 },
112 114 "devDependencies": {
113   - "@commitlint/cli": "^17.5.1",
114   - "@commitlint/config-conventional": "^17.4.4",
115   - "@iconify/json": "^2.2.46",
  115 + "@commitlint/cli": "^17.6.6",
  116 + "@commitlint/config-conventional": "^17.6.6",
  117 + "@iconify/json": "^2.2.85",
116 118 "@purge-icons/generated": "^0.9.0",
117   - "@types/codemirror": "^5.60.7",
  119 + "@types/codemirror": "^5.60.8",
118 120 "@types/crypto-js": "^4.1.1",
119 121 "@types/intro.js": "^5.1.1",
120 122 "@types/lodash-es": "^4.17.7",
121 123 "@types/mockjs": "^1.0.7",
122 124 "@types/nprogress": "^0.2.0",
123   - "@types/qrcode": "^1.5.0",
  125 + "@types/qrcode": "^1.5.1",
124 126 "@types/qs": "^6.9.7",
125   - "@types/showdown": "^2.0.0",
  127 + "@types/showdown": "^2.0.1",
126 128 "@types/sortablejs": "^1.15.1",
127 129 "@vben/eslint-config": "workspace:*",
128 130 "@vben/stylelint-config": "workspace:*",
129 131 "@vben/ts-config": "workspace:*",
130 132 "@vben/types": "workspace:*",
131 133 "@vben/vite-config": "workspace:*",
132   - "@vue/compiler-sfc": "^3.2.47",
133   - "@vue/test-utils": "^2.3.2",
  134 + "@vue/compiler-sfc": "^3.3.4",
  135 + "@vue/test-utils": "^2.4.0",
134 136 "cross-env": "^7.0.3",
135 137 "cz-git": "^1.6.1",
136 138 "czg": "^1.6.1",
137 139 "husky": "^8.0.3",
138   - "lint-staged": "13.2.0",
139   - "prettier": "^2.8.7",
  140 + "lint-staged": "13.2.3",
  141 + "prettier": "^2.8.8",
140 142 "prettier-plugin-packagejson": "^2.4.3",
141   - "rimraf": "^4.4.1",
142   - "turbo": "^1.8.8",
143   - "typescript": "^5.0.3",
144   - "unbuild": "^1.2.0",
145   - "unplugin-vue-define-options": "^1.3.3",
146   - "vite": "^4.3.0-beta.2",
  143 + "rimraf": "^5.0.1",
  144 + "turbo": "^1.10.7",
  145 + "typescript": "^5.1.6",
  146 + "unbuild": "^1.2.1",
  147 + "vite": "^4.3.9",
147 148 "vite-plugin-mock": "^2.9.6",
148   - "vite-plugin-vue-setup-extend": "^0.4.0",
149   - "vue-tsc": "^1.2.0"
  149 + "vue-tsc": "^1.8.3"
150 150 },
151 151 "packageManager": "pnpm@8.1.0",
152 152 "engines": {
... ...
packages/hooks/package.json
... ... @@ -29,8 +29,8 @@
29 29 "lint": "pnpm eslint ."
30 30 },
31 31 "dependencies": {
32   - "@vueuse/core": "^9.13.0",
33   - "vue": "^3.2.47"
  32 + "@vueuse/core": "^10.2.1",
  33 + "vue": "^3.3.4"
34 34 },
35 35 "devDependencies": {
36 36 "@vben/types": "workspace:*"
... ...