babel-engine-plugin icon indicating copy to clipboard operation
babel-engine-plugin copied to clipboard

Fix ignored verbose flag

Open LaurensRietveld opened this issue 7 years ago • 5 comments

A fix for #11

(all credits go to @timwis though, just implemented his find. Wanted my own branch with this fix to avoid a warning flood)

LaurensRietveld avatar Apr 30 '18 06:04 LaurensRietveld

I don't think this is correct. This doesn't take the flag into account, it will always ignore all the warnings. It should only do that when verbose is set to false. So don't really understand why the current implementation doesn't work.

SamVerschueren avatar May 05 '18 04:05 SamVerschueren

For what it's worth, suppressing these warnings completely is my preferred behavior. I don't want my console filled with a bunch of warnings that I can't do anything about, even if it's just once per package.

Thanks everyone involved! This package is a big help

kevinmook avatar May 23 '18 17:05 kevinmook

It should only do that when verbose is set to false

👍

So don't really understand why the current implementation doesn't work.


if (this._options.plugin.verbose === false && logs.has(pkgName)) {
  return;
}

for what reason is logs.has(pkgName) part of the condition? returning when this._options.plugin.verbose is false disables the logging.

bseber avatar Jun 05 '18 13:06 bseber

The goal is not disabling the logging, the goal is to show the log only once, so when not yet part of the logs set.

SamVerschueren avatar Jun 10 '18 18:06 SamVerschueren

I don't want my console filled with a bunch of warnings that I can't do anything about

You can do something about it. File PRs adding the engine field to those packages.

sindresorhus avatar Aug 03 '18 06:08 sindresorhus