Skip to content

Conversation

@xiaohuoni
Copy link
Contributor

@xiaohuoni xiaohuoni commented Jul 10, 2024

支持从 umi 配置透传给 mako

#1389

关联 PR

在 umi 那边增加 mako 配置的类型

Summary by CodeRabbit

  • 新功能
    • 增加了对 mako 配置键的支持。
    • 调整了 mako 配置处理方式,确保支持特定配置键并正确集成到最终配置中。

@coderabbitai
Copy link

coderabbitai bot commented Jul 10, 2024

Warning

Rate limit exceeded

@xiaohuoni has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 34 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between 649c4c6 and d7ebb0d.

Walkthrough

这次更改主要集中在增强对 mako 配置键的支持,包括对特定键的支持、配置键的验证以及调整 analyze 配置处理方式。此外,函数参数和返回值也进行了相应的调整,以确保配置能够正确集成到最终的 makoConfig 中。

Changes

文件路径 更改摘要
packages/bundler-mako/index.js 添加对 mako 配置对象中特定键的支持,并重构了 mako 配置的处理方式,确保某些键支持且集成到最终的 makoConfig 中。

Poem

代码之中新的风,
mako 配置显威风。
验证优化如潮涌,
调整细节贯长虹。
兔子祝贺笑春风,
每个改动皆不同。


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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 details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ea2376b and 503ce5d.

Files selected for processing (1)
  • packages/bundler-mako/index.js (4 hunks)
Additional comments not posted (3)
packages/bundler-mako/index.js (3)

241-256: 代码更改:支持新的 mako 配置键

这些更改添加了对 mako 配置键的支持和验证,确保 umi 配置中的键在 mako 中是受支持的。


460-463: 代码更改:包含 mako 配置

这些更改确保 opts.config 中的 mako 配置被包含在返回的 makoConfig 对象中。


628-628: 代码更改:展开并包含 mako 配置

这些更改确保返回的 makoConfig 对象包含所有的 mako 配置。

Copy link
Contributor

@sorrycc sorrycc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1、analyze 的改动被覆盖了
2、umi 那边需要有个联动的 pr,增加 mako 配置并提供类型和文档

Copy link

@coderabbitai coderabbitai bot left a 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 details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 503ce5d and 08d0644.

Files selected for processing (1)
  • packages/bundler-mako/index.js (4 hunks)
Files skipped from review as they are similar to previous changes (1)
  • packages/bundler-mako/index.js

@xiaohuoni
Copy link
Contributor Author

  1. 回退了
  2. feat: add mako types umijs/umi#12553

Copy link

@coderabbitai coderabbitai bot left a 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 details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 503ce5d and 649c4c6.

Files selected for processing (1)
  • packages/bundler-mako/index.js (3 hunks)
Additional comments not posted (3)
packages/bundler-mako/index.js (3)

241-256: 验证通过:支持的 Mako 配置项

新增的验证逻辑确保了 mako 配置中仅允许支持的键。这有助于维护系统的稳健性。


460-462: 确认更改:处理 Mako 配置

getMakoConfig 函数已修改为显式处理 mako 配置。更改确认无误。


628-628: 确认更改:配置整合

确保 mako 配置正确集成到返回的配置对象中。

@sorrycc sorrycc merged commit 8b14776 into master Jul 10, 2024
@afc163 afc163 deleted the feat-pass-umi-config-mako branch July 10, 2024 15:17
This was referenced Sep 12, 2024
This was referenced Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants