Skip to content

fix: process.env.NODE_ENV inside paren expr#2153

Merged
IWANABETHATGUY merged 6 commits intomainfrom
fix/drop-syntax
Sep 4, 2024
Merged

fix: process.env.NODE_ENV inside paren expr#2153
IWANABETHATGUY merged 6 commits intomainfrom
fix/drop-syntax

Conversation

@IWANABETHATGUY
Copy link
Member

Description

@netlify
Copy link

netlify bot commented Sep 4, 2024

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 21d03ac
🔍 Latest deploy log https://app.netlify.com/sites/rolldown-rs/deploys/66d8197407e5b30008611aff

let options = CompressOptions {
fold_constants: true,
remove_dead_code: true,
remove_syntax: true,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/// Remove syntax from the AST.
///
/// * Parenthesized Expression
/// * `debugger`
/// * `console.log`

@@ -0,0 +1,16 @@
use oxc::codegen::{self, CodeGenerator, Gen};

pub trait ToSourceString {
Copy link
Member Author

@IWANABETHATGUY IWANABETHATGUY Sep 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used for convert any stmt or program to source_string, useful for debugging.

@IWANABETHATGUY IWANABETHATGUY marked this pull request as ready for review September 4, 2024 08:11
@IWANABETHATGUY IWANABETHATGUY added this pull request to the merge queue Sep 4, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2024

Benchmarks Rust

group                                                               pr                                     target
-----                                                               --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol                     1.00     54.5±1.21ms        ? ?/sec    1.03     55.9±1.26ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-minify              1.00     79.2±1.91ms        ? ?/sec    1.01     79.9±1.08ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-minify-sourcemap    1.00     94.7±1.28ms        ? ?/sec    1.01     95.5±1.00ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap           1.01     63.4±1.20ms        ? ?/sec    1.00     63.1±3.49ms        ? ?/sec
bundle/bundle@rome-ts                                               1.00    102.6±1.05ms        ? ?/sec    1.01    103.3±2.38ms        ? ?/sec
bundle/bundle@rome-ts-minify                                        1.00    188.4±6.34ms        ? ?/sec    1.00    188.7±6.38ms        ? ?/sec
bundle/bundle@rome-ts-minify-sourcemap                              1.00    228.1±3.63ms        ? ?/sec    1.07    244.0±7.93ms        ? ?/sec
bundle/bundle@rome-ts-sourcemap                                     1.00    117.8±1.05ms        ? ?/sec    1.03    120.8±1.42ms        ? ?/sec
bundle/bundle@threejs                                               1.00     33.2±1.04ms        ? ?/sec    1.01     33.5±0.51ms        ? ?/sec
bundle/bundle@threejs-minify                                        1.01     81.2±3.40ms        ? ?/sec    1.00     80.7±2.94ms        ? ?/sec
bundle/bundle@threejs-minify-sourcemap                              1.00     99.2±1.28ms        ? ?/sec    1.02    101.1±1.61ms        ? ?/sec
bundle/bundle@threejs-sourcemap                                     1.01     42.8±0.34ms        ? ?/sec    1.00     42.3±0.57ms        ? ?/sec
bundle/bundle@threejs10x                                            1.00    359.3±6.45ms        ? ?/sec    1.00    358.1±4.21ms        ? ?/sec
bundle/bundle@threejs10x-minify                                     1.00    960.7±4.45ms        ? ?/sec    1.01    966.3±8.12ms        ? ?/sec
bundle/bundle@threejs10x-minify-sourcemap                           1.00  1224.8±13.33ms        ? ?/sec    1.00   1224.8±8.66ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                                  1.00    424.2±3.46ms        ? ?/sec    1.01    428.1±6.02ms        ? ?/sec
remapping/remapping                                                 1.01     33.1±0.27ms        ? ?/sec    1.00     32.7±0.30ms        ? ?/sec
remapping/render-chunk-remapping                                    1.00     83.0±0.76ms        ? ?/sec    1.00     83.0±0.62ms        ? ?/sec
scan/scan@rome-ts                                                   1.00     82.4±0.96ms        ? ?/sec    1.00     82.5±1.15ms        ? ?/sec
scan/scan@threejs                                                   1.01     25.9±0.88ms        ? ?/sec    1.00     25.7±1.85ms        ? ?/sec
scan/scan@threejs10x                                                1.01    256.9±2.58ms        ? ?/sec    1.00    253.1±2.57ms        ? ?/sec

Merged via the queue into main with commit fddb2f5 Sep 4, 2024
@IWANABETHATGUY IWANABETHATGUY deleted the fix/drop-syntax branch September 4, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants