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

fix/export deconstructed var #1216

Merged
merged 2 commits into from
May 30, 2024
Merged

fix/export deconstructed var #1216

merged 2 commits into from
May 30, 2024

Conversation

stormslowly
Copy link
Member

@stormslowly stormslowly commented May 30, 2024

修复导出变量提取时,变量名带上 ctxt 的 bug

仅此语法会触发

export  const { a, b } = obj

Summary by CodeRabbit

  • 新功能

    • 在应用程序中添加了搜索功能。
    • 引入了一个新模块,导出内部模块的所有实体。
    • 在项目中引入了配置文件以进行入口点和模块优化设置。
  • 测试

    • 添加了各种导出场景的测试功能,如默认导出、命名函数导出、类导出、命名导出、对象解构导出、数组解构导出和变量声明导出。
  • 文档

    • 引入了一些新文件以支持测试工具和构建结果解析。

Copy link
Contributor

coderabbitai bot commented May 30, 2024

Walkthrough

这次修改包括对exports_transform.rs文件的调整,修改了assign_prop.keyassign_prop.key.sym,并添加了各种导出场景的测试函数。另外,还涉及到对测试工具和构建结果解析的修改,以及新文件的引入和配置设置。

Changes

文件路径 修改摘要
crates/mako/src/plugins/farm_tree_shake/shake/module_concatenate/exports_transform.rs 修改了impl Visit for PatDefineIdCollector中的assign_prop.keyassign_prop.key.sym,添加了各种导出场景的测试函数。
e2e/fixtures/mako.scope-hoisting.export_start_from_inner/expect.js
e2e/fixtures/mako.scope-hoisting.export_start_from_inner/root.js
引入了测试工具和构建结果解析相关的修改,以及新文件root.js的导出语句调整。
e2e/fixtures/mako.scope-hoisting.export_start_from_inner/index.js
e2e/fixtures/mako.scope-hoisting.export_start_from_inner/inner.js
引入了新文件index.jsinner.js,分别用于导出内部模块的内容。
e2e/fixtures/mako.scope-hoisting.export_start_from_inner/mako.config.json 引入了项目的入口和模块优化配置设置。

Poem

兔子编码忙修改,

导出场景测试新添,

测试工具构建精,

内部模块导出新,

配置设置添新元。🐇


Tip

Early Access Features
  • gpt-4o model for chat

Note

Pull Request 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 f31696d into master May 30, 2024
8 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix/export_deconstructed_var branch May 30, 2024 02:26
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