Repository: vercel/next.js
Pull request: Turbopack: rename simple tree shaking

This is called "used exports removal" now

Closes PACK-4979

Changed files:
filename: turbopack/crates/turbopack-ecmascript/src/lib.rs
patch: @@ -14,6 +14,7 @@ pub mod async_chunk;
 pub mod chunk;
 pub mod code_gen;
 mod errors;
+pub mod export_usage;
 pub mod magic_identifier;
 pub mod manifest;
 mod merged_module;
@@ -23,7 +24,6 @@ mod path_visitor;
 pub mod references;
 pub mod runtime_functions;
 pub mod side_effect_optimization;
-pub mod simple_tree_shake;
 pub(crate) mod special_cases;
 pub(crate) mod static_code;
 mod swc_comments;
@@ -117,6 +117,7 @@ use crate::{
     analyzer::graph::EvalContext,
     chunk::{EcmascriptChunkPlaceable, placeable::is_marked_as_side_effect_free},
     code_gen::{CodeGens, ModifiableAst},
+    export_usage::{ModuleExportUsageInfo, get_module_export_usages},
     merged_module::MergedEcmascriptModule,
     parse::generate_js_source_map,
     references::{
@@ -125,7 +126,6 @@ use crate::{
         esm::{base::EsmAssetReferences, export},
     },
     side_effect_optimization::reference::EcmascriptModulePartReference,
-    simple_tree_shake::{ModuleExportUsageInfo, get_module_export_usages},
     swc_comments::{CowComments, ImmutableComments},
     transform::{remove_directives, remove_shebang},
 };

filename: turbopack/crates/turbopack-ecmascript/src/references/esm/export.rs
patch: @@ -31,10 +31,10 @@ use crate::{
     EcmascriptModuleAsset, ScopeHoistingContext,
     chunk::{EcmascriptChunkPlaceable, EcmascriptExports},
     code_gen::{CodeGeneration, CodeGenerationHoistedStmt},
+    export_usage::ModuleExportUsageInfo,
     magic_identifier,
     parse::ParseResult,
     runtime_functions::{TURBOPACK_DYNAMIC, TURBOPACK_ESM},
-    simple_tree_shake::ModuleExportUsageInfo,
     tree_shake::asset::EcmascriptModulePartAsset,
     utils::module_id_to_lit,
 };

filename: turbopack/crates/turbopack-ecmascript/src/side_effect_optimization/facade/module.rs
patch: @@ -23,13 +23,13 @@ use crate::{
     EcmascriptModuleContentOptions, EcmascriptOptions, MergedEcmascriptModule, SpecifiedModuleType,
     chunk::{EcmascriptChunkPlaceable, EcmascriptExports},
     code_gen::CodeGens,
+    export_usage::get_module_export_usages,
     parse::ParseResult,
     references::{
         async_module::{AsyncModule, OptionAsyncModule},
         esm::{EsmExport, EsmExports, base::EsmAssetReferences},
     },
     side_effect_optimization::reference::EcmascriptModulePartReference,
-    simple_tree_shake::get_module_export_usages,
 };
 
 /// A module derived from an original ecmascript module that only contains all

filename: turbopack/crates/turbopack-ecmascript/src/side_effect_optimization/locals/module.rs
patch: @@ -21,11 +21,11 @@ use crate::{
     AnalyzeEcmascriptModuleResult, EcmascriptAnalyzable, EcmascriptModuleAsset,
     EcmascriptModuleContent, EcmascriptModuleContentOptions, MergedEcmascriptModule,
     chunk::{EcmascriptChunkPlaceable, EcmascriptExports},
+    export_usage::get_module_export_usages,
     references::{
         async_module::OptionAsyncModule,
         esm::{EsmExport, EsmExports},
     },
-    simple_tree_shake::get_module_export_usages,
 };
 
 /// A module derived from an original ecmascript module that only contains the

filename: turbopack/crates/turbopack-ecmascript/src/tree_shake/asset.rs
patch: @@ -22,12 +22,12 @@ use crate::{
     EcmascriptModuleAssetType, EcmascriptModuleContent, EcmascriptModuleContentOptions,
     EcmascriptParsable,
     chunk::{EcmascriptChunkPlaceable, EcmascriptExports},
+    export_usage::get_module_export_usages,
     parse::ParseResult,
     references::{
         FollowExportsResult, analyse_ecmascript_module, esm::FoundExportType, follow_reexports,
     },
     side_effect_optimization::facade::module::EcmascriptModuleFacadeModule,
-    simple_tree_shake::get_module_export_usages,
     tree_shake::{Key, side_effect_module::SideEffectsModule},
 };