-
Notifications
You must be signed in to change notification settings - Fork 35
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
Only show modules that is defined on package.json #52
Comments
I guess you're right, but there is another problem. Some people develop monorepo projects, which could contain multiple |
Yes, I have a monorepo myself (using lerna). What do you think the best approach, walk up directory tree until it's a root directory, then for every package.json found, add it to the list of available deps? Lerna itself only has Also, do you think making explicit package only as default behavior is preferable? because this is kind of breaking change |
Filtering Since everything resolves |
What if the packages were simply sorted based on their presence in a I've been working with Gulp plugins, and the plugin has dutifully been suggesting |
What is the use case for importing a module that you did not install? A module that is not managed by you, but is managed by and can be upgraded and replaced at any time by a different project you depend on? I'm pretty sure this is something you should never do, so offering it as an option is just another way to help people shoot themselves in the foot. |
I really like the idea of filtering by We will consider this if it raises more support. |
@jonyeezs hey, not sure why you need more opinions on this issue, it's the most upvoted opened issue. I'm also waiting for this feature and actually surprised this package doesn't work this way by default. 😉 |
Currently autocomplete-modules list all packages inside
node_modules
directory. Using npm 3 will make autocomplete list all packages because of flat hierarchy.I think the default behavior should only list packages that is native in nodejs and packages that is explicitly defined in
package.json
. We can probably add another setting to include all packages insidenode_modules
if we want implicit importWhat do you think?
The text was updated successfully, but these errors were encountered: