Don't pass watchSet when instantiating Resolver objects.

We used the watchSet only when reading package.json files, and I think we
can add package.json files to the watchSet in the ImportScanner instead.
This commit is contained in:
Ben Newman
2016-10-03 21:03:44 -04:00
parent 1a3ae4e117
commit 97ca5f1836
3 changed files with 0 additions and 4 deletions

View File

@@ -878,7 +878,6 @@ export class PackageSourceBatch {
targetArch: this.processor.arch,
extensions: this.importExtensions,
nodeModulesPaths,
watchSet: this.unibuild.watchSet,
onMissing(id) {
const error = new Error("Cannot find module '" + id + "'");
error.code = "MODULE_NOT_FOUND";

View File

@@ -125,7 +125,6 @@ export default class ImportScanner {
targetArch: bundleArch,
extensions,
nodeModulesPaths,
watchSet,
onPackageJson(path, pkg) {
return scanner._addPkgJsonToOutput(path, pkg);

View File

@@ -48,7 +48,6 @@ export default class Resolver {
targetArch,
extensions = [".js", ".json"],
nodeModulesPaths = [],
watchSet = null,
onPackageJson,
onMissing,
statOrNull = optimisticStatOrNull,
@@ -57,7 +56,6 @@ export default class Resolver {
this.extensions = extensions;
this.targetArch = targetArch;
this.nodeModulesPaths = nodeModulesPaths;
this.watchSet = watchSet;
this.onPackageJson = onPackageJson;
this.onMissing = onMissing;
this.statOrNull = statOrNull;