You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perhaps this can just be mentioned in the README as a caveat, but if no projectName or cwd is provided, conf tries to detect the package.json of the parent package.
However, this uses the module.parent mechanism, which returns the nearest direct dependent, rather than the top level package.
The problem is that we can't really know which module in the tree is the correct one. It might be the direct parent, it might be top level, or somewhere in between. I think auto-detecting the direct one and falling back to an option is a good compromise, but happy to consider other solutions. And yes, should be documented better regardless.
As noted in: sindresorhus/electron-store#1 (comment)
Perhaps this can just be mentioned in the README as a caveat, but if no
projectName
orcwd
is provided, conf tries to detect the package.json of the parent package.However, this uses the module.parent mechanism, which returns the nearest direct dependent, rather than the top level package.
conf/index.js
Line 13 in c5a736b
This can cause issues if a module is using conf via an intermediary.
The text was updated successfully, but these errors were encountered: