mirror of https://github.com/status-im/metro.git
fbsource
Reviewed By: samwgoldman Differential Revision: D4314897 fbshipit-source-id: fbe11da4c63bf34d010220d74177cb3ca4cbee6d
This commit is contained in:
parent
c383638e5e
commit
4130afcf19
|
@ -264,7 +264,9 @@ class Server {
|
||||||
this._bundles[key].then(bundle => {
|
this._bundles[key].then(bundle => {
|
||||||
const deps = bundleDeps.get(bundle);
|
const deps = bundleDeps.get(bundle);
|
||||||
filePaths.forEach(filePath => {
|
filePaths.forEach(filePath => {
|
||||||
|
// $FlowFixMe(>=0.37.0)
|
||||||
if (deps.files.has(filePath)) {
|
if (deps.files.has(filePath)) {
|
||||||
|
// $FlowFixMe(>=0.37.0)
|
||||||
deps.outdated.add(filePath);
|
deps.outdated.add(filePath);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -557,6 +559,7 @@ class Server {
|
||||||
if (optionsJson in this._bundles) {
|
if (optionsJson in this._bundles) {
|
||||||
return this._bundles[optionsJson].then(bundle => {
|
return this._bundles[optionsJson].then(bundle => {
|
||||||
const deps = bundleDeps.get(bundle);
|
const deps = bundleDeps.get(bundle);
|
||||||
|
// $FlowFixMe(>=0.37.0)
|
||||||
const {dependencyPairs, files, idToIndex, outdated} = deps;
|
const {dependencyPairs, files, idToIndex, outdated} = deps;
|
||||||
if (outdated.size) {
|
if (outdated.size) {
|
||||||
|
|
||||||
|
@ -570,6 +573,7 @@ class Server {
|
||||||
|
|
||||||
const changedModules =
|
const changedModules =
|
||||||
Array.from(outdated, this.getModuleForPath, this);
|
Array.from(outdated, this.getModuleForPath, this);
|
||||||
|
// $FlowFixMe(>=0.37.0)
|
||||||
deps.outdated = new Set();
|
deps.outdated = new Set();
|
||||||
|
|
||||||
const opts = bundleOpts(options);
|
const opts = bundleOpts(options);
|
||||||
|
|
|
@ -114,6 +114,7 @@ class ModuleCache {
|
||||||
getPackageForModule(module: Module): ?Package {
|
getPackageForModule(module: Module): ?Package {
|
||||||
if (this._packageModuleMap.has(module)) {
|
if (this._packageModuleMap.has(module)) {
|
||||||
const packagePath = this._packageModuleMap.get(module);
|
const packagePath = this._packageModuleMap.get(module);
|
||||||
|
// $FlowFixMe(>=0.37.0)
|
||||||
if (this._packageCache[packagePath]) {
|
if (this._packageCache[packagePath]) {
|
||||||
return this._packageCache[packagePath];
|
return this._packageCache[packagePath];
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue