Skip to content

Refactor: Extract transpilation passes and callback generation from transpileStrandsToJS#8782

Merged
davepagurek merged 4 commits into
processing:dev-2.0from
LalitNarayanYadav:refactor/strands-extract-passes
May 12, 2026
Merged

Refactor: Extract transpilation passes and callback generation from transpileStrandsToJS#8782
davepagurek merged 4 commits into
processing:dev-2.0from
LalitNarayanYadav:refactor/strands-extract-passes

Conversation

@LalitNarayanYadav
Copy link
Copy Markdown
Contributor

Addresses #8694

Changes

  • Extracted runNonControlFlowPass
  • Extracted runControlFlowPass
  • Extracted buildStrandsCallback
  • Simplified transpileStrandsToJS into a staged orchestration pipeline

This improves readability by separating the major transpilation stages into named functions while preserving the existing transformation order and behavior.

Screenshots of the change

N/A (non-visual refactor)

PR Checklist

  • npm run lint passes
  • Inline reference is included / updated
  • Unit tests are included / updated

@ksen0 ksen0 added this to the 2.3 milestone May 11, 2026
@p5-bot
Copy link
Copy Markdown

p5-bot Bot commented May 11, 2026

Comment thread src/strands/strands_transpiler.js
Comment thread src/strands/strands_transpiler.js
Comment thread src/strands/strands_transpiler.js
Updated nonControlFlowCallbacks to use spread operator correctly and added comments for clarity in internalStrandsCallback function.
Copy link
Copy Markdown
Contributor

@davepagurek davepagurek left a comment

Choose a reason for hiding this comment

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

Thanks @LalitNarayanYadav, looks great!

@davepagurek davepagurek merged commit 0e00be1 into processing:dev-2.0 May 12, 2026
5 checks passed
@LalitNarayanYadav LalitNarayanYadav deleted the refactor/strands-extract-passes branch May 12, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Completed

Development

Successfully merging this pull request may close these issues.

3 participants