You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Application code may use multiple JS SDK clients. Transforming all of them in one pass might be difficult, and user might want to transform specific clients.
For example, in the following code user might want to transform only S3 client
If user has written application code in such a way, that it's separated into folders based on clients they can run existing codemod on specific folders.
Self-service
Problem
Application code may use multiple JS SDK clients. Transforming all of them in one pass might be difficult, and user might want to transform specific clients.
For example, in the following code user might want to transform only S3 client
Then, the output should be:
Solution
Provide an option which user can pass at top-level when running codemod.
The option can be
clients
and it can be passed as follows:$ npx aws-sdk-js-codemod@latest -t v2-to-v3 --clients s3 **/*.js
Alternatives
If user has written application code in such a way, that it's separated into folders based on clients they can run existing codemod on specific folders.
For example:
$ npx aws-sdk-js-codemod@latest -t v2-to-v3 src/s3/*.js
However, this requires application code to be refactored.
We can't expect users to do that.
Additional context
Example code: https://github.com/aws-solutions/qnabot-on-aws/blob/7fb99e0c716ad7c6702f630f46d5626ad3cb5a69/bin/build.js#L10-L11
The text was updated successfully, but these errors were encountered: