fix(codegen): do not escape $ in strings unless using backtick as quote#10103
Merged
graphite-app[bot] merged 1 commit intomainfrom Mar 29, 2025
Conversation
Member
Author
CodSpeed Instrumentation Performance ReportMerging #10103 will create unknown performance changesComparing Summary
Benchmarks breakdown
|
d0ff0cc to
92a03b8
Compare
196072e to
dba7db6
Compare
dba7db6 to
87a539a
Compare
92a03b8 to
d3afce0
Compare
This was referenced Mar 28, 2025
Merged
Member
Author
|
The effect on output sizes is odd. Output for Edit: Actually I can't replicate the larger gzipped size locally. cargo run -p oxc_minifier --example minifier target/antd.js -- --mangle --nospace > out.js
gzip -9 out.jsThat produces 5 bytes shorter output after this PR. So I don't understand why |
Contributor
Merge activity
|
…uote (#10103) When printing `"${"`, it's unnecessary to escape the `$` unless the quote character is a backtick.
d3afce0 to
c903e42
Compare
87a539a to
9b6e344
Compare
Base automatically changed from
03-28-fix_codegen_prevent_arithmetic_overflow_calculating_quote_for_stringliteral_s
to
main
March 29, 2025 13:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

When printing
"${", it's unnecessary to escape the$unless the quote character is a backtick.