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 handling of parent being absent from cache and parent being self #16

Merged
merged 2 commits into from Nov 13, 2019

Conversation

stroncium
Copy link
Contributor

@stroncium stroncium commented Nov 13, 2019

Fixes #15

Now falls back to normal require(parent being import-fresh then) if actual parent is not in cache.

Also, handles parent being the same as target by changing parent to import-fresh too. (I'd suspect it is a really rare edge case, but memory leak from repeated import-freshing itself would be quite hard to debug.)

//NOTE additionally tested with eslint/eslint#12529

@stroncium stroncium changed the title Handle parent being out of cache and parent being self Add handling of parent being out of cache and parent being self Nov 13, 2019
@stroncium stroncium changed the title Add handling of parent being out of cache and parent being self Add handling of parent being absent from cache and parent being self Nov 13, 2019
@sindresorhus sindresorhus merged commit c827b22 into sindresorhus:master Nov 13, 2019
@sindresorhus
Copy link
Owner

Thanks for fixing :)

@mdjermanovic
Copy link

Thanks! :-)

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.

Error: Cannot read property 'require' of undefined
3 participants