-
-
Notifications
You must be signed in to change notification settings - Fork 723
refactor(minfier): consistent method names #13060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
Merge activity
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors method names in the minifier module to improve consistency and readability. The changes enforce a consistent naming pattern where method names indicate their purpose: "substitute_" for syntax replacements, "minimize_" for size optimizations, and "replace_" for known method transformations.
- Renamed methods to follow consistent prefixes based on their functionality
- Reorganized method ordering and removed duplicate method declarations
- Updated all call sites to use the new method names consistently
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| substitute_alternate_syntax.rs | Renamed methods to use "substitute_" prefix and removed duplicate method declaration |
| replace_known_methods.rs | Renamed methods to use "replace_" prefix for known method transformations |
| remove_unused_expression.rs | Updated method call to use new naming convention |
| remove_dead_code.rs | Renamed sequence expression method to "remove_" prefix |
| mod.rs | Updated all method calls throughout to use new naming conventions |
| minimize_*.rs files | Renamed methods to use "minimize_" prefix for size optimization methods |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
crates/oxc_minifier/src/peephole/substitute_alternate_syntax.rs
Outdated
Show resolved
Hide resolved
crates/oxc_minifier/src/peephole/substitute_alternate_syntax.rs
Outdated
Show resolved
Hide resolved
crates/oxc_minifier/src/peephole/substitute_alternate_syntax.rs
Outdated
Show resolved
Hide resolved
crates/oxc_minifier/src/peephole/substitute_alternate_syntax.rs
Outdated
Show resolved
Hide resolved
CodSpeed Instrumentation Performance ReportMerging #13060 will not alter performanceComparing Summary
|
aa4da02 to
59aa706
Compare
59aa706 to
09e4063
Compare
Consistent naming to understand where the methods are coming from, also enforce ordering.