fix: 优化依赖 (#220)

This commit is contained in:
qlin 2023-10-24 18:34:53 +08:00 committed by GitHub
parent 585235697a
commit 3e580dbed9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 3786 additions and 4831 deletions

View File

@ -46,18 +46,16 @@ export default defineRuntimeConfig({
}, },
// http 异常,和插件异常 // http 异常,和插件异常
errorHandler(error) { errorHandler(error) {
if (error.response) { // 处理业务异常,例如上述 transformData 抛出的异常
if (error.code) {
console.log(error.msg)
} else if (error.response) {
// 请求成功发出且服务器也响应了状态码,但状态代码超出了 2xx 的范围 // 请求成功发出且服务器也响应了状态码,但状态代码超出了 2xx 的范围
console.log(error.response.data); console.log(`服务异常:${error.response.status}`)
console.log(error.response.status);
console.log(error.response.headers);
} else if (error.msg) {
console.log(error.msg);
} else { } else {
// 发送请求时出了点问题 // 请求异常
console.log('Error', error.message); console.log(error.msg || error.message || `请求失败`)
} }
console.log(error.config);
}, },
// 支持其他 fetch 配置 // 支持其他 fetch 配置
...otherConfigs, ...otherConfigs,

View File

@ -30,7 +30,7 @@
], ],
"dependencies": { "dependencies": {
"chalk": "^5.0.1", "chalk": "^5.0.1",
"conventional-changelog-cli": "^2.2.2", "conventional-changelog-cli": "^4.1.0",
"enquirer": "^2.3.6", "enquirer": "^2.3.6",
"execa": "^6.1.0", "execa": "^6.1.0",
"minimist": "^1.2.6", "minimist": "^1.2.6",
@ -39,19 +39,17 @@
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^11.0.0", "@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0", "@commitlint/config-conventional": "^11.0.0",
"@vite-pwa/vitepress": "^0.0.5",
"@webank/eslint-config-webank": "1.2.7", "@webank/eslint-config-webank": "1.2.7",
"chokidar": "^3.5.2", "chokidar": "^3.5.3",
"commitizen": "^4.2.1", "commitizen": "^4.3.0",
"cz-conventional-changelog": "^3.3.0", "cz-conventional-changelog": "^3.3.0",
"deepmerge": "^4.2.2", "deepmerge": "^4.2.2",
"fs-extra": "^11.1.1", "fs-extra": "^11.1.1",
"husky": "^8.0.3", "husky": "^8.0.3",
"lint-staged": "^13.2.0", "lint-staged": "^13.2.0",
"typescript": "^5.0.4", "typescript": "^5.0.4",
"vite-plugin-pwa": "^0.14.7",
"vitepress": "1.0.0-alpha.73", "vitepress": "1.0.0-alpha.73",
"vue": "^3.2.47", "vue": "^3.3.4",
"yargs-parser": "^21.1.1" "yargs-parser": "^21.1.1"
}, },
"lint-staged": { "lint-staged": {

View File

@ -1,6 +1,7 @@
// fes.config.js 只负责管理 cli 相关的配置 // fes.config.js 只负责管理 cli 相关的配置
import { defineBuildConfig } from '@fesjs/fes'; import { defineBuildConfig } from '@fesjs/fes';
import pxtoviewport from '@ttou/postcss-px-to-viewport'; import postcsspxtoviewport8plugin from 'postcss-px-to-viewport-8-plugin';
export default defineBuildConfig({ export default defineBuildConfig({
define: { define: {
@ -15,7 +16,7 @@ export default defineBuildConfig({
ios: '10', ios: '10',
}, },
extraPostCSSPlugins: [ extraPostCSSPlugins: [
pxtoviewport({ postcsspxtoviewport8plugin({
unitToConvert: 'px', unitToConvert: 'px',
viewportWidth: 375, viewportWidth: 375,
unitPrecision: 5, unitPrecision: 5,

View File

@ -12,7 +12,7 @@
}, },
"devDependencies": { "devDependencies": {
"@webank/eslint-config-webank": "1.2.7", "@webank/eslint-config-webank": "1.2.7",
"@ttou/postcss-px-to-viewport": "^2.0.3" "postcss-px-to-viewport-8-plugin": "^1.2.3"
}, },
"dependencies": { "dependencies": {
"@fesjs/fes": "^3.0.0", "@fesjs/fes": "^3.0.0",

View File

@ -19,8 +19,8 @@
"dependencies": { "dependencies": {
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.21.3", "@babel/core": "^7.23.2",
"@babel/preset-env": "^7.20.2", "@babel/preset-env": "^7.23.2",
"@webank/eslint-config-webank": "1.2.7", "@webank/eslint-config-webank": "1.2.7",
"chalk": "^4.1.2", "chalk": "^4.1.2",
"chokidar": "^3.5.2", "chokidar": "^3.5.2",

View File

@ -26,20 +26,20 @@
"access": "public" "access": "public"
}, },
"dependencies": { "dependencies": {
"@babel/core": "^7.21.3", "@babel/core": "^7.23.2",
"@babel/plugin-proposal-do-expressions": "^7.18.6", "@babel/plugin-proposal-do-expressions": "^7.22.5",
"@babel/plugin-proposal-export-default-from": "^7.18.10", "@babel/plugin-proposal-export-default-from": "^7.22.17",
"@babel/plugin-proposal-function-bind": "^7.18.9", "@babel/plugin-proposal-function-bind": "^7.22.5",
"@babel/plugin-proposal-pipeline-operator": "^7.18.9", "@babel/plugin-proposal-pipeline-operator": "^7.22.15",
"@babel/plugin-transform-runtime": "^7.21.0", "@babel/plugin-transform-runtime": "^7.23.2",
"@babel/preset-env": "7.20.2", "@babel/preset-env": "^7.23.2",
"@babel/preset-typescript": "^7.21.0", "@babel/preset-typescript": "^7.23.2",
"@fesjs/utils": "^3.0.1", "@fesjs/utils": "^3.0.1",
"@vue/babel-plugin-jsx": "^1.1.1", "@vue/babel-plugin-jsx": "^1.1.1",
"ajv": "^8.12.0", "ajv": "^8.12.0",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.14",
"babel-loader": "^9.1.2", "babel-loader": "^9.1.2",
"cli-highlight": "^2.1.4", "cli-highlight": "^2.1.11",
"cliui": "^8.0.1", "cliui": "^8.0.1",
"connect-history-api-fallback": "^2.0.0", "connect-history-api-fallback": "^2.0.0",
"copy-webpack-plugin": "^11.0.0", "copy-webpack-plugin": "^11.0.0",

View File

@ -24,9 +24,9 @@
"access": "public" "access": "public"
}, },
"dependencies": { "dependencies": {
"@babel/core": "^7.21.3", "@babel/core": "^7.23.2",
"@babel/preset-env": "^7.20.2", "@babel/preset-env": "^7.23.2",
"@babel/register": "^7.21.0", "@babel/register": "^7.22.15",
"@fesjs/utils": "^3.0.1", "@fesjs/utils": "^3.0.1",
"commander": "^7.0.0", "commander": "^7.0.0",
"dotenv": "8.2.0", "dotenv": "8.2.0",

View File

@ -33,8 +33,8 @@
"@fesjs/fes": "^3.1.4" "@fesjs/fes": "^3.1.4"
}, },
"dependencies": { "dependencies": {
"@babel/core": "^7.21.3", "@babel/core": "^7.23.2",
"@babel/preset-env": "^7.15.0", "@babel/preset-env": "^7.23.2",
"@vue/babel-plugin-jsx": "^1.0.6", "@vue/babel-plugin-jsx": "^1.0.6",
"babel-jest": "^29.0.0", "babel-jest": "^29.0.0",
"jest": "^29.0.0", "jest": "^29.0.0",

View File

@ -32,7 +32,7 @@
"vue": "^3.2.47" "vue": "^3.2.47"
}, },
"dependencies": { "dependencies": {
"vite-plugin-windicss": "^1.8.3", "vite-plugin-windicss": "^1.9.1",
"windicss": "^3.5.1", "windicss": "^3.5.1",
"windicss-webpack-plugin": "^1.6.0" "windicss-webpack-plugin": "^1.6.0"
}, },

View File

@ -29,7 +29,7 @@
"@fesjs/compiler": "^3.0.1", "@fesjs/compiler": "^3.0.1",
"@fesjs/utils": "^3.0.1", "@fesjs/utils": "^3.0.1",
"@fesjs/runtime": "^3.0.0", "@fesjs/runtime": "^3.0.0",
"@vue/compiler-sfc": "^3.2.47", "@vue/compiler-sfc": "^3.3.4",
"envinfo": "^7.7.3", "envinfo": "^7.7.3",
"express": "^4.17.3", "express": "^4.17.3",
"mockjs": "^1.1.0" "mockjs": "^1.1.0"

View File

@ -1,5 +1,5 @@
// fes.config.js 只负责管理 cli 相关的配置 // fes.config.js 只负责管理 cli 相关的配置
import pxtoviewport from '@ttou/postcss-px-to-viewport'; import pxtoviewport from 'postcss-px-to-viewport-8-plugin';
import { defineBuildConfig } from '@fesjs/fes'; import { defineBuildConfig } from '@fesjs/fes';
export default defineBuildConfig({ export default defineBuildConfig({

View File

@ -40,7 +40,7 @@
"access": "public" "access": "public"
}, },
"dependencies": { "dependencies": {
"@ttou/postcss-px-to-viewport": "^2.0.3", "postcss-px-to-viewport-8-plugin": "^1.2.3",
"@fesjs/fes": "workspace:*", "@fesjs/fes": "workspace:*",
"@fesjs/plugin-icon": "workspace:*", "@fesjs/plugin-icon": "workspace:*",
"@fesjs/plugin-request": "workspace:*", "@fesjs/plugin-request": "workspace:*",

8532
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff