Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(cli, outdated): Adds 'Homepage' to outdated --long output. #81

Merged
merged 3 commits into from
Nov 26, 2018

Conversation

jbottigliero
Copy link
Contributor

@jbottigliero jbottigliero commented Oct 17, 2018

My current workflow (which I assume is fairly common) is:

  • Run npm outdated
  • Search npm for a/the packages
  • Go to the package's homepage (or repository)
  • Search for a changelog to determine an upgrade path

It seems like the npm outdated utility could provide a little more information to smooth out this process (and possibly enable some standardization around the changelog location).

This change proposes the output of homepage when using the --long flag. I realize this is likely not the ideal solution (homepage might not always contain a changelog), but it seems like it would be a reasonable and helpful link to provide.

I've been digging into npm's handling of CHANGELOG files (and it's permutations) to determine if there could be a more helpful link to provide here, but I haven't found anything that seems standardized or well documented.

TODO

  • Include homepage when use --parseable
  • Add homepage specific npm outdated --long tests.

===

  • package.json's homepage property is displayed when using the --long option for npm outdated

Example pretty" Output (generated from npm/cli:

Package             Current  Wanted  Latest  Location  Package Type  Homepage
aproba                1.2.0   1.2.0   2.0.0  npm       dependencies  https://github.com/iarna/aproba
bluebird              3.5.1   3.5.2   3.5.2  npm       dependencies  https://github.com/petkaantonov/bluebird
chownr                1.0.1   1.0.1   1.1.1  npm       dependencies  https://github.com/isaacs/chownr#readme
ci-info               1.4.0   1.6.0   1.6.0  npm       dependencies  https://github.com/watson/ci-info
cli-table3            0.5.0   0.5.1   0.5.1  npm       dependencies  https://github.com/cli-table/cli-table3
config-chain         1.1.11  1.1.12  1.1.12  npm       dependencies  http://github.com/dominictarr/config-chain
figgy-pudding         3.4.1   3.5.1   3.5.1  npm       dependencies  https://github.com/zkat/figgy-pudding#readme
glob                  7.1.2   7.1.3   7.1.3  npm       dependencies  https://github.com/isaacs/node-glob#readme
is-cidr               2.0.6   2.0.7   3.0.0  npm       dependencies  https://github.com/silverwind/is-cidr#readme
JSONStream            1.3.4   1.3.5   1.3.5  npm       dependencies  http://github.com/dominictarr/JSONStream
libcipm               2.0.2   2.0.2   3.0.2  npm       dependencies  https://github.com/zkat/cipm#readme
libnpmhook            4.0.1   4.0.1   5.0.2  npm       dependencies  https://github.com/npm/libnpmhook#readme
npm-packlist         1.1.11  1.1.12  1.1.12  npm       dependencies  https://www.npmjs.com/package/npm-packlist
npm-profile           3.0.2   3.0.2   4.0.1  npm       dependencies  https://github.com/npm/npm-profile/tree/latest/lib#readme
npm-registry-fetch    1.1.0   1.1.0   3.8.0  npm       dependencies  https://github.com/npm/registry-fetch#readme
opener                1.5.0   1.5.1   1.5.1  npm       dependencies  https://github.com/domenic/opener#readme
pacote                8.1.6   8.1.6   9.1.0  npm       dependencies  https://github.com/zkat/pacote#readme
query-string          6.1.0   6.2.0   6.2.0  npm       dependencies  https://github.com/sindresorhus/query-string#readme
readable-stream       2.3.6   2.3.6   3.0.6  npm       dependencies  https://github.com/nodejs/readable-stream#readme
semver                5.5.0   5.6.0   5.6.0  npm       dependencies  https://github.com/npm/node-semver#readme
ssri                  6.0.0   6.0.1   6.0.1  npm       dependencies  https://github.com/zkat/ssri#readme
unique-filename       1.1.0   1.1.1   1.1.1  npm       dependencies  https://github.com/iarna/unique-filename

- `package.json`'s `homepage` property is displayed when using the `--long` option for `npm outdated`
@jbottigliero jbottigliero requested a review from a team as a code owner October 17, 2018 15:19
@zkat zkat added the semver:minor new backwards-compatible feature label Nov 13, 2018
Copy link
Contributor

@zkat zkat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this patch. Thank you!

- Adds `homepage` to `--parseable` output.
- Updates `npm outdated --long` test to include `homepage` in expected output.
- Adds `homepage` to `npm-outdated` documentation.
@jbottigliero
Copy link
Contributor Author

Great, thanks! I've made what I believe are the last few required changes:

  • Adds homepage to --parseable output.
  • Updates npm outdated --long test to include homepage in expected output.
  • Adds homepage to npm-outdated documentation.

Let me know if you think anything should be changed or updated!

@jbottigliero
Copy link
Contributor Author

standard was failing in node@9 on Travis CI – fixed warnings.

@zkat zkat changed the base branch from latest to release-next November 26, 2018 16:06
@zkat zkat merged commit 4be51a9 into npm:release-next Nov 26, 2018
zkat pushed a commit that referenced this pull request Dec 10, 2018
* feat(cli, outdated): Adds 'Homepage' to outdated --long output.

- `package.json`'s `homepage` property is displayed when using the `--long` option for `npm outdated`

* test: npm outdated --long

- Adds `homepage` to `--parseable` output.
- Updates `npm outdated --long` test to include `homepage` in expected output.
- Adds `homepage` to `npm-outdated` documentation.

* fix: javascript standard style updates

PR-URL: #81
Credit: @jbottigliero
Reviewed-By: @zkat
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
semver:minor new backwards-compatible feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants