-
Notifications
You must be signed in to change notification settings - Fork 13
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
Cannot be used inside non-main module #5
Comments
I'm sorry. I'm not sure if I completely follow. Could you give a more complete code snippet of how you're using codependency in this scenario? (or how you would like to use it) |
I have a package called If the application developer does
|
Ah, so normally, people will always require |
@ronkorving You are correct. I made it an arbitrary example. |
@ronkorving I'm hitting this issue, too. Regarding |
I think this pull request will fix this issue: #14 @Raynos @spencerhakim if you have the opportunity to try. |
I have a similar issue where i'm using this for an eslint config. The module includes multiple configs which are in my project i would then use you would only get warned of missing peer dependencies if you use one or more of these configs, but the configs are optional. (they have respective plugin-react and plugin-mocha peer dependencies ) since It's eslint itself that loads this module and it's configs and plugins. when i try to do
in /mocha.js i get the following error when running eslint in the parent
Surely the package.json that it found in |
@alasdairhurst I think a simple solution to that would be to add an option to |
Let's say I have a package called
foo
and it has three modules,bar
,baz
,bob
.When I use
codependency
insidefoo/bar
it will not work because of https://github.com/Wizcorp/codependency/blob/master/index.js#L183-L188codependency
assumes it's only imported in the main module of the package.I added a hack to my local module
To allow it to detect either the main package is equal to me or the dirname + filename is equal to me.
However this does not support packages that have modules called
lib/foo
ortest/mocks/bar
. I do not know what heuristic we can use to support those.The text was updated successfully, but these errors were encountered: