Socket
Socket
Sign inDemoInstall

fb-watchman

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fb-watchman - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

44

index.js

@@ -147,6 +147,33 @@ /* Copyright 2014-present Facebook, Inc.

// we can discover the problem.
proc = childProcess.spawn(this.watchmanBinaryPath, args, {
stdio: ['ignore', 'pipe', 'pipe']
});
var proc = null;
var spawnFailed = false;
function spawnError(error) {
if (spawnFailed) {
// For ENOENT, proc 'close' will also trigger with a negative code,
// let's suppress that second error.
return;
}
spawnFailed = true;
if (error.errno === 'EACCES') {
error.message = 'The Watchman CLI is installed but cannot ' +
'be spawned because of a permission problem';
} else if (error.errno === 'ENOENT') {
error.message = 'Watchman was not found in PATH. See ' +
'https://facebook.github.io/watchman/docs/install.html ' +
'for installation instructions';
}
console.log('Watchman: ', error.message);
self.emit('error', error);
}
try {
proc = childProcess.spawn(this.watchmanBinaryPath, args, {
stdio: ['ignore', 'pipe', 'pipe']
});
} catch (error) {
spawnError(error);
return;
}
var stdout = [];

@@ -162,10 +189,11 @@ var stderr = [];

});
proc.on('error', function(error) {
spawnError(error);
});
proc.on('close', function (code) {
if (code !== 0) {
var why = this.watchmanBinaryPath + args.join(' ') +
' returned with exit code ' + code + ' ' +
stderr.join('');
console.log(why);
self.emit('error', why);
spawnError(new Error(
self.watchmanBinaryPath + args.join(' ') +
' returned with exit code ' + code + ' ' + stderr.join('')));
return;

@@ -172,0 +200,0 @@ }

2

package.json
{
"name": "fb-watchman",
"version": "1.4.0",
"version": "1.5.0",
"description": "Bindings for the Watchman file watching service",

@@ -5,0 +5,0 @@ "main": "index.js",

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