npm / bundlewatch
bundlewatch
What changed in bundlewatch 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
23 breaking3 security12 new APIs and options4 behavior and defaults1 tooling17 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initbundlewatch 160 changes
Breaking changes 23
Self-hosted services must return
{ "baselinePrefix": 1 }before prefixed clients can run; clients stop if support cannot be confirmed and never fall back to an unprefixed baseline.Deep imports into bundlewatch/lib no longer work, except for lib/app.
Deep imports no longer work except bundlewatch/lib/app and bundlewatch/lib/app/index.js; use the package's main export.
Discovered config files now take precedence over the package.json bundlewatch key; the first matching file wins, and a broken config fails without falling back.
Basic auth credentials in service URLs continue to work but no longer appear in results links or GitHub status details links.
ci.trackBranches replaces its defaults instead of merging with them index by index.
files replaces its defaults instead of merging with them index by index.
Configured files arrays replace the defaults instead of merging index by index.
Pushes and other non-pull-request builds compare with the repository's default branch instead of master; CI_BRANCH_BASE and ci.repoBranchBase still override this.
Statuses are reported on the pull request's head commit instead of GITHUB_SHA, the temporary merge commit.
Proxy variables HTTP_PROXY, HTTPS_PROXY, and NO_PROXY are no longer read.
BundleWatch no longer reads HTTP_PROXY, HTTPS_PROXY, NO_PROXY or similar variables for proxy configuration.
Numeric maxSize values are now enforced; 0 still means no limit.
Numeric maxSize limits are now enforced instead of silently ignored; zero still means no limit.
BundleWatch 1.0 requires Node.js 22.17 or later, including in CI.
Node.js 22.17 or later is required, including in CI.
For users migrating from 0.3.x, the first 1.0 run reports files previously saved under an empty name as new until a tracked branch saves a new baseline.
Pull request builds no longer save baselines, preventing a fork's master from overwriting the repository's baseline; branch builds still save.
Pull request builds still compare with the baseline but no longer save one, preventing pull request branches from overwriting tracked branch baselines.
When the service accepts a token for writing, results use a short service link; creating it adds a request and falls back to the long link after 5 seconds.
The service is introducing stricter authorization for saving baselines and creating short links: public-repository tokens must belong to a user with push access or be an installation token for that repository.
The default tracked branches are now master, main and develop, plus the repository's default branch on GitHub Actions.
Configured trackBranches arrays replace the defaults instead of merging index by index.
Security 3
Basic Auth credentials in bundlewatchServiceHost URLs continue to work and are omitted from results links, CI logs, and GitHub statuses.
Results pages escape every value and allow no scripts.
The setup page checks an OAuth state and recommends a fine-grained token.
New APIs and options 12
Run bundlewatch with --no-compare to check maxSize without requesting or comparing with the base branch's baseline.
Set compare: false to check maxSize without requesting or comparing with the base branch's baseline. Files over maxSize still fail the run.
An optional top-level prefix gives each application its own GitHub statuses and baseline history. Prefixes must be 1–64 lowercase ASCII letters, digits, hyphens, or underscores, starting with a letter or digit.
BundleWatch discovers supported config files automatically, searching upward to the nearest package.json; a discovered config takes precedence over the package.json bundlewatch key.
Adds a service endpoint that renders a short results link.
GitHub Actions can use the workflow's GITHUB_TOKEN for saving baselines and creating short links by granting statuses: write, keeping contents: read, and passing the token as BUNDLEWATCH_GITHUB_TOKEN.
On GitHub Enterprise Server, commit statuses are sent to GITHUB_API_URL; comparisons require a self-hosted service because service.bundlewatch.io only accepts github.com tokens.
Commit statuses are sent to the GitHub API at GITHUB_API_URL when it is set, supporting GitHub Enterprise Server.
Adds a service endpoint that creates a short results link.
-V now prints the version.
Adds a flag that prints the version.
--version now prints the version.
Behavior and default changes 4
Newly generated short-link IDs are 22 characters; existing result links continue to work.
Brotli compression now works without installing brotli-size, using Node's built-in zlib to produce identical sizes.
Defaults to master, main, and develop, plus the repository's default branch on GitHub Actions.
TypeScript configuration files load natively on Node.js 22.18 and later.
Tooling 1
The new command raises exceeded maxSize limits to fit built files, optionally adding --headroom. It previews by default; --write saves JSON config and package.json changes in place.
Fixes and other changes 17
Results pages stay steady when file sections are toggled.
Runs with missing or unreadable files no longer send a baseline and log the reason.
The service writes baselines before sending the response, preventing a write from being lost when the Lambda freezes.
The 0.x entry point bundlewatch/lib/app continues to work.
The 0.x entry point lib/bin/index.js continues to work.
Config discovery checks .mjs, .js, .cjs, .mts, .ts, .cts and .json in that order in each directory, searching upward from the current directory.
Config loading supports .mjs files and configs with only named exports via import(); .ts, .mts and .cts load on Node.js 22.18 and later.
Setting bundlewatchServiceHost to null prints no results link, and the Node.js API returns url: undefined.
Empty files with compression set to none measure 0 B instead of failing with Could not read file.
The --config flag accepts absolute paths.
An explicit --config path overrides config discovery and accepts absolute paths.
When CI is set but CI_REPO_OWNER and CI_REPO_NAME are missing, the repository is read from GIT_URL.
Failing files with paths sharing the same final 37 characters no longer share a status; the second gets a (2) suffix.
Malformed results links return 400, GitHub failures return 503, and baselines too large to store return 413.
Removed files named after Object.prototype properties show as removed, and a file named __proto__ is measured instead of dropped.
Service results links now render for files without maxSize, and accept size strings such as 100KB sent by 0.x CLIs for numeric maxSize values.
Descriptions exceeding GitHub's 140-character limit are truncated instead of leaving the status pending.