Skip to content

fix: propagate duplex transform sink errors#8

Merged
achingbrain merged 3 commits intomasterfrom
fix/propagate-duplex-transform-sink-errors
Jan 13, 2022
Merged

fix: propagate duplex transform sink errors#8
achingbrain merged 3 commits intomasterfrom
fix/propagate-duplex-transform-sink-errors

Conversation

@achingbrain
Copy link
Copy Markdown
Collaborator

Sink errors were either getting smothered or causing unhandled promise rejections depending on your platform.

This breaks on Chrome when creating an abortable-iterator from a duplex transform stream that you then try to abort.

Instead if the sink of a duplex stream being used as a transform returns a promise, propagate errors thrown by the sink into it's source so they can be caught and handled by the consumer.

Sink errors were either getting smothered or causing unhandled
promise rejections depending on your platform.

Instead if the sink of a duplex stream being used as a transform
returns a promise, propagate errors thrown by the sink into it's
source so they can be caught and handled by the consumer.
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 13, 2022

Codecov Report

Merging #8 (d4096c2) into master (7e5155d) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master        #8   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          268       303   +35     
  Branches        42        49    +7     
=========================================
+ Hits           268       303   +35     
Flag Coverage Δ
chrome 100.00% <100.00%> (ø)
node 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/index.ts 100.00% <100.00%> (ø)
test/index.spec.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 45859d3...d4096c2. Read the comment docs.

@achingbrain achingbrain merged commit 89df9be into master Jan 13, 2022
@achingbrain achingbrain deleted the fix/propagate-duplex-transform-sink-errors branch January 13, 2022 09:38
github-actions bot pushed a commit that referenced this pull request Jan 13, 2022
### [2.0.2](v2.0.1...v2.0.2) (2022-01-13)

### Bug Fixes

* propagate duplex transform sink errors ([#8](#8)) ([89df9be](89df9be))
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 2.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

achingbrain added a commit to alanshaw/abortable-iterator that referenced this pull request Jan 13, 2022
Fix in it-pipe lets us abort duplex streams used as transforms.

Refs: alanshaw/it-pipe#8
achingbrain added a commit to alanshaw/abortable-iterator that referenced this pull request Jan 13, 2022
Fix in it-pipe lets us abort duplex streams used as transforms.

Refs: alanshaw/it-pipe#8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant