-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(outdated): add workspaces support
- Add listing outdated direct deps of a workspace in `npm outdated` - Add ability to filter the results of `npm outdated` using `-w` config - Added tests and docs Fixes: npm/statusboard#303
- Loading branch information
Showing
5 changed files
with
408 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,3 +152,95 @@ exports[`test/lib/outdated.js TAP should display outdated deps outdated specific | |
Package Current Wanted Latest Location Depended by | ||
cat 1.0.0 1.0.1 1.0.1 node_modules/cat tap-testdir-outdated-should-display-outdated-deps | ||
` | ||
|
||
exports[`test/lib/outdated.js TAP workspaces > should display all dependencies 1`] = ` | ||
Package Current Wanted Latest Location Depended by | ||
cat 1.0.0 1.0.1 1.0.1 node_modules/cat [email protected] | ||
chai 1.0.0 1.0.1 1.0.1 node_modules/chai foo | ||
dog 1.0.1 1.0.1 2.0.0 node_modules/dog tap-testdir-outdated-workspaces | ||
theta MISSING 1.0.1 1.0.1 - [email protected] | ||
` | ||
|
||
exports[`test/lib/outdated.js TAP workspaces > should display json results filtered by ws 1`] = ` | ||
{ | ||
"cat": { | ||
"current": "1.0.0", | ||
"wanted": "1.0.1", | ||
"latest": "1.0.1", | ||
"dependent": "a", | ||
"location": "{CWD}/test/lib/tap-testdir-outdated-workspaces/node_modules/cat" | ||
} | ||
} | ||
` | ||
|
||
exports[`test/lib/outdated.js TAP workspaces > should display nested deps when filtering by ws and using --all 1`] = ` | ||
Package Current Wanted Latest Location Depended by | ||
cat 1.0.0 1.0.1 1.0.1 node_modules/cat [email protected] | ||
chai 1.0.0 1.0.1 1.0.1 node_modules/chai foo | ||
` | ||
|
||
exports[`test/lib/outdated.js TAP workspaces > should display no results if ws has no deps to display 1`] = ` | ||
` | ||
|
||
exports[`test/lib/outdated.js TAP workspaces > should display parseable results filtered by ws 1`] = ` | ||
{CWD}/test/lib/tap-testdir-outdated-workspaces/node_modules/cat:[email protected]:[email protected]:[email protected]:a | ||
` | ||
|
||
exports[`test/lib/outdated.js TAP workspaces > should display results filtered by ws 1`] = ` | ||
Package Current Wanted Latest Location Depended by | ||
cat 1.0.0 1.0.1 1.0.1 node_modules/cat [email protected] | ||
` | ||
|
||
exports[`test/lib/outdated.js TAP workspaces > should display ws outdated deps human output 1`] = ` | ||
Package Current Wanted Latest Location Depended by | ||
cat 1.0.0 1.0.1 1.0.1 node_modules/cat [email protected] | ||
dog 1.0.1 1.0.1 2.0.0 node_modules/dog tap-testdir-outdated-workspaces | ||
theta MISSING 1.0.1 1.0.1 - [email protected] | ||
` | ||
|
||
exports[`test/lib/outdated.js TAP workspaces > should display ws outdated deps json output 1`] = ` | ||
{ | ||
"cat": { | ||
"current": "1.0.0", | ||
"wanted": "1.0.1", | ||
"latest": "1.0.1", | ||
"dependent": "a", | ||
"location": "{CWD}/test/lib/tap-testdir-outdated-workspaces/node_modules/cat" | ||
}, | ||
"dog": { | ||
"current": "1.0.1", | ||
"wanted": "1.0.1", | ||
"latest": "2.0.0", | ||
"dependent": "tap-testdir-outdated-workspaces", | ||
"location": "{CWD}/test/lib/tap-testdir-outdated-workspaces/node_modules/dog" | ||
}, | ||
"theta": { | ||
"wanted": "1.0.1", | ||
"latest": "1.0.1", | ||
"dependent": "c" | ||
} | ||
} | ||
` | ||
|
||
exports[`test/lib/outdated.js TAP workspaces > should display ws outdated deps parseable output 1`] = ` | ||
{CWD}/test/lib/tap-testdir-outdated-workspaces/node_modules/cat:[email protected]:[email protected]:[email protected]:a | ||
{CWD}/test/lib/tap-testdir-outdated-workspaces/node_modules/dog:[email protected]:[email protected]:[email protected]:tap-testdir-outdated-workspaces | ||
:[email protected]:MISSING:[email protected]:c | ||
` | ||
|
||
exports[`test/lib/outdated.js TAP workspaces > should highlight ws in dependend by section 1`] = ` | ||
[4mPackage[24m [4mCurrent[24m [4mWanted[24m [4mLatest[24m [4mLocation[24m [4mDepended by[24m | ||
[31mcat[39m 1.0.0 [32m1.0.1[39m [35m1.0.1[39m node_modules/cat [[email protected][39m | ||
[33mdog[39m 1.0.1 [32m1.0.1[39m [35m2.0.0[39m node_modules/dog tap-testdir-outdated-workspaces | ||
[31mtheta[39m MISSING [32m1.0.1[39m [35m1.0.1[39m - [[email protected][39m | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.