Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added method to get an iterator for all files in HasteFS #7010

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Used hasteFS.getFileIterator() in jest-resolve-dependencies
  • Loading branch information
rubennorte committed Sep 20, 2018
commit fa3c8b4d0050103fb705c25781132ecd974b7d80
11 changes: 7 additions & 4 deletions packages/jest-resolve-dependencies/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,13 @@ class DependencyResolver {
}
}
}
const modules = this._hasteFS.getAllFiles().map(file => ({
dependencies: this.resolve(file, options),
file,
}));
const modules = [];
for (const file of this._hasteFS.getFileIterator()) {
modules.push({
dependencies: this.resolve(file, options),
file,
});
}
return Array.from(collectModules(relatedPaths, modules, changed));
}
}
Expand Down