@testsmith/perfornium 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -520,7 +520,10 @@ class StepExecutor {
|
|
|
520
520
|
const Module = require('module');
|
|
521
521
|
const tempModule = new Module(filePath);
|
|
522
522
|
tempModule.filename = filePath;
|
|
523
|
-
|
|
523
|
+
// Include both script dir and cwd node_modules for dependency resolution
|
|
524
|
+
const scriptPaths = Module._nodeModulePaths(path.dirname(filePath));
|
|
525
|
+
const cwdPaths = Module._nodeModulePaths(process.cwd());
|
|
526
|
+
tempModule.paths = [...new Set([...scriptPaths, ...cwdPaths])];
|
|
524
527
|
tempModule._compile(result.code, filePath);
|
|
525
528
|
module = tempModule.exports;
|
|
526
529
|
}
|