Skip to content

fix(stream-transform): handle promise rejections without leaking - #508

Merged
wdavidw merged 1 commit into
adaltas:masterfrom
jakezwang:fix-transform-promise-rejections
Sep 23, 2026
Merged

wdavidw merged 1 commit into
adaltas:masterfrom
jakezwang:fix-transform-promise-rejections

Conversation

@jakezwang

Copy link
Copy Markdown
Contributor

Handle a rejected async transform handler in the same then call as its fulfillment. Attaching catch to the original promise leaves the promise returned by then unhandled, so a process can terminate even after the callback or pipeline has received the error.

Adds callback and pipeline regressions in child processes with --unhandled-rejections=strict; both fail before the fix and pass afterward. The original error is preserved.

Validation: stream-transform's 79 tests and type checks pass on Node 20, 22 and 24; package lint and build pass. Full workspace npm test passes on Node 24 (1,047 passing, 6 existing pending). Root lint still reports 5 errors and 6 warnings in unchanged packages, identical to an unmodified-source run.

@wdavidw

wdavidw commented Sep 23, 2026

Copy link
Copy Markdown
Member

Thank you for reporting

@wdavidw
wdavidw merged commit e594bdf into adaltas:master Sep 23, 2026
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.

2 participants