Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 1.91 KB

CHANGELOG.md

File metadata and controls

44 lines (27 loc) · 1.91 KB

spawnteract

v5.1.0

Allow opt-out of automatic connection file removal on process exit

  • To disable, set cleanupConnectionFile to false in the spawnOptions:
    launch(kernelName, { cleanupConnectionFile: false });
  • Otherwise, the default will still be to remove the connection file on process exit

v5.0.0

Replaced child_process.spawn with execa

  • In order to improve kernel process cleanup

  • execa is built on top of child_process in a backward compatible fashion and returns a ChildProcess instance, so you will most likely not need to change anything to upgrade from v4.0.0

  • Usage and arguments are backward compatible:

launch(kernelName, specs, spawnOptions)
launchSpec(kernelSpec, spawnOptions)
launchSpecFromConnectionInfo(kernelSpec, config, connectionFile, spawnOptions)

The differences are:

  • spawnOptions will support execa options, a superset of child_process options, adding functionality outlined in the execa API docs.

  • While the spawnResults object is still an instance of ChildProcess, execa adds some additional properties, which may or may not ever be useful for kernel processes.

From the docs, execa:

returns a ChildProcess instance, which is enhanced to also be a Promise for a result Object with stdout and stderr properties.

Automatic connection file cleanup:

  • Once a kernel launched with spawnteract exits or errors out, spawnteract will attempt to delete that kernel's connection file.
  • This will fail silently if the connection file is missing or any other potential problem prevents the file from being found and removed.