mainmatter / ember-asset-size-action

Comment with the diff for the asset sizes on Pull Request
MIT License
22 stars 15 forks source link

feat/support-showing-total-diff-size-between-base-and-pr-branches #34

Closed rahulk94 closed 1 year ago

rahulk94 commented 2 years ago

This feature adds an argument called show-total-size-diff, which defaults to no. This can be set to yes to calculate the total asset size differences between the base branch vs the PR branch.

This is PR builds upon the excellent work done by @timiyay in https://github.com/simplabs/ember-asset-size-action/pull/27 but that PR reports just the total size of the artefacts, whereas this reports the total size diff after the changes in the PR.

Given this repo doesn't seem to be merging PRs at the moment this is mainly being raised to help others who are after a total size diff feature. Since we bumped our application to ember-auto-import@2 the ember-asset-size-action has stopped being able to map chunks to each other as the naming conventions don't allow for comparison anymore.

Techn1x commented 2 years ago

example output from this branch (probably a bad example since so little changed in this example, but it shows the output tables) Screenshot from 2022-08-11 12-34-34

mansona commented 1 year ago

Hey folks! thanks for the contribution 🎉

I ended up merging your feature in a new PR over here https://github.com/mainmatter/ember-asset-size-action/pull/34

This simplifies the implementation a bit because you don't really need a separate diff function 👍 I have merged this and will be releasing it as part of the v3 release so let me know if it's ok for your use case

rahulk94 commented 1 year ago

Hey @mansona thanks for that. I assume you meant https://github.com/mainmatter/ember-asset-size-action/pull/64.

It should work fine for me, looking forward to v3 🙂

mansona commented 1 year ago

🤦 yes I did mean #64

I'm just trying to get #68 and #67 working before I release v3 but it hopefully won't take me too long 👍