@clinic/heap-profiler
Advanced tools
Comparing version 4.1.0 to 4.1.1
{ | ||
"name": "@clinic/heap-profiler", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "Programmable interface to Clinic.js Heap Profiler", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/clinicjs/node-clinic-heap-profiler", |
@@ -10,2 +10,6 @@ # Clinic.js Heap Profiler | ||
## Issues | ||
To open an issue, please use the [main repository](https://github.com/clinicjs/node-clinic) with the `heapprofiler` label. | ||
## Installation | ||
@@ -12,0 +16,0 @@ |
@@ -119,4 +119,9 @@ 'use strict' | ||
collect (args, cb) { | ||
const nodeOptions = ` -r ${path.join(__dirname, './injects/ipc.js')}` | ||
let preloadPath = path.join(__dirname, './injects/ipc.js') | ||
if (process.platform === 'win32') { | ||
preloadPath = preloadPath.replace(/\\/g, '\\\\') | ||
} | ||
const nodeOptions = `-r "${preloadPath}"` | ||
const env = { | ||
@@ -123,0 +128,0 @@ ...process.env, |
'use strict' | ||
const { spawn } = require('child_process') | ||
const fs = require('fs') | ||
@@ -76,2 +77,23 @@ const path = require('path') | ||
test('child_process - test spawn - filepath with spaces should be preloaded', t => { | ||
const env = process.env | ||
// double quotes are required for paths with spaces | ||
env.NODE_OPTIONS = `-r "${path.join(__dirname, 'fixtures', 'file with space.js')}"` | ||
if (process.platform === 'win32') { | ||
env.NODE_OPTIONS = env.NODE_OPTIONS.replace(/\\/g, '\\\\') | ||
} | ||
this.process = spawn( | ||
process.execPath, | ||
[path.join('test', 'fixtures', 'randomHashes.js')], | ||
{ stdio: ['ignore', 'inherit', 'inherit'], env } | ||
) | ||
this.process.once('exit', (code) => { | ||
t.equal(code, 0) | ||
t.end() | ||
}) | ||
}) | ||
test('cmd - test visualization - missing data', t => { | ||
@@ -78,0 +100,0 @@ const tool = new ClinicHeapProfiler({ debug: true }) |
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
305091
153
5125
114
32
8