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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor new backwards-compatible feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants