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

`verbose` option has no effect

Open timwis opened this issue 6 years ago • 8 comments

I'm still getting all the warnings, even with verbose: false. Did you perhaps mean to use an || operator instead of && on this line? Happy to submit a PR if that's helpful.

timwis avatar Apr 09 '18 11:04 timwis

I'd also love to have the ability to suppress these warnings. It's very annoying to have a slew of warnings due to external dependencies we have no control over.

kevinmook avatar May 23 '18 16:05 kevinmook

This is the result on my side.

With verbose: true (default) screen shot 2018-06-10 at 20 33 30

With verbose: false screen shot 2018-06-10 at 20 33 40

You can clearly see that rxjs is now only printed once instead of multiple times.

@timwis Are you able to take a screenshot showing that it doesn't work for you?

@kevinmook It's a warning for a reason. If we can't detect it it might break your app. PRs to add the engines field to the external dependencies would definitely help. I would be open to suggestions though, but entirely disabling it doesn't feel right.

SamVerschueren avatar Jun 10 '18 18:06 SamVerschueren

Same here, very annoying.

Any update on this?

vielhuber avatar Jul 31 '18 22:07 vielhuber

See my last comment. Any ideas on how to fix this are more than welcome. Maybe something like a whitelist option or something? Which safely ignores that no engines field is specified.

@sindresorhus any ideas or suggestions?

SamVerschueren avatar Aug 01 '18 03:08 SamVerschueren

First we have to define the desired behaviour.

we use e.g. VueJS and are confronted with a ton of warnings, even when using verbose: false.

First suggestion: Include a new option ("hide_warnings"), which does this: https://github.com/SamVerschueren/babel-engine-plugin/pull/13

Second suggestion: Include a whitelist option where one can list all packages one does not want to have shown warnings (['tslib','@angular/core','...']).

Thirds suggestion: Abandon the type of warning of a missing node version. It seems that the majority of plugin authors ignore this.

vielhuber avatar Aug 01 '18 07:08 vielhuber

First suggestion: Include a new option ("hide_warnings"), which does this: #13

I think can reluctantly accept this as long as there's a clear warning of the consequences in the readme.

Second suggestion: Include a whitelist option where one can list all packages one does not want to have shown warnings (['tslib','@angular/core','...']).

A whitelist makes sense, but you should really try to get the engine field added to the package.json of those projects before whitelisting them.

Thirds suggestion: Abandon the type of warning of a missing node version. It seems that the majority of plugin authors ignore this.

We're not going to do that. We need to push people to fix their package.json. Without a engine field we have to assume the lowest target possible which creates more bloated and slow code.

sindresorhus avatar Aug 03 '18 06:08 sindresorhus

OK, shall I make a pull request for the first suggestion?

vielhuber avatar Aug 03 '18 22:08 vielhuber

@vielhuber

OK, shall I make a pull request for the first suggestion?

Yes please.

dep-deprecated avatar Jan 14 '19 20:01 dep-deprecated