Closed bendrucker closed 8 years ago
Re: versioning. I am not convinced that implicit behavior should be considered a contract. What is explicit is that proxyquire
documents using null
, and thus, the proposed contract is that, in order to mock the absence of a module, use null
, not more generally a falsey value. If users were relying on undocumented behavior, they do so at their own risk. I would argue that patching this behavior is more a bug fix than a major release.
Can't be too careful when it comes to breaking people's builds
By that same criterion, every change to a piece of code is a major version bump, including bug fixes, regardless of whether the code is used for testing or not.
Regardless, thanks for your responses and efforts!
Yup, commits coming!
Migrating from #32 / @kgryte:
So the issue I reported over at https://github.com/bendrucker/proxyquire-universal/issues/18 actually seems to be related to this issue. When I set a stub to
false
, the stub is ignored, but, when I set the stub to a truthy value, the stub is used, even in the browser.I am guessing this has to do with "simulating the absence of modules", but I was under the impression that setting a stub to
null
meant that the stub was ignored, not simply a falsey value.Note: I am using
proxyquirify@3.0.1
.