Closed yanglinz closed 1 year ago
Hey thanks for the contribution 🎉
Am I right in saying that this change would consider a deleted file as one that has gotten smaller? It would be good to see what the buildOutputTest.mjs
would look like for the change that you want to make here.
also I created an issue that might make the requirement a bit clearer: https://github.com/mainmatter/ember-asset-size-action/issues/65
Yep you're right, as implemented it would not distinguish files that got smaller vs deleted. I agree that having the distinction would be ideal 👍
Thanks for writing up the issue and clarifying the requirements - I'll tweak the PR to address it!
@mansona I've tweaked my PR to distinguish between files that got smaller vs files that got deleted in a way that should satisfy https://github.com/mainmatter/ember-asset-size-action/issues/65. I also updated the tests in buildOutputTest.mjs
as suggested. Let me know if my approach makes sense to you or if you had something else in mind!
oh I just pushed the updated dist to your branch there too, essentially you have to run npm run build
and commit the dist folder since https://github.com/mainmatter/ember-asset-size-action/pull/43
This is a bit of a pain, but it's a lot better than having to commit all of node_modules 🙈
Currently, deleted files (files that exist on the trunk branch but no longer exist in the PR branch) are ignored in the final asset size diff. This PR changes the asset diffing helper so that deleted files are included.