aws-toolkit-vscode icon indicating copy to clipboard operation
aws-toolkit-vscode copied to clipboard

chore: use [email protected] for moving to JS SDK v3

Open trivikr opened this issue 1 year ago • 5 comments

Problem

From AWS SDK for JavaScript v2 README:

We are formalizing our plans to make the Maintenance Announcement (Phase 2) for AWS SDK for JavaScript v2 in 2023.

Solution

This draft PR is testing aws-sdk-js-codemod.

$ npx [email protected] -t v2-to-v3 $(grep "'aws-sdk" src/**/*.ts | cut -d":" -f1 | uniq | tr '\n' ' ')

We would like to know from you which transformations codemod should prioritize. The best way to help us is to create/upvote issues on GitHub at https://github.com/awslabs/aws-sdk-js-codemod/issues. You can comment on this PR too. Feel free to take over the commits/PR, or close it and re-run codemod at later stage.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

trivikr avatar Oct 27 '23 07:10 trivikr

Do comment if I can post experimental PR targeting specific files, which could be easy to review and possibly merge. For example, I can post a PR just targeting ecs folder for example, which seems to be easiest on first look.

trivikr avatar Oct 27 '23 07:10 trivikr

@trivikr yes, this is very welcome. Thank you!

justinmk3 avatar Oct 27 '23 09:10 justinmk3

Example feature request learned from this PR https://github.com/awslabs/aws-sdk-js-codemod/issues/663

trivikr avatar Oct 27 '23 17:10 trivikr

I don't see any problems with the changes here (except stylistic nits which we can auto-fix).

Seems like the next step is to add the missing dependencies to package.json and see if the changes actually work?

justinmk3 avatar Nov 02 '23 23:11 justinmk3

Seems like the next step is to add the missing dependencies to package.json and see if the changes actually work?

Yes. But this PR didn't change all the APIs of JS SDK v2 to use v3.

Some transformations will be added in codemod in future, like https://github.com/awslabs/aws-sdk-js-codemod/issues/666. Other transformations are less likely to be prioritized, like PromiseResult or ServiceConfigurationOptions, which fewer JS SDK customers are expected to be use.

trivikr avatar Nov 02 '23 23:11 trivikr