-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 deprecation warning at runtime #7342
Comments
Here's a sketchy idea to build on top of: Idea 1 (Runtime based)
Idea 2 (build-time based)Another alternative could be using preprocessing tools. For example, jsdoc-api would allow searching for deprecated keys in jsdoc comments; or maybe adding 'TODO' comments and linting with tools similar to eslint-plugin-output-todo-comments. Although, this ideas won't follow the intention of Deprecator.js. |
Good thinking about the pre-processor. I think (1) is the more pragmatic and fast to implement way. I'm still thinking about which aspects to standardize / for which deprecation scenarios to prepare, or if your example is already all that's needed. What we would likely not add is |
Yeah, option 1 is pretty straightforward, and also, it pseudo-centralizes deprecations if they are all added in So what's next? Need a hand with this? Should we wait for other ideas? |
I'll make the PR in the coming days. |
@RaschidJFR Quick update, I did not forget about this pending issue to merge your other PR. I will look into this shortly, apologies for the delay. |
🎉 This change has been released in version 5.0.0-beta.1 |
🎉 This change has been released in version 5.0.0 |
New Feature / Enhancement Checklist
Current Limitation
The Deprecator currently only allows to detect deprecated Parse Server Options. It is not possible to manage deprecations that are only detectable at run-time.
Feature / Enhancement Description
Extend the Deprecator to handle run-time deprecations.
It was expected that the deprecator will need to be extended to accommodate this scenario. The concept of the deprecator is to define deprecations centrally and compose the deprecation warning messages in a unified style, which is easy for Parse Server Options. For deprecations that are detected "in-code" or only at runtime we want to avoid spreading deprecation definitions all over the place that are difficult to manage, maintain and identify.
Example Use Case
Log deprecation warning in #7339
Alternatives / Workarounds
3rd Party References
n/a
The text was updated successfully, but these errors were encountered: