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

@babel/cli can't be quietened #8326

Closed
insin opened this issue Jul 14, 2018 · 13 comments · Fixed by #10399, cds-snc/report-a-cybercrime#936 or jakeherp/todo-list#1 · May be fixed by ali8889/mist#4 or dyna-dot/CyberChef#3
Closed

@babel/cli can't be quietened #8326

insin opened this issue Jul 14, 2018 · 13 comments · Fixed by #10399, cds-snc/report-a-cybercrime#936 or jakeherp/todo-list#1 · May be fixed by ali8889/mist#4 or dyna-dot/CyberChef#3
Labels
claimed good first issue help wanted outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@insin
Copy link

insin commented Jul 14, 2018

v7 Regression

Potential Commit/PR that introduced the regression

#7439

Describe the regression

@babel/cli can no longer be quietened.

The --quiet flag was removed and a "Successfully compiled..." message is logged to the console without an option to suppress it:

console.log(
`Successfully compiled ${compiledFiles} ${
compiledFiles !== 1 ? "files" : "file"
} with Babel.`,
);

Environment

@babel/cli v7.0.0-beta.53

@babel-bot
Copy link
Collaborator

Hey @insin! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

@loganfsmyth
Copy link
Member

It looks like --quiet was removed in #7439 but it probably just wasn't fully thought through, not sure. Having it seems reasonable alongside the separate --verbose option.

@Rohanhacker
Copy link

Hey @loganfsmyth, I'd like to work on this. This will be my first contrib. 😃

@loganfsmyth
Copy link
Member

@Rohanhacker go for it!

@devenbansod
Copy link
Contributor

Hi @loganfsmyth @insin so would the --quiet option basically serve to remove the currently insuppressible console.log?
Also, which one would take precedence if a user passes in both --quiet and --verbose options?

Am I missing an issue in instead basing the lone console.log output to be conditional on ! cliOptions.verbose and not be required to add --quiet back?

@loganfsmyth
Copy link
Member

Yes, I'd say it should disable all logging. My preference would be for --verbose alongside --quiet being an error.

Am I missing an issue in instead basing the lone console.log output to be conditional on ! cliOptions.verbose and not be required to add --quiet back?

I honestly don't feel strongly about it, you're right that we could absolutely just change it so that --verbose is required for the "Successfully compiled" message.

@Rohanhacker Have you looked into this at all at this point?

@Rohanhacker
Copy link

Rohanhacker commented Jul 28, 2018

I haven't thought about the case when --verbose alongside --quiet is used. I was caught up with something. I'll make a pr tomorrow. I think throwing an error make sense when both are used together.

@Rohanhacker
Copy link

@loganfsmyth I've added the quiet flag, Should I make a pr or change it so that --verbose is required for the "Successfully compiled" message ??

@thallysrc
Copy link

hey @Rohanhacker do you still working at this issue? i've been looking any pull request opened by you but i have not found it

@Rohanhacker
Copy link

@thallysrc I've added quiet flag but not sure if it is required or not

@colinmetcalf
Copy link

Hey @loganfsmyth and @Rohanhacker ! Has this issue been solved yet? If not may I take a look at it? Thanks

@nbkhope
Copy link

nbkhope commented Feb 13, 2019

When I upgraded to Babel 7, it stopped console logging the files that were transpiled. How can I get that logging back again? Now it only says Successfully compiled X files with Babel.

@ianstormtaylor
Copy link

Any update on this for adding the --quiet flag back?

chris-peng-1244 added a commit to chris-peng-1244/babel that referenced this issue Sep 6, 2019
nicolo-ribaudo pushed a commit that referenced this issue Oct 29, 2019
* Fix issue #8326, quiet the @babel/cli with --quiet cli option.

* --quiet and --verbose options now conflict with each other.
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jan 28, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.