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 postinstall spam #10152

Closed
tildechris opened this issue Jul 1, 2019 · 8 comments
Closed

babel-cli postinstall spam #10152

tildechris opened this issue Jul 1, 2019 · 8 comments
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@tildechris
Copy link

Bug Report

Current Behavior
When installing babel-cli, a transitive dependency is spamming the installation log. Consider removing core-js as a dependency.

$ npm install
...
> [email protected] postinstall /usr/local/google/home/tildechris/src/tildechris-expeditors/node_modules/core-js
> node scripts/postinstall || echo "ignore"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> [email protected] postinstall /usr/local/google/home/tildechris/src/tildechris-expeditors/node_modules/core-js-pure
> node scripts/postinstall || echo "ignore"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

Expected behavior/code

Installation without error should not produce any output by default.

Environment

  • Babel version(s): [e.g. 6.26.0]
  • Node/npm version: [e.g. node v11.10.0/npm 6.7.0]
  • OS: [Debian GNU/Linux rodete]
  • Monorepo: [e.g. no]
  • How you are using Babel: [cli]

Possible Solution
Consider removing core-js as a dependency.

Additional context/Screenshots

Please see below for more context:

zloirock/core-js#548

tl;dr - The core-js maintainer isn't willing to revert this regression.

@babel-bot
Copy link
Collaborator

Hey @tildechris! 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.

@zloirock
Copy link
Member

zloirock commented Jul 1, 2019

Good luck -)

@tildechris
Copy link
Author

Thanks @zloirock. Hopefully this request remains civil. Your package obviously delivers value, but IMHO this is a regression.

Please let me know if there's anything that would help you reconsider your decision.

@ghost
Copy link

ghost commented Jul 1, 2019

@tildechris Don't even worry about it - the people who want to push ads in inappropriate places always get spanked and this will be no different.

People clearly don't like ads in general, never mind this desperate, pathetic and distasteful personal ad inappropriately spewed into your logs. Just look at the amount of people running adblock who disrupted Google and the rest of the big-money ad industry.

You might consider even encouraging this bad behavior so we can reach endgame more quickly.

If that's not enough for you right now, I would also encourage you and anyone else who cares to fill core-js issues with their own personal ads while also complaining directly to NPM.

@tildechris
Copy link
Author

Thanks @waynebloss. In order to evaluate this issue effectively, we should keep commentary on the upsteam issue at zloirock/core-js#548.

Let's limit this thread to its effect on babel-cli and possible solutions.

@ghost
Copy link

ghost commented Jul 1, 2019

@tildechris Yeah no problem. You won't see this particular account commenting there because apparently @zloirock can dish it out, but can't take it when people post inappropriate messages in inappropriate places that take up his or her resources.

The possible solutions that I can see:

  • Complain to NPM until they kick all the bad actors off their platform.
  • Complain to every package that uses this junk.
  • Find someone to fork and maintain it without ads.
  • Wait until the bad actors wake up and smell their own feces.

Eventually enough things will break and we'll win. There's no doubt in my mind.

@jhpratt
Copy link

jhpratt commented Jul 1, 2019

core-js is a major dependency, as it's used for a few plugins. Frankly, there's not a chance it's going to be removed.

@nicolo-ribaudo
Copy link
Member

I can't reproduce this report: when I run npm install --save-dev @babel/cli I don't get the postinstall message.

I only get it from @babel/preset-env. I have talked with other people from the team, and we have decided to hide that message for users who don't use Babel to inject core-js in their code. If you use Babel to inject imports to core-js (or to @babel/runtime-corejs3), you'll still see the postinstall message coming from one of those two packages, because you are directly depending on core-js.

@tildechris
Copy link
Author

Thanks @nicolo-ribaudo. I should've added the only reason I thought it was babel-cli was because of

$ npm ls core-js
└─┬ [email protected]
  ├─┬ [email protected]
  │ └── [email protected] 
  ├─┬ [email protected]
  │ └── [email protected]  deduped
  └─┬ [email protected]
    └── [email protected]  deduped

I agree that it's a reasonable compromise to only show this message if you directly depend on core-js.

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Jul 5, 2019

Fixed by zloirock/core-js#590

Current status:

  1. Babel 6 packages (@tildechris, used by you) aren't maintained anymore, except maybe for highly problematic securety issues. I don't know how they behave.
  2. @babel/preset-env and @babel/plugin-transform-runtime don't show the message when installed, since who uses those packages might not use core-js. If they use core-js using one of those package, they will see the message because of other dependencies.
  3. @babel/runtime-corejs2, @babel/runtime-corejs3 and @babel/polyfill do show the postinstall message, snce they are just wrappers around core-js. We won't remove it (and probably we can't), since it's a decision that only the core-js author can take.
  4. @babel/node does show the message, since internally it loads core-js before running your code to make it work in older node versions.

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants