-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ls: do not warn on missing optional deps
There was code checking node[_type], but we didn't include that field on the object that is actually checked when we are looking for problems. Fix: #3137
- Loading branch information
Showing
5 changed files
with
148 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -5,6 +5,46 @@ | |
* Make sure to inspect the output below. Do not ignore changes! | ||
*/ | ||
'use strict' | ||
exports[`test/lib/ls.js TAP ignore missing optional deps --json > ls --json problems 1`] = ` | ||
Array [ | ||
"invalid: [email protected] {project}/node_modules/optional-wrong", | ||
"missing: peer-missing@1, required by [email protected]", | ||
"invalid: [email protected] {project}/node_modules/peer-optional-wrong", | ||
"invalid: [email protected] {project}/node_modules/peer-wrong", | ||
"missing: prod-missing@1, required by [email protected]", | ||
"invalid: [email protected] {project}/node_modules/prod-wrong", | ||
] | ||
` | ||
|
||
exports[`test/lib/ls.js TAP ignore missing optional deps --parseable > ls --parseable result 1`] = ` | ||
{project} | ||
{project}/node_modules/optional-ok | ||
{project}/node_modules/optional-wrong | ||
{project}/node_modules/peer-ok | ||
{project}/node_modules/peer-optional-ok | ||
{project}/node_modules/peer-optional-wrong | ||
{project}/node_modules/peer-wrong | ||
{project}/node_modules/prod-ok | ||
{project}/node_modules/prod-wrong | ||
` | ||
|
||
exports[`test/lib/ls.js TAP ignore missing optional deps human output > ls result 1`] = ` | ||
[email protected] {project} | ||
+-- UNMET OPTIONAL DEPENDENCY optional-missing@1 | ||
+-- [email protected] | ||
+-- [email protected] invalid | ||
+-- UNMET DEPENDENCY peer-missing@1 | ||
+-- [email protected] | ||
+-- UNMET OPTIONAL DEPENDENCY peer-optional-missing@1 | ||
+-- [email protected] | ||
+-- [email protected] invalid | ||
+-- [email protected] invalid | ||
+-- UNMET DEPENDENCY prod-missing@1 | ||
+-- [email protected] | ||
\`-- [email protected] invalid | ||
` | ||
|
||
exports[`test/lib/ls.js TAP ls --depth=0 > should output tree containing only top-level dependencies 1`] = ` | ||
[email protected] {CWD}/tap-testdir-ls-ls---depth-0 | ||
+-- [email protected] | ||
|
@@ -341,7 +381,7 @@ exports[`test/lib/ls.js TAP ls cycle deps with filter args > should print tree o | |
exports[`test/lib/ls.js TAP ls deduped missing dep > should output parseable signaling missing peer dep in problems 1`] = ` | ||
[email protected] {CWD}/tap-testdir-ls-ls-deduped-missing-dep | ||
+-- [email protected] | ||
| \`-- UNMET DEPENDENCY b@^1.0.0 deduped | ||
| \`-- UNMET DEPENDENCY b@^1.0.0 | ||
\`-- UNMET DEPENDENCY b@^1.0.0 | ||
` | ||
|
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