fix(minifier): remove unused long array expressions#13752
fix(minifier): remove unused long array expressions#13752graphite-app[bot] merged 1 commit intomainfrom
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue where long array expressions converted to string split operations were not being properly removed by the minifier due to missing side-effect annotations. The fix adds the pure = true annotation to .split() calls to ensure they are detected as side-effect free and can be removed when unused.
- Adds
pure = trueparameter toexpression_call_with_purefor array-to-split transformations - Updates test expectations to include
/* @__PURE__ */comments in generated code - Adds test case to verify unused array expressions are properly removed
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
CodSpeed Instrumentation Performance ReportMerging #13752 will not alter performanceComparing Summary
Footnotes |
Merge activity
|
Long array expressions are converted to `"str1,str2".split(',')`, but that was not removed because it was not detected as sideeffect free. This PR fixes that by adding `pure = true` to the `.split` call.
41adbd1 to
3d895cf
Compare

Long array expressions are converted to
"str1,str2".split(','), but that was not removed because it was not detected as sideeffect free. This PR fixes that by addingpure = trueto the.splitcall.