Skip to content

refactor: call loadWorkletRuntime once in each module#2315

Merged
HuJean merged 1 commit intomainfrom
p/load
Mar 9, 2026
Merged

refactor: call loadWorkletRuntime once in each module#2315
HuJean merged 1 commit intomainfrom
p/load

Conversation

@HuJean
Copy link
Copy Markdown
Collaborator

@HuJean HuJean commented Mar 6, 2026

Summary by CodeRabbit

Release Notes

  • Refactor
    • Optimized worklet runtime loading to ensure it's initialized once per module, improving performance and consistency in worklet registration patterns.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).
  • Changeset added, and when a BREAKING CHANGE occurs, it needs to be clearly marked (or not required).

@HuJean HuJean requested a review from gaoachao as a code owner March 6, 2026 08:26
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 6, 2026

🦋 Changeset detected

Latest commit: 9ac5804

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@lynx-js/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 6, 2026

📝 Walkthrough

Walkthrough

This PR refactors the worklet runtime loading mechanism in the Lynx React SWC plugin, changing from inline short-circuit evaluation (loadWorkletRuntime(...) && registerWorkletInternal(...)) to an explicit two-step pattern where the runtime load result is captured in a named constant (__workletRuntimeLoaded) before conditionally invoking registration.

Changes

Cohort / File(s) Summary
Changeset Documentation
.changeset/sad-terms-reply.md
Patch release for @lynx-js/react documenting refactor to invoke loadWorkletRuntime once per module.
Core Plugin Implementation
packages/react/transform/crates/swc_plugin_worklet/gen_stmt.rs, packages/react/transform/crates/swc_plugin_worklet/lib.rs
Introduces RegisterWorkletParams<'a> struct to aggregate worklet registration parameters and adds worklet_runtime_loaded_ident: Ident field; updates transform_worklet and gen_register_worklet_stmt signatures to accept new parameter; extends WorkletVisitor with worklet_runtime_loaded: bool and worklet_runtime_loaded_ident: Ident fields; implements top-level runtime load insertion in module processing.
Test Fixture
packages/react/transform/__test__/fixture.spec.js
Updates test patterns to use intermediate __workletRuntimeLoaded variable instead of inline short-circuit evaluation.
Snapshot Tests
packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/*.js
Updates 31 snapshot files to reflect two-step runtime load pattern: store loadWorkletRuntime(...) result in const __workletRuntimeLoaded, then conditionally call registerWorkletInternal(...) using that constant.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • gaoachao

Poem

🐰 A worklet hops once, not twice it seems,
With __workletRuntimeLoaded in the code's new schemes,
No more inline checks in a single bound,
Two steps now taken, one constant profound! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately describes the main refactoring objective: moving loadWorkletRuntime to be called once per module instead of multiple times inline.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch p/load

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.changeset/sad-terms-reply.md:
- Around line 1-5: The changeset currently declares a patch release for
"@lynx-js/react" but this PR is refactor-only; update the
.changeset/sad-terms-reply.md file to be an empty changeset by removing the
package release block (the line containing "@lynx-js/react": patch and the
surrounding YAML header) and any user-facing release note text, leaving only the
repo's minimal/empty changeset content used for internal-only refactors so CI
passes without producing a consumer-facing release.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d3da9989-4a92-4c70-9a70-32a44837162b

📥 Commits

Reviewing files that changed from the base of the PR and between 0d41253 and a8364c4.

📒 Files selected for processing (32)
  • .changeset/sad-terms-reply.md
  • packages/react/transform/__test__/fixture.spec.js
  • packages/react/transform/crates/swc_plugin_worklet/gen_stmt.rs
  • packages/react/transform/crates/swc_plugin_worklet/lib.rs
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_capture_env_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_ident_from_this_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_2_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_3_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_4_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_capture_globals.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_capture_type_annotations.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_destructure_from_closure.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_extract_catch_clause_params.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_extract_idents_inside_of_ctx.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_transform_recursively.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_skip_shared_identifiers_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_arrow_function.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_fn_decl_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_function_expr.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_property_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_static_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_static_property_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_js_fn_in_run_on_js_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus_alias.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus_general.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus_general_mixed.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_multiple_worklets.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_multiple_worklets_in_func.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_ui_worklet_lepus.js

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 6, 2026

Merging this PR will degrade performance by 7.82%

❌ 1 regressed benchmark
✅ 71 untouched benchmarks
⏩ 3 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
transform 1000 view elements 43.6 ms 47.3 ms -7.82%

Comparing p/load (9ac5804) with main (4daa4d9)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@relativeci
Copy link
Copy Markdown

relativeci bot commented Mar 6, 2026

Web Explorer

#8042 Bundle Size — 384.5KiB (0%).

9ac5804(current) vs 4daa4d9 main#8021(baseline)

Bundle metrics  Change 1 change
                 Current
#8042
     Baseline
#8021
No change  Initial JS 155.59KiB 155.59KiB
No change  Initial CSS 35.1KiB 35.1KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 8 8
No change  Assets 8 8
Change  Modules 238(-0.42%) 239
No change  Duplicate Modules 16 16
No change  Duplicate Code 2.98% 2.98%
No change  Packages 4 4
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#8042
     Baseline
#8021
No change  JS 253.55KiB 253.55KiB
No change  Other 95.85KiB 95.85KiB
No change  CSS 35.1KiB 35.1KiB

Bundle analysis reportBranch p/loadProject dashboard


Generated by RelativeCIDocumentationReport issue

@Yradex Yradex self-requested a review March 6, 2026 09:37
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/react/transform/crates/swc_plugin_worklet/gen_stmt.rs (1)

14-26: Good refactor using a parameter struct.

The RegisterWorkletParams struct improves code organization by grouping all related parameters, making the API cleaner and reducing the number of individual function parameters.

Consider adding documentation comments to the struct fields for clarity, especially for is_class_member and worklet_runtime_loaded_ident whose purposes may not be immediately obvious.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/react/transform/crates/swc_plugin_worklet/gen_stmt.rs` around lines
14 - 26, Add inline documentation comments to the RegisterWorkletParams struct
fields to clarify purpose and usage, especially for is_class_member and
worklet_runtime_loaded_ident; update the struct definition
(RegisterWorkletParams, fields mode, target, worklet_type, function_name,
function, extracted_idents, extracted_js_fns, hash, is_class_member,
named_imports, worklet_runtime_loaded_ident) with concise doc comments
describing what each field represents, the meaning of boolean is_class_member,
and what worklet_runtime_loaded_ident is expected to reference/hold.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/react/transform/crates/swc_plugin_worklet/gen_stmt.rs`:
- Around line 14-26: Add inline documentation comments to the
RegisterWorkletParams struct fields to clarify purpose and usage, especially for
is_class_member and worklet_runtime_loaded_ident; update the struct definition
(RegisterWorkletParams, fields mode, target, worklet_type, function_name,
function, extracted_idents, extracted_js_fns, hash, is_class_member,
named_imports, worklet_runtime_loaded_ident) with concise doc comments
describing what each field represents, the meaning of boolean is_class_member,
and what worklet_runtime_loaded_ident is expected to reference/hold.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ac51121f-cb84-41e6-ad81-71433c668bbb

📥 Commits

Reviewing files that changed from the base of the PR and between a8364c4 and e8f95ef.

📒 Files selected for processing (33)
  • .changeset/sad-terms-reply.md
  • packages/react/transform/__test__/fixture.spec.js
  • packages/react/transform/crates/swc_plugin_worklet/gen_stmt.rs
  • packages/react/transform/crates/swc_plugin_worklet/lib.rs
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_add_worklet_runtime_ident.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_capture_env_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_ident_from_this_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_2_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_3_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_4_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_capture_globals.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_capture_type_annotations.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_destructure_from_closure.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_extract_catch_clause_params.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_extract_idents_inside_of_ctx.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_transform_recursively.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_skip_shared_identifiers_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_arrow_function.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_fn_decl_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_function_expr.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_property_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_static_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_static_property_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_js_fn_in_run_on_js_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus_alias.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus_general.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus_general_mixed.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_multiple_worklets.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_multiple_worklets_in_func.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_ui_worklet_lepus.js
🚧 Files skipped from review as they are similar to previous changes (15)
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_fn_decl_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_in_class_property_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_lepus_general_mixed.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_extract_member_expr_2_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_not_destructure_from_closure.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_in_class_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_function_expr.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_not_capture_globals.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_multiple_worklets_in_func.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_in_class_static_property_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_lepus_general.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_lepus_alias.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_extract_ident_from_this_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_multiple_worklets.js

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/react/transform/crates/swc_plugin_worklet/gen_stmt.rs (1)

14-26: Good refactoring with parameter struct.

The RegisterWorkletParams struct cleanly bundles related parameters, improving code readability and making future parameter additions easier. The struct is appropriately kept private since it's only used internally within this module.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/react/transform/crates/swc_plugin_worklet/gen_stmt.rs` around lines
14 - 26, The review notes that RegisterWorkletParams is a good refactor and
should remain private; no code changes are required—keep the struct
RegisterWorkletParams as-is (private) to continue bundling the related
parameters (mode, target, worklet_type, function_name, function,
extracted_idents, extracted_js_fns, hash, is_class_member, named_imports,
worklet_runtime_loaded_ident) and proceed with using it where the previous
parameter list was used.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/react/transform/crates/swc_plugin_worklet/gen_stmt.rs`:
- Around line 14-26: The review notes that RegisterWorkletParams is a good
refactor and should remain private; no code changes are required—keep the struct
RegisterWorkletParams as-is (private) to continue bundling the related
parameters (mode, target, worklet_type, function_name, function,
extracted_idents, extracted_js_fns, hash, is_class_member, named_imports,
worklet_runtime_loaded_ident) and proceed with using it where the previous
parameter list was used.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2aa11a7b-ab4a-49d0-ba76-41fba4b929da

📥 Commits

Reviewing files that changed from the base of the PR and between e8f95ef and 9ac5804.

📒 Files selected for processing (34)
  • .changeset/sad-terms-reply.md
  • packages/react/transform/__test__/fixture.spec.js
  • packages/react/transform/crates/swc_plugin_worklet/gen_stmt.rs
  • packages/react/transform/crates/swc_plugin_worklet/lib.rs
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_add_worklet_runtime_ident_with_inner_ident.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_add_worklet_runtime_ident_with_outer_ident.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_capture_env_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_ident_from_this_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_2_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_3_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_4_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_extract_member_expr_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_capture_globals.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_capture_type_annotations.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_destructure_from_closure.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_extract_catch_clause_params.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_extract_idents_inside_of_ctx.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_not_transform_recursively.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_skip_shared_identifiers_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_arrow_function.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_fn_decl_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_function_expr.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_property_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_static_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_in_class_static_property_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_js_fn_in_run_on_js_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus_alias.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus_general.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_lepus_general_mixed.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_multiple_worklets.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_multiple_worklets_in_func.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/__swc_snapshots__/lib.rs/should_transform_ui_worklet_lepus.js
🚧 Files skipped from review as they are similar to previous changes (16)
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_in_class_property_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_lepus_general_mixed.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_not_destructure_from_closure.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_in_class_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_lepus_general.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_arrow_function.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_not_transform_recursively.js
  • packages/react/transform/test/fixture.spec.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_extract_member_expr_4_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_capture_env_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_in_class_static_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_function_expr.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_extract_ident_from_this_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_ui_worklet_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_skip_shared_identifiers_lepus.js
  • packages/react/transform/crates/swc_plugin_worklet/tests/swc_snapshots/lib.rs/should_transform_js_fn_in_run_on_js_lepus.js

@HuJean HuJean enabled auto-merge (squash) March 9, 2026 04:19
@HuJean HuJean merged commit f730d3c into main Mar 9, 2026
96 of 103 checks passed
@HuJean HuJean deleted the p/load branch March 9, 2026 05:23
colinaaa pushed a commit that referenced this pull request Mar 9, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @lynx-js/devtool-mcp-server@0.5.0

### Minor Changes

- Use `@lynx-js/devtool-connector` instead of
`@lynx-js/debug-router-connector`.
([#2284](#2284))

The new connector avoids using keep-alive connections, which makes the
connection much more reliable.

- **BREAKING CHANGE**: Remove the `./debug-router-connector` exports.
([#2284](#2284))

## @lynx-js/web-elements@0.12.0

### Minor Changes

- feat: add `willchange` event to `x-viewpager-ng`
([#2305](#2305))

### Patch Changes

- fix: firefox `@supports(width:1rex)`
([#2288](#2288))

- fix: check computed overflow style in `getTheMostScrollableKid` to
avoid treating `overflow: visible` elements as scroll containers
([#2309](#2309))

- fix: the inline-truncation should only work as a direct child of
x-text ([#2287](#2287))

- fix: getVisibleCells cannot work in firefox due to
contentvisibilityautostatechange not propagate list-item
([#2308](#2308))

- fix: foldview stuck issue
([#2304](#2304))

## @lynx-js/gesture-runtime@2.1.3

### Patch Changes

- Optimize gesture callbacks and relationships to prevent unnecessary
gesture registration and rerenders.
([#2277](#2277))

## @lynx-js/react@0.116.5

### Patch Changes

- Improve React runtime hook profiling.
([#2235](#2235))
Enable Profiling recording first, then enter the target page so the
trace includes full render/hydrate phases.

- Record trace events for `useEffect` / `useLayoutEffect` hook entry,
callback, and cleanup phases.
    -   Log trace events for `useState` setter calls.
- Wire `profileFlowId` support in debug profile utilities and attach
flow IDs to related hook traces.
- Instrument hydrate/background snapshot profiling around patch
operations with richer args (e.g. snapshot id/type, dynamic part index,
value type, and source when available).
- Capture vnode source mapping in dev and use it in profiling args to
improve trace attribution.
- Expand debug test coverage for profile utilities, hook profiling
behavior, vnode source mapping, and hydrate profiling branches.

- refactor: call loadWorkletRuntime once in each module
([#2315](#2315))

## @lynx-js/rspeedy@0.13.5

### Patch Changes

- feat: opt-in the web platform's new binary output format
([#2281](#2281))

    Introduce a new flag to enable the new binary output format.

Currently it's an internal-use-only flag that will be removed in the
future; set the corresponding environment variable to 'true' to enable
it.

- Avoid generating `Rsbuild vundefined` in greeting message.
([#2275](#2275))

-   Updated dependencies \[]:
    -   @lynx-js/web-rsbuild-server-middleware@0.19.8

## @lynx-js/lynx-bundle-rslib-config@0.2.2

### Patch Changes

- Support bundle and load css in external bundle
([#2143](#2143))

## @lynx-js/external-bundle-rsbuild-plugin@0.0.3

### Patch Changes

- Updated dependencies
\[[`c28b051`](c28b051),
[`4cbf809`](4cbf809)]:
    -   @lynx-js/externals-loading-webpack-plugin@0.0.4

## @lynx-js/react-rsbuild-plugin@0.12.10

### Patch Changes

- Support bundle and load css in external bundle
([#2143](#2143))

- Updated dependencies
\[[`59f2933`](59f2933),
[`453e006`](453e006)]:
    -   @lynx-js/template-webpack-plugin@0.10.5
    -   @lynx-js/css-extract-webpack-plugin@0.7.0
    -   @lynx-js/react-webpack-plugin@0.7.4
    -   @lynx-js/react-alias-rsbuild-plugin@0.12.10
    -   @lynx-js/use-sync-external-store@1.5.0
    -   @lynx-js/react-refresh-webpack-plugin@0.3.4

## @lynx-js/web-core-wasm@0.0.5

### Patch Changes

- Updated dependencies
\[[`4963907`](4963907),
[`8fd936a`](8fd936a),
[`0d41253`](0d41253),
[`d32c4c6`](d32c4c6),
[`7518b72`](7518b72),
[`fca9d4a`](fca9d4a)]:
    -   @lynx-js/web-elements@0.12.0

## @lynx-js/externals-loading-webpack-plugin@0.0.4

### Patch Changes

- perf: optimize external bundle loading by merging multiple
`fetchBundle` calls for the same URL into a single request.
([#2307](#2307))

- Support bundle and load css in external bundle
([#2143](#2143))

## @lynx-js/template-webpack-plugin@0.10.5

### Patch Changes

- feat: allow `templateDebugUrl` to be customized via
`output.publicPath` or the `beforeEncode` hook.
([#2274](#2274))

- feat: opt-in the web platform's new binary output format
([#2281](#2281))

    Introduce a new flag to enable the new binary output format.

Currently it's an internal-use-only flag that will be removed in the
future; set the corresponding environment variable to 'true' to enable
it.

-   Updated dependencies \[]:
    -   @lynx-js/web-core-wasm@0.0.5

## create-rspeedy@0.13.5



## @lynx-js/react-alias-rsbuild-plugin@0.12.10



## upgrade-rspeedy@0.13.5

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants