File tree Expand file tree Collapse file tree 4 files changed +28
-0
lines changed
Expand file tree Collapse file tree 4 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ Bugfixes:
1212
1313Other improvements:
1414
15+ ## [ v10.1.0] ( https://github.com/purescript-node/purescript-node-child-process/releases/tag/v10.1.0 ) - 2023-07-25
16+
17+ Other improvements:
18+ - Fix regression: add ` ref ` /` unref ` APIs that were dropped in ` v10.0.0 ` (#50 by @JordanMartinez )
19+
1520## [ v10.0.0] ( https://github.com/purescript-node/purescript-node-child-process/releases/tag/v10.0.0 ) - 2023-07-20
1621
1722Breaking changes:
Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ module Node.ChildProcess
5151 , kill'
5252 , killSignal
5353 , killed
54+ , ref
55+ , unref
5456 , signalCode
5557 , spawnFile
5658 , spawnArgs
@@ -188,6 +190,12 @@ killSignal = unsafeCoerce SafeCP.killSignal
188190killed :: ChildProcess -> Effect Boolean
189191killed = unsafeCoerce SafeCP .killed
190192
193+ ref :: ChildProcess -> Effect Unit
194+ ref = unsafeCoerce SafeCP .ref
195+
196+ unref :: ChildProcess -> Effect Unit
197+ unref = unsafeCoerce SafeCP .unref
198+
191199signalCode :: ChildProcess -> Effect (Maybe String )
192200signalCode = unsafeCoerce SafeCP .signalCode
193201
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ export const pidImpl = (cp) => cp.pid;
55export const killImpl = ( cp ) => cp . kill ( ) ;
66export const killStrImpl = ( cp , str ) => cp . kill ( str ) ;
77export const killedImpl = ( cp ) => cp . killed ;
8+ export const refImpl = ( cp ) => cp . ref ( ) ;
9+ export const unrefImpl = ( cp ) => cp . unref ( ) ;
810export const signalCodeImpl = ( cp ) => cp . signalCode ;
911export const spawnArgs = ( cp ) => cp . spawnArgs ;
1012export const spawnFile = ( cp ) => cp . spawnFile ;
Original file line number Diff line number Diff line change @@ -17,10 +17,13 @@ module Node.UnsafeChildProcess.Safe
1717 , kill'
1818 , killSignal
1919 , killed
20+ , ref
21+ , unref
2022 , signalCode
2123 , spawnFile
2224 , spawnArgs
2325 , safeStdio
26+
2427 ) where
2528
2629import Prelude
@@ -120,6 +123,16 @@ killed cp = runEffectFn1 killedImpl cp
120123
121124foreign import killedImpl :: EffectFn1 (UnsafeChildProcess ) (Boolean )
122125
126+ ref :: UnsafeChildProcess -> Effect Unit
127+ ref cp = runEffectFn1 refImpl cp
128+
129+ foreign import refImpl :: EffectFn1 (UnsafeChildProcess ) (Unit )
130+
131+ unref :: UnsafeChildProcess -> Effect Unit
132+ unref cp = runEffectFn1 unrefImpl cp
133+
134+ foreign import unrefImpl :: EffectFn1 (UnsafeChildProcess ) (Unit )
135+
123136signalCode :: UnsafeChildProcess -> Effect (Maybe String )
124137signalCode cp = map toMaybe $ runEffectFn1 signalCodeImpl cp
125138
You can’t perform that action at this time.
0 commit comments