Skip to content

Commit

Permalink
chore: 升级vitev5 版本,规定node版本>=18.0.0pnpm版本>=8.6.10 (#738)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxian521 authored Nov 10, 2023
1 parent 6e195c8 commit 10e68d6
Show file tree
Hide file tree
Showing 18 changed files with 2,253 additions and 2,301 deletions.
10 changes: 5 additions & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ dist
*.d.ts
/src/assets
package.json
.eslintrc.js
.eslintrc.cjs
.prettierrc.js
commitlint.config.js
postcss.config.js
tailwind.config.js
stylelint.config.js
commitlint.config.cjs
postcss.config.cjs
tailwind.config.ts
stylelint.config.cjs
src/components/ReSplitPane/iconfont
src/components/ReFlowChart/src/assets/iconfont
9 changes: 6 additions & 3 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
module.exports = {
// @ts-check
const { defineConfig } = require("eslint-define-config");

module.exports = defineConfig({
root: true,
env: {
node: true
Expand Down Expand Up @@ -42,7 +45,7 @@ module.exports = {
parser: "vue-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
ecmaVersion: 2020,
ecmaVersion: "latest",
sourceType: "module",
jsxPragma: "React",
ecmaFeatures: {
Expand Down Expand Up @@ -117,4 +120,4 @@ module.exports = {
}
]
}
}
});
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dist-ssr
*.local
.eslintcache
report.html
vite.config.*.timestamp*

yarn.lock
npm-debug.log*
Expand Down
2 changes: 1 addition & 1 deletion .lintstagedrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"prettier --cache --ignore-unknown --write",
"eslint --cache --fix"
],
"{!(package)*.json,*.code-snippets,.!(browserslist)*rc}": [
"{!(package)*.json,*.code-snippets,.!({browserslist,nvm})*rc}": [
"prettier --cache --write--parser json"
],
"package.json": ["prettier --cache --write"],
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.9.0
5 changes: 4 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
module.exports = {
// @ts-check

/** @type {import("prettier").Config} */
export default {
bracketSpacing: true,
singleQuote: false,
arrowParens: "avoid",
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM node:16-alpine as build-stage
FROM node:18-alpine as build-stage

WORKDIR /app
RUN corepack enable
RUN corepack prepare pnpm@7.32.1 --activate
RUN corepack prepare pnpm@8.6.10 --activate

RUN npm config set registry https://registry.npmmirror.com

Expand Down
6 changes: 3 additions & 3 deletions README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ After operating the above two commands, open `http://localhost:8080` in the brow
Of course, you can also operate the `docker` project through the [Docker Desktop](https://www.docker.com/products/docker-desktop/) visual interface, as shown below

<p align="center">
<img alt="docker" width="100%" src="https://yiming_chang.gitee.io/pure-admin-doc/img/docker/1.jpg">
<img alt="docker" width="100%" src="https://xiaoxian521.github.io/hyperlink/img/docker-desktop.jpg">
</p>

## Change Log
Expand Down Expand Up @@ -170,10 +170,10 @@ In principle, no fees and copyrights are charged, and it is commercially availab

Many thanks to the kind individuals who leave a star. Your support is much appreciated :heart:

[![Stargazers for vue-pure-admin](https://reporoster.com/stars/pure-admin/vue-pure-admin)](https://github.com/pure-admin/vue-pure-admin/stargazers)
[![Stargazers repo roster for @pure-admin/vue-pure-admin](https://bytecrank.com/nastyox/reporoster/php/stargazersSVG.php?user=pure-admin&repo=vue-pure-admin)](https://github.com/pure-admin/vue-pure-admin/stargazers)

## `Fork`

It's so cool that you study hard :heart:

[![Forkers repo roster for vue-pure-admin](https://reporoster.com/forks/pure-admin/vue-pure-admin)](https://github.com/pure-admin/vue-pure-admin/network/members)
[![Forkers repo roster for @pure-admin/vue-pure-admin](https://bytecrank.com/nastyox/reporoster/php/forkersSVG.php?user=pure-admin&repo=vue-pure-admin)](https://github.com/pure-admin/vue-pure-admin/network/members)
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ docker run -dp 8080:80 --name pure-admin vue-pure-admin
当然也可以通过 [Docker Desktop](https://www.docker.com/products/docker-desktop/) 可视化界面去操作 `docker` 项目,如下图

<p align="center">
<img alt="docker" width="100%" src="https://yiming_chang.gitee.io/pure-admin-doc/img/docker/1.jpg">
<img alt="docker" width="100%" src="https://xiaoxian521.github.io/hyperlink/img/docker-desktop.jpg">
</p>

## 更新日志
Expand Down Expand Up @@ -170,10 +170,10 @@ docker run -dp 8080:80 --name pure-admin vue-pure-admin

非常感谢留下星星的好心人,感谢您的支持 :heart:

[![Stargazers for vue-pure-admin](https://reporoster.com/stars/pure-admin/vue-pure-admin)](https://github.com/pure-admin/vue-pure-admin/stargazers)
[![Stargazers repo roster for @pure-admin/vue-pure-admin](https://bytecrank.com/nastyox/reporoster/php/stargazersSVG.php?user=pure-admin&repo=vue-pure-admin)](https://github.com/pure-admin/vue-pure-admin/stargazers)

## `Fork`

瞧,那些 `小哥哥``小姐姐` 认真 `学习` 的样子真滴是 `哎呦不错哦` :heart:

[![Forkers repo roster for vue-pure-admin](https://reporoster.com/forks/pure-admin/vue-pure-admin)](https://github.com/pure-admin/vue-pure-admin/network/members)
[![Forkers repo roster for @pure-admin/vue-pure-admin](https://bytecrank.com/nastyox/reporoster/php/forkersSVG.php?user=pure-admin&repo=vue-pure-admin)](https://github.com/pure-admin/vue-pure-admin/network/members)
File renamed without changes.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
114 changes: 60 additions & 54 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
"name": "vue-pure-admin",
"version": "4.5.0",
"private": true,
"type": "module",
"scripts": {
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
"serve": "pnpm dev",
"build": "rimraf dist && NODE_OPTIONS=--max-old-space-size=8192 vite build && generate-version-file",
"build:staging": "rimraf dist && vite build --mode staging",
"report": "rimraf dist && vite build",
"preview": "vite preview",
"preview:build": "pnpm build && vite preview",
"typecheck": "tsc --noEmit && vue-tsc --noEmit --skipLibCheck",
"svgo": "svgo -f src/assets/svg -o src/assets/svg",
"cloc": "NODE_OPTIONS=--max-old-space-size=4096 cloc . --exclude-dir=node_modules --exclude-lang=YAML",
"clean:cache": "rimraf .eslintcache && rimraf node_modules && pnpm install",
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock,build}/**/*.{vue,js,ts,tsx}\" --fix",
"lint:prettier": "prettier --write \"src/**/*.{js,ts,json,tsx,css,scss,vue,html,md}\"",
"lint:stylelint": "stylelint --cache --fix \"**/*.{html,vue,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
"lint": "pnpm lint:eslint && pnpm lint:prettier && pnpm lint:stylelint",
"prepare": "husky install",
"preinstall": "npx only-allow pnpm"
},
"keywords": [
"vue-pure-admin",
"element-plus",
Expand All @@ -13,38 +33,19 @@
"vite"
],
"homepage": "https://github.com/pure-admin/vue-pure-admin",
"bugs": {
"url": "https://github.com/pure-admin/vue-pure-admin/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/pure-admin/vue-pure-admin.git"
},
"bugs": {
"url": "https://github.com/pure-admin/vue-pure-admin/issues"
},
"license": "MIT",
"author": {
"name": "xiaoxian521",
"email": "[email protected]",
"url": "https://github.com/xiaoxian521"
},
"scripts": {
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
"serve": "pnpm dev",
"build": "rimraf dist && NODE_OPTIONS=--max-old-space-size=8192 vite build && generate-version-file",
"build:staging": "rimraf dist && vite build --mode staging",
"report": "rimraf dist && vite build",
"preview": "vite preview",
"preview:build": "pnpm build && vite preview",
"typecheck": "tsc --noEmit && vue-tsc --noEmit --skipLibCheck",
"svgo": "svgo -f src/assets/svg -o src/assets/svg",
"cloc": "NODE_OPTIONS=--max-old-space-size=4096 cloc . --exclude-dir=node_modules --exclude-lang=YAML",
"clean:cache": "rimraf .eslintcache && rimraf node_modules && pnpm install",
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock,build}/**/*.{vue,js,ts,tsx}\" --fix",
"lint:prettier": "prettier --write \"src/**/*.{js,ts,json,tsx,css,scss,vue,html,md}\"",
"lint:stylelint": "stylelint --cache --fix \"**/*.{html,vue,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
"lint": "pnpm lint:eslint && pnpm lint:prettier && pnpm lint:stylelint",
"prepare": "husky install",
"preinstall": "npx only-allow pnpm"
},
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@howdyjs/mouse-menu": "2.0.9",
Expand All @@ -53,19 +54,19 @@
"@pureadmin/descriptions": "^1.2.0",
"@pureadmin/table": "^2.3.4",
"@pureadmin/utils": "^1.9.10",
"@vueuse/core": "^10.5.0",
"@vueuse/core": "^10.6.0",
"@vueuse/motion": "^2.0.0",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.12",
"@zxcvbn-ts/core": "^3.0.4",
"animate.css": "^4.1.1",
"axios": "^1.6.0",
"axios": "^1.6.1",
"china-area-data": "^5.0.1",
"cropperjs": "^1.6.1",
"dayjs": "^1.11.10",
"echarts": "^5.4.3",
"el-table-infinite-scroll": "^3.0.3",
"element-plus": "^2.4.1",
"element-plus": "^2.4.2",
"intro.js": "^7.2.0",
"js-cookie": "^3.0.5",
"jsbarcode": "^3.11.5",
Expand All @@ -81,56 +82,57 @@
"qs": "^6.11.2",
"responsive-storage": "^2.2.0",
"sortablejs": "^1.15.0",
"swiper": "^11.0.3",
"swiper": "^11.0.4",
"typeit": "^8.7.1",
"v-contextmenu": "3.0.0",
"v3-infinite-loading": "^1.3.1",
"version-rocket": "^1.7.0",
"vue": "^3.3.7",
"vue-i18n": "^9.6.2",
"version-rocket": "^1.7.1",
"vue": "^3.3.8",
"vue-i18n": "^9.6.5",
"vue-json-pretty": "^2.2.4",
"vue-pdf-embed": "^1.2.1",
"vue-router": "^4.2.5",
"vue-tippy": "^6.3.1",
"vue-types": "^5.1.1",
"vue-virtual-scroller": "2.0.0-beta.8",
"vue-waterfall-plugin-next": "^2.2.4",
"vue-waterfall-plugin-next": "^2.2.6",
"vue3-danmaku": "^1.6.0",
"vuedraggable": "^4.1.0",
"wavesurfer.js": "^7.4.2",
"wavesurfer.js": "^7.4.5",
"xgplayer": "^3.0.9",
"xlsx": "^0.18.5"
},
"devDependencies": {
"@commitlint/cli": "^17.7.2",
"@commitlint/config-conventional": "^17.7.0",
"@commitlint/cli": "^18.2.0",
"@commitlint/config-conventional": "^18.1.0",
"@faker-js/faker": "^8.2.0",
"@iconify-icons/ep": "^1.2.12",
"@iconify-icons/ri": "^1.2.10",
"@iconify/vue": "^4.1.1",
"@intlify/unplugin-vue-i18n": "^1.4.0",
"@intlify/unplugin-vue-i18n": "^1.5.0",
"@pureadmin/theme": "^3.2.0",
"@types/intro.js": "^5.1.2",
"@types/js-cookie": "^3.0.4",
"@types/node": "^20.8.2",
"@types/intro.js": "^5.1.4",
"@types/js-cookie": "^3.0.6",
"@types/node": "^20.9.0",
"@types/nprogress": "0.2.0",
"@types/qrcode": "^1.5.2",
"@types/qs": "^6.9.8",
"@types/sortablejs": "^1.15.3",
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"@vitejs/plugin-vue": "^4.4.0",
"@types/qrcode": "^1.5.5",
"@types/qs": "^6.9.10",
"@types/sortablejs": "^1.15.5",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"@vitejs/plugin-vue": "^4.4.1",
"@vitejs/plugin-vue-jsx": "^3.0.2",
"@vue/eslint-config-prettier": "^8.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"autoprefixer": "^10.4.16",
"cloc": "^2.11.0",
"cssnano": "^6.0.1",
"eslint": "^8.50.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint": "^8.53.0",
"eslint-define-config": "^1.24.1",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-vue": "^9.18.1",
"husky": "^8.0.3",
"lint-staged": "^14.0.1",
"lint-staged": "^15.0.2",
"picocolors": "^1.0.0",
"postcss": "^8.4.31",
"postcss-html": "^1.5.0",
Expand All @@ -139,24 +141,23 @@
"prettier": "^3.0.3",
"rimraf": "^5.0.5",
"rollup-plugin-visualizer": "^5.9.2",
"sass": "^1.69.0",
"sass": "^1.69.5",
"sass-loader": "^13.3.2",
"stylelint": "^15.10.3",
"stylelint": "^15.11.0",
"stylelint-config-html": "^1.1.0",
"stylelint-config-recess-order": "^4.3.0",
"stylelint-config-recommended": "^13.0.0",
"stylelint-config-recommended-scss": "^13.0.0",
"stylelint-config-recommended-scss": "^13.1.0",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-config-standard-scss": "^11.0.0",
"stylelint-config-standard-scss": "^11.1.0",
"stylelint-order": "^6.0.3",
"stylelint-prettier": "^4.0.2",
"stylelint-scss": "^5.2.1",
"svgo": "^3.0.2",
"stylelint-scss": "^5.3.1",
"svgo": "^3.0.3",
"tailwindcss": "^3.3.5",
"terser": "^5.24.0",
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vite": "5.0.0-beta.17",
"vite-plugin-cdn-import": "^0.3.5",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-fake-server": "^2.0.0",
Expand All @@ -165,6 +166,11 @@
"vue-eslint-parser": "^9.3.2",
"vue-tsc": "^1.8.22"
},
"engines": {
"node": "^18.0.0 || >=20.0.0",
"pnpm": ">=8.6.10"
},
"packageManager": "[email protected]",
"pnpm": {
"peerDependencyRules": {
"ignoreMissing": [
Expand Down
Loading

2 comments on commit 10e68d6

@xiaoxian521
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

推荐使用node V18.18.2node V20 LTSnode V21以及pnpm V8.6.10版本或pnpm最新版来运行本平台(当然这些版本不是固定的,可以随着官方推荐的长期维护版本自行安装)

点击查看更多细节

@xiaoxian521
Copy link
Member Author

@xiaoxian521 xiaoxian521 commented on 10e68d6 Nov 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

通过在 discord vite频道 询问得知 "vite": "5.0.0-beta.17" 类似于RC准正式版本,基本不会有break change
平台才决定合并该功能到主分支

从性能来讲,这次vite5最大的两个亮点:

  1. 通过 server.warmup.clientFiles 配置可使页面首次加载变快数倍
  2. hmr变快数倍

Please sign in to comment.