yarnpkg/yarn
View on GitHubyarn list show dependencies of all packages in the workspace
Open
#5174 opened on Jan 8, 2018
cat-featuregood first issuehelp wantedtriaged
Description
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