-
Notifications
You must be signed in to change notification settings - Fork 670
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: make RecognizeStream.readableObjectMode always return Boolean #943
fix: make RecognizeStream.readableObjectMode always return Boolean #943
Conversation
Codecov Report
@@ Coverage Diff @@
## release-candidate-v5 #943 +/- ##
=========================================================
- Coverage 54.36% 26.92% -27.44%
=========================================================
Files 18 18
Lines 4505 4505
Branches 906 906
=========================================================
- Hits 2449 1213 -1236
- Misses 2054 3291 +1237
+ Partials 2 1 -1
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## release-candidate-v5 #943 +/- ##
=========================================================
- Coverage 54.36% 26.92% -27.44%
=========================================================
Files 18 18
Lines 4505 4505
Branches 906 906
=========================================================
- Hits 2449 1213 -1236
- Misses 2054 3291 +1237
+ Partials 2 1 -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.
This looks good, thanks! Just to confirm my understanding, this changes what would be the default behavior for Node 10, but it does not prevent this from functioning with Node 10, right?
Yeah, it just unifies what calling this property in the case that you don't set it to true will return such that node 10 will return the same thing as node 12 ( Example code:
Environment:
Before patch:
After patch:
Like I mentioned in the PR, this is a fairly inconsequential BC break that it could probably be safe to push to v4, but given that there's an upcoming v5 soon, might as well do it "right" per semver guidelines. |
# [5.0.0](v4.5.1...v5.0.0) (2019-10-04) ### Bug Fixes * make RecognizeStream.readableObjectMode always return Boolean ([#943](#943)) ([a276df4](a276df4)) ### Build System * drop support for Node versions 6 and 8 ([3ea1fd7](3ea1fd7)) ### Code Refactoring * change all websocket method parameters to lower camel case ([#941](#941)) ([cb6711f](cb6711f)) ### Features * add support for new authenticators in all sdks and add new service features for major release ([#946](#946)) ([3acffc5](3acffc5)) ### BREAKING CHANGES * Passing individual credentials to the service constructor will no longer work. An Authenticator must be initialized and passed in. For more information, see the migration guide. * All parameters have been converted to their lower camel case version. * Support for the `token` parameter has been removed * Support for the `customization_id` parameter has been removed * Method `setAuthorizationHeaderToken` has been removed from the WebSocket Stream classes * `RecognizeStream.readableObjectMode` will always be a Boolean value - before, it could have been `undefined`. * This SDK may no longer work with applications running on Node 6 or 8.
Unifies the return type of RecognizeStream.readableObjectMode to always return
Boolean
instead ofBoolean
on Node 12+ andtrue | undefined
for Node 10-. While this is a very slight break in behavior, figured it would be better for v5 than pushing to v4 just to be safe. See #907 for discussion on this, namely the final two comments: #907 (comment) and #907 (comment).Checklist
npm test
passes (tip:npm run autofix
can correct most style issues)