🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

pfork

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pfork - npm Package Compare versions

Comparing version
0.5.0
to
0.5.1
+10
-26
lib/util.js

@@ -26,3 +26,2 @@ var cp = require('child_process');

child.on('exit', execCb);
child.on('disconnect', execCb);
child.stdout.on('data', function(chunk) {

@@ -42,3 +41,3 @@ data = data ? Buffer.concat([data, chunk]) : chunk;

}
execCmd(execPath, ['-v'], function(str) {
execCmd(execPath, ['--version'], function(str) {
if (/v\d+\.\d+\.\d+/.test(str)) {

@@ -52,12 +51,8 @@ callback(RegExp['$&']);

function getMaxSemiSpaceFlag(execPath, callback) {
execCmd(execPath, ['--v8-options'], function(v8Options) {
if (v8Options.indexOf('--max-semi-space-size') !== -1) {
return callback('--max-semi-space-size');
}
if (v8Options.indexOf('--max_semi_space_size') !== -1) {
return callback('--max_semi_space_size');
}
callback('');
});
function getMaxSemiSpaceFlag(version) {
var major = parseInt(version.substring(1, version.indexOf('.')), 10);
if (major < 6) {
return;
}
return major > 9 ? '--max-semi-space-size' : '--max_semi_space_size';
}

@@ -73,18 +68,7 @@

getArgs: function(execPath, callback) {
var version;
var flag;
var execCb = function() {
if (version != null && flag != null) {
callback(version, flag);
}
};
getVersion(execPath, function(v) {
version = v;
execCb();
getVersion(execPath, function(version) {
callback(version, getMaxSemiSpaceFlag(version));
});
getMaxSemiSpaceFlag(execPath, function(f) {
flag = f;
execCb();
});
}
};
{
"name": "pfork",
"description": "fork process",
"version": "0.5.0",
"version": "0.5.1",
"main": "lib/index.js",

@@ -6,0 +6,0 @@ "author": "avenwu <avenwu@vip.qq.com>",