Skip to content

Conversation

@mjameswh
Copy link
Contributor

@mjameswh mjameswh commented Jul 3, 2025

What was changed

  • Bridge's error conversion logic now uses the isPromise node's utility function instead of an instanceof Promise check.

    The later is prone to Jest's globals differ from Node globals bug (i.e. somePromise instanceof Promise may evaluate to false in some contexts), which would result in not converting errors thrown from the Rust side when Worker is run in Jest.

    This has been causing Jest tests to fail with ShutdownError: Worker has been shutdown errors, using TS SDK 1.12.0.

@mjameswh mjameswh requested a review from a team as a code owner July 3, 2025 16:30
@mjameswh mjameswh merged commit 0b93a9a into main Jul 3, 2025
43 of 44 checks passed
@mjameswh mjameswh deleted the fix-jest-instanceof-promise branch July 3, 2025 21:15
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.

3 participants