Skip to content

Commit

Permalink
Add comment about unsupported config.params (#856)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored Apr 11, 2024
1 parent fa53244 commit 59d2e57
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/six-rice-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"aws-sdk-js-codemod": patch
---

Add comment about unsupported config.params
5 changes: 5 additions & 0 deletions src/transforms/v2-to-v3/__fixtures__/config/params.input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import AWS from "aws-sdk";

const config = new AWS.Config({
params: { TableName: "TableName" }
});
5 changes: 5 additions & 0 deletions src/transforms/v2-to-v3/__fixtures__/config/params.output.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const config = {
// The key params is no longer supported in v3, and can be removed.
// @deprecated The object needs to be passed to individual operations where it's intended.
params: { TableName: "TableName" }
};
4 changes: 4 additions & 0 deletions src/transforms/v2-to-v3/config/AWS_CONFIG_KEY_MAP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ export const AWS_CONFIG_KEY_MAP: Record<string, AwsConfigKeyStatus> = {
newKeyName: "maxAttempts",
description: "The value of maxAttempts needs to be maxRetries + 1.",
},
params: {
deprecationMessage:
"The object needs to be passed to individual operations where it's intended.",
},
paramValidation: {
deprecationMessage: "The SDK no longer validates input parameters.",
},
Expand Down

0 comments on commit 59d2e57

Please sign in to comment.