
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
overweight
Advanced tools
An all-in-one toolkit for keeping your bundle sizes in check. It ships with a CLI, Node API, and GitHub Action, plus a tester architecture that lets you decide how assets are evaluated.
overweight entries in package.json or overweight.config.json.gzip (default), brotli, or none, and plug in your own logic programmatically.bundlesize: migration is trivial, yet the project stands on its own roadmap.pnpm add -D overweight
Keep your configuration close to your code:
overweight.json (or overweight.config.json) at the project root (default when the CLI runs without args).package.json → overweight field (array or object with a files property).overweight --config path/to/config.json.{
"files": [
{
"path": "./dist/vendor.js",
"maxSize": "30 kB",
"compression": "gzip",
"label": "Vendor bundle"
},
{
"path": "./dist/chunk-*.js",
"maxSize": "10 kB",
"compression": "brotli"
}
]
}
Field reference:
| Field | Type | Description |
|---|---|---|
path | string | File path or glob resolved from the config root. |
maxSize | string | number | Accepts units (10 kB, 2MiB). Numbers are treated as raw bytes. |
compression | string | Tester id (gzip, brotli, none). Defaults to gzip. |
label | string | Optional human-friendly label used in reports. |
pnpm overweight
pnpm overweight --config ./configs/overweight.json
pnpm overweight --reporter json
# quick ad-hoc checks
pnpm overweight --file "dist/*.js" --max-size "15 kB" --compression brotli
Available reporters: console (default), json, json-file, silent.
# emit a machine-readable report
pnpm overweight --reporter json-file --report-file ./reports/overweight.json
import { runChecks, normalizeConfig } from "overweight";
const config = normalizeConfig({
files: [{ path: "./dist/app.js", maxSize: "15 kB", compression: "brotli" }]
});
const result = await runChecks(config, {
testers: {
custom: {
id: "custom",
label: "custom",
async measure(buffer) {
return { bytes: buffer.byteLength / 2 };
}
}
}
});
if (result.stats.hasFailures) {
throw new Error("Bundle too big!");
}
name: bundle-overweight-test
on:
pull_request:
push:
branches: [main]
jobs:
overweight:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9
- run: pnpm install
- uses: yoavniran/overweight@v1
with:
config: overweight.json
github-token: ${{ secrets.GITHUB_TOKEN }}
baseline-report-path: overweight-report.json
update-baseline: true
report-file: overweight-report.json
report-json, report-table, and report-file outputs enable downstream workflows (PR comments, Slack alerts, artifact uploads, etc.).baseline-report-path + update-baseline are set, the action refreshes the stored bundle size report on the branch that ran the workflow. If baseline-report-path is omitted and report-file is set, the baseline defaults to that path. The update runs on a dedicated branch + pull request using update-pr-title, update-pr-body, and update-branch-prefix. Use baseline-protected-branches (default main,master, supports glob patterns) to block updates on protected branches.comment-on-pr-always (first run only) and comment-on-pr-each-run control when PR comments are posted even if checks pass.report-file, baseline-updated, baseline-update-pr-url, baseline-update-pr-number) make it easy to chain artifact uploads or follow-up workflows.When update-baseline: true, Overweight will:
To allow that flow:
contents: write permission (GitHub defaults to read-only).actions/checkout@v4 (fetch-depth defaults are fine because commits are created via the GitHub API).github-token secret with permission to create branches and PRs in the repository (the default secrets.GITHUB_TOKEN works for same-repo PRs).update-pr-title, update-pr-body, and update-branch-prefix to fit your repo conventions.pr-<number>), so subsequent pushes to your feature branch simply update the existing baseline PR instead of opening multiples.baseline-protected-branches to list branches or patterns (comma-separated) where baseline updates are forbidden; the default main,master protects the typical default branches.tsupsimple-git-hooks + commitlint.pnpm run release triggers semantic-release, which:
v1) so consumers can reference yoavniran/overweight@v1 for the latest release in that major line..github/workflows/release.yml exposes a dry-run workflow input (defaults to true) so manual dispatches preview semantic-release without mutating tags or npm. Set the field to false to publish for real, e.g.:gh workflow run "Overweight Release" \
--ref release-main \
--field dry-run=false
Since the release workflow force-updates major tags (e.g., v1), when syncing your local repository you may encounter tag conflicts. To sync tags properly:
# Recommended: Use the sync-tags script
pnpm run sync-tags
# Or manually force-update all tags from remote
git fetch --tags --force
# Alternative: Delete conflicting tag and re-fetch
git tag -d v1 && git fetch origin tag v1
MIT License © Yoav Niran.
FAQs
Extensible bundle size guard with pluggable testers, CLI, and GitHub Action.
We found that overweight demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.