eik-lib / issues

All Eik issues, bugs, questions etc goes here. Documentation is to be found at https://eik.dev
1 stars 0 forks source link

Improve CLI messages for alias commands regarding caching #14

Open digitalsadhu opened 2 years ago

digitalsadhu commented 2 years ago

Background

When running the alias commands, the cli output seems to suggest that the version has not changed even though it actually has. What's going on is that the Fastly cache takes a while to expire so we continue to see the old version for a while. We can improve this in a couple ways.

Example:

Running this command…

➜  react git:(next) npx @eik/cli pkg-alias @fabric-ds/react 1.3.1 1

Might result in something like…

::  PACKAGE  > @fabric-ds/react | org: finn | version: 1.2.0 | alias: v1  UPDATED

When what we expect is…

::  PACKAGE  > @fabric-ds/react | org: finn | version: 1.3.1 | alias: v1  UPDATED

Task

Firstly, instead of just displaying the old, invalid version number, we want to let users know that an update has triggered but there is a cache that will take a while to expire

Secondly, we want to be able to print out the cache time remaining so they know how much longer they need to wait. This info can be gotten from the headers.

Definition of Done