From 3067a9dc5b854f16e774ca1017da198733504052 Mon Sep 17 00:00:00 2001 From: bac-joker Date: Sun, 7 Mar 2021 18:12:27 +0800 Subject: [PATCH 1/2] fix: plugin name error --- docs/reference/plugin/plugins/layout.md | 2 +- docs/zh/reference/plugin/plugins/layout.md | 2 +- packages/fes-compiler/src/service/utils/pluginUtils.js | 4 ++-- packages/fes-plugin-locale/src/index.js | 4 ++-- packages/fes-plugin-request/src/template/resErrorProcess.js | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/reference/plugin/plugins/layout.md b/docs/reference/plugin/plugins/layout.md index ba44c567..d8bf02ab 100644 --- a/docs/reference/plugin/plugins/layout.md +++ b/docs/reference/plugin/plugins/layout.md @@ -7,7 +7,7 @@ - 主题,提供 `light`、`dark` 两种主题。 - 默认实现对路由的 404、403 处理。 - 搭配 [@fesjs/plugin-access](./access.html) 插件使用,可以完成对路由的权限控制。 -- 搭配 [@fesjs/plugin-loacle](./locale.html) 插件使用,提供切换语言的能力。 +- 搭配 [@fesjs/plugin-locale](./locale.html) 插件使用,提供切换语言的能力。 - 支持自定义头部区域。 - 可配置页面是否需要 layout。 diff --git a/docs/zh/reference/plugin/plugins/layout.md b/docs/zh/reference/plugin/plugins/layout.md index ba44c567..d8bf02ab 100644 --- a/docs/zh/reference/plugin/plugins/layout.md +++ b/docs/zh/reference/plugin/plugins/layout.md @@ -7,7 +7,7 @@ - 主题,提供 `light`、`dark` 两种主题。 - 默认实现对路由的 404、403 处理。 - 搭配 [@fesjs/plugin-access](./access.html) 插件使用,可以完成对路由的权限控制。 -- 搭配 [@fesjs/plugin-loacle](./locale.html) 插件使用,提供切换语言的能力。 +- 搭配 [@fesjs/plugin-locale](./locale.html) 插件使用,提供切换语言的能力。 - 支持自定义头部区域。 - 可配置页面是否需要 layout。 diff --git a/packages/fes-compiler/src/service/utils/pluginUtils.js b/packages/fes-compiler/src/service/utils/pluginUtils.js index 71f8f1a0..b3f14064 100644 --- a/packages/fes-compiler/src/service/utils/pluginUtils.js +++ b/packages/fes-compiler/src/service/utils/pluginUtils.js @@ -12,8 +12,8 @@ import { import { PluginType } from '../enums'; const RE = { - [PluginType.plugin]: /^(@fesjs\/)?plugin-/, - [PluginType.preset]: /^(@fesjs\/)?preset-/ + [PluginType.plugin]: /^(@fesjs\/|@webank\/fes-|fes-)?plugin-/, + [PluginType.preset]: /^(@fesjs\/|@webank\/fes-|fes-)?preset-/ }; export function isPluginOrPreset(type, name) { diff --git a/packages/fes-plugin-locale/src/index.js b/packages/fes-plugin-locale/src/index.js index b30f0bd1..947e53bf 100644 --- a/packages/fes-plugin-locale/src/index.js +++ b/packages/fes-plugin-locale/src/index.js @@ -48,9 +48,9 @@ export default (api) => { ...api.config.locale }; - const loacleConfigFileBasePath = getLocaleFileBasePath(); + const localeConfigFileBasePath = getLocaleFileBasePath(); - const locales = getLocalesJSON(loacleConfigFileBasePath); + const locales = getLocalesJSON(localeConfigFileBasePath); api.writeTmpFile({ path: absoluteFilePath, diff --git a/packages/fes-plugin-request/src/template/resErrorProcess.js b/packages/fes-plugin-request/src/template/resErrorProcess.js index 9a1e213d..50961d49 100644 --- a/packages/fes-plugin-request/src/template/resErrorProcess.js +++ b/packages/fes-plugin-request/src/template/resErrorProcess.js @@ -5,7 +5,7 @@ export default async ({ errorHandler = {}, response }, next) => { - if (response && isObject(response.data) && response.data.code !== '0') { + if (response && isObject(response.data) && response.data.code && response.data.code !== '0') { errorHandler[response.data.code] && errorHandler[response.data.code](response); } else if (error) { if (error.type) { From f905b932f66d30901649a80a1681740dc86e3c9d Mon Sep 17 00:00:00 2001 From: bac-joker Date: Sun, 7 Mar 2021 18:12:57 +0800 Subject: [PATCH 2/2] chore(release): publish --- lerna.json | 2 +- packages/create-fes-app/package.json | 2 +- packages/fes-compiler/package.json | 2 +- packages/fes-plugin-jest/package.json | 4 ++-- packages/fes-plugin-layout/package.json | 2 +- packages/fes-plugin-locale/package.json | 2 +- packages/fes-plugin-request/package.json | 2 +- packages/fes-plugin-vuex/package.json | 2 +- packages/fes-preset-built-in/package.json | 4 ++-- packages/fes/package.json | 6 +++--- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lerna.json b/lerna.json index f3efbe61..b482283e 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.0.0-rc.1", + "version": "2.0.0-rc.2", "changelog": { "repo": "WeBankFinTech/fes.js", "cacheDir": ".changelog", diff --git a/packages/create-fes-app/package.json b/packages/create-fes-app/package.json index c613a844..d0030814 100644 --- a/packages/create-fes-app/package.json +++ b/packages/create-fes-app/package.json @@ -1,6 +1,6 @@ { "name": "@fesjs/create-fes-app", - "version": "2.0.0-rc.1", + "version": "2.0.0-rc.2", "description": "create a app base on fes.js", "main": "lib/index.js", "files": [ diff --git a/packages/fes-compiler/package.json b/packages/fes-compiler/package.json index f7750b1f..d978a3e8 100644 --- a/packages/fes-compiler/package.json +++ b/packages/fes-compiler/package.json @@ -1,6 +1,6 @@ { "name": "@fesjs/compiler", - "version": "2.0.0-rc.1", + "version": "2.0.0-rc.2", "description": "@fesjs/compiler", "main": "lib/index.js", "files": [ diff --git a/packages/fes-plugin-jest/package.json b/packages/fes-plugin-jest/package.json index c4618ef0..43936563 100644 --- a/packages/fes-plugin-jest/package.json +++ b/packages/fes-plugin-jest/package.json @@ -1,6 +1,6 @@ { "name": "@fesjs/plugin-jest", - "version": "2.0.0-rc.1", + "version": "2.0.0-rc.2", "description": "@fesjs/plugin-jest", "main": "lib/index.js", "files": [ @@ -31,7 +31,7 @@ }, "dependencies": { "@babel/core": "7.11.6", - "@fesjs/compiler": "^2.0.0-rc.1", + "@fesjs/compiler": "^2.0.0-rc.2", "@umijs/babel-preset-umi": "3.2.24", "babel-core": "^7.0.0-bridge.0", "babel-jest": "^26.6.3", diff --git a/packages/fes-plugin-layout/package.json b/packages/fes-plugin-layout/package.json index a80287e2..d206735e 100644 --- a/packages/fes-plugin-layout/package.json +++ b/packages/fes-plugin-layout/package.json @@ -1,6 +1,6 @@ { "name": "@fesjs/plugin-layout", - "version": "2.0.0-rc.1", + "version": "2.0.0-rc.2", "description": "@fesjs/plugin-layout", "main": "lib/index.js", "files": [ diff --git a/packages/fes-plugin-locale/package.json b/packages/fes-plugin-locale/package.json index 916a87f3..fad0439f 100644 --- a/packages/fes-plugin-locale/package.json +++ b/packages/fes-plugin-locale/package.json @@ -1,6 +1,6 @@ { "name": "@fesjs/plugin-locale", - "version": "2.0.0-rc.1", + "version": "2.0.0-rc.2", "description": "@fesjs/plugin-locale", "main": "lib/index.js", "files": [ diff --git a/packages/fes-plugin-request/package.json b/packages/fes-plugin-request/package.json index 842050e2..71bcac20 100644 --- a/packages/fes-plugin-request/package.json +++ b/packages/fes-plugin-request/package.json @@ -1,6 +1,6 @@ { "name": "@fesjs/plugin-request", - "version": "2.0.0-rc.1", + "version": "2.0.0-rc.2", "description": "@fesjs/plugin-request", "main": "lib/index.js", "files": [ diff --git a/packages/fes-plugin-vuex/package.json b/packages/fes-plugin-vuex/package.json index d3341c78..149bea60 100644 --- a/packages/fes-plugin-vuex/package.json +++ b/packages/fes-plugin-vuex/package.json @@ -1,6 +1,6 @@ { "name": "@fesjs/plugin-vuex", - "version": "2.0.0-rc.1", + "version": "2.0.0-rc.2", "description": "@fesjs/plugin-vuex", "main": "lib/index.js", "files": [ diff --git a/packages/fes-preset-built-in/package.json b/packages/fes-preset-built-in/package.json index 86d01a20..e6cde439 100644 --- a/packages/fes-preset-built-in/package.json +++ b/packages/fes-preset-built-in/package.json @@ -1,6 +1,6 @@ { "name": "@fesjs/preset-built-in", - "version": "2.0.0-rc.1", + "version": "2.0.0-rc.2", "description": "@fesjs/preset-built-in", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -32,7 +32,7 @@ "@babel/plugin-proposal-pipeline-operator": "^7.12.13", "@babel/plugin-transform-runtime": "^7.12.13", "@babel/preset-env": "^7.12.13", - "@fesjs/compiler": "^2.0.0-rc.1", + "@fesjs/compiler": "^2.0.0-rc.2", "@soda/friendly-errors-webpack-plugin": "^1.8.0", "@umijs/utils": "3.3.3", "@vue/babel-plugin-jsx": "^1.0.2", diff --git a/packages/fes/package.json b/packages/fes/package.json index 9f8e5536..ea3f7aaf 100644 --- a/packages/fes/package.json +++ b/packages/fes/package.json @@ -1,6 +1,6 @@ { "name": "@fesjs/fes", - "version": "2.0.0-rc.1", + "version": "2.0.0-rc.2", "description": "一个好用的前端管理台快速开发框架", "preferGlobal": true, "scripts": { @@ -39,8 +39,8 @@ "strong" ], "dependencies": { - "@fesjs/compiler": "^2.0.0-rc.1", - "@fesjs/preset-built-in": "^2.0.0-rc.1", + "@fesjs/compiler": "^2.0.0-rc.2", + "@fesjs/preset-built-in": "^2.0.0-rc.2", "@fesjs/runtime": "^2.0.0-rc.1", "@umijs/utils": "3.3.3", "resolve-cwd": "^3.0.0"