ci: Check bundle size increases per PR - #24737
nicohrubec wants to merge 14 commits into
Conversation
Co-Authored-By: GPT-6 <codex@openai.com>
Co-Authored-By: GPT-6 <codex@openai.com>
93485e5 to
cf9b39e
Compare
Co-Authored-By: GPT-6 <codex@openai.com>
Co-Authored-By: GPT-6 <codex@openai.com>
Co-Authored-By: GPT-6 <codex@openai.com>
Co-Authored-By: GPT-6 <codex@openai.com>
Co-Authored-By: GPT-6 <codex@openai.com>
Co-Authored-By: GPT-6 <codex@openai.com>
Co-Authored-By: GPT-6 <codex@openai.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8900460. Configure here.
Co-Authored-By: GPT-6 <codex@openai.com>
Co-Authored-By: GPT-6 <codex@openai.com>
Co-Authored-By: GPT-6 <codex@openai.com>
| `Size limit exceeded for ${name} - ${this.formatBytes(current.size)} > ${this.formatBytes(current.sizeLimit)}`, | ||
| ); | ||
| } | ||
|
|
There was a problem hiding this comment.
Bug: The removal of explicit number coercion for result.size may cause bytes.format() to fail if the size field from the JSON output is a string.
Severity: MEDIUM
Suggested Fix
Restore the explicit number coercion to ensure the size property is always a number before being used, especially by external library functions like bytes.format(). Change size: result.size back to size: +result.size.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: dev-packages/size-limit-gh-action/utils/SizeLimitFormatter.mjs#L80
Potential issue: The explicit number coercion for the `size` field, previously done
using `+result.size`, has been removed. While JavaScript's automatic type coercion
handles arithmetic operations like subtraction correctly even with string numbers, the
`size` value is also passed to the `bytes.format()` method from the `bytes-iec` library.
This library likely expects a numeric input and may return `null` or incorrect output if
`size-limit`'s JSON output provides the `size` value as a string. This removal of
defensive type coercion introduces a risk of silent failures or incorrect formatting in
the size report.
Did we get this right? 👍 / 👎 to inform future reviews.

Accept Bundlesize Increase. If present, it passes without measuring again.Also removing the old absolute size limits and the weekly size limit update workflow, since these are no longer needed now.
Fixes #21813