Skip to content

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

@trivikr

Description

@trivikr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestp3This is a minor priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions