Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task
trivikr opened this issue Aug 22, 2023 · 0 comments
Open
1 task
Labels
enhancement New feature or request p3 This is a minor priority issue

Comments

@trivikr
Copy link
Member

trivikr commented Aug 22, 2023

Self-service

  • I'd be willing to implement this feature

Problem

In #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 trivikr added the enhancement New feature or request label Aug 22, 2023
@trivikr trivikr added the p3 This is a minor priority issue label Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p3 This is a minor priority issue
Projects
None yet
Development

No branches or pull requests

1 participant