-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
Looks like module.parent
is deprecated
#157
Comments
Note that The deprecation note gives an alternate syntax to be able to get to the parent modules without altering the CJS cache: const moduleParents = Object.values(require.cache)
.filter((m) => m.children.includes(module)); Not sure if that would work here though; if there are several modules that loads Ultimately, it seems to me there are three ways of looking at it:
|
This is the best solution. |
I just saw it in the Release Notes for Node v14.6.0. PR: nodejs/node#32217
It is used here:
meow/index.js
Lines 13 to 15 in fa2a374
The text was updated successfully, but these errors were encountered: