chore: add foreign jsx transform test case - #2588
Conversation
Summary of ChangesHello @fireairforce, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求主要通过重构 Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
这个 PR 的主要内容是为 foreign JSX transform 添加了一组快照测试用例,同时包含了一个小的代码重构。
crates/pack-core/src/client/context.rs 中的重构通过预先计算 source_maps 的值,避免了代码重复和潜在的重复异步调用,提高了代码的可读性和性能。
新增的测试用例验证了在 node_modules 中的文件(foreign code)使用 JSX pragma 时,如果 JSX 运行时设置为 "automatic",会正确地抛出错误。这是一个有价值的测试场景。
代码整体质量很高,但在新添加的测试文件中发现了一些可以改进的地方,详见具体的审查意见。
dc7ca63 to
cac8e73
Compare
📊 Performance Benchmark Report (with-antd)Utoopack Performance ReportReport ID: Executive SummaryKey Findings
Workload Distribution by Tier
Parallelization AnalysisThread Utilization
Assessment: With 5 working threads, achieving 3.1x parallelism indicates significant loss of potential parallelism. Top 20 Tasks by Total Duration
Deep Dive by TierTier 1: Runtime & Resolution (P0)Focus: Task scheduling and dependency resolution.
Potential P0 Issues:
Tier 2: Physical & Resource Barriers (P1)Focus: Hardware utilization, I/O, and heavy monoliths.
Tier 3: Architecture & Asset Pipeline (P2-P3)Focus: Global state and transformation pipeline.
Duration Distribution
Diagnostic Signal Summary
Action Items (P0-P4)
Report generated by Utoopack Performance Analysis Agent on 2026-02-11 |
Summary
添加一组 foreign jsx transform 的测试 case
Test Plan