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

Haste2 #599

Merged
merged 41 commits into from
Feb 16, 2016
Merged

Haste2 #599

merged 41 commits into from
Feb 16, 2016

Commits on Feb 5, 2016

  1. Initial implementation of the node-haste2 resolver.

    This is a hybrid between node-haste1 and node-haste2 and currently only works with both of them hooked up. This is terrible.
    cpojer committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    1a418ef View commit details
    Browse the repository at this point in the history
  2. Rename and cleanups in HasteModuleLoader

    * _nodeModuleNameToPath: _resolveNodeModuleName
    * _moduleNameToPath: _resolveModuleName
    * Remove package.json resolution, resolve.sync
      does this.
    cpojer committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    b237305 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a841f2f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6efc108 View commit details
    Browse the repository at this point in the history
  5. Fix buildLoader call in tests to only resolve dependencies once (bu…

    …ildLoader is called recursively).
    cpojer committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    6ce50ca View commit details
    Browse the repository at this point in the history
  6. * Resolve mocks and mock dependencies properly through node-haste2

    * Extract dependencies from `requireActual` and `requireMock`
    cpojer committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    c78a6d8 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4f76713 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b82a981 View commit details
    Browse the repository at this point in the history
  9. Stop using _resourceMap inside of HasteModuleLoader.

    (this adds two TODO items to make these two methods work properly again, but I’m unblocking myself by stubbing them out for now).
    cpojer committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    77e0893 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    95d6d99 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    9e8637a View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    3bee143 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    3e4782e View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    781585a View commit details
    Browse the repository at this point in the history
  15. Reorganize all methods in HasteModuleLoader; it is now a readable file!

    * Coverage is now collected for all modules except for node_modules; this simplifies the runner/loader quite a bit.
    * Cleaned up a few tiny bits here and there.
    cpojer committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    88396f2 View commit details
    Browse the repository at this point in the history
  16. Freeze the config object in the test runner and don’t mutate it any l…

    …onger. Remove object-assign.
    cpojer committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    5a1a457 View commit details
    Browse the repository at this point in the history
  17. New and fixed implementation for jest —onlyChanged:

    * Look up changed files starting from test files rather than changed files
    * Deduplicate testPathDirs and changed test files
    * Use the git root dir for tests, not the test path dir so we get correct absolute paths (—onlyChanged *never* worked for jest itself, what!?)
    * This might not perform as well as it did before; we’ll see and I might rewrite this again, but for now this works pretty well.
    * Simplify the tests. I’m going to make them more robust in a follow-up but most of the things the tests were covering is handled by DependencyGraph
    cpojer committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    1ea7d1e View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    2cef024 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    df4804b View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    fb018e0 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    bfbef68 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    984ead6 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    0c66ddc View commit details
    Browse the repository at this point in the history
  24. Remove access to the resolver from the ModuleLoader; build the entire…

    … moduleMap upfront in the TestRunner.
    
    + minor cleanups to the TestRunner.
    cpojer committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    1c2834f View commit details
    Browse the repository at this point in the history
  25. node-haste updates.

    cpojer committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    4132f9e View commit details
    Browse the repository at this point in the history
  26. Update the jsdom test.

    cpojer committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    2fcc121 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    bb1db33 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    7a8aa36 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    af64d93 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    0b39b9b View commit details
    Browse the repository at this point in the history
  31. Split up TestRunner and a single test run.

    Jest now has an actual software architecture. lol.
    cpojer committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    462196b View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    1829692 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    4a703de View commit details
    Browse the repository at this point in the history
  34. * Catch resolver errors

    * use testPathDirs instead of rootDir
    * Fix TestRunner-test
    cpojer committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    06c5bd7 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    f381030 View commit details
    Browse the repository at this point in the history
  36. node-haste2 usage inside of Jest is pivoting!

    * Resolving the entire Graph for every single test file has proven to be unfeasible in a sufficiently large codebase. This change now circumvents all static resolution and falls back to the same dynamic resolution that node-haste1 was providing in Jest. Jest pulls out the entire HasteMap of node-haste2 and uses that. node-modules are resolved inside of Jest only.
    * Instead of providing local moduleMaps per test, the entire haste map is now written to disk and read by workers and shared with all tests.
    * Jest is now by default using graceful-fs and provides it to test files as well. This is safer to not run into the file limits
    cpojer committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    b6eb94c View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2016

  1. Provide two implementations of changed test path resolution.

    The node-haste2 way of resolving shallow dependencies is way too slow for large codebases. The haste reverse-dep-graph lookup is less correct (ie, doesn’t work well with relative modules) but it works well with a haste only system.
    cpojer committed Feb 8, 2016
    Configuration menu
    Copy the full SHA
    e014290 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2016

  1. Configuration menu
    Copy the full SHA
    d47d677 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2016

  1. Configuration menu
    Copy the full SHA
    35a7a2f View commit details
    Browse the repository at this point in the history
  2. Fix code coverage.

    cpojer committed Feb 10, 2016
    Configuration menu
    Copy the full SHA
    1b32beb View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2016

  1. Fix TestRunner test.

    Reviewed By: voideanvalue
    
    Differential Revision: D2629814
    cpojer committed Feb 15, 2016
    Configuration menu
    Copy the full SHA
    8b8ecb9 View commit details
    Browse the repository at this point in the history