preactjs / compressed-size-action

GitHub Action that adds compressed size changes to your PRs.
https://github.com/marketplace/actions/compressed-size-action
MIT License
602 stars 84 forks source link

Add option to pass stripHash pattern #15

Closed bartlomiejzuber closed 4 years ago

bartlomiejzuber commented 4 years ago

Works well in build produced by latest CRA.

with:
          repo-token: "${{ secrets.GITHUB_TOKEN }}"
          exclude: "{**/*.map,**/node_modules/**,**/*runtime*.*,**/*manifest*.*,**/*service-worker*.*}"
          pattern: "**/build/**/*.js"
          strip-hash: "\\..*chunk"

(delta is shows up as 20 for testing purposes (it's a map on existing file sizes + 20)) image

image

related issue: https://github.com/preactjs/compressed-size-action/issues/13

bartlomiejzuber commented 4 years ago

Hey @developit thank you, I'd like to merge it but I don't have access to do it. Can you do it ?

ckybonist commented 4 years ago

Any progress? It's really a great feature and I just need it. @developit

developit commented 4 years ago

I will get this merged and released this week.

bartlomiejzuber commented 4 years ago

@developit Kindly reminder. 😄

aulneau commented 4 years ago

@developit could you take a look at merging this when you have a chance? Thanks :)

developit commented 4 years ago

This has been released in v2.

I also made it so that any submatches in the provided regex are turned into asterisks. You can see a few examples of this in the V2 docs at the link above.