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: building sonic boom safe #316

Merged
merged 4 commits into from
Mar 17, 2022

Conversation

ramonmulia
Copy link
Contributor

@ramonmulia ramonmulia commented Mar 14, 2022

Added the following block to build safe sonic boom.

Closes #304

Copy link
Member

@jsumners jsumners left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing tests.

.taprc Outdated
@@ -1,4 +1,5 @@
ts: false
check-coverage: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

took it from pino, otherwise tests will fail if not reaches 100% coverage. https://github.com/pinojs/pino/blob/f8696ab5fb0e5a819b6255af420b29fb075cbdee/.taprc#L3

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the istanbul ignores. Let's not lower the code coverage here.

lib/utils.js Outdated
}
return stream

/* istanbul ignore next */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are there so many istanbul directives in this new code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code block comes from pino as you can see here https://github.com/pinojs/pino/blob/f8696ab5fb0e5a819b6255af420b29fb075cbdee/lib/tools.js#L335-L373
I'm not sure if we need to cover this part as there is no unit test to cover it in pino.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is covered by tests in pino. The istanbul ignores are there because on Node 12 we are lacking the WeakRef primitives that are needed for this feature.

.taprc Outdated
@@ -1,4 +1,5 @@
ts: false
check-coverage: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the istanbul ignores. Let's not lower the code coverage here.

@coveralls
Copy link

coveralls commented Mar 15, 2022

Pull Request Test Coverage Report for Build 1995385865

  • 15 of 15 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 1944509551: 0.0%
Covered Lines: 363
Relevant Lines: 363

💛 - Coveralls

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina
Copy link
Member

There are likely a few more lines to skip to satisfy the coverage requirements in Node v12: https://github.com/pinojs/pino-pretty/runs/5573573041?check_suite_focus=true.

Copy link
Member

@jsumners jsumners left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@mcollina mcollina merged commit 482a474 into pinojs:master Mar 17, 2022
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.

Dissapering logs with fatal
4 participants