-
Notifications
You must be signed in to change notification settings - Fork 104
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
Allow cleanup of register() #63
Comments
I think this seems useful and it should not affect existing users so I don't see any problems adding it. It does change the API but since the register() function currently returns void I guess it will not really break anyone so I would consider it a minor version increment as it is backwards compatible. So feel free to go ahead and make a PR for it :-). If you do, please also update the README to reflect the API change. |
register() updated to return a function to re-instate original filename resolver. Closes dividab#63
register() updated to return a function to re-instate original filename resolver. Closes #63
Hello, first of all thank you for this very useful library! I've been working on some TypeScript tooling myself and this makes using paths some much easier.
However in testing scenarios it's useful to be able to cleanup some of the side-effects that are being caused by
register
. I'd propose returning a function fromregister()
that would reassignModule._resolveFilename
back tooriginalResolveFilename
. I'll happily make the PR if this seems aligned with your goals of this library as wellThe text was updated successfully, but these errors were encountered: