Reviewed By: samwgoldman

Differential Revision: D4314897

fbshipit-source-id: fbe11da4c63bf34d010220d74177cb3ca4cbee6d
This commit is contained in:
Jeff Morrison 2016-12-13 18:57:42 -08:00 committed by Facebook Github Bot
parent c383638e5e
commit 4130afcf19
2 changed files with 5 additions and 0 deletions

View File

@ -264,7 +264,9 @@ class Server {
this._bundles[key].then(bundle => {
const deps = bundleDeps.get(bundle);
filePaths.forEach(filePath => {
// $FlowFixMe(>=0.37.0)
if (deps.files.has(filePath)) {
// $FlowFixMe(>=0.37.0)
deps.outdated.add(filePath);
}
});
@ -557,6 +559,7 @@ class Server {
if (optionsJson in this._bundles) {
return this._bundles[optionsJson].then(bundle => {
const deps = bundleDeps.get(bundle);
// $FlowFixMe(>=0.37.0)
const {dependencyPairs, files, idToIndex, outdated} = deps;
if (outdated.size) {
@ -570,6 +573,7 @@ class Server {
const changedModules =
Array.from(outdated, this.getModuleForPath, this);
// $FlowFixMe(>=0.37.0)
deps.outdated = new Set();
const opts = bundleOpts(options);

View File

@ -114,6 +114,7 @@ class ModuleCache {
getPackageForModule(module: Module): ?Package {
if (this._packageModuleMap.has(module)) {
const packagePath = this._packageModuleMap.get(module);
// $FlowFixMe(>=0.37.0)
if (this._packageCache[packagePath]) {
return this._packageCache[packagePath];
} else {