Compare commits

..

2 Commits

Author SHA1 Message Date
3ec43ce4b1
chore: prepare v2.1.6 2024-07-17 14:41:58 -05:00
5c680ac55f
fix: writable issue 2024-07-17 13:26:44 -05:00
3 changed files with 12 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "purescript-node-stream-pipes",
"version": "v2.1.5",
"version": "v2.1.6",
"type": "module",
"dependencies": {
"csv-parse": "^5.5.6",

View File

@ -1,7 +1,7 @@
package:
name: node-stream-pipes
publish:
version: '2.1.5'
version: '2.1.6'
license: 'GPL-3.0-or-later'
location:
githubOwner: 'cakekindel'

View File

@ -191,9 +191,17 @@ awaitReadableOrClosed s = Aff.supervise do
awaitFinished :: forall s a. Write s a => s -> Aff Unit
awaitFinished s = Aff.supervise do
fiber <- Aff.forkAff $ onceAff0 finishH s
fiber <-
Aff.forkAff
$ parOneOf
[ onceAff0 finishH s $> Right unit
, Left <$> onceAff1 errorH s
]
finished <- liftEffect $ isWritableFinished s
if not finished then Aff.joinFiber fiber else Aff.killFiber (error "") fiber
if not finished then
liftEither =<< Aff.joinFiber fiber
else
Aff.killFiber (error "") fiber
awaitWritableOrClosed :: forall s a. Write s a => s -> Aff Unit
awaitWritableOrClosed s = Aff.supervise do