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

Add type declarations #148

Merged
merged 8 commits into from Dec 13, 2021
Merged

Add type declarations #148

merged 8 commits into from Dec 13, 2021

Conversation

lukeg90
Copy link
Contributor

@lukeg90 lukeg90 commented Nov 8, 2021

@types/hapi-pino is not compatible with pino's type declarations: https://github.com/pinojs/pino/blob/38ff645e7fd1a62ccffaa710070a03ba71495f1e/pino.d.ts

The goal of this PR is to make @types/hapi-pino unnecessary.

Copy link
Collaborator

@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.

Could you add some tests for those APIs? See how pino does them

@coveralls
Copy link

coveralls commented Nov 8, 2021

Coverage Status

Coverage decreased (-99.0%) to 0.0% when pulling 1369e11 on lukeg90:types-declaration into 204c96e on pinojs:master.

@lukeg90
Copy link
Contributor Author

lukeg90 commented Nov 9, 2021

I added a types test, but I have not added any new API, just documented what already exists. So I'm not sure what would have made the test coverage decrease to 0.

Copy link
Collaborator

@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

@lauraseidler
Copy link
Collaborator

Great idea, just one comment from my side - should the type tests maybe run in CI as well? I see you added an npm script already, but so far looks like it needs to be run manually, which is easily forgotten :)

@lukeg90
Copy link
Contributor Author

lukeg90 commented Nov 10, 2021

@lauraseidler Done :)

Copy link
Collaborator

@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

Copy link
Collaborator

@lauraseidler lauraseidler left a comment

Choose a reason for hiding this comment

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

LGTM - sorry for the delay, I was off for two weeks :)

Not sure what's going on with the coverage there - let's see if the problem persists when the PR is merged, if yes I'll look into it.

Should we release a new minor version for this?

@arty-name
Copy link
Contributor

Please, it would be nice to see this released. The latest release of pino made it nigh impossible to use the existing typings of hapi-pino.

@lukeg90
Copy link
Contributor Author

lukeg90 commented Dec 13, 2021

@lauraseidler any update on a release?

@mcollina mcollina merged commit b960b85 into hapijs:master Dec 13, 2021
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.

None yet

5 participants