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:
12
12
13
13
Other improvements:
14
14
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
+
15
20
## [ v10.0.0] ( https://github.com/purescript-node/purescript-node-child-process/releases/tag/v10.0.0 ) - 2023-07-20
16
21
17
22
Breaking changes:
Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ module Node.ChildProcess
51
51
, kill'
52
52
, killSignal
53
53
, killed
54
+ , ref
55
+ , unref
54
56
, signalCode
55
57
, spawnFile
56
58
, spawnArgs
@@ -188,6 +190,12 @@ killSignal = unsafeCoerce SafeCP.killSignal
188
190
killed :: ChildProcess -> Effect Boolean
189
191
killed = unsafeCoerce SafeCP .killed
190
192
193
+ ref :: ChildProcess -> Effect Unit
194
+ ref = unsafeCoerce SafeCP .ref
195
+
196
+ unref :: ChildProcess -> Effect Unit
197
+ unref = unsafeCoerce SafeCP .unref
198
+
191
199
signalCode :: ChildProcess -> Effect (Maybe String )
192
200
signalCode = unsafeCoerce SafeCP .signalCode
193
201
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ export const pidImpl = (cp) => cp.pid;
5
5
export const killImpl = ( cp ) => cp . kill ( ) ;
6
6
export const killStrImpl = ( cp , str ) => cp . kill ( str ) ;
7
7
export const killedImpl = ( cp ) => cp . killed ;
8
+ export const refImpl = ( cp ) => cp . ref ( ) ;
9
+ export const unrefImpl = ( cp ) => cp . unref ( ) ;
8
10
export const signalCodeImpl = ( cp ) => cp . signalCode ;
9
11
export const spawnArgs = ( cp ) => cp . spawnArgs ;
10
12
export const spawnFile = ( cp ) => cp . spawnFile ;
Original file line number Diff line number Diff line change @@ -17,10 +17,13 @@ module Node.UnsafeChildProcess.Safe
17
17
, kill'
18
18
, killSignal
19
19
, killed
20
+ , ref
21
+ , unref
20
22
, signalCode
21
23
, spawnFile
22
24
, spawnArgs
23
25
, safeStdio
26
+
24
27
) where
25
28
26
29
import Prelude
@@ -120,6 +123,16 @@ killed cp = runEffectFn1 killedImpl cp
120
123
121
124
foreign import killedImpl :: EffectFn1 (UnsafeChildProcess ) (Boolean )
122
125
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
+
123
136
signalCode :: UnsafeChildProcess -> Effect (Maybe String )
124
137
signalCode cp = map toMaybe $ runEffectFn1 signalCodeImpl cp
125
138
You can’t perform that action at this time.
0 commit comments