Skip to content
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

Merged
merged 4 commits into from
Nov 24, 2016
Merged

[WIP] Add verbose flag - fixes #763 #1994

merged 4 commits into from
Nov 24, 2016

Conversation

sebmck
Copy link
Contributor

@sebmck sebmck commented Nov 22, 2016

Work in progress, need to add more places to log. Adds verbose logging in the following places:

  • CLI errors.
  • File copying/extraneous etc.
  • HTTP requests. (Still needs more info)

@sebmck sebmck mentioned this pull request Nov 22, 2016
@sebmck sebmck changed the title Add verbose flag - fixes #763 [WIP] Add verbose flag - fixes #763 Nov 22, 2016
@@ -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({
Copy link
Member

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?

Copy link
Contributor Author

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.

@bestander
Copy link
Member

ping @kittens, a few lint and undefined errors

Sebastian McKenzie added 3 commits November 24, 2016 14:56
# 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
@bestander
Copy link
Member

Looks great!
Merge when ready

@sebmck sebmck merged commit 099e76d into master Nov 24, 2016
@sebmck sebmck deleted the verbose-flag branch November 24, 2016 15:48
bestander pushed a commit to bestander/yarn that referenced this pull request Nov 24, 2016
* 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);
Copy link

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'));

Copy link
Member

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?

@Aarbel
Copy link

Aarbel commented Jan 28, 2018

@bestander yarn --verbose isn't mentioned in the documentation :
https://yarnpkg.com/lang/en/docs/cli/install/

could you add it ? ;)

@bestander
Copy link
Member

bestander commented Jan 28, 2018 via email

@Aarbel
Copy link

Aarbel commented Jan 28, 2018

ok

@cvetanov
Copy link

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

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.

6 participants