-
Notifications
You must be signed in to change notification settings - Fork 773
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
tooling: adding script to inspect TS interface diffs #764
Conversation
Codecov Report
@@ Coverage Diff @@
## master #764 +/- ##
==========================================
- Coverage 92.06% 92.05% -0.02%
==========================================
Files 46 44 -2
Lines 3025 3021 -4
Branches 471 471
==========================================
- Hits 2785 2781 -4
Misses 145 145
Partials 95 95
Continue to review full report at Codecov.
|
This is really cool, @evertonfraga ! 👏🏻 |
This is really cool 😄 , please do a rebase and drop a note once you have change the diff command and this is ready for re-review, so that this won't get forgotten. |
Thanks @holgerd77! I am changing some control flows to make a continuous |
1d30ac5
to
dee04f3
Compare
# cleanup | ||
rm -rf $TGZ $CACHE_PATH | ||
|
||
git diff --no-index -- $A_PATH $B_PATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fulfill the ultimate diff experience, a single diff command should be run at the end, instead of separate ones. This gave north to every other change, and the script was basically entirely rewritten.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea!
05da5cb
to
d33e4a7
Compare
This is ready for review :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, just tested out the script it's working great for me!
* tooling: adding script to inspect TS interface diffs * tooling: refactoring script to improve usability
My goal is to quickly inspect what interfaces have changed since the packages' latest release. This is specially useful for releases.
Instead of going over
diff
for the source files (which would be chaotic), I chose to performdiff
on the.d.ts
files. They are generated at build time, therefore not part of this repo, so I can't usegit
to compare such files.The
ts-interface-diff.sh
script downloads the latest published package, and compares the.d.ts
files recursively to the ones found in the localdist
directory, printing the diff tostdout
. I made it generic enough to be used with any other package, so feel free to test it elsewhere, if you want.Basic instructions on the script file itself.
How to test this PR
# Run script ./scripts/ts-interface-diff.sh ethereumjs-vm packages/vm/
Real-life output: