-
-
Notifications
You must be signed in to change notification settings - Fork 583
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: log
compiler option
#1009
fix: log
compiler option
#1009
Conversation
There was a confusing behavior caused by the strange logic in the compiler logging. It is possible to turn off the logging only if the `log` option has been set to a truthy value, which is not equal to "info", because of the condition `!ctx.options.log || ctx.options.log === 'info'`. However, at the same time, the type of the `log` option is either `boolean | 'info' | undefined`. I think that this PR will make the logic of the `log` option clearer.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening this pull request! A maintainer will review it soon.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. |
up |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. |
Related (although yours is earlier): https://github.com/aidenybai/million/pull/1020/files I'll probably merge this one and just tweak my other PR. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. |
There was a confusing behavior caused by the strange logic in the compiler logging.
It is possible to turn off the logging only if the
log
option has been set to a truthy value, which is not equal to'info'
, because of the condition!ctx.options.log || ctx.options.log === 'info'
.However, at the same time, the type of the
log
option is eitherboolean | 'info' | undefined
, so there is no valid value with type that can turn off the logging.I think that this PR will make the logic of the
log
option a little clearer.Status
Semantic versioning classification: