-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[WIP] Add verbose flag - fixes #763 #1994
Conversation
@@ -22,31 +22,31 @@ async function runGlobal( | |||
name: string, | |||
checkGlobal?: ?(config: Config, reporter: Reporter, out: string) => ?Promise<void>, | |||
): Promise<void> { | |||
let out = ''; | |||
const stdout = new stream.Writable({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is copied and pasted in a few places, what about making a mockOutputStream
module to encapsulate it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah i noticed this too, I'm going to abstract it out in a subsequent pull request.
ping @kittens, a few lint and undefined errors |
# Conflicts: # __tests__/commands/_helpers.js # __tests__/commands/_init.js # __tests__/commands/global.js # __tests__/commands/list.js # __tests__/commands/outdated.js # __tests__/commands/remove.js # __tests__/commands/run.js # __tests__/commands/upgrade.js
Looks great! |
* Add verbose flag - fixes yarnpkg#763 * fix lint * fix lint add verboseInspect method
}); | ||
|
||
const reporter = new Reporter({stdout, stderr: stdout}); | ||
|
||
if (beforeInstall) { | ||
await beforeInstall(cwd); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add reporter and out arguments to before install?
if (beforeInstall) {
- await beforeInstall(cwd);
+ await beforeInstall(cwd, reporter, () => out);
}
// remove the lockfile if we create one and it didn't exist before
const lockfile = await createLockfile(cwd);
// create directories
await fs.mkdirp(path.join(cwd, '.yarn-global'));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@onemen, feel free to send a PR.
Why do we need it?
@bestander yarn --verbose isn't mentioned in the documentation : could you add it ? ;) |
Please send a PR, we really appreciate when community helps us with
improving the documentation.
…On Sun, Jan 28, 2018 at 1:32 PM Clement Fradet Normand < ***@***.***> wrote:
@bestander <https://github.com/bestander> yarn --verbose isn't mentioned
in the documentation :
https://yarnpkg.com/lang/en/docs/cli/install/
could you add it ? ;)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1994 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACBdWKTTT5PmvAh7si7p1TaBb4EH0Hyzks5tPOd_gaJpZM4K545g>
.
|
ok |
I see that there are no open pull requests for adding this option in the docs so I created one in the website repo #782 |
Work in progress, need to add more places to log. Adds verbose logging in the following places: