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 an option to intercept and rewire nested requires #192

Closed
wants to merge 1 commit into from

Conversation

airhorns
Copy link

@airhorns airhorns commented Jun 25, 2021

Follow up to #73

This adds support for rewire-ing the inner modules required by a rewire'd module. This is really useful if you have transitive dependencies you also want to mock, or if you are using rewire as a userland require implementation, to have rewire use it's own userland implementation for nested requires as opposed to just the outer one.

@airhorns
Copy link
Author

airhorns commented Jul 1, 2021

Ended up needing a require cache too so i put together https://github.com/gadget-inc/requirefire which is a half fork of rewire that does this other stuff. I think it is different enough that it belongs somewhere else but happy to try to port the changes to rewire if you think they should be here!

@airhorns airhorns closed this Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant