Skip to content

Commit

Permalink
fix: 优化依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
winixt committed Oct 24, 2023
1 parent 5852356 commit 0b3befc
Show file tree
Hide file tree
Showing 13 changed files with 3,563 additions and 4,608 deletions.
16 changes: 7 additions & 9 deletions docs/reference/plugin/plugins/request-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,16 @@ export default defineRuntimeConfig({
},
// http 异常,和插件异常
errorHandler(error) {
if (error.response) {
// 处理业务异常,例如上述 transformData 抛出的异常
if (error.code) {
console.log(error.msg)
} else if (error.response) {
// 请求成功发出且服务器也响应了状态码,但状态代码超出了 2xx 的范围
console.log(error.response.data);
console.log(error.response.status);
console.log(error.response.headers);
} else if (error.msg) {
console.log(error.msg);
console.log(`服务异常:${error.response.status}`)
} else {
// 发送请求时出了点问题
console.log('Error', error.message);
// 请求异常
console.log(error.msg || error.message || `请求失败`)
}
console.log(error.config);
},
// 支持其他 fetch 配置
...otherConfigs,
Expand Down
12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
],
"dependencies": {
"chalk": "^5.0.1",
"conventional-changelog-cli": "^2.2.2",
"conventional-changelog-cli": "^4.1.0",
"enquirer": "^2.3.6",
"execa": "^6.1.0",
"minimist": "^1.2.6",
Expand All @@ -39,19 +39,17 @@
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@vite-pwa/vitepress": "^0.0.5",
"@webank/eslint-config-webank": "1.2.7",
"chokidar": "^3.5.2",
"commitizen": "^4.2.1",
"chokidar": "^3.5.3",
"commitizen": "^4.3.0",
"cz-conventional-changelog": "^3.3.0",
"deepmerge": "^4.2.2",
"fs-extra": "^11.1.1",
"husky": "^8.0.3",
"lint-staged": "^13.2.0",
"typescript": "^5.0.4",
"vite-plugin-pwa": "^0.14.7",
"vitepress": "1.0.0-alpha.73",
"vue": "^3.2.47",
"vue": "^3.3.4",
"yargs-parser": "^21.1.1"
},
"lint-staged": {
Expand All @@ -70,4 +68,4 @@
"path": "./node_modules/cz-conventional-changelog"
}
}
}
}
5 changes: 3 additions & 2 deletions packages/create-fes-app/templates/app/h5/.fes.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// fes.config.js 只负责管理 cli 相关的配置
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({
define: {
Expand All @@ -15,7 +16,7 @@ export default defineBuildConfig({
ios: '10',
},
extraPostCSSPlugins: [
pxtoviewport({
postcsspxtoviewport8plugin({
unitToConvert: 'px',
viewportWidth: 375,
unitPrecision: 5,
Expand Down
2 changes: 1 addition & 1 deletion packages/create-fes-app/templates/app/h5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"devDependencies": {
"@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": {
"@fesjs/fes": "^3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/create-fes-app/templates/plugin/package.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"dependencies": {
},
"devDependencies": {
"@babel/core": "^7.21.3",
"@babel/preset-env": "^7.20.2",
"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@webank/eslint-config-webank": "1.2.7",
"chalk": "^4.1.2",
"chokidar": "^3.5.2",
Expand Down
20 changes: 10 additions & 10 deletions packages/fes-builder-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@
"access": "public"
},
"dependencies": {
"@babel/core": "^7.21.3",
"@babel/plugin-proposal-do-expressions": "^7.18.6",
"@babel/plugin-proposal-export-default-from": "^7.18.10",
"@babel/plugin-proposal-function-bind": "^7.18.9",
"@babel/plugin-proposal-pipeline-operator": "^7.18.9",
"@babel/plugin-transform-runtime": "^7.21.0",
"@babel/preset-env": "7.20.2",
"@babel/preset-typescript": "^7.21.0",
"@babel/core": "^7.23.2",
"@babel/plugin-proposal-do-expressions": "^7.22.5",
"@babel/plugin-proposal-export-default-from": "^7.22.17",
"@babel/plugin-proposal-function-bind": "^7.22.5",
"@babel/plugin-proposal-pipeline-operator": "^7.22.15",
"@babel/plugin-transform-runtime": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/preset-typescript": "^7.23.2",
"@fesjs/utils": "^3.0.1",
"@vue/babel-plugin-jsx": "^1.1.1",
"ajv": "^8.12.0",
"autoprefixer": "^10.4.14",
"babel-loader": "^9.1.2",
"cli-highlight": "^2.1.4",
"cli-highlight": "^2.1.11",
"cliui": "^8.0.1",
"connect-history-api-fallback": "^2.0.0",
"copy-webpack-plugin": "^11.0.0",
Expand Down Expand Up @@ -69,4 +69,4 @@
"@fesjs/fes": "^3.1.4",
"core-js": "^3.29.1"
}
}
}
8 changes: 4 additions & 4 deletions packages/fes-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"access": "public"
},
"dependencies": {
"@babel/core": "^7.21.3",
"@babel/preset-env": "^7.20.2",
"@babel/register": "^7.21.0",
"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/register": "^7.22.15",
"@fesjs/utils": "^3.0.1",
"commander": "^7.0.0",
"dotenv": "8.2.0",
"joi": "17.3.0",
"set-value": "3.0.2",
"tapable": "^2.2.0"
}
}
}
6 changes: 3 additions & 3 deletions packages/fes-plugin-jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"@fesjs/fes": "^3.1.4"
},
"dependencies": {
"@babel/core": "^7.21.3",
"@babel/preset-env": "^7.15.0",
"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@vue/babel-plugin-jsx": "^1.0.6",
"babel-jest": "^29.0.0",
"jest": "^29.0.0",
Expand All @@ -44,4 +44,4 @@
"typescript": "^5.0.4",
"@vue/vue3-jest": "^29.2.0"
}
}
}
4 changes: 2 additions & 2 deletions packages/fes-plugin-windicss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"vue": "^3.2.47"
},
"dependencies": {
"vite-plugin-windicss": "^1.8.3",
"vite-plugin-windicss": "^1.9.1",
"windicss": "^3.5.1",
"windicss-webpack-plugin": "^1.6.0"
},
"typings": "./types.d.ts"
}
}
4 changes: 2 additions & 2 deletions packages/fes-preset-built-in/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@fesjs/compiler": "^3.0.1",
"@fesjs/utils": "^3.0.1",
"@fesjs/runtime": "^3.0.0",
"@vue/compiler-sfc": "^3.2.47",
"@vue/compiler-sfc": "^3.3.4",
"envinfo": "^7.7.3",
"express": "^4.17.3",
"mockjs": "^1.1.0"
Expand All @@ -38,4 +38,4 @@
"vue": "^3.2.47"
},
"typings": "./types.d.ts"
}
}
2 changes: 1 addition & 1 deletion packages/fes-template-h5/.fes.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// 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';

export default defineBuildConfig({
Expand Down
2 changes: 1 addition & 1 deletion packages/fes-template-h5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"access": "public"
},
"dependencies": {
"@ttou/postcss-px-to-viewport": "^2.0.3",
"postcss-px-to-viewport-8-plugin": "^1.2.3",
"@fesjs/fes": "workspace:*",
"@fesjs/plugin-icon": "workspace:*",
"@fesjs/plugin-request": "workspace:*",
Expand Down
Loading

0 comments on commit 0b3befc

Please sign in to comment.