Skip to content

feat(codemode): support promise chaining#35617

Open
rekram1-node wants to merge 13 commits into
v2from
promise-chaining
Open

feat(codemode): support promise chaining#35617
rekram1-node wants to merge 13 commits into
v2from
promise-chaining

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • support eager sandbox promise chaining with then, catch, and finally
  • return chainable promises from all, allSettled, and race
  • flatten promises returned by handlers and preserve fulfillment/rejection pass-through semantics
  • defer handlers past synchronous execution and reject self-resolving chains
  • preserve native Promise.race loser behavior while draining work within the execution lifetime
  • accept supported CodeMode callables as handlers and update runtime guidance

Tests

  • bun test from packages/codemode (288 pass)
  • bun typecheck from packages/codemode
  • git diff --check

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.

1 participant