wallaby-webpack
Advanced tools
Comparing version 0.0.27 to 0.0.28
22
index.js
@@ -50,2 +50,3 @@ 'use strict'; | ||
this._entryFiles = {}; | ||
this._testDependencies = {}; | ||
this._inputFileSystem = new WallabyInputFileSystem(this); | ||
@@ -113,2 +114,3 @@ } | ||
self._compilationFileTimestamps = {}; | ||
self._testDependencies = {}; | ||
@@ -153,2 +155,8 @@ self._loaderEmitRequired = true; | ||
if (isTestFile && m.dependencies) { | ||
var depIds = []; | ||
self._traverseDependencies(m.dependencies, depIds); | ||
self._testDependencies[trackedFile.id] = depIds; | ||
} | ||
createFilePromises.push(wallaby.createFile({ | ||
@@ -213,3 +221,5 @@ // adding the suffix to store webpack file along with the original copies for tracked files | ||
return Promise.all(createFilePromises); | ||
return Promise.all(createFilePromises).then(function () { | ||
return {testDependencies: self._testDependencies}; | ||
}); | ||
}); | ||
@@ -219,2 +229,12 @@ }; | ||
_traverseDependencies(deps, depIds) { | ||
var self = this; | ||
_.each(deps, function (dep) { | ||
if (!dep || !dep.module) return; | ||
var trackedDepFile = dep.module.resource && self._allTrackedFiles[dep.module.resource]; | ||
if (trackedDepFile) depIds.push(trackedDepFile.id); | ||
self._traverseDependencies(dep.module.dependencies, depIds); | ||
}); | ||
} | ||
static _fileArrayToObject(files) { | ||
@@ -221,0 +241,0 @@ return _.reduce(files, function (memo, file) { |
{ | ||
"name": "wallaby-webpack", | ||
"version": "0.0.27", | ||
"version": "0.0.28", | ||
"description": "Webpack postprocessor for wallaby.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18284
354