-
Notifications
You must be signed in to change notification settings - Fork 0
fix: Incorrect type for SQS messageGroupId
#1205
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
Conversation
| if (queueUrl.includes('.fifo')) { | ||
| messageParameters.MessageDeduplicationId = uuid(); | ||
| messageParameters.MessageGroupId = messageGroupId !== null ? messageGroupId : uuid(); | ||
| messageParameters.MessageGroupId = messageGroupId ?? uuid(); |
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.
Nullish coalescing treats both null and undefined as "omitted" values.
corinja
left a comment
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.
Do we know anywhere that existing code is explicitly passing in null and needs to be updated to pass in undefined?
Yeah, definitely some places (here's an example off the top of my head). However this won't cause any issues until we migrate those projects to TypeScript; the change is backwards-compatible in JS. |
|
Having said that I guess we could preserve |
corinja
left a comment
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.
Cool. Didn't mean to create more work with my previous comment! But this looks good.
|
All good; I needed to think about it more and resist breaking semver. It's tempting though when the breaking change is to fix something that was already broken! |
|
🎉 This PR is included in version 2.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The current type is
null | undefined, which is unusable!I've changed this to
string | null | undefinedas a non-breaking step torwardsstring | undefined, with plans to remove thenulltype in v3.Also improves associated JSDoc.
Jira: ENG-3420