Skip to content

Commit b4b12b3

Browse files
authored
Use formatting convention of trailing comma from input code (#713)
1 parent 3d1dd7f commit b4b12b3

35 files changed

+65
-35
lines changed

.changeset/calm-goats-try.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"aws-sdk-js-codemod": patch
3+
---
4+
5+
Use formatting convention of trailing comma from input code

src/transforms/v2-to-v3/__fixtures__/config/credentials.order.input.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ const credsBefore = new AWS.Config({
1111
accessKeyId: "KEY",
1212
secretAccessKey: "SECRET",
1313
logger: console,
14-
region: "us-east-1",
14+
region: "us-east-1"
1515
});
1616

1717
const credsInBetween = new AWS.Config({
1818
logger: console,
1919
accessKeyId: "KEY",
2020
secretAccessKey: "SECRET",
21-
region: "us-east-1",
21+
region: "us-east-1"
2222
});
2323

2424
const credsDispersedBefore = new AWS.Config({
@@ -32,5 +32,5 @@ const credsDispersedAfter = new AWS.Config({
3232
logger: console,
3333
accessKeyId: "KEY",
3434
region: "us-east-1",
35-
secretAccessKey: "SECRET",
35+
secretAccessKey: "SECRET"
3636
});

src/transforms/v2-to-v3/__fixtures__/config/httpOptions.input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import AWS from "aws-sdk";
22

33
const config = new AWS.Config({
44
httpOptions: {
5-
connectTimeout: 1000,
5+
connectTimeout: 1000
66
}
77
});

src/transforms/v2-to-v3/__fixtures__/config/httpOptions.output.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ const config = {
33
// Refer to UPGRADING.md on aws-sdk-js-v3 for changes needed.
44
// Please create/upvote feature request on aws-sdk-js-codemod for httpOptions.
55
httpOptions: {
6-
connectTimeout: 1000,
6+
connectTimeout: 1000
77
}
88
};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import AWS from "aws-sdk";
22

33
const documentClient = new AWS.DynamoDB.DocumentClient({
4-
convertEmptyValues: true,
4+
convertEmptyValues: true
55
});
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import AWS from "aws-sdk";
22

33
const documentClient = new AWS.DynamoDB.DocumentClient({
4-
wrapNumbers: true,
4+
wrapNumbers: true
55
});
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import AWS from "aws-sdk";
2+
3+
const client = new AWS.DynamoDB({
4+
region: "us-west-2",
5+
});
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { DynamoDB } from "@aws-sdk/client-dynamodb";
2+
3+
const client = new DynamoDB({
4+
region: "us-west-2",
5+
});

src/transforms/v2-to-v3/__fixtures__/s3-upload/global-import-equals.input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ await client.upload({
55
Body: "BODY",
66
Bucket: "Bucket",
77
ContentType: "ContentType",
8-
Key: "Key",
8+
Key: "Key"
99
}).promise();

src/transforms/v2-to-v3/__fixtures__/s3-upload/global-import-equals.output.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ await new Upload({
1111
Body: "BODY",
1212
Bucket: "Bucket",
1313
ContentType: "ContentType",
14-
Key: "Key",
14+
Key: "Key"
1515
}
1616
}).done();

0 commit comments

Comments
 (0)