Skip to content
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

State api name "is" not supported in comments #864

Merged
merged 3 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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