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

Add jest-resolve to resolve modules based on the Facebook module resolution algorithm. #1007

Closed
wants to merge 7 commits into from

Conversation

cpojer
Copy link
Member

@cpojer cpojer commented May 14, 2016

This refactors Runtime.js and TestRunner.js and pulls out the resolution code into a new module jest-resolve which now encodes Facebook's module resolution algorithm. It provides the second half of node-haste and together with jest-haste-map can be seen as a full replacement.

There is very little new code in this diff. Most code is existing code that was lifted from another module and brought together. The next step after this diff will be to see if it makes sense to fork the resolve module and speed up how it works.

It doesn't come with its own tests (yet) because its functionality is completely covered by all the tests in Runtime.js. I have also cleaned up all of the Runtime tests and added a new createRuntime helper for testing, which should make it much easier from now on to change how an instance of Runtime is constructed for tests.

@cpojer
Copy link
Member Author

cpojer commented May 14, 2016

@facebook-github-bot import

@ghost
Copy link

ghost commented May 14, 2016

Thanks for importing. If you are an FB employee go to Phabricator to review.

@cpojer
Copy link
Member Author

cpojer commented May 14, 2016

cc @davidaurelio, as always for these kind of things :)

@davidaurelio
Copy link
Contributor

oh man, I’m sorry. I totally lost sight of this.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2021
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants