Skip to content

Commit

Permalink
Mark Config apiVersion as deprecated (#699)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Nov 10, 2023
1 parent 5c6face commit fb18aa6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/five-peas-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"aws-sdk-js-codemod": patch
---

Mark Config apiVersion as deprecated
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import AWS from "aws-sdk";

const config = new AWS.Config({
apiVersion: "2012-08-10"
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const config = {
// The key apiVersion is no longer supported in v3, and can be removed.
// @deprecated The client uses the "latest" apiVersion.
apiVersion: "2012-08-10"
};
3 changes: 3 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 @@ -8,6 +8,9 @@ export interface AwsConfigKeyStatus {
* Maps the AWS config keys with their equivalent replacement in v3.
*/
export const AWS_CONFIG_KEY_MAP: Record<string, AwsConfigKeyStatus> = {
apiVersion: {
deprecationMessage: `The client uses the "latest" apiVersion.`,
},
computeChecksums: {
deprecationMessage: "Applicable commands of S3 will automatically compute the MD5 checksums.",
},
Expand Down

0 comments on commit fb18aa6

Please sign in to comment.