Skip to content

Added a list sub-command for the yarn global command. Added unit test.#3308

Merged
bestander merged 1 commit intoyarnpkg:masterfrom
gonzofish:master
May 12, 2017
Merged

Added a list sub-command for the yarn global command. Added unit test.#3308
bestander merged 1 commit intoyarnpkg:masterfrom
gonzofish:master

Conversation

@gonzofish
Copy link
Copy Markdown
Contributor

This involved moving the list function out of the buildSubCommands so it could be called from ls & list.

Calling global ls will display a warning that global ls is deprecated and to use global list.

Summary
Changed the yarn global ls command to yarn global list to be inline with the non-global command, as per #3003.

Test plan

Tests were updated to ensure that the output of yarn global ls and yarn global list produced the same results. Running yarn run test verified the new test passed.

This involved moving the list function out of the buildSubCommands so it could be called from ls & list.

Calling global ls will display a warning that global ls is deprecated and to use global list.
@gonzofish
Copy link
Copy Markdown
Contributor Author

There was a timeout issue in each of the failed tests, but they were different tests that failed and they were not related to my change (as far as I can tell)...what should I do to remedy?

const lockfile = await Lockfile.fromDirectory(config.cwd);
const install = new Install({skipIntegrityCheck: true}, config, new NoopReporter(), lockfile);
const patterns = await install.init();
reporter.warn(`\`yarn global ls\` is deprecated. Please use \`yarn global list\`.`);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants