Merged
Conversation
parfeon
requested changes
Jan 5, 2022
Contributor
parfeon
left a comment
There was a problem hiding this comment.
Changes looks good. Should we have another test case for setter?
phairow
previously approved these changes
Jan 7, 2022
| }; | ||
|
|
||
| export default class { | ||
| _db: DatabaseInterface; |
Contributor
There was a problem hiding this comment.
Nice to see this removed since it was not used
| if (!val || typeof val !== 'string' || val.trim().length === 0) { | ||
| throw new Error('Missing uuid parameter. Provide a valid string uuid'); | ||
| } | ||
| this.UUID = val; |
Contributor
There was a problem hiding this comment.
Looks good, I know we discussed this and I will hold back my concern on throwing exceptions from constructors :) it is a C# and Java thing (something to do with destructor cleanup of resources that is not relevant here) which made me take that stand. For this it should be fine.
Contributor
There was a problem hiding this comment.
since constructor calls setUUID it will have potential to throw when constructor is called
| let storageParams = { uuid: 'customUUID', networking: networking }; | ||
| const pubnub = new PubNub(storageParams); | ||
| assert.equal(pubnub.getUUID(), 'customUUID'); | ||
| assert.throws(() => { |
| publishKey: 'myPublishKey', | ||
| uuid: ' ' | ||
| }; | ||
| assert.throws(() => { |
are
previously approved these changes
Jan 7, 2022
parfeon
previously approved these changes
Jan 12, 2022
Contributor
Author
|
@client-engineering-bot release as v5.0.0 |
f6880b0
kazydek
approved these changes
Jan 12, 2022
are
approved these changes
Jan 12, 2022
techwritermat
approved these changes
Jan 12, 2022
|
🚀 Release successfully completed 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
refactor: Breaking change,
uuidparameter is mandatory.uuidis required parameter in PubNub constructor.BREAKING CHANGES: SDK will not generate or store
uuidautomatically.uuidis required parameter in PubNub constructor.