ranyitz / qnm

:mag: cli utility for querying the node_modules directory

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a way to include bundled dependencies

barak007 opened this issue · comments

Hey, 10x for this great tool.

I encountered a case where when installing packages that uses bundledDependencies running qnm does not report about these dependencies.

It would be nice to have support for this as one of the functionalities that qnm is providing is to figure out what version is actually running.

Thanks @barak007!

From what I know, it does show the bundledDependencies, but it doesn't indicate that those are "bundledDependencies" which I think would be nice to be aware of when running qnm.

@barak007 Here is a PR with a suggested implementation for showing bundledDependencies in qnm's output, let me know what you think.

The indication is great! and I want to suggest one more case that I think caused me not to see the bundled dependency.
I'm not sure if qnm already shows if a package is forced with resolutions or overrides but when I tried to use "resolutions" (yarn) on a dependency that some package declared as bundled and it didn't show that the bundled dependency was still in the original location (not forced). if you want I can open it as a separated issue.

Hey! Thanks.

Today qnm is not aware to yarn's resolutions or npm's overrides.

It sounds like an good idea, to mark a specific dependency as (resolutions)/(overrides) in the same manner as (bundledDependnecies) to provide a hint about the reason a certain package is located in specific place in the file tree.

Do you think that would be helpful?


Regarding the possible bug, the main reason that I created qnm is that it'll replace the manual work of checking files on the file system, with that in mind, I made it look at the file system as a source of truth and I'm confidence that it's reliable. (e.g. if it says a certain package is located somewhere, you will see it in this location).

If that's not the case, please create a small repro which I'll be able to debug and solve the issue in case it exists.

In regards to resolutions I think it will be good addition. In regards to the possible bug I will reproduce and open new issue if needed