Skip to content

Commit

Permalink
State api name "is" not supported in comments (#864)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored Apr 16, 2024
1 parent 515ccdf commit 2db36c9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/strange-crabs-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"aws-sdk-js-codemod": patch
---

State api name "is" not supported in comments
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import AWS from "aws-sdk";
const s3 = new AWS.S3();
const params = { Bucket: "bucket", Key: "key" };

// S3 getSignedUrl with callbacks are not supported in AWS SDK for JavaScript (v3).
// S3 getSignedUrl with callbacks is not supported in AWS SDK for JavaScript (v3).
// Please convert to 'client.getSignedUrl(apiName, options)', and re-run aws-sdk-js-codemod.
s3.getSignedUrl("getObject", params, function (err, url) {
console.log('The URL is', url);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const uploadParams = {
Key: "Key",
};

// S3 ManagedUpload with callbacks are not supported in AWS SDK for JavaScript (v3).
// S3 ManagedUpload with callbacks is not supported in AWS SDK for JavaScript (v3).
// Please convert to 'await client.upload(params, options).promise()', and re-run aws-sdk-js-codemod.
client.upload(uploadParams, (err, data) => {
if (err) console.log(err, err.stack); // an error occurred
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const uploadParams = {
Key: "Key",
};

// S3 ManagedUpload with callbacks are not supported in AWS SDK for JavaScript (v3).
// S3 ManagedUpload with callbacks is not supported in AWS SDK for JavaScript (v3).
// Please convert to 'await client.upload(params, options).promise()', and re-run aws-sdk-js-codemod.
client.upload(uploadParams, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const addNotSupportedClientComments = (
if (FUNCTION_TYPE_LIST.includes(args[args.length - 1].type)) {
const comments = callExpression.node.comments || [];
comments.push(
j.commentLine(` ${apiDescription} with callbacks are ${NOT_SUPPORTED_COMMENT}.`)
j.commentLine(` ${apiDescription} with callbacks is ${NOT_SUPPORTED_COMMENT}.`)
);
comments.push(
j.commentLine(
Expand Down

0 comments on commit 2db36c9

Please sign in to comment.