Skip to content

Commit 2db36c9

Browse files
authored
State api name "is" not supported in comments (#864)
1 parent 515ccdf commit 2db36c9

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

.changeset/strange-crabs-guess.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+
State api name "is" not supported in comments

src/transforms/v2-to-v3/__fixtures__/s3-get-signed-url/callback.output.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import AWS from "aws-sdk";
33
const s3 = new AWS.S3();
44
const params = { Bucket: "bucket", Key: "key" };
55

6-
// S3 getSignedUrl with callbacks are not supported in AWS SDK for JavaScript (v3).
6+
// S3 getSignedUrl with callbacks is not supported in AWS SDK for JavaScript (v3).
77
// Please convert to 'client.getSignedUrl(apiName, options)', and re-run aws-sdk-js-codemod.
88
s3.getSignedUrl("getObject", params, function (err, url) {
99
console.log('The URL is', url);

src/transforms/v2-to-v3/__fixtures__/s3-upload/callback-arrow-fn.output.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const uploadParams = {
88
Key: "Key",
99
};
1010

11-
// S3 ManagedUpload with callbacks are not supported in AWS SDK for JavaScript (v3).
11+
// S3 ManagedUpload with callbacks is not supported in AWS SDK for JavaScript (v3).
1212
// Please convert to 'await client.upload(params, options).promise()', and re-run aws-sdk-js-codemod.
1313
client.upload(uploadParams, (err, data) => {
1414
if (err) console.log(err, err.stack); // an error occurred

src/transforms/v2-to-v3/__fixtures__/s3-upload/callback.output.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const uploadParams = {
88
Key: "Key",
99
};
1010

11-
// S3 ManagedUpload with callbacks are not supported in AWS SDK for JavaScript (v3).
11+
// S3 ManagedUpload with callbacks is not supported in AWS SDK for JavaScript (v3).
1212
// Please convert to 'await client.upload(params, options).promise()', and re-run aws-sdk-js-codemod.
1313
client.upload(uploadParams, function (err, data) {
1414
if (err) console.log(err, err.stack); // an error occurred

src/transforms/v2-to-v3/apis/addNotSupportedClientComments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const addNotSupportedClientComments = (
6464
if (FUNCTION_TYPE_LIST.includes(args[args.length - 1].type)) {
6565
const comments = callExpression.node.comments || [];
6666
comments.push(
67-
j.commentLine(` ${apiDescription} with callbacks are ${NOT_SUPPORTED_COMMENT}.`)
67+
j.commentLine(` ${apiDescription} with callbacks is ${NOT_SUPPORTED_COMMENT}.`)
6868
);
6969
comments.push(
7070
j.commentLine(

0 commit comments

Comments
 (0)