Releases: preactjs/compressed-size-action
2.7.0
What's Changed
- Remove bot check for existing comments by @flugg in #80
- Add comment-key input by @sarayourfriend in #82
- fix: Incorrect fetch for
baseRef
by @rschristian in #109
New Contributors
- @flugg made their first contribution in #80
- @sarayourfriend made their first contribution in #82
Full Changelog: 2.6.0...2.7.0
v2
2.6.0
New Features / Improvements
- [feature] Add install script inputs by @jeffreys-cat in #85
- feat: Add support for more precise percentage changes by @mister-ben in #97
- Add support for Bun by @jack-weilage in #104
Action Maintenance
- Update action.yml to use node16 by @estherkim in #87
- Move to node20, release v3 by @jonny-puma in #103
Repo Maintenance
- Fix typo by @denniskigen in #86
- chore: Update Github actions to latest versions by @mmckenziedev in #90
- chore: Bump package-lock.json by @rschristian in #105
New Contributors
- @denniskigen made their first contribution in #86
- @estherkim made their first contribution in #87
- @mmckenziedev made their first contribution in #90
- @jack-weilage made their first contribution in #104
- @jonny-puma made their first contribution in #103
- @mister-ben made their first contribution in #97
- @jeffreys-cat made their first contribution in #85
- @rschristian made their first contribution in #105
Full Changelog: 2.5.0...2.6.0
2.5.0
What's Changed
- Improve pnpm support by @einSelbst in #76
New Contributors
- @einSelbst made their first contribution in #76
Full Changelog: 2.4.0...2.5.0
2.4.0
What's Changed
- Add pnpm support by @apazzolini in #68
- #69 fix typo in strip hash console log by @spencerkordecki in #70
New Contributors
- @spencerkordecki made their first contribution in #70
- @apazzolini made their first contribution in #68
Full Changelog: 2.3.0...2.4.0
2.3.0
- Update the default value of the
pattern
config option to include.mjs
and.cjs
files in addition to.js
(14f22a1).
2.2.0
- Hide "size change" column if all size changes are
0b
(no changes) (#50, thanks @fisker!) - Default
github-token
config option to${{ github.token }}
and make it optional (#58, thanks @MichaelDeBoey!) - Add
clean-script
config option, which is an npm-script to run between builds (aftertarget
is built andpr
is checked out, but before installing+buildingpr
) - see updated documentation.
2.1.0
- Improve diff table output (#28, thanks @fisker)
- Run
git reset
between builds to prevent conflicts (#40, thanks @JoviDeCroock) - Update dependencies (#45, thanks @andrewiggins)
- Fix percent change calculation (#44, thanks @arendjr)
- Add new
cwd
option for executing the action in a custom directory (#48) - Support
on: pull_request_target
to comment on PR's from forks (yay!)
v2.0.1
v2.0.0
- New
strip-hash
option to customize filename hash removal (see below) (#15, thanks @bartlomiejzuber) - A new experimental
use-check
option, which reports status as a CI Check instead of comments (#18) - Adjust the default file pattern to find files in subfolders (#14, thanks @VikingTristan)
- Fix usage with Yarn's
frozen-lockfile
option (#5 thanks @sasurau4) - Add an error message when configured incorrectly (#7 thanks @gavinsharp)
Custom filename hash comparison
In v2, a new strip-hash
option allows passing a custom Regular Expression pattern that is then used to remove hashes from filenames before comparison and for display purposes.
Usage & Instructions
By default, the sequence of characters matched by the regex will be removed from filenames for comparison and display purposes. The example below will convert foo.abcde.js
to foo.js
:
strip-hash: "\\b\\w{5}\\."
You can customize this by using parens to create a submatch that marks where the hash occurs. When a submatch is detected, it will be replaced with asterisk characters matching its length. This is particularly useful in cases where a mix of hashed and unhashed filenames are in use. In the example below, foo.abcde.chunk.js
will be replaced with foo.*****.chunk.js
.
strip-hash: "\\.(\\w{5})\\.chunk\\.js$"
Full Usage:
# <etc>
- uses: actions/checkout@v2
- uses: preactjs/compressed-size-action@v1
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
+ strip-hash: "\\.(\\w{5})\\.chunk\\.js$"