NickHeiner / jscodemod

Codemod runner
MIT License
41 stars 4 forks source link

Gap in feedback during processing #27

Closed tquetano-netflix closed 3 years ago

tquetano-netflix commented 3 years ago

When the codemod is executing, we are given a progress bar as feedback, which is very helpful to know both how many files are being processed and when it is complete. However, there is a sizable delay between when this progress bar reaches 100% and when the process actually finishes. This is a little misleading, but also ambiguous about whether or not something in the process is hanging or broken.

It would be valuable to have some feedback in the console that the process should not yet be finished, even if it is just a line. For example, if that delay is due to actually writing the transformed files to the system then a simple Writing files to system... log would be enough.

NickHeiner commented 3 years ago

Yes, this is a good point. Additionally, on multi-phase codemods, it's not super helpful to have a blank arrow. I'd like to add the codemod name to the beginning of the arrow.

As a workaround, if you're curious what the codemod is doing, you can run with env var loglevel=debug or loglevel=trace to get debug output.