Expose fastfs on the DepencenyGraph instance.

Summary:
The FS as seen by an instance of a dependency graph is useful for clients of node-haste. This provides an accessor to fastfs so that the partial view of the filesystem can be queried. I was thinking of splitting out the fastfs creation to outside the constructor but the necessary refactoring doesn't seem worth it. The fastfs is intrinsically tied to the dependency graph and the `DependencyGraph` instance is meant to be a base-class for clients anyway. Both in react-packager and jest we are wrapping it with higher-level client specific containers, Resolver and HasteResolver respectively.

public

Reviewed By: davidaurelio

Differential Revision: D2885217

fb-gh-sync-id: 47a408b2682516bee9d6a4e6c61b9063817aaf22
This commit is contained in:
Christoph Pojer 2016-02-01 16:59:28 -08:00 committed by facebook-github-bot-9
parent f0a42f7035
commit f4fc79ab68
2 changed files with 3 additions and 3 deletions

View File

@ -147,8 +147,8 @@ class DependencyGraph {
return this._moduleCache.getModule(entryPath).getDependencies();
}
stat(filePath) {
return this._fastfs.stat(filePath);
getFS() {
return this._fastfs;
}
/**

View File

@ -110,7 +110,7 @@ class Resolver {
}
stat(filePath) {
return this._depGraph.stat(filePath);
return this._depGraph.getFS().stat(filePath);
}
getModuleForPath(entryFile) {