-
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
fix(preset-umi): tmp umi tsconfig includes add .umirc.*.ts #12251
fix(preset-umi): tmp umi tsconfig includes add .umirc.*.ts #12251
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
WalkthroughThe update introduces a new capability within the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Review Status
Configuration used: CodeRabbit UI
Files selected for processing (1)
- packages/preset-umi/src/features/tmpFiles/tmpFiles.ts (1 hunks)
Additional Context Used
Additional comments not posted (1)
packages/preset-umi/src/features/tmpFiles/tmpFiles.ts (1)
97-97
: The addition of${baseUrl}.${frameworkName}rc.*.ts
to theinclude
array in the TypeScript configuration is a welcome change that addresses the issue of missing type completions for.umirc.*.ts
files. Ensure thatbaseUrl
andframeworkName
are always correctly set to avoid potential path resolution issues.Verification successful
The script successfully located the
tmpFiles.ts
file and verified the presence and definitions ofbaseUrl
andframeworkName
. The output confirms that both variables are indeed defined within the file, withframeworkName
being assigned the value fromapi.service.frameworkName
andbaseUrl
being conditionally set based on whetherapi.appData.hasSrcDir
is true or false. This addresses the concern raised in the review comment about ensuring thatbaseUrl
andframeworkName
are always correctly set to avoid potential path resolution issues.Given this information, the addition of
${baseUrl}.${frameworkName}rc.*.ts
to theinclude
array in the TypeScript configuration, as mentioned in the review comment, is verified to be correctly implemented with the necessary variables being defined and utilized as intended.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify that baseUrl and frameworkName are always defined and valid grep -E 'const (baseUrl|frameworkName) =' tmpFiles.tsLength of output: 100
Script:
#!/bin/bash # Find the correct path to tmpFiles.ts and verify the presence of baseUrl and frameworkName fd tmpFiles.ts --exec grep -E 'const (baseUrl|frameworkName) =' {}Length of output: 185
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #12251 +/- ##
=======================================
Coverage 28.40% 28.40%
=======================================
Files 492 492
Lines 15171 15171
Branches 3630 3630
=======================================
Hits 4310 4310
Misses 10088 10088
Partials 773 773 ☔ View full report in Codecov by Sentry. |
修复
.umi/tsconfig.json
中include
字段没有包含.umirc.*.ts
导致额外创建的配置文件如.umirc.local.ts
等 无法获得类型补全的问题Summary by CodeRabbit