Skip to content
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

Clarify what' yarn ls' is showing #181

Open
swang opened this issue Oct 14, 2016 · 6 comments
Open

Clarify what' yarn ls' is showing #181

swang opened this issue Oct 14, 2016 · 6 comments

Comments

@swang
Copy link

swang commented Oct 14, 2016

Reposting from yarnkpkg/yarn

yarn ls has no clear documentation. I would like to add some but it I want to be clear what is going on.

modules
From the screenshot, it looks like zip-stream requires a versioning of lodash@~3.2.0 in grey, while the bolded [email protected] is the actual version of lodash that was installed.

But.. looking into the code, the grey/"dim" npm modules that don't have a bold equivalent (ex: compress-commons) means that they have been hoisted up to the main node_modules/ folder. So anything that is bolded, is actually dependencies that yarn decided it couldn't hoist out to the main folder. Is this mostly correct? Is there something else that should be known in the documentation?

@markstos
Copy link
Contributor

markstos commented Dec 6, 2016

It's also not clear what yarn ls --depth 0 is showing. I would expect it to list the same dependencies seen in package.json, but it lists many more. I suspect it's listing nested dependencies which got flattened to the top level, even though they are not top-level dependencies. This behavior should be documented.

@swang swang closed this as completed Nov 8, 2017
@markstos
Copy link
Contributor

markstos commented Nov 8, 2017

This should be re-opened, it's still not clear what yarn list --depth 0 is showing. See: #251 (review)

@olingern
Copy link
Contributor

olingern commented Nov 8, 2017

@markstos I'll provide a detail explanation of what is being displayed here later today.

@Haroenv Haroenv reopened this Nov 8, 2017
@olingern
Copy link
Contributor

olingern commented Nov 10, 2017

I suspect it's listing nested dependencies which got flattened to the top level, even though they are not top-level dependencies.

@markstos At a glance from the work a year ago, this seems to be correct. I implemented the depth relative to the existing tree output that @kittens had put together, and not something that mirrors npm.

If there's a desire to mirror npm, perhaps, that conversation is better moved to an RFC.

cc: @BYK @bestander

@markstos
Copy link
Contributor

@olingern It does seem like yarn list --depth 0 is showing flattened dependencies. I guess if you want the un-flattened dependencies, you can just open up package.json. If the current behavior is considered desired, then appropriate mentions of flattening should be added to the yarn list docs.

@hgezim
Copy link

hgezim commented Dec 29, 2020

@markstos package.json doesn't actually show you what's installed, though.

What does bold mean in the yarn ls output?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants