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: log compiler option #1009

Merged
merged 1 commit into from
May 19, 2024
Merged

Conversation

rmnilin
Copy link
Contributor

@rmnilin rmnilin commented Mar 26, 2024

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, 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

  • Code changes have been tested against prettier, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

Semantic versioning classification:

  • This PR changes the codebase
    • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
    • This PR changes the internal workings with no modifications to the external API (bug fixes, performance improvements)
  • This PR only includes non-code changes, like changes to documentation, README, etc.

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.
Copy link

vercel bot commented Mar 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
million-kitchen-sink ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 26, 2024 8:39pm
sink ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 26, 2024 8:39pm

@CLAassistant
Copy link

CLAassistant commented Mar 26, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

@github-actions github-actions bot left a 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.

Copy link

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.

@github-actions github-actions bot added the Stale label Apr 12, 2024
@rmnilin
Copy link
Contributor Author

rmnilin commented Apr 12, 2024

up

@github-actions github-actions bot removed the Stale label Apr 13, 2024
Copy link

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.

@github-actions github-actions bot added the Stale label Apr 28, 2024
@lxsmnsyc
Copy link
Collaborator

lxsmnsyc commented May 3, 2024

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.

@github-actions github-actions bot removed the Stale label May 4, 2024
Copy link

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.

@github-actions github-actions bot added the Stale label May 19, 2024
@lxsmnsyc lxsmnsyc merged commit 746e00f into aidenybai:main May 19, 2024
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants