Indexed by TopGit from live GitHub metadata: preactjs/compressed-size-action has 653 stars, written primarily in JavaScript. GitHub Action that adds compressed size changes to your PRs.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Note: Due to GitHub's permission model, this action cannot safely create comments when it is triggered by a PR from a fork. It will, however, still generate the size comparison and print the comment it would've posted to the stdout of the action, allowing manual checking and you can copy/paste it into a comment if you wish.
The markdown comment that compressed-size-action posts to pull requests is also exposed as the comment-body output. This can be used by later workflow steps to archive the report, pass it to another job, or post the comment from a separate workflow with the permissions you need:
By default, compressed-size-action will install dependencies according to which lockfiles are present, if any. However, if you need to run a different installation command, you can pass a custom script to do so. For example, to use npm ci with the --workspace option:
By default, compressed-size-action will try to build your PR by running the "build" npm script in your package.json.
If you need to perform some tasks after dependencies are installed but before building, you can use a "postinstall" npm script to do so. For example, in Lerna-based monorepo:
It is also possible to define a "prebuild" npm script, which runs after "postinstall" but before "build".
You can also specify a completely different npm script to run instead of the default ("build"). To do this, add a build-script option to your yml workflow:
For repositories or custom monorepo setups where files are modified in ways that are not reset by npm ci && npm run build, it may be necessary to define a custom "clean" script. This script resets any file modifications after the upstream (target) build ends and your PR code (HEAD) is checked out, but before installation of npm dependencies for HEAD:
// package.json
{
"scripts": {
// example - a simple nested node_modules setup:
"postinstall": "cd packages && npm i",
// between the two builds, we need to delete the inner node_modules:
"clean": "rm -rf packages/node_modules"
}
}
Sorting the list of files
By default, the results table is sorted by filename in ascending order. You can customize this behavior using the sort-by option:
The format is "column:direction", where column is one of "Filename", "Size", or "Change" and direction is "asc" or "desc". For example, "Size:desc" sorts the table by file size in descending order.
Customizing the list of files
compressed-size-action defaults to tracking the size of all JavaScript files within dist/ directories - anywhere in your repository, not just at the root. You can change the list of files to be tracked and reported using the pattern and exclude options, both of which are minimatch patterns:
Files are collected by finding matches for pattern, then any of those that match exclude are ignored. For that reason, most projects don't need to modify exclude. The default values for pattern and exclude are as follows:
with:
# Any JS files anywhere within a dist directory:
pattern: "**/dist/**/*.{js,mjs,cjs}"
# Always ignore SourceMaps and node_modules:
exclude: "{**/*.map,**/node_modules/**}"
Dealing with hashed filenames
A strip-hash option was added in v2 that allows passing a custom Regular Expression pattern that will be used to remove hashes from filenames. The un-hashed filenames are used both for size comparison and display purposes.
By default, the characters matched by the regex are removed from filenames.
In the example below, a filename foo.abcde.js will be converted to foo.js:
strip-hash: "\\b\\w{5}\\."
This can be customized further using parens to create submatches, which mark where a hash occurs. When a submatch is detected, it will be replaced with asterisks. This is particularly useful when mix of hashed and unhashed filenames are present.
In the example below, a filename foo.abcde.chunk.js will be converted to foo.*****.chunk.js:
strip-hash: "\\.(\\w{5})\\.chunk\\.js$"
Increasing the required threshold
By default, a file that's been changed by a single byte will be reported as changed. If you'd prefer to require a certain minimum threshold for a file to be changed, you can specify minimum-change-threshold in bytes:
minimum-change-threshold: 100
In the above example, a file with a delta of less than 100 bytes will be reported as unchanged.
Compression
By default, files are compared after gzip compression, but it's possible to use other compression algorithms (gzip/brotli/none) or disable the compression.
compression: "none"
Specifying the base ref
Use the base-ref option to compare against a specific ref. Otherwise, the action compares against the PR's base branch.
For example, a project could set base-ref conditionally to use the PR target branch for feature PRs but compare against production for release PRs. Comparing against the previous release tag could show cumulative size change across all changes going into the release.
Checking multiple bundles
The action reuses the same comment each time it runs on a PR. In order to run the action multiple times against separate bundles for a single PR, you must provide a comment-key option, which the action will use to determine which comment to add or update for the run. The example below demonstrates this for separate "modern" and "legacy" bundles:
If you do not provide this key, the action will attempt to use (and therefore replace) the same comment for both bundles, hiding the output for whichever run finished last.
How active is development on preactjs/compressed-size-action?
The most recent commit recorded on preactjs/compressed-size-action was 5 months ago, based on the GitHub push timestamp. The repository has 108 forks — one of the better signals of community interest.
How many stars does preactjs/compressed-size-action have?
preactjs/compressed-size-action has 653 GitHub stars — refresh the page for the live number, or check github.com/preactjs/compressed-size-action. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What else is in the Automation space?
preactjs/compressed-size-action is tracked by TopGit under the Automation category, alongside 7 GitHub-tagged topics. Trending and Topics pages list peer repositories of comparable stars and language.
What language is preactjs/compressed-size-action written in?
preactjs/compressed-size-action is written primarily in JavaScript. GitHub's language field is based on the largest share of bytes in the default branch.
What topics is preactjs/compressed-size-action associated with?
GitHub's repository topics for preactjs/compressed-size-action: "action", "actions", "bytes", "compressed", "prs", "size", "workflow". TopGit's editorial category is Automation.
Where do I read more about preactjs/compressed-size-action?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/preactjs/compressed-size-action is the definitive source.
Why is preactjs/compressed-size-action categorized under Automation?
TopGit places preactjs/compressed-size-action in the Automation category based on its GitHub topics and description (tagged: "action", "actions", "bytes"). Categories are assigned from real repository metadata, not editorial guesswork.
Read full README in the tab above.
Is compressed-size-action worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of compressed-size-action.