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

Have an option for opting out of the version checker messages? #1774

Closed
orta opened this issue Jul 2, 2020 · 6 comments · Fixed by #1821
Closed

Have an option for opting out of the version checker messages? #1774

orta opened this issue Jul 2, 2020 · 6 comments · Fixed by #1821
Labels
🚀 Feature Request new suggested feature

Comments

@orta
Copy link
Contributor

orta commented Jul 2, 2020

🚀 Feature Proposal

Hi folks, it might not be a shock but I am always using nightly TypeScript and would love to be able to opt out of the messages that it could be unstable with Jest. I dig the point of the messaging.

Happy to make the PR, but wanted to see if folks would want it be done and/or how. env vars? config?

@orta orta added the 🚀 Feature Request new suggested feature label Jul 2, 2020
@ahnpnl
Copy link
Collaborator

ahnpnl commented Jul 3, 2020

hey @orta glad to have you here. I had some thoughts about this a while ago. I have 2 similar ideas about this:

Using env var

  • This env var can be persisted after 1st run so the next run won't show the message again.

  • Maybe this env var value will be updated once user uses a new TypeScript version so the message will show again and then the run after that won't show ?

Using config

The only doubt I have with this approach is: imo having too many config options are not so nice.

I'd prefer more the approach using env var. Let me know what you think :)

@orta
Copy link
Contributor Author

orta commented Jul 3, 2020

Simplest option might be to detect process.env.TS_JEST_IGNORE_VERSION_WARNINGS and skip the warnings, no need to anything too complex - it can cover all the different checks then?

@ahnpnl
Copy link
Collaborator

ahnpnl commented Jul 3, 2020

👍LGTM, PR is welcome !

@ahnpnl
Copy link
Collaborator

ahnpnl commented Jul 13, 2020

I forgot that jest creates a sandbox environment to run test, so process.env won't work. I think the only way is create a new config option.

But if user explicitly sets sys env before running tests, it should be possible to check to hide/show warning message.

@orta
Copy link
Contributor Author

orta commented Jul 21, 2020

hah, now I feel guilty! Thanks @ahnpnl

@ahnpnl
Copy link
Collaborator

ahnpnl commented Aug 11, 2020

26.2.0 is out which includes this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 Feature Request new suggested feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants