aws-sdk-js-codemod icon indicating copy to clipboard operation
aws-sdk-js-codemod copied to clipboard

[Feature]: Display warning if latest version of codemod is not being used

Open trivikr opened this issue 2 years ago • 0 comments

Self-service

  • [ ] I'd be willing to implement this feature

Problem

In https://github.com/awslabs/aws-sdk-js-codemod/issues/531, we plan to recommend users to use latest version of codemod in every run. However, it's possible that they may not use the latest version and miss bug fixes or new features when attempting to transform their applications.

Solution

Check the latest version available on npm, and display a warning if they're not using the latest version.

To minimize network calls, the CLI can limit it's calls to maximum once per day and store the information locally in the following format:

{
  "last_call_timestamp": Date,
  "latest_observed_version": Number
}

The data can be stored next to codemod installation inside npx folder, so that it's deleted when codemod is deleted.

Alternatives

N/A

Additional context

No response

trivikr avatar Aug 22 '23 15:08 trivikr