From 4be51a9cc65635bb26fa4ce62233f26e0104bc20 Mon Sep 17 00:00:00 2001 From: Joe Bottigliero Date: Mon, 26 Nov 2018 10:13:52 -0600 Subject: cli,outdated: Adds 'Homepage' to outdated --long output. (#81) * 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: https://github.com/npm/cli/pull/81 Credit: @jbottigliero Reviewed-By: @zkat --- test/tap/outdated-long.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/tap/outdated-long.js b/test/tap/outdated-long.js index 6ea5e6e2c..976d416a1 100644 --- a/test/tap/outdated-long.js +++ b/test/tap/outdated-long.js @@ -74,6 +74,10 @@ test('it should not throw', function (t) { npm.install('.', function (err) { t.ifError(err, 'install success') npm.config.set('long', true) + // since it's possible for the homepage of a package to change, after the + // install we read the value from the package.json directly to specify our + // expected output. + expOut[1] = expOut[1] + ':' + JSON.parse(fs.readFileSync(path.resolve(pkg, 'node_modules', 'underscore', 'package.json'))).homepage npm.outdated(function (er, d) { t.ifError(err, 'npm outdated ran without error') t.is(process.exitCode, 1, 'exit code set to 1') -- cgit v1.2.3