-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add transformation for AWS.ProcessCredentials (#636)
- Loading branch information
Showing
4 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"aws-sdk-js-codemod": patch | ||
--- | ||
|
||
Add transformation for AWS.ProcessCredentials |
3 changes: 3 additions & 0 deletions
3
src/transforms/v2-to-v3/__fixtures__/credentials/process.input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import AWS from "aws-sdk"; | ||
|
||
new AWS.ProcessCredentials({ profile: "profile-name" }); |
6 changes: 6 additions & 0 deletions
6
src/transforms/v2-to-v3/__fixtures__/credentials/process.output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { fromProcess } from "@aws-sdk/credential-providers"; | ||
|
||
// JS SDK v3 switched to credential providers to functions instead of objects. | ||
// This is the closest approximation from codemod of what your application needs. | ||
// Reference: https://www.npmjs.com/package/@aws-sdk/credential-providers | ||
fromProcess({ profile: "profile-name" }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters