-
Notifications
You must be signed in to change notification settings - Fork 1
Destructure correct items in outdated json #83
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution.
I think these changes are incorrect.
Please tell me the output of yarn -v
and yarn outdated --json
.
$ yarn -v
1.5.1
$ yarn outdated --json
{"type":"info","data":"Color legend : \n \"<red>\" : Major Update backward-incompatible updates \n \"<yellow>\" : Minor Update backward-compatible features \n \"<green>\" : Patch Update backward-compatible bug fixes"}
{"type":"table","data":{"head":["Package","Current","Wanted","Latest","Package Type","URL"],"body":[["babel","6.0.15","6.0.15","6.23.0","dependencies","https://babeljs.io/"],["babel-cli","6.0.15","6.0.15","6.26.0","devDependencies","https://babeljs.io/"],["hothouse","0.4.0","exotic","exotic","devDependencies","file:../../../../../hothouse"],["is-yarn","1.0.0","exotic","exotic","devDependencies","file:../is-yarn-workspaces"],["is-yarn","1.0.0","exotic","exotic","dependencies","file:../is-yarn"]]}}
In my environment, all table items are [name, current, wanted, latest, packageType, url]
.
I'm on 1.7.0. I believe in a Yarn workspace you also get the package the dependency came from... Here's my output:
|
Might need to parse the |
This uses the `head` of the table to map fields properly and reference them by name rather than index in the array of output, since the indices can change depending on how the command is run.
I changed it so it uses the |
@remotezygote Hm...
I agree with your approach. And now, I enabled CircleCI for your pull request. |
Codecov Report
@@ Coverage Diff @@
## master #83 +/- ##
==========================================
- Coverage 33.33% 33.17% -0.17%
==========================================
Files 21 21
Lines 417 416 -1
Branches 44 43 -1
==========================================
- Hits 139 138 -1
Misses 252 252
Partials 26 26
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@remotezygote Many thanks for your contribution. |
Fixes #79