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

Use fastify-warning for handling deprecation warnings #2354

Merged
merged 9 commits into from
Jul 27, 2020
Merged

Conversation

delvedor
Copy link
Member

Continuation of #2339.
Please, take also a look at fastify/process-warning#1.

Checklist

  • run npm run test and npm run benchmark
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message and code follows Code of conduct

@delvedor delvedor added internals Change that won't impact the surface API. v3.x Issue or pr related to Fastify v3 labels Jun 27, 2020
@delvedor delvedor requested a review from a team June 27, 2020 15:44
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.

@delvedor delvedor requested review from mcollina and jsumners July 11, 2020 13:42
@delvedor
Copy link
Member Author

@mcollina @jsumners PTAL. Also review fastify/process-warning#1.

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.

just a nit

If you want to deprecate an API, or you want to warn the user about a specific use case, you can use the [`fastify-warning`](https://github.com/fastify/fastify-warning) module.

```js
const warning = require('fastify-warning')()
Copy link
Member

Choose a reason for hiding this comment

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

It would be good to explain why this is a factory.

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.

LGTM on this side.

@mcollina
Copy link
Member

@delvedor what's the state of this?

@mcollina mcollina mentioned this pull request Jul 24, 2020
@delvedor
Copy link
Member Author

@mcollina Sorry, got caught with other stuff :)
I'll try to finish this this weekend.

@delvedor
Copy link
Member Author

It would be good to explain why this is a factory.

It is already explained in the module documentation :)

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 mcollina merged commit af77198 into master Jul 27, 2020
@mcollina mcollina deleted the custom-warnings branch July 27, 2020 08:16
@github-actions
Copy link

github-actions bot commented Feb 8, 2022

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
internals Change that won't impact the surface API. v3.x Issue or pr related to Fastify v3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants