Skip to content

Commit 59d2e57

Browse files
authored
Add comment about unsupported config.params (#856)
1 parent fa53244 commit 59d2e57

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

.changeset/six-rice-mate.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+
Add comment about unsupported config.params
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 config = new AWS.Config({
4+
params: { TableName: "TableName" }
5+
});
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const config = {
2+
// The key params is no longer supported in v3, and can be removed.
3+
// @deprecated The object needs to be passed to individual operations where it's intended.
4+
params: { TableName: "TableName" }
5+
};

src/transforms/v2-to-v3/config/AWS_CONFIG_KEY_MAP.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ export const AWS_CONFIG_KEY_MAP: Record<string, AwsConfigKeyStatus> = {
4242
newKeyName: "maxAttempts",
4343
description: "The value of maxAttempts needs to be maxRetries + 1.",
4444
},
45+
params: {
46+
deprecationMessage:
47+
"The object needs to be passed to individual operations where it's intended.",
48+
},
4549
paramValidation: {
4650
deprecationMessage: "The SDK no longer validates input parameters.",
4751
},

0 commit comments

Comments
 (0)