Git and JS History Conversion Tools
These tools accompany my blog post Rewriting Your Git History and JS Source for Fun and Profit.
They are a slightly sanitized version of the scripts that I used to rewrite our Git repository, by converting all AMD/ES5 code to ES6 module syntax, and auto-formatting all JS and Python source throughout the entire history of the repository.
If you actually wanted to use this:
- Tweak paths as needed:
repoFilterUtils.pyto define the source repo and output repo paths
js-codemods/transformJSFile.jsand fix the path to a temp folder for writing errors to disk
yarnto install the JS dependencies under
- Install Black and Requests into your system's Python3 location
node js-codemods/jsTransformServerin a separate shell.
python3 cloneAndProcessRepo.pyto kick this off.