-
Notifications
You must be signed in to change notification settings - Fork 17
Print deprecation warning from Kuzzle #614
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
Print deprecation warning from Kuzzle #614
Conversation
I don't see how the deprecation are hidden in production by default? |
If I understood well, usages of the console once the sdk is build are disabled, also it seems like Kuzzle server doesn't send deprecations info when turned in mode production. But I might not be the best to answer that @jenow @Yoann-Abbes |
Codecov Report
@@ Coverage Diff @@
## 7-dev #614 +/- ##
==========================================
+ Coverage 86.75% 86.80% +0.04%
==========================================
Files 33 34 +1
Lines 1503 1516 +13
Branches 262 265 +3
==========================================
+ Hits 1304 1316 +12
Misses 146 146
- Partials 53 54 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also you should ensure that the Kuzzle
class is calling the deprecation util with an unit test
+ Applying PR suggestions
Finally, using process.env.NODE_ENV was the solution to this issue |
Co-authored-by: Adrien Maret <[email protected]>
# [7.6.0](https://github.com/kuzzleio/sdk-javascript/releases/tag/7.6.0) (2021-04-06) #### Bug fixes - [ [#622](#622) ] Pick first route when multiple non-GET routes of the same size are available ([scottinet](https://github.com/scottinet)) #### New features - [ [#621](#621) ] Secure WebSocket connection with cookie authentication ([Shiranuit](https://github.com/Shiranuit)) - [ [#613](#613) ] Implement index:stats ([Leodau](https://github.com/Leodau)) - [ [#612](#612) ] Implement security:getUserStrategies ([Leodau](https://github.com/Leodau)) #### Enhancements - [ [#620](#620) ] Add kuzzleStack property to KuzzleError ([Aschen](https://github.com/Aschen)) - [ [#617](#617) ] Add suggest to search result ([Aschen](https://github.com/Aschen)) - [ [#614](#614) ] Print deprecation warning from Kuzzle ([MathieuVeber](https://github.com/MathieuVeber)) - [ [#606](#606) ] Add _source property to user objects ([Aschen](https://github.com/Aschen)) ---
Closes #593
What does this PR do?
From now on, when developing with the SDK, you will see warning when using a deprecated action. You can disable this behavior by setting to false the deprecationWarning option on the kuzzle sdk object
How should this be manually tested?
Use a deprecated action and observe the warning(s)
Other changes
Updated doc and added tests