Skip to content

Commit

Permalink
fix(cli-common): 修复组件判别逻辑错误
Browse files Browse the repository at this point in the history
  • Loading branch information
muxiangqiu committed Sep 17, 2024
1 parent 356d59f commit a4979fe
Show file tree
Hide file tree
Showing 5 changed files with 362 additions and 593 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change

## 2.60.3

- fix(cli-common): 修复组件判别逻辑错误

## 2.60.2

- fix(ui-packages): 修复目录名称拼写错误导致前端相关包没有正常发布
Expand Down
6 changes: 6 additions & 0 deletions dev-packages/cli-common/src/package/package-protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ export namespace RawComponentPackage {
if (!Array.isArray(pck.keywords)) {
return false;
}
if (pck.keywords.includes('malagu-component')) {
return true;
}
if (!pck.keywords.includes('malagu')) {
return false;
}
return pck.keywords.some(k => k.endsWith(MALAGU_COMPONENT_SUFFIX));
}
}
2 changes: 1 addition & 1 deletion dev-packages/cli-common/src/utils/component-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export namespace ComponentUtil {
const keywordsAlias = keywords
.filter(k => k.endsWith(MALAGU_COMPONENT_SUFFIX))
.map(k => k.substring(0, k.length - MALAGU_COMPONENT_SUFFIX.length));
return keywords.includes('malagu') ? keywordsAlias : [ ...keywordsAlias, 'malagu' ];
return keywordsAlias.includes('malagu') ? keywordsAlias : [ ...keywordsAlias, 'malagu' ];
}
}

6 changes: 3 additions & 3 deletions ui-packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@types/react-router-dom": "^5.3.3",
"autoprefixer": "^9.8.6",
"css-minimizer-webpack-plugin": "^3.4.1",
"cssnano": "^4.1.11",
"autoprefixer": "^10.4.20",
"css-minimizer-webpack-plugin": "^7.0.0",
"cssnano": "^7.0.6",
"fs-extra": "^11.1.1",
"less": "^4.1.1",
"less-loader": "^9.0.0",
Expand Down
Loading

0 comments on commit a4979fe

Please sign in to comment.