-
Notifications
You must be signed in to change notification settings - Fork 85
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: 🐛 concatenated module exported namespace should sort key #1564
fix: 🐛 concatenated module exported namespace should sort key #1564
Conversation
… object's key should be sorted
Walkthrough此次更改涉及 Changes
Poem
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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
Outside diff range, codebase verification and nitpick comments (1)
crates/mako/src/plugins/tree_shaking/shake/module_concatenate/concatenated_transformer/tests.rs (1)
Line range hint
717-775
: 审查新函数inner_trans_code_imported_as
此函数是新添加的,支持不同的导入类型。它使用
ConcatenatedTransform
类根据指定的导入类型执行转换。这是 PR 引入的新功能的关键部分,正确地处理了不同的导入情况。建议在函数文档中添加更多注释,说明每个参数的作用和期望的行为,以提高代码的可读性和可维护性。
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- crates/mako/src/plugins/tree_shaking/shake/module_concatenate/concatenated_transformer.rs (1 hunks)
- crates/mako/src/plugins/tree_shaking/shake/module_concatenate/concatenated_transformer/tests.rs (5 hunks)
Additional comments not posted (2)
crates/mako/src/plugins/tree_shaking/shake/module_concatenate/concatenated_transformer.rs (1)
354-368
: 审查key_value_props
的类型更改和排序操作此次更改将
key_value_props
的类型从Vec<PropOrSpread>
修改为Vec<KeyValueProp>
,并引入了按键排序的操作。这些更改有助于提高输出的稳定性和一致性,符合 PR 的目标。建议进行全面测试,以确保这些更改不会对系统的其他部分产生负面影响。crates/mako/src/plugins/tree_shaking/shake/module_concatenate/concatenated_transformer/tests.rs (1)
642-688
: 审查新的测试函数test_export_decl_vars_import_as_namespace
此测试函数用于验证当变量作为命名空间导入时的导出行为。它正确地设置了命名空间导入类型,并检查输出是否符合预期的 JavaScript 代码和导出映射。这是验证新功能的重要测试,确保了代码的稳定性和预期行为。
make dist js more stable.
Summary by CodeRabbit
新功能
修复