Comparing version
{ | ||
"name": "nw", | ||
"version": "0.87.0-3-sdk", | ||
"version": "0.87.0-4-sdk", | ||
"description": "An installer for nw.js", | ||
@@ -37,4 +37,4 @@ "repository": { | ||
"axios": "^1.6.8", | ||
"commander": "^12.0.0", | ||
"semver": "^7.6.1", | ||
"commander": "^12.1.0", | ||
"semver": "^7.6.2", | ||
"tar": "^7.1.0", | ||
@@ -56,5 +56,5 @@ "yauzl-promise": "^4.0.0" | ||
"devDependencies": { | ||
"selenium-webdriver": "^4.20.0", | ||
"selenium-webdriver": "^4.21.0", | ||
"vitest": "^1.6.0" | ||
} | ||
} |
@@ -69,2 +69,6 @@ # nw | ||
### Specify unref flag | ||
Set `nwjs_unref` in `.npmrc` or `NWJS_UNREF` environment variable. Default to `false`. This is useful if you're using `nw` package to call the executable and want to prevent zombie processes eating up memory. | ||
## Usage | ||
@@ -71,0 +75,0 @@ |
@@ -21,3 +21,4 @@ import fs from 'node:fs'; | ||
* @property {boolean} ffmpeg If true, ffmpeg is not downloaded. | ||
* @property {false | "gyp"} nativeAddon Rebuild native modules | ||
* @property {false | "gyp"} nativeAddon Rebuild native modules | ||
* @property {boolean} unref Unref the child process and unblock the caller | ||
*/ | ||
@@ -77,4 +78,5 @@ | ||
options.nativeAddon = options.nativeAddon || process.env.npm_config_nwjs_native_addon || process.env.NWJS_NATIVE_ADDON || false; | ||
options.unref = options.unref || process.env.npm_config_nwjs_unref || process.env.NWJS_UNREF || false; | ||
return { ...options }; | ||
} |
@@ -16,2 +16,3 @@ import child_process from "node:child_process"; | ||
* @property {string} [cacheDir = "./cache"] Cache directory | ||
* @property {boolean} [unref = false] Unref the child process and unblock the caller | ||
* @property {string[]} [args = []] Command line arguments | ||
@@ -36,2 +37,3 @@ */ | ||
cacheDir = "./cache", | ||
unref = false, | ||
args = [], | ||
@@ -69,2 +71,6 @@ }) { | ||
}); | ||
if (unref) { | ||
nwProcess.unref(); | ||
} | ||
}); | ||
@@ -71,0 +77,0 @@ } catch (error) { |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
35456
1.92%833
0.85%130
3.17%34
6.25%Updated
Updated