aws / aws/aws-sdk-js-codemod

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

Open
#561 0 comments 0 reactions 0 assignees View on GitHub
enhancement p3
Dominant language
TypeScript
Stars
89
Forks
13
Avg merge
9h 59m
Merged PRs (30d)
1

Description

### 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:
```console
{
"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_

Contributor guide

Open the contributing guide

Research direction

Start at the codemod CLI entry point and inspect how its installed version is determined and where npx stores the installation. Check how the latest package version can be read from npm, then define the local timestamp and observed-version data flow. Done means the CLI warns when its version is older, while limiting the check to once per day.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.