Skip to content

Commit fb18aa6

Browse files
authored
Mark Config apiVersion as deprecated (#699)
1 parent 5c6face commit fb18aa6

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

.changeset/five-peas-whisper.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+
Mark Config apiVersion as deprecated
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+
apiVersion: "2012-08-10"
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 apiVersion is no longer supported in v3, and can be removed.
3+
// @deprecated The client uses the "latest" apiVersion.
4+
apiVersion: "2012-08-10"
5+
};

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ export interface AwsConfigKeyStatus {
88
* Maps the AWS config keys with their equivalent replacement in v3.
99
*/
1010
export const AWS_CONFIG_KEY_MAP: Record<string, AwsConfigKeyStatus> = {
11+
apiVersion: {
12+
deprecationMessage: `The client uses the "latest" apiVersion.`,
13+
},
1114
computeChecksums: {
1215
deprecationMessage: "Applicable commands of S3 will automatically compute the MD5 checksums.",
1316
},

0 commit comments

Comments
 (0)