thlorenz / proxyquireify

browserify >= v2 version of proxyquire. Mocks out browserify's require to allow stubbing out dependencies while testing.
MIT License
152 stars 24 forks source link

Don't disable the cache when inside `proxyquire()` and other improvements #9

Closed jhiesey closed 10 years ago

jhiesey commented 10 years ago

This is the pull request I promised a week ago in IRC together with @feross.

This change allows using proxyquireify with tape, which has both circular dependencies and keeps global state. Previously it would fail due to the lack of caching.

Proxyquireify can now be used as a browserify plugin (as opposed to a browserify replacement) as well.

I realize this is a rather big pull request. I'm open to feedback, so let me know what you think.

feross commented 10 years ago

:+1: :+1: :+1:

thlorenz commented 10 years ago

Thanks, will have a look when I get a breather.

weilu commented 10 years ago

:+1: Works for me. Fixes #6

feross commented 10 years ago

@thlorenz any chance you could take a look at this? i know you're super busy, but it's an awesome PR :)

thlorenz commented 10 years ago

I'll dedicate some time tomorrow to have a look.

thlorenz commented 10 years ago

Went out as 0.5.

Thank you both for contributing this. Awesome work @jhiesey!