Skip to content
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: support specify plugin as string #1292

Merged
merged 2 commits into from
Jun 19, 2024
Merged

feat: support specify plugin as string #1292

merged 2 commits into from
Jun 19, 2024

Conversation

sorrycc
Copy link
Member

@sorrycc sorrycc commented Jun 19, 2024

Summary by CodeRabbit

  • 功能更新
    • 在Mako软件包的index.ts文件中,引入了resolve模块的导入,并修改了build函数以根据配置动态加载插件,支持字符串和非字符串类型的插件。

Copy link
Contributor

coderabbitai bot commented Jun 19, 2024

摘要

# 现有变更集

整体概述:

综合概括整体变更,而非具体文件,以不超过 80 个字进行阐述。

变更:

文件路径 变更摘要
e2e/fixtures/plugins/expect.js 添加了针对 JavaScript 文件中 JSX 元素的特定内容检查断言。
e2e/fixtures/plugins/mako.config.json 在 JSON 配置文件中添加了插件引用,同时保留了原始的最小化设置。
e2e/fixtures/plugins/plugin.js plugin.js 文件中引入了一个异步函数 load(path),用于检查给定路径是否以 .hoo 结尾,并在条件满足时返回包含 JSX 内容和类型信息的对象。
e2e/fixtures/plugins/src/foo.haha 引入了一个注释,指示应使用加载钩子处理某些内容。
e2e/fixtures/plugins/src/foo.hoo 引入了一个注释,指示应使用加载钩子处理某些内容。
e2e/fixtures/plugins/src/index.tsx index.tsx 文件中添加了两个新的 console.log 语句,用于需要额外文件。
packages/mako/binding.d.ts binding.d.ts 中添加了一个新的导出接口 TransformOutput,具有 code 和可选的 map 两个属性。
packages/mako/package.json 更新了 @types/resolve 依赖项为版本 ^1.20.6,将 resolve 依赖项更新为版本 ^1.22.8
packages/mako/src/index.ts 引入了 resolve 模块的导入,并修改了 build 函数,以根据配置动态加载插件,处理字符串和非字符串类型的插件。

诗歌:

代码兔儿闻异变,插件动态载入处。
transformOutput 转换新,路径结尾 .hoo 畅。
索引加 log,配置全改,Resolve 更新上游。
新功能升级乐编程,敏捷如风箭。


Note

Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://coderabbit.ai

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.

@sorrycc sorrycc merged commit 948d9f1 into master Jun 19, 2024
8 checks passed
@sorrycc sorrycc deleted the sorrycc-g1bb branch June 19, 2024 08:15
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.

1 participant