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: globalThis attributes visit #1254

Merged
merged 4 commits into from
Jun 7, 2024
Merged

Conversation

xusd320
Copy link
Contributor

@xusd320 xusd320 commented Jun 6, 2024

Close #1249

Summary by CodeRabbit

  • 新功能
    • 更新JavaScript对象中属性访问的字符串格式,从使用点符号改为使用方括号符号。
    • 调整了模块导出中访问全局对象属性的语法。

Copy link
Contributor

coderabbitai bot commented Jun 6, 2024

漫游

这次变更涉及更新字符串格式化,从点号记法改为方括号记法,用于访问 JavaScript 对象的属性。这影响了代码中外部目标的构建方式。

变更

文件路径 总结
crates/mako/src/resolve/mod.rs 更新字符串格式化方式,影响外部目标构建
e2e/fixtures/config.externals/expect.js 调整访问全局对象属性的语法
packages/mako/binding.d.ts 调整接口声明

诗篇

兔子跳跃在代码间,方括号取代点号闪亮。
全局对象在变更中舞蹈,JavaScript世界焕然一新。 🐇📦✨


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.

@xusd320 xusd320 force-pushed the fix/globalThis-attributes-visit branch from 4953bbb to a51ee2c Compare June 6, 2024 08:17
@xusd320 xusd320 requested a review from sorrycc June 7, 2024 02:09
@sorrycc sorrycc merged commit e9ca254 into master Jun 7, 2024
8 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix/globalThis-attributes-visit branch June 7, 2024 02:28
sorrycc pushed a commit that referenced this pull request Jun 11, 2024
* fix: globalThis attributes visit

* chore: add comments and unit test

* chore: extract common fn get_external_target_from_global_obj

* chore: remove duplicated comments
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.

[Bug]: globalThis 的兼容性处理有问题
3 participants