修复 semi-webpack/semi-rspack:支持匹配 @douyinfe/semi-ui-19 等带数字后缀包名#3125
Closed
SudoUserReal wants to merge 1 commit intomainfrom
Closed
修复 semi-webpack/semi-rspack:支持匹配 @douyinfe/semi-ui-19 等带数字后缀包名#3125SudoUserReal wants to merge 1 commit intomainfrom
@douyinfe/semi-ui-19 等带数字后缀包名#3125SudoUserReal wants to merge 1 commit intomainfrom
Conversation
This commit was automatically generated by Semi Issue Solver. Closes #3116
| omitCss(module: any) { | ||
| const compatiblePath = transformPath(module.resource); | ||
| if (/@douyinfe\/semi-(ui|icons)\/lib\/.+\.js$/.test(compatiblePath)) { | ||
| if (SEMI_LIB_JS_RE.test(compatiblePath)) { |
Check failure
Code scanning / CodeQL
Polynomial regular expression used on uncontrolled data High
| customTheme(module: any) { | ||
| const compatiblePath = transformPath(module.resource); | ||
| if (/@douyinfe\/semi-(ui|icons)\/lib\/.+\.js$/.test(compatiblePath)) { | ||
| if (SEMI_LIB_JS_RE.test(compatiblePath)) { |
Check failure
Code scanning / CodeQL
Polynomial regular expression used on uncontrolled data High
| }); | ||
| } | ||
| if (/@douyinfe\/semi-(ui|icons|foundation)\/lib\/.+\.scss$/.test(compatiblePath)) { | ||
| if (SEMI_LIB_SCSS_RE.test(compatiblePath)) { |
Check failure
Code scanning / CodeQL
Polynomial regular expression used on uncontrolled data High
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 72ccff0:
|
semi-design
|
||||||||||||||||||||||||||||
| Project |
semi-design
|
| Branch Review |
solve/issue-3116-1770017038039
|
| Run status |
|
| Run duration | 08m 17s |
| Commit |
|
| Committer | SudoUser |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
13
|
|
|
0
|
|
|
291
|
| View all changes introduced in this branch ↗︎ | |
Collaborator
Author
|
PR 关闭原因: 关闭 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复 Issue #3116:
@douyinfe/semi-webpack-plugin(以及对应的semi-rspack规则)在通过module.resource路径正则识别 Semi 相关依赖时,仅匹配@douyinfe/semi-(ui|icons|foundation),导致@douyinfe/semi-ui-19/lib/...这类带数字后缀的包名无法命中,从而相关 loader/规则不生效。解决方案
将依赖识别正则扩展为支持可选的
-数字后缀(如semi-ui-19),并保持对原有semi-ui/semi-icons/semi-foundation的兼容;同时在semi-rspack中对齐相同的匹配逻辑。主要变更点
packages/semi-webpack/src/semi-webpack-plugin.ts:扩展 Semi 依赖路径匹配正则,覆盖@douyinfe/semi-ui-<number>形态packages/semi-webpack/README.md:补充说明支持带数字后缀的 Semi 包名packages/semi-rspack/src/rule.ts:对齐相同的包名匹配规则,避免 rspack 场景同类问题packages/semi-rspack/README.md:同步文档说明测试说明
@douyinfe/semi-ui与@douyinfe/semi-ui-19验证对应规则/loader 是否均能生效(webpack 与 rspack 场景各验证一次)