-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(preset-umi): integrate umi ui to preset-umi #10837
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
"ui:dev": "pnpm --filter @umijs/ui dev", | ||
"ui:release": "pnpm --filter @umijs/ui release", | ||
"valtio:build": "pnpm --filter @umijs/valtio build", | ||
"valtio:dev": "pnpm --filter @umijs/valtio dev", | ||
"valtio:release": "umi-scripts releaseValtio" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这段代码看起来很短,有两个新的脚本命令 ui:build
和 ui:release
。这些命令使用 pnpm
而不是 npm
或 yarn
进行构建。
根据补丁中的信息,其他命令包括单元测试 /test
, 端到端测试 /test:e2e
, 检查 TypeScript 编译错误 /tsc:check
, 清除 Turbo 模式缓存文件目录 /turbo:clean
, @umijs/ui
组件库开发 /ui:dev
和发布 /ui:release
。 另外还包括 @umijs/valtio
开发和发布命令。
没有明显的错误风险,提供以下改进建议:
- 添加更多的注释以帮助其他人了解代码
- 为项目创建文档
- 对所有依赖项进行版本控制并跟踪其安全漏洞
@@ -40,6 +40,7 @@ | |||
"@umijs/plugin-run": "workspace:*", | |||
"@umijs/renderer-react": "workspace:*", | |||
"@umijs/server": "workspace:*", | |||
"@umijs/ui": "workspace:*", | |||
"@umijs/utils": "workspace:*", | |||
"@umijs/zod2ts": "workspace:*", | |||
"babel-plugin-dynamic-import-node": "2.3.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该代码补丁似乎只是将"@umijs/ui"添加为依赖项。无明显的错误或风险。如果与其他代码相关,则需要进行更全面的审查。建议考虑将内部库更新到最新版本以获得更好的性能、功能和安全性。
@@ -4,7 +4,8 @@ export default { | |||
'@umijs/plugins/dist/styled-components', | |||
'@umijs/plugins/dist/react-query', | |||
], | |||
|
|||
publicPath: '/__umi_ui/entry/', | |||
base: '/__umi_ui/entry', | |||
styledComponents: {}, | |||
reactQuery: {}, | |||
valtio: {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这段代码的更改看起来非常简单,主要是添加了 publicPath
和 base
两个配置项。其中 publicPath
配置的值为 /__umi_ui/entry/
,它可以用于指定引入资源时的前缀路径;base
配置的值为 /__umi_ui/entry
,它指定应用的基本 URL 地址。这两个配置项的添加可以提高应用的性能和可靠性。
此外,从这段代码来看,并未发现任何明显的问题或潜在风险。如果有其他问题或优化建议,欢迎进一步讨论。
"umi": "workspace:*" | ||
"antd": "^5.2.3", | ||
"rc-virtual-list": "^3.4.13", | ||
"typescript": "^4" | ||
}, | ||
"packageManager": "pnpm@7.3.0", | ||
"publishConfig": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这段代码本身并没有明显的错误风险。以下是一些改进建议:
- "dependencies" 的部分可以放在 "devDependencies" 后面,这样更加清晰。
- "release" 脚本中的脚本命令缺少描述,可以添加注释说明。
- 添加一个 ".npmignore" 文件来忽略不必要的文件和目录,从而使发布后的软件包更小巧。
希望能够对你有所帮助!
Size Change: +9.22 kB (0%) Total Size: 9.84 MB
ℹ️ View Unchanged
|
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #10837 +/- ##
==========================================
- Coverage 29.29% 29.25% -0.04%
==========================================
Files 469 469
Lines 14177 14196 +19
Branches 3335 3340 +5
==========================================
Hits 4153 4153
- Misses 9317 9334 +17
- Partials 707 709 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
based on #10783