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

Fix repeatedly showing postinstall to once a day #597

Closed
wants to merge 2 commits into from

Conversation

remy
Copy link

@remy remy commented Jul 17, 2019

This uses a temp file and checks the timestamp (useful for local development) and it means that the request for support is only shown on that particular machine once a day.

Ref #548

Hopefully this helps calm people down!

This uses a temp file and checks the timestamp (useful for local
development) and it means that the request for support is only shown on
that particular machine once a day.
@zloirock
Copy link
Owner

Thanks. One moment - I'm ready to limit it to one message per npm install. I have no ideas about how to get this info, so we could use, for example, 5 minutes. Also, try / catch block on writeFileSync could be useful.

@remy
Copy link
Author

remy commented Aug 31, 2019

Sorry, super slack on reply to this thread (though now it might be that npm will be shooting us down anyway).

I added the try/catch on write and I've changed the check to be on a 5 minute timeout as you requested.

@zloirock
Copy link
Owner

zloirock commented Sep 1, 2019

Thanks. I already reworked it by a little more complex logic. About NPM - seems new rules are not a problem.

@zloirock zloirock closed this in ee76c97 Sep 1, 2019
@onexdata
Copy link

I was hired to discover and fix the reason node build logs just doubled in size.

It's because someone added something that uses core-js, and each sub-package that uses it also shows an add saying zloirock is looking for a good job.

While I understand we all need to eat, 50+ ads spamming the same thing is apparently a big enough issue to pay someone to get rid of.

I see this has been a problem for people for a while... Might want to fix this before "zloirock is looking for a good job" becomes a meme or synonymous with spam. That would probably not be the outcome you're looking for.

@andrewzah
Copy link

andrewzah commented Feb 14, 2020

It's because someone added something that uses core-js, and each sub-package that uses it also shows an add saying zloirock is looking for a good job.

This is still occurring.

@lifenstein
Copy link

lifenstein commented Mar 19, 2020

It's possible to add one of many environment variables to hide the ads:

https://github.com/zloirock/core-js/blob/master/packages/core-js/postinstall.js#L31

Options available since https://github.com/zloirock/core-js/releases/tag/v3.3.0 , mid October.

@andrewzah
Copy link

So instead of outright removing the spam, making people dig into changelogs/github issues to figure out that it's even possible to disable it is better?

@lifenstein
Copy link

lifenstein commented Mar 23, 2020

@azah

  1. There's a bit of a backstory behind the ad: Get rid of postinstall message #548 (comment)
  2. Since the sole package maintainer seems to be in jail for 18 months ( State and governance of the project? #767 (comment) ), I think it is safe to assume there won't be any releases anytime soon. (Update: another contributor seems to have privileges.)
  3. It's an open-source repo (MIT license) and anyone is free to fork it.
  4. I never said or even implied that what I posted was "better", just a workaround that I found by digging around. I have nothing to do with the package; just pointed out that there are options available, if one bothers to look.

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.

5 participants