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

yarn list show dependencies of all packages in the workspace #5174

Open
simonrelet opened this issue Jan 8, 2018 · 4 comments
Open

yarn list show dependencies of all packages in the workspace #5174

simonrelet opened this issue Jan 8, 2018 · 4 comments

Comments

@simonrelet
Copy link

Do you want to request a feature or report a bug?

Bug, I think.

What is the current behavior?

When you run yarn list, yarn list --production, or NODE_ENV=production yarn list (not sure which one is recommended BTW) in a package, the output is the list of dependencies of all the packages in the workspace.

If the current behavior is a bug, please provide the steps to reproduce.

Github sample: /~https://github.com/simonrelet/yarn-workspace-issue
In a terminal run:

git clone /~https://github.com/simonrelet/yarn-workspace-issue
cd yarn-workspace-issue
yarn install
cd packages/ccc
yarn list

Output:

yarn list v1.3.2
warning package.json: No license field
├─ aaa@1.0.0
│  └─ chalk@^2.3.0
├─ ansi-styles@3.2.0
│  └─ color-convert@^1.9.0
├─ bbb@1.0.0
│  └─ fs-extra@^5.0.0
├─ ccc@1.0.0
├─ chalk@2.3.0
│  ├─ ansi-styles@^3.1.0
│  ├─ escape-string-regexp@^1.0.5
│  └─ supports-color@^4.0.0
├─ color-convert@1.9.1
│  └─ color-name@^1.1.1
├─ color-name@1.1.3
├─ escape-string-regexp@1.0.5
├─ fs-extra@5.0.0
│  ├─ graceful-fs@^4.1.2
│  ├─ jsonfile@^4.0.0
│  └─ universalify@^0.1.0
├─ graceful-fs@4.1.11
├─ has-flag@2.0.0
├─ jsonfile@4.0.0
│  └─ graceful-fs@^4.1.6
├─ supports-color@4.5.0
│  └─ has-flag@^2.0.0
└─ universalify@0.1.1

What is the expected behavior?

I would expect yarn to list the dependencies of the current package.

Output:

yarn list v1.3.2

Please mention your node.js, yarn and operating system version.

Node: 9.3.0
Yarn: 1.3.2
OS: OS X 10.12.6

@ghost ghost assigned bestander Jan 8, 2018
@ghost ghost added the triaged label Jan 8, 2018
@bestander
Copy link
Member

Should be covered by yarnpkg/rfcs#83.
Your participation is welcome.

@simonrelet
Copy link
Author

Sorry for the late answer, I'll have a look at the RFC.
Thank you!

@NickHeiner
Copy link

I would also like the ability to run yarn list on a single workspace. It appears that the workspace docs are inaccurate.

image

yarn list and yarn workspace package-name list produce the same output, even when truly running yarn list in package-name would produce different output.

@chaitan94
Copy link

I went through the code and I feel that the ideal way to implement this would be to have separate lockfiles for each workspace package. In other words, I would say that #5428 needs to be solved before this can be tackled (without complicating it too much).

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

No branches or pull requests

4 participants