Skip to content

Commit

Permalink
fix: remove the unnecessary logic for inserting semicolons (#7615)
Browse files Browse the repository at this point in the history
  • Loading branch information
inottn authored Aug 20, 2024
1 parent f80d28a commit 374ae5f
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions crates/rspack_plugin_javascript/src/visitors/semicolon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,21 +124,11 @@ impl<'a> Visit for InsertedSemicolons<'a> {
n.visit_children_with(self)
}

fn visit_export_decl(&mut self, n: &swc_core::ecma::ast::ExportDecl) {
self.post_semi(&n.span);
n.visit_children_with(self)
}

fn visit_named_export(&mut self, n: &swc_core::ecma::ast::NamedExport) {
self.post_semi(&n.span);
n.visit_children_with(self)
}

fn visit_export_default_decl(&mut self, n: &swc_core::ecma::ast::ExportDefaultDecl) {
self.post_semi(&n.span);
n.visit_children_with(self)
}

fn visit_export_default_expr(&mut self, n: &swc_core::ecma::ast::ExportDefaultExpr) {
self.post_semi(&n.span);
n.visit_children_with(self)
Expand Down

2 comments on commit 374ae5f

@rspack-bot
Copy link

Choose a reason for hiding this comment

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

📝 Ran ecosystem CI: Open

suite result
modernjs ✅ success
_selftest ✅ success
nx ❌ failure
rspress ✅ success
rslib ✅ success
rsbuild ❌ failure
examples ✅ success

@rspack-bot
Copy link

Choose a reason for hiding this comment

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

📝 Benchmark detail: Open

Name Base (2024-08-20 46c0de9) Current Change
10000_development-mode + exec 2.36 s ± 21 ms 2.37 s ± 43 ms +0.46 %
10000_development-mode_hmr + exec 703 ms ± 6.6 ms 712 ms ± 11 ms +1.25 %
10000_production-mode + exec 3.02 s ± 31 ms 3.04 s ± 26 ms +0.68 %
arco-pro_development-mode + exec 1.9 s ± 92 ms 1.91 s ± 76 ms +0.77 %
arco-pro_development-mode_hmr + exec 437 ms ± 1.6 ms 438 ms ± 2.9 ms +0.11 %
arco-pro_production-mode + exec 3.47 s ± 77 ms 3.48 s ± 81 ms +0.24 %
arco-pro_production-mode_generate-package-json-webpack-plugin + exec 3.54 s ± 75 ms 3.56 s ± 62 ms +0.35 %
threejs_development-mode_10x + exec 1.71 s ± 10 ms 1.69 s ± 15 ms -1.10 %
threejs_development-mode_10x_hmr + exec 816 ms ± 6.3 ms 797 ms ± 11 ms -2.36 %
threejs_production-mode_10x + exec 5.55 s ± 44 ms 5.53 s ± 28 ms -0.34 %

Please sign in to comment.