Socket
Socket
Sign inDemoInstall

tsc-watch

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsc-watch - npm Package Compare versions

Comparing version 1.0.23 to 1.0.24

3

CHANGELOG.md
# @gilamran/tsc-watch CHANGELOG
## v1.0.24 - 20/07/2018
* Killing onFail and onSuccess after compilation
## v1.0.23 - 1/06/2018

@@ -4,0 +7,0 @@ * Typescript as a peer dependency (Thanks to @asztal)

70

lib/tsc-watch.js

@@ -76,2 +76,36 @@ #!/usr/bin/env node

function killAllProcesses() {
killFailureProcess().then(() => {
Signal.emitFail();
if (onFailureCommand) {
failureProcess = runCommand(onFailureCommand);
failureProcessExited = new Promise(resolve => {
failureProcess.on('exit', code => {
resolve(code);
});
});
}
});
killAllSuccessProcesses().then(() => {
Signal.emitSuccess();
if (firstTime && onFirstSuccessCommand) {
firstTime = false;
firstSuccessProcess = runCommand(onFirstSuccessCommand);
firstSuccessProcessExited = new Promise(resolve => {
firstSuccessProcess.on('exit', code => {
resolve(code);
});
});
} else if (onSuccessCommand) {
successProcess = runCommand(onSuccessCommand);
successProcessExited = new Promise(resolve => {
successProcess.on('exit', code => {
resolve(code);
});
});
}
});
}
function killAllSuccessProcesses() {

@@ -144,35 +178,3 @@ const promises = [];

if (compilationComplete) {
if (hadErrors) {
killFailureProcess().then(() => {
Signal.emitFail();
if (onFailureCommand) {
failureProcess = runCommand(onFailureCommand);
failureProcessExited = new Promise(resolve => {
failureProcess.on('exit', code => {
resolve(code);
});
});
}
});
} else {
killAllSuccessProcesses().then(() => {
Signal.emitSuccess();
if (firstTime && onFirstSuccessCommand) {
firstTime = false;
firstSuccessProcess = runCommand(onFirstSuccessCommand);
firstSuccessProcessExited = new Promise(resolve => {
firstSuccessProcess.on('exit', code => {
resolve(code);
});
});
} else if (onSuccessCommand) {
successProcess = runCommand(onSuccessCommand);
successProcessExited = new Promise(resolve => {
successProcess.on('exit', code => {
resolve(code);
});
});
}
});
}
killAllProcesses();
}

@@ -192,3 +194,3 @@ });

tscProcess.on('exit', () => Promise.all([killAllSuccessProcesses(), killFailureProcess()]));
tscProcess.on('exit', () => killAllProcesses());
process.on('SIGTERM', () => tscProcess.kill(0));
{
"name": "tsc-watch",
"version": "1.0.23",
"version": "1.0.24",
"description": "The TypeScript compiler with onSuccess command",

@@ -5,0 +5,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc