Skip to content

Commit 4581d61

Browse files
authored
refactor: Rename SQS message model class (#1191)
Change the name of the class to match the name exported from the package index. This should not be a breaking change because the class is the default export of its module. Just in case there is some contrived case that depends on the class's `name` attribute, we'll include this in the v2.0.0 major release. Jira: [ENG-2733]
1 parent baa4966 commit 4581d61

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

docs/migration/v2.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This doc summarises the breaking changes introduced in v2 and what you need to d
99
- [RequestService](#requestservice)
1010
- [Models](#models)
1111
- [StatusModel](#statusmodel)
12+
- [SQSMessageModel](#sqsmessagemodel)
1213

1314
The new version of dependency injection does not work if code is minified. See [Notes](../../README.md#notes) in the main readme for how to turn this off in webpack.
1415

@@ -215,3 +216,5 @@ Note that we can keep `status` unset initially, and TypeScript will complain if
215216
### `SQSMessageModel`
216217

217218
The model constructor will now validate that `message` has all fields required of a received SQS message. This should not break existing applications that are using this model correctly, but is included in the 2.0.0 release as a precaution.
219+
220+
The class name has also changed from `Message` to `SQSMessageModel` in order to be consistent with the name exported from the package index. Again, this is not expected to break anything, and does not affect imports because the class is a default export.

src/models/SQSMessageModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { SQS } from 'aws-sdk';
33
/**
44
* Message model for SQS.
55
*/
6-
export default class Message {
6+
export default class SQSMessageModel {
77
readonly messageId: string;
88

99
readonly receiptHandle: string;

0 commit comments

Comments
 (0)