v10.0.0
Breaking changes:
-
Migrate
onEvent-style event handlers toeventH-style (#43 by @JordanMartinez)-- Before onExit cp case _ of Normally exitCode -> ... BySignal signal -> ... -- After cp # on_ exitH case _ of Normally exitCode -> ... BySignal signal -> ...
See https://pursuit.purescript.org/packages/purescript-node-event-emitter/3.0.0/docs/Node.EventEmitter for more details.
-
Update
pidtype signature to returnMaybe Pidrather thanPid(#44 by @JordanMartinez) -
Update
killreturned value fromEffect UnittoEffect Boolean(#44 by @JordanMartinez) -
Migrate
Errortonode-os'SystemError(#45 by @JordanMartinez) -
Breaking changes made to the
Exittype (#46 by @JordanMartinez)- Moved from
Node.ChildProcestoNode.ChildProces.Types - Changed the
BySignal's constructor's arg type fromSignaltoString
- Moved from
-
Breaking changes made to the
Handletype (#46 by @JordanMartinez)- Moved from
Node.ChildProcestoNode.ChildProces.Types
- Moved from
-
Converted
defaultOptions { override = Just 1}pattern to(_ { override = Just 1})(#46 by @JordanMartinez)Before:
spawn "foo" [ "bar" ] (defaultSpawnOptions { someOption = Just overrideValue }) spawn "foo" [ "bar" ] defaultSpawnOptions
After:
spawn "foo" [ "bar" ] (_ { someOption = Just overrideValue }) spawn "foo" [ "bar" ] identity
-
Restrict end-user's ability to configure
stdioto only those appended tosafeStdio(#46 by @JordanMartinez)See the module docs for
Node.ChildProcess. -
All
ChildProcess-creating functions have been updated to support no args and all args variants (#46, #48 by @JordanMartinez)
New features:
-
Added event handler for
spawnevent (#43 by @JordanMartinez) -
Added missing APIs (#44 by @JordanMartinez)
- exitCode
- kill (no signal specified)
- kill' (kill with a
Stringsignal) - killSignal (kill with an ADT
Signalarg) - killed
- signalCode
- spawnArgs
- spawnFile
-
Added unsafe, uncurried API of all ChildProcess-creating functions (#46 by @JordanMartinez)
-
Added safe variant of
spawnSync/spawnSync'(#46 by @JordanMartinez) -
Added
Aff-basedwaitSpawnedto safely getPid(#47 by @JordanMartinez)Blocks until child process either successfully spawns or fails to spawn.
Bugfixes:
Other improvements:
- Bumped CI's node version to
lts/*(#41 by @JordanMartinez) - Updated CI
actions/checkoutandactions/setup-nodeetov3(#41 by @JordanMartinez) - Format codebase & enforce formatting in CI via purs-tidy (#42 by @JordanMartinez)
- Migrate FFI to uncurried functions (#44, #46 by @JordanMartinez)
- Updated recommended module alias in docs (#46 by @JordanMartinez)