diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc399ba23391..a9ce8b18d5a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,14 +34,14 @@ jobs: uses: ./.github/workflows/reusable-build.yml with: target: x86_64-unknown-linux-gnu - profile: 'debug' + profile: "debug" test-windows: name: Test Windows uses: ./.github/workflows/reusable-build.yml with: target: x86_64-pc-windows-msvc - profile: 'debug' + profile: "debug" test-mac: name: Test Mac @@ -49,8 +49,21 @@ jobs: uses: ./.github/workflows/reusable-build.yml with: target: x86_64-apple-darwin - profile: 'debug' + profile: "debug" + cargo-deny: + name: Check license of dependencies + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install cargo-deny + uses: baptiste0928/cargo-install@v2 + with: + crate: cargo-deny + version: "0.11.3" + - name: Check licenses + run: | + cargo deny check license spell: name: Spell check runs-on: ubuntu-latest diff --git a/crates/rspack_core/src/compiler/compilation.rs b/crates/rspack_core/src/compiler/compilation.rs index 5a060e8ace75..19ecdd677844 100644 --- a/crates/rspack_core/src/compiler/compilation.rs +++ b/crates/rspack_core/src/compiler/compilation.rs @@ -616,6 +616,7 @@ impl Compilation { diagnostics, dependencies, current_profile, + exports_info_related, } = task_result; let module_identifier = factory_result.module.identifier(); @@ -638,6 +639,18 @@ impl Compilation { self .missing_dependencies .extend(factory_result.missing_dependencies); + self.module_graph.exports_info_map.insert( + exports_info_related.exports_info.id, + exports_info_related.exports_info, + ); + self.module_graph.export_info_map.insert( + exports_info_related.side_effects_info.id, + exports_info_related.side_effects_info, + ); + self.module_graph.export_info_map.insert( + exports_info_related.other_exports_info.id, + exports_info_related.other_exports_info, + ); add_queue.add_task(AddTask { original_module_identifier, diff --git a/crates/rspack_core/src/compiler/mod.rs b/crates/rspack_core/src/compiler/mod.rs index 83ba799d6ae1..58014bceccce 100644 --- a/crates/rspack_core/src/compiler/mod.rs +++ b/crates/rspack_core/src/compiler/mod.rs @@ -212,12 +212,23 @@ where .module_graph .module_identifier_to_module_graph_module, ); + let mut export_info_map = + std::mem::take(&mut self.compilation.module_graph.export_info_map); for mgm in mi_to_mgm.values_mut() { - // merge exports info if let Some(exports_map) = exports_info_map.remove(&mgm.module_identifier) { - mgm.exports.exports.extend(exports_map.into_iter()); + let exports = self + .compilation + .module_graph + .exports_info_map + .get_mut(&mgm.exports) + .expect("should have exports info"); + for (name, export_info) in exports_map { + exports.exports.insert(name, export_info.id); + export_info_map.insert(export_info.id, export_info); + } } } + self.compilation.module_graph.export_info_map = export_info_map; self .compilation .module_graph diff --git a/crates/rspack_core/src/compiler/queue.rs b/crates/rspack_core/src/compiler/queue.rs index ba3878f28546..e2186c39783f 100644 --- a/crates/rspack_core/src/compiler/queue.rs +++ b/crates/rspack_core/src/compiler/queue.rs @@ -9,6 +9,7 @@ use crate::{ ModuleProfile, ModuleType, NormalModuleFactory, NormalModuleFactoryContext, Resolve, ResolverFactory, SharedPluginDriver, WorkerQueue, }; +use crate::{ExportInfo, ExportsInfo, UsageState}; #[derive(Debug)] pub enum TaskResult { @@ -41,6 +42,13 @@ pub struct FactorizeTask { pub current_profile: Option>, } +/// a struct temporarily used creating ExportsInfo +#[derive(Debug)] +pub struct ExportsInfoRelated { + pub exports_info: ExportsInfo, + pub other_exports_info: ExportInfo, + pub side_effects_info: ExportInfo, +} #[derive(Debug)] pub struct FactorizeTaskResult { pub original_module_identifier: Option, @@ -50,6 +58,7 @@ pub struct FactorizeTaskResult { pub diagnostics: Vec, pub is_entry: bool, pub current_profile: Option>, + pub exports_info_related: ExportsInfoRelated, } #[async_trait::async_trait] @@ -108,7 +117,15 @@ impl WorkerTask for FactorizeTask { } }; - let mgm = ModuleGraphModule::new(result.module.identifier(), *result.module.module_type()); + let other_exports_info = ExportInfo::new("null".into(), UsageState::Unknown, None); + let side_effects_only_info = + ExportInfo::new("*side effects only*".into(), UsageState::Unknown, None); + let exports_info = ExportsInfo::new(other_exports_info.id, side_effects_only_info.id); + let mgm = ModuleGraphModule::new( + result.module.identifier(), + *result.module.module_type(), + exports_info.id, + ); if let Some(current_profile) = &self.current_profile { current_profile.mark_factory_end(); @@ -122,6 +139,11 @@ impl WorkerTask for FactorizeTask { dependencies: self.dependencies, diagnostics, current_profile: self.current_profile, + exports_info_related: ExportsInfoRelated { + exports_info, + other_exports_info, + side_effects_info: side_effects_only_info, + }, }))) } } diff --git a/crates/rspack_core/src/exports_info.rs b/crates/rspack_core/src/exports_info.rs index 5239d851f7f4..e04ee6d6bfa4 100644 --- a/crates/rspack_core/src/exports_info.rs +++ b/crates/rspack_core/src/exports_info.rs @@ -1,4 +1,3 @@ -use std::collections::hash_map::Entry; use std::collections::VecDeque; use std::sync::atomic::AtomicU32; use std::sync::atomic::Ordering::Relaxed; @@ -41,22 +40,32 @@ impl ExportsInfoId { for (i, id) in chain.into_iter().enumerate() { let is_last = i == len - 1; - let exports_info = mg.get_exports_info_mut_by_id(&id); + let exports_info = mg.get_exports_info_by_id(&id); - for e in exports_info.exports.values_mut() { - if e.provided.is_none() { - e.provided = Some(ExportInfoProvided::False); + let export_id_list = exports_info.exports.values().cloned().collect::>(); + let other_export_info = exports_info.other_exports_info; + for id in export_id_list { + let export_info = mg + .export_info_map + .get_mut(&id) + .expect("should have export info"); + if export_info.provided.is_none() { + export_info.provided = Some(ExportInfoProvided::False); } - if e.can_mangle_provide.is_none() { - e.can_mangle_provide = Some(true); + if export_info.can_mangle_provide.is_none() { + export_info.can_mangle_provide = Some(true); } } if is_last { - if exports_info.other_exports_info.provided.is_none() { - exports_info.other_exports_info.provided = Some(ExportInfoProvided::False); + let other_export_info = mg + .export_info_map + .get_mut(&other_export_info) + .expect("should have export info"); + if other_export_info.provided.is_none() { + other_export_info.provided = Some(ExportInfoProvided::False); } - if exports_info.other_exports_info.can_mangle_provide.is_none() { - exports_info.other_exports_info.can_mangle_provide = Some(true); + if other_export_info.can_mangle_provide.is_none() { + other_export_info.can_mangle_provide = Some(true); } } } @@ -88,8 +97,16 @@ impl ExportsInfoId { } } - let exports_info = mg.get_exports_info_mut_by_id(self); - for export_info in exports_info.exports.values_mut() { + let exports_info = mg.get_exports_info_by_id(self); + let redirect_to = exports_info.redirect_to; + let other_exports_info = exports_info.other_exports_info; + let exports_id_list = exports_info.exports.values().cloned().collect::>(); + for export_info_id in exports_id_list { + let export_info = mg + .export_info_map + .get_mut(&export_info_id) + .expect("should have export info"); + if !can_mangle && export_info.can_mangle_provide != Some(false) { export_info.can_mangle_provide = Some(false); changed = true; @@ -109,7 +126,6 @@ impl ExportsInfoId { if let Some(target_key) = target_key { export_info.set_target( &target_key, - // TODO: remove this unwrap, you can't unwrap here target_module.clone(), Some(&vec![export_info.name.clone()]), priority, @@ -117,7 +133,7 @@ impl ExportsInfoId { } } - if let Some(redirect_to) = exports_info.redirect_to { + if let Some(redirect_to) = redirect_to { let flag = redirect_to.set_unknown_exports_provided( mg, can_mangle, @@ -130,22 +146,24 @@ impl ExportsInfoId { changed = true; } } else { + let other_exports_info = mg + .export_info_map + .get_mut(&other_exports_info) + .expect("should have export info"); if !matches!( - exports_info.other_exports_info.provided, + other_exports_info.provided, Some(ExportInfoProvided::True | ExportInfoProvided::Null) ) { - exports_info.other_exports_info.provided = Some(ExportInfoProvided::Null); + other_exports_info.provided = Some(ExportInfoProvided::Null); changed = true; } if let Some(target_key) = target_key { - exports_info - .other_exports_info - .set_target(&target_key, target_module, None, priority); + other_exports_info.set_target(&target_key, target_module, None, priority); } - if !can_mangle && exports_info.other_exports_info.can_mangle_provide != Some(false) { - exports_info.other_exports_info.can_mangle_provide = Some(false); + if !can_mangle && other_exports_info.can_mangle_provide != Some(false) { + other_exports_info.can_mangle_provide = Some(false); changed = true; } } @@ -173,10 +191,18 @@ impl ExportsInfoId { let is_last = i == len - 1; if let Some(info) = exports_info.exports.get(name) { + let info = mg + .export_info_map + .get(info) + .expect("should have export info"); return info; } if is_last { - return &exports_info.other_exports_info; + let info = mg + .export_info_map + .get(&exports_info.other_exports_info) + .expect("should have export info"); + return info; } } unreachable!() @@ -197,21 +223,24 @@ impl ExportsInfoId { for (i, id) in chain.into_iter().enumerate() { let is_last = i == len - 1; - let exports_info = mg.get_exports_info_mut_by_id(&id); - match exports_info.exports.entry(name.clone()) { - Entry::Occupied(_) => return exports_info.id, - Entry::Vacant(vac) => { - if is_last { - let new_info = ExportInfo::new( - name.clone(), - UsageState::Unknown, - Some(&exports_info.other_exports_info), - ); - exports_info._exports_are_ordered = false; - vac.insert(new_info); - return exports_info.id; - } - } + let exports_info = mg.get_exports_info_by_id(&id); + let other_exports_info = exports_info.other_exports_info; + if exports_info.exports.contains_key(name) { + return id; + } + if is_last { + let other_export_info = mg + .export_info_map + .get(&other_exports_info) + .expect("should have export_info"); + let new_info = ExportInfo::new(name.clone(), UsageState::Unknown, Some(other_export_info)); + let new_info_id = new_info.id; + mg.export_info_map.insert(new_info_id, new_info); + + let exports_info = mg.get_exports_info_mut_by_id(&id); + exports_info._exports_are_ordered = false; + exports_info.exports.insert(name.clone(), new_info_id); + return id; } } unreachable!() @@ -254,24 +283,20 @@ impl From for ExportsInfoId { #[derive(Debug)] pub struct ExportsInfo { - pub exports: HashMap, - pub other_exports_info: ExportInfo, - pub _side_effects_only_info: ExportInfo, + pub exports: HashMap, + pub other_exports_info: ExportInfoId, + pub _side_effects_only_info: ExportInfoId, pub _exports_are_ordered: bool, pub redirect_to: Option, pub id: ExportsInfoId, } impl ExportsInfo { - pub fn new() -> Self { + pub fn new(other_exports_info: ExportInfoId, _side_effects_only_info: ExportInfoId) -> Self { Self { exports: HashMap::default(), - other_exports_info: ExportInfo::new("null".into(), UsageState::Unknown, None), - _side_effects_only_info: ExportInfo::new( - "*side effects only*".into(), - UsageState::Unknown, - None, - ), + other_exports_info, + _side_effects_only_info, _exports_are_ordered: false, redirect_to: None, id: ExportsInfoId::new(), @@ -295,7 +320,11 @@ impl ExportsInfo { } UsedName::Vec(value) => { if value.is_empty() { - return self.other_exports_info.get_used(runtime); + let other_export_info = module_graph + .export_info_map + .get(&self.other_exports_info) + .expect("should have export info"); + return other_export_info.get_used(runtime); } let info = self.id.get_read_only_export_info(&value[0], module_graph); if let Some(exports_info) = info.get_exports_info(module_graph) { @@ -310,14 +339,18 @@ impl ExportsInfo { } } - pub fn get_ordered_exports(&self) -> impl Iterator { + pub fn get_ordered_exports(&self) -> impl Iterator { // TODO need order self.exports.values() } pub fn set_redirect_name_to(&mut self) {} pub fn set_has_provide_info(&mut self, mg: &mut ModuleGraph) { - for e in self.exports.values_mut() { + for export_info_id in self.exports.values() { + let e = mg + .export_info_map + .get_mut(export_info_id) + .expect("should have export info"); if e.provided.is_none() { e.provided = Some(ExportInfoProvided::False); } @@ -328,22 +361,20 @@ impl ExportsInfo { if let Some(ref mut redirect_to) = self.redirect_to { redirect_to.set_has_provide_info(mg); } else { - if self.other_exports_info.provided.is_none() { - self.other_exports_info.provided = Some(ExportInfoProvided::False); + let other_export_info = mg + .export_info_map + .get_mut(&self.other_exports_info) + .expect("should have export info"); + if other_export_info.provided.is_none() { + other_export_info.provided = Some(ExportInfoProvided::False); } - if self.other_exports_info.can_mangle_provide.is_none() { - self.other_exports_info.can_mangle_provide = Some(true); + if other_export_info.can_mangle_provide.is_none() { + other_export_info.can_mangle_provide = Some(true); } } } } -impl Default for ExportsInfo { - fn default() -> Self { - Self::new() - } -} - pub enum UsedName { Str(JsWord), Vec(Vec), @@ -581,36 +612,33 @@ impl ExportInfo { return Some(ResolvedExportInfoTargetWithCircular::Target(target)); }; - // use export_info_mut - let mut export_info = { + let export_info_id = { let id = mg .module_graph_module_by_identifier(&target.module) .expect("should have mgm") - .exports - .id; + .exports; let exports_info_id = id.export_info_mut(name, mg); let exports_info = mg.get_exports_info_mut_by_id(&exports_info_id); - exports_info + *exports_info .exports - .get_mut(name) + .get(name) .expect("should have export info") - .clone() }; - if already_visited.contains(&export_info.id) { + if already_visited.contains(&export_info_id) { return Some(ResolvedExportInfoTargetWithCircular::Circular); } - let new_target = export_info._get_target(mg, resolve_filter.clone(), already_visited); - let export_info_id = export_info.id; + let mut export_info = mg + .export_info_map + .get_mut(&export_info_id) + .expect("should have export info") + .clone(); + let export_info_id = export_info.id; + let new_target = export_info._get_target(mg, resolve_filter.clone(), already_visited); _ = std::mem::replace( - { - let exports_info_id = mg.get_exports_info_mut(&target.module).id; - - mg.get_exports_info_mut_by_id(&exports_info_id) - .exports - .get_mut(name) - .expect("should have export info") - }, + mg.export_info_map + .get_mut(&export_info_id) + .expect("should have export info"), export_info, ); @@ -752,7 +780,11 @@ impl ExportInfo { .exports_info .expect("should have exports_info when exports_info is true"); } - let new_exports_info = ExportsInfo::new(); + + let other_exports_info = ExportInfo::new("null".into(), UsageState::Unknown, None); + let side_effects_only_info = + ExportInfo::new("*side effects only*".into(), UsageState::Unknown, None); + let new_exports_info = ExportsInfo::new(other_exports_info.id, side_effects_only_info.id); let new_exports_info_id = new_exports_info.id; let old_exports_info = self.exports_info; @@ -764,6 +796,10 @@ impl ExportInfo { } mg.exports_info_map .insert(new_exports_info_id, new_exports_info); + mg.export_info_map + .insert(other_exports_info.id, other_exports_info); + mg.export_info_map + .insert(side_effects_only_info.id, side_effects_only_info); new_exports_info_id } } @@ -871,7 +907,11 @@ pub fn process_export_info( .exports_info_map .get(&export_info.exports_info.expect("should have exports info")) { - for export_info in exports_info.get_ordered_exports() { + for export_info_id in exports_info.get_ordered_exports() { + let export_info = module_graph + .export_info_map + .get(export_info_id) + .expect("should have export_info"); process_export_info( module_graph, runtime, diff --git a/crates/rspack_core/src/module_graph/mod.rs b/crates/rspack_core/src/module_graph/mod.rs index be052c95af7b..04aae0181c90 100644 --- a/crates/rspack_core/src/module_graph/mod.rs +++ b/crates/rspack_core/src/module_graph/mod.rs @@ -12,8 +12,8 @@ pub use connection::*; use crate::{ to_identifier, BoxDependency, BoxModule, BuildDependency, BuildInfo, BuildMeta, - DependencyCondition, DependencyId, ExportsInfo, ExportsInfoId, Module, ModuleGraphModule, - ModuleIdentifier, ModuleProfile, + DependencyCondition, DependencyId, ExportInfo, ExportInfoId, ExportsInfo, ExportsInfoId, Module, + ModuleGraphModule, ModuleIdentifier, ModuleProfile, }; // TODO Here request can be used JsWord @@ -46,6 +46,7 @@ pub struct ModuleGraph { import_var_map: IdentifierMap, pub exports_info_map: HashMap, + pub export_info_map: HashMap, } impl ModuleGraph { @@ -532,15 +533,19 @@ impl ModuleGraph { let mgm = self .module_graph_module_by_identifier(module_identifier) .expect("should have mgm"); - &mgm.exports + let exports_info = self + .exports_info_map + .get(&mgm.exports) + .expect("should have export info"); + exports_info } - pub fn get_exports_info_mut(&mut self, module_identifier: &ModuleIdentifier) -> &mut ExportsInfo { - let mgm = self - .module_graph_module_by_identifier_mut(module_identifier) - .expect("should have mgm"); - &mut mgm.exports - } + // pub fn get_exports_info_mut(&mut self, module_identifier: &ModuleIdentifier) -> &mut ExportsInfo { + // let mgm = self + // .module_graph_module_by_identifier_mut(module_identifier) + // .expect("should have mgm"); + // &mut mgm.exports + // } pub fn get_exports_info_by_id(&self, id: &ExportsInfoId) -> &ExportsInfo { let exports_info = self.exports_info_map.get(id).expect("should have mgm"); @@ -563,8 +568,8 @@ mod test { use crate::{ BoxDependency, BuildContext, BuildResult, CodeGenerationResult, Compilation, Context, - Dependency, DependencyId, Module, ModuleDependency, ModuleGraph, ModuleGraphModule, - ModuleIdentifier, ModuleType, SourceType, + Dependency, DependencyId, ExportInfo, ExportsInfo, Module, ModuleDependency, ModuleGraph, + ModuleGraphModule, ModuleIdentifier, ModuleType, SourceType, UsageState, }; // Define a detailed node type for `ModuleGraphModule`s @@ -654,9 +659,18 @@ mod test { impl_noop_trait_dep_type!(Edge); fn add_module_to_graph(mg: &mut ModuleGraph, m: Box) { - let mgm = ModuleGraphModule::new(m.identifier(), ModuleType::Js); + let other_exports_info = ExportInfo::new("null".into(), UsageState::Unknown, None); + let side_effects_only_info = + ExportInfo::new("*side effects only*".into(), UsageState::Unknown, None); + let exports_info = ExportsInfo::new(other_exports_info.id, side_effects_only_info.id); + let mgm = ModuleGraphModule::new(m.identifier(), ModuleType::Js, exports_info.id); mg.add_module_graph_module(mgm); mg.add_module(m); + mg.export_info_map + .insert(other_exports_info.id, other_exports_info); + mg.export_info_map + .insert(side_effects_only_info.id, side_effects_only_info); + mg.exports_info_map.insert(exports_info.id, exports_info); } fn link_modules_with_dependency( diff --git a/crates/rspack_core/src/module_graph_module.rs b/crates/rspack_core/src/module_graph_module.rs index ca5543af056e..a1bbfb89290d 100644 --- a/crates/rspack_core/src/module_graph_module.rs +++ b/crates/rspack_core/src/module_graph_module.rs @@ -1,11 +1,12 @@ use rspack_error::{internal_error, Result}; use rustc_hash::FxHashSet as HashSet; +use crate::ExportsInfoId; use crate::{ is_async_dependency, module_graph::ConnectionId, BuildInfo, BuildMeta, BuildMetaDefaultObject, BuildMetaExportsType, ChunkGraph, ChunkGroupOptionsKindRef, DependencyId, ExportsArgument, - ExportsInfo, ExportsType, FactoryMeta, ModuleArgument, ModuleGraph, ModuleGraphConnection, - ModuleIdentifier, ModuleIssuer, ModuleProfile, ModuleSyntax, ModuleType, + ExportsType, FactoryMeta, ModuleArgument, ModuleGraph, ModuleGraphConnection, ModuleIdentifier, + ModuleIssuer, ModuleProfile, ModuleSyntax, ModuleType, }; #[derive(Debug)] @@ -27,12 +28,16 @@ pub struct ModuleGraphModule { pub factory_meta: Option, pub build_info: Option, pub build_meta: Option, - pub exports: Box, + pub exports: ExportsInfoId, pub profile: Option>, } impl ModuleGraphModule { - pub fn new(module_identifier: ModuleIdentifier, module_type: ModuleType) -> Self { + pub fn new( + module_identifier: ModuleIdentifier, + module_type: ModuleType, + exports_info_id: ExportsInfoId, + ) -> Self { Self { outgoing_connections: Default::default(), incoming_connections: Default::default(), @@ -48,7 +53,7 @@ impl ModuleGraphModule { factory_meta: None, build_info: None, build_meta: None, - exports: Box::new(ExportsInfo::new()), + exports: exports_info_id, profile: None, } } diff --git a/crates/rspack_database/Cargo.toml b/crates/rspack_database/Cargo.toml index d24f5611cf24..c8ce37be3038 100644 --- a/crates/rspack_database/Cargo.toml +++ b/crates/rspack_database/Cargo.toml @@ -1,5 +1,6 @@ [package] edition = "2021" +license = "MIT" name = "rspack_database" version = "0.1.0" diff --git a/crates/rspack_identifier/Cargo.toml b/crates/rspack_identifier/Cargo.toml index 91581b703030..b9e2e3bc57e8 100644 --- a/crates/rspack_identifier/Cargo.toml +++ b/crates/rspack_identifier/Cargo.toml @@ -1,5 +1,6 @@ [package] edition = "2021" +license = "MIT" name = "rspack_identifier" version = "0.1.0" diff --git a/crates/rspack_plugin_javascript/src/dependency/export_info_api_dep.rs b/crates/rspack_plugin_javascript/src/dependency/export_info_api_dep.rs index 48915ec7f1b8..81c2e8ef5752 100644 --- a/crates/rspack_plugin_javascript/src/dependency/export_info_api_dep.rs +++ b/crates/rspack_plugin_javascript/src/dependency/export_info_api_dep.rs @@ -55,8 +55,12 @@ impl ExportInfoApiDependency { let mgm = compilation .module_graph .module_graph_module_by_identifier(&id)?; - let info = mgm.exports.exports.get(export_name)?; - Some(info.usage_state) + let exports_info = compilation + .module_graph + .get_exports_info_by_id(&mgm.exports); + let info_id = exports_info.exports.get(export_name)?; + let export_info = compilation.module_graph.export_info_map.get(info_id)?; + Some(export_info.usage_state) } _ => { // TODO: support other prop diff --git a/crates/rspack_plugin_javascript/src/plugin/provided_exports_plugin.rs b/crates/rspack_plugin_javascript/src/plugin/provided_exports_plugin.rs index 2bd13994e124..e6aaae2e0459 100644 --- a/crates/rspack_plugin_javascript/src/plugin/provided_exports_plugin.rs +++ b/crates/rspack_plugin_javascript/src/plugin/provided_exports_plugin.rs @@ -93,10 +93,15 @@ impl<'a> ProvidedExportsPlugin<'a> { for name in hide_export.iter() { let from_exports_info_id = exports_info_id.export_info_mut(name, self.mg); let exports_info = self.mg.get_exports_info_mut_by_id(&from_exports_info_id); - let export_info = exports_info + let export_info_id = *exports_info .exports - .get_mut(name) + .get(name) .expect("should have exports info"); + let export_info = self + .mg + .export_info_map + .get_mut(&export_info_id) + .expect("should have export info"); export_info.unuset_target(&dep_id); } } @@ -186,12 +191,17 @@ impl<'a> ProvidedExportsPlugin<'a> { }; let exports_info_id = exports_info.export_info_mut(&name, self.mg); let exports_info = self.mg.get_exports_info_mut_by_id(&exports_info_id); - let mut export_info = exports_info + let export_info_id = *exports_info .exports - .get_mut(&name) + .get(&name) + .expect("should have export info"); + + let mut export_info = self + .mg + .export_info_map + .get_mut(&export_info_id) .expect("should have export info") .clone(); - if let Some(ref mut provided) = export_info.provided && matches!(provided, ExportInfoProvided::False | ExportInfoProvided::Null) { *provided = ExportInfoProvided::True; self.changed = true; @@ -235,10 +245,15 @@ impl<'a> ProvidedExportsPlugin<'a> { // Recalculate target exportsInfo let target = export_info.get_target(self.mg, None); - let exports_info = self.mg.get_exports_info_mut_by_id(&exports_info_id); - let export_info_old = exports_info + let exports_info = self.mg.get_exports_info_by_id(&exports_info_id); + let export_info_old_id = *exports_info .exports - .get_mut(&name) + .get(&name) + .expect("should have export info"); + let export_info_old = self + .mg + .export_info_map + .get_mut(&export_info_old_id) .expect("should have export info"); _ = std::mem::replace(export_info_old, export_info); @@ -257,10 +272,15 @@ impl<'a> ProvidedExportsPlugin<'a> { } } } - let exports_info = self.mg.get_exports_info_mut_by_id(&exports_info_id); - let export_info = exports_info + let exports_info = self.mg.get_exports_info_by_id(&exports_info_id); + let export_info_id = *exports_info .exports - .get_mut(&name) + .get(&name) + .expect("should have export info"); + let export_info = self + .mg + .export_info_map + .get_mut(&export_info_id) .expect("should have export info"); if export_info.exports_info_owned { let changed = export_info diff --git a/deny.toml b/deny.toml new file mode 100644 index 000000000000..2030a0e25e75 --- /dev/null +++ b/deny.toml @@ -0,0 +1,221 @@ +# This template contains all of the possible sections and their default values + +# Note that all fields that take a lint level have these possible values: +# * deny - An error will be produced and the check will fail +# * warn - A warning will be produced, but the check will not fail +# * allow - No warning or error will be produced, though in some cases a note +# will be + +# The values provided in this template are the default values that will be used +# when any section or field is not specified in your own configuration + +# If 1 or more target triples (and optionally, target_features) are specified, +# only the specified targets will be checked when running `cargo deny check`. +# This means, if a particular package is only ever used as a target specific +# dependency, such as, for example, the `nix` crate only being used via the +# `target_family = "unix"` configuration, that only having windows targets in +# this list would mean the nix crate, as well as any of its exclusive +# dependencies not shared by any other crates, would be ignored, as the target +# list here is effectively saying which targets you are building for. +targets = [ + # The triple can be any string, but only the target triples built in to + # rustc (as of 1.40) can be checked against actual config expressions + #{ triple = "x86_64-unknown-linux-musl" }, + # You can also specify which target_features you promise are enabled for a + # particular target. target_features are currently not validated against + # the actual valid features supported by the target architecture. + #{ triple = "wasm32-unknown-unknown", features = ["atomics"] }, +] + +# This section is considered when running `cargo deny check advisories` +# More documentation for the advisories section can be found here: +# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html +[advisories] +# The path where the advisory database is cloned/fetched into +db-path = "~/.cargo/advisory-db" +# The url(s) of the advisory databases to use +db-urls = ["https://github.com/rustsec/advisory-db"] +# The lint level for security vulnerabilities +vulnerability = "deny" +# The lint level for unmaintained crates +unmaintained = "warn" +# The lint level for crates that have been yanked from their source registry +yanked = "warn" +# The lint level for crates with security notices. Note that as of +# 2019-12-17 there are no security notice advisories in +# https://github.com/rustsec/advisory-db +notice = "warn" +# A list of advisory IDs to ignore. Note that ignored advisories will still +# output a note when they are encountered. +ignore = [ + #"RUSTSEC-0000-0000", +] +# Threshold for security vulnerabilities, any vulnerability with a CVSS score +# lower than the range specified will be ignored. Note that ignored advisories +# will still output a note when they are encountered. +# * None - CVSS Score 0.0 +# * Low - CVSS Score 0.1 - 3.9 +# * Medium - CVSS Score 4.0 - 6.9 +# * High - CVSS Score 7.0 - 8.9 +# * Critical - CVSS Score 9.0 - 10.0 +#severity-threshold = + +# If this is true, then cargo deny will use the git executable to fetch advisory database. +# If this is false, then it uses a built-in git library. +# Setting this to true can be helpful if you have special authentication requirements that cargo-deny does not support. +# See Git Authentication for more information about setting up git authentication. +#git-fetch-with-cli = true + +# This section is considered when running `cargo deny check licenses` +# More documentation for the licenses section can be found here: +# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html +[licenses] +# The lint level for crates which do not have a detectable license +unlicensed = "deny" +# List of explicitly allowed licenses +# See https://spdx.org/licenses/ for list of possible licenses +# [possible values: any SPDX 3.11 short identifier (+ optional exception)]. +allow = [ + "MIT", + "Apache-2.0", + "Apache-2.0 WITH LLVM-exception", + "BSD-2-Clause", + "BSD-2-Clause-Patent", + "BSD-3-Clause", + "CC0-1.0", + "ISC", + "Zlib", + "MPL-2.0", + "0BSD", + "Unicode-DFS-2016", + "BSL-1.0", +] +# List of explicitly disallowed licenses +# See https://spdx.org/licenses/ for list of possible licenses +# [possible values: any SPDX 3.11 short identifier (+ optional exception)]. +deny = [ + #"Nokia", +] +# Lint level for licenses considered copyleft +copyleft = "warn" +# Blanket approval or denial for OSI-approved or FSF Free/Libre licenses +# * both - The license will be approved if it is both OSI-approved *AND* FSF +# * either - The license will be approved if it is either OSI-approved *OR* FSF +# * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF +# * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved +# * neither - This predicate is ignored and the default lint level is used +allow-osi-fsf-free = "neither" +# Lint level used when no other predicates are matched +# 1. License isn't in the allow or deny lists +# 2. License isn't copyleft +# 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither" +default = "deny" +# The confidence threshold for detecting a license from license text. +# The higher the value, the more closely the license text must be to the +# canonical license text of a valid SPDX license file. +# [possible values: any between 0.0 and 1.0]. +confidence-threshold = 0.8 +# Allow 1 or more licenses on a per-crate basis, so that particular licenses +# aren't accepted for every possible crate as with the normal allow list +exceptions = [ + # Each entry is the crate and version constraint, and its specific allow + # list + #{ allow = ["Zlib"], name = "adler32", version = "*" }, +] + +# Some crates don't have (easily) machine readable licensing information, +# adding a clarification entry for it allows you to manually specify the +# licensing information +#[[licenses.clarify]] +# The name of the crate the clarification applies to +#name = "ring" +# The optional version constraint for the crate +#version = "*" +# The SPDX expression for the license requirements of the crate +#expression = "MIT AND ISC AND OpenSSL" +# One or more files in the crate's source used as the "source of truth" for +# the license expression. If the contents match, the clarification will be used +# when running the license check, otherwise the clarification will be ignored +# and the crate will be checked normally, which may produce warnings or errors +# depending on the rest of your configuration +#license-files = [ +# Each entry is a crate relative path, and the (opaque) hash of its contents +#{ path = "LICENSE", hash = 0xbd0eed23 } +#] + +[licenses.private] +# If true, ignores workspace crates that aren't published, or are only +# published to private registries. +# To see how to mark a crate as unpublished (to the official registry), +# visit https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field. +ignore = false +# One or more private registries that you might publish crates to, if a crate +# is only published to private registries, and ignore is true, the crate will +# not have its license(s) checked +registries = [ + #"https://sekretz.com/registry +] + +# This section is considered when running `cargo deny check bans`. +# More documentation about the 'bans' section can be found here: +# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html +[bans] +# Lint level for when multiple versions of the same crate are detected +multiple-versions = "warn" +# Lint level for when a crate version requirement is `*` +wildcards = "allow" +# The graph highlighting used when creating dotgraphs for crates +# with multiple versions +# * lowest-version - The path to the lowest versioned duplicate is highlighted +# * simplest-path - The path to the version with the fewest edges is highlighted +# * all - Both lowest-version and simplest-path are used +highlight = "all" +# List of crates that are allowed. Use with care! +allow = [ + #{ name = "ansi_term", version = "=0.11.0" }, +] +# List of crates to deny +deny = [ + # Each entry the name of a crate and a version range. If version is + # not specified, all versions will be matched. + #{ name = "ansi_term", version = "=0.11.0" }, + # + # Wrapper crates can optionally be specified to allow the crate when it + # is a direct dependency of the otherwise banned crate + #{ name = "ansi_term", version = "=0.11.0", wrappers = [] }, +] +# Certain crates/versions that will be skipped when doing duplicate detection. +skip = [ + #{ name = "ansi_term", version = "=0.11.0" }, +] +# Similarly to `skip` allows you to skip certain crates during duplicate +# detection. Unlike skip, it also includes the entire tree of transitive +# dependencies starting at the specified crate, up to a certain depth, which is +# by default infinite +skip-tree = [ + #{ name = "ansi_term", version = "=0.11.0", depth = 20 }, +] + +# This section is considered when running `cargo deny check sources`. +# More documentation about the 'sources' section can be found here: +# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html +[sources] +# Lint level for what to happen when a crate from a crate registry that is not +# in the allow list is encountered +unknown-registry = "warn" +# Lint level for what to happen when a crate from a git repository that is not +# in the allow list is encountered +unknown-git = "warn" +# List of URLs for allowed crate registries. Defaults to the crates.io index +# if not specified. If it is specified but empty, no registries are allowed. +allow-registry = ["https://github.com/rust-lang/crates.io-index"] +# List of URLs for allowed Git repositories +allow-git = [] + +[sources.allow-org] +# 1 or more github.com organizations to allow git sources for +github = [""] +# 1 or more gitlab.com organizations to allow git sources for +gitlab = [""] +# 1 or more bitbucket.org organizations to allow git sources for +bitbucket = [""] diff --git a/packages/rspack-cli/package.json b/packages/rspack-cli/package.json index 4fa564336ec5..4941063453f3 100644 --- a/packages/rspack-cli/package.json +++ b/packages/rspack-cli/package.json @@ -41,7 +41,7 @@ "exit-hook": "^3.2.0", "interpret": "^3.1.1", "rechoir": "^0.8.0", - "semver": "6.3.0", + "semver": "6.3.1", "webpack-bundle-analyzer": "4.6.1", "yargs": "17.6.2" } diff --git a/packages/rspack/src/Compilation.ts b/packages/rspack/src/Compilation.ts index 05ded25b76d4..ad490f96f0e5 100644 --- a/packages/rspack/src/Compilation.ts +++ b/packages/rspack/src/Compilation.ts @@ -301,6 +301,9 @@ export class Compilation { .concat(optionsOrFallback(options.loggingDebug, [])) .map(normalizeFilter); + options.modulesSpace = + options.modulesSpace || (context.forToString ? 15 : Infinity); + return options; } diff --git a/packages/rspack/src/Stats.ts b/packages/rspack/src/Stats.ts index 75c6922bad45..63eafc8b875e 100644 --- a/packages/rspack/src/Stats.ts +++ b/packages/rspack/src/Stats.ts @@ -116,7 +116,8 @@ function presetToOptions(name?: boolean | string): StatsOptions { }; case "verbose": return { - all: true + all: true, + modulesSpace: Infinity }; case "errors-only": return { diff --git a/packages/rspack/src/config/types.ts b/packages/rspack/src/config/types.ts index 282b8aa194ce..4f1ae1f35d47 100644 --- a/packages/rspack/src/config/types.ts +++ b/packages/rspack/src/config/types.ts @@ -610,6 +610,7 @@ export interface StatsOptions { timings?: boolean; builtAt?: boolean; moduleAssets?: boolean; + modulesSpace?: number; nestedModules?: boolean; source?: boolean; logging?: ("none" | "error" | "warn" | "info" | "log" | "verbose") | boolean; diff --git a/packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts b/packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts index 450ef2011908..528f9a032ef5 100644 --- a/packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts +++ b/packages/rspack/src/stats/DefaultStatsFactoryPlugin.ts @@ -613,10 +613,7 @@ const SIMPLE_EXTRACTORS: SimpleExtractors = { options.source! ); const groupedModules = factory.create(`${type}.modules`, array, context); - const limited = spaceLimited( - groupedModules, - 15 /* options.modulesSpace */ - ); + const limited = spaceLimited(groupedModules, options.modulesSpace!); object.modules = limited.children; object.filteredModules = limited.filteredChildren; }, diff --git a/packages/rspack/tests/Stats.test.ts b/packages/rspack/tests/Stats.test.ts index bf183da4f844..167f1f0794f1 100644 --- a/packages/rspack/tests/Stats.test.ts +++ b/packages/rspack/tests/Stats.test.ts @@ -214,6 +214,33 @@ describe("Stats", () => { `); }); + it("should output the specified number of modules when set stats.modulesSpace", async () => { + const stats = await compile({ + context: __dirname, + entry: "./fixtures/abc" + }); + + expect( + stats?.toJson({ + all: true, + timings: false, + builtAt: false, + version: false + }).modules?.length + ).toBe(4); + + expect( + stats?.toJson({ + all: true, + timings: false, + builtAt: false, + version: false, + modulesSpace: 3 + }).modules?.length + // 2 = 3 - 1 = max - filteredChildrenLineReserved + ).toBe(2); + }); + it("should have time log when logging verbose", async () => { const stats = await compile({ context: __dirname, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 702f0ace9694..8ee021190c68 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1000,7 +1000,7 @@ importers: internal-ip: 6.2.0 interpret: ^3.1.1 rechoir: ^0.8.0 - semver: 6.3.0 + semver: 6.3.1 source-map-support: ^0.5.19 ts-node: 10.9.1 webpack-bundle-analyzer: 4.6.1 @@ -1013,7 +1013,7 @@ importers: exit-hook: 3.2.0 interpret: 3.1.1 rechoir: 0.8.0 - semver: 6.3.0 + semver: 6.3.1 webpack-bundle-analyzer: 4.6.1 yargs: 17.6.2 devDependencies: @@ -2021,7 +2021,7 @@ packages: debug: 4.3.4 gensync: 1.0.0-beta.2 json5: 2.2.3 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true @@ -2090,7 +2090,7 @@ packages: debug: 4.3.4 gensync: 1.0.0-beta.2 json5: 2.2.3 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true @@ -2164,7 +2164,7 @@ packages: '@babel/helper-validator-option': 7.18.6 browserslist: 4.21.5 lru-cache: 5.1.1 - semver: 6.3.0 + semver: 6.3.1 /@babel/helper-compilation-targets/7.20.7_@babel+core@7.19.3: resolution: {integrity: sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==} @@ -2177,7 +2177,7 @@ packages: '@babel/helper-validator-option': 7.18.6 browserslist: 4.21.5 lru-cache: 5.1.1 - semver: 6.3.0 + semver: 6.3.1 dev: true /@babel/helper-compilation-targets/7.20.7_@babel+core@7.20.12: @@ -2191,7 +2191,7 @@ packages: '@babel/helper-validator-option': 7.18.6 browserslist: 4.21.5 lru-cache: 5.1.1 - semver: 6.3.0 + semver: 6.3.1 dev: false /@babel/helper-compilation-targets/7.20.7_@babel+core@7.21.0: @@ -2205,7 +2205,7 @@ packages: '@babel/helper-validator-option': 7.18.6 browserslist: 4.21.5 lru-cache: 5.1.1 - semver: 6.3.0 + semver: 6.3.1 dev: true /@babel/helper-compilation-targets/7.20.7_@babel+core@7.21.4: @@ -2219,7 +2219,7 @@ packages: '@babel/helper-validator-option': 7.18.6 browserslist: 4.21.5 lru-cache: 5.1.1 - semver: 6.3.0 + semver: 6.3.1 dev: true /@babel/helper-compilation-targets/7.21.5_@babel+core@7.21.0: @@ -2233,7 +2233,7 @@ packages: '@babel/helper-validator-option': 7.21.0 browserslist: 4.21.5 lru-cache: 5.1.1 - semver: 6.3.0 + semver: 6.3.1 dev: true /@babel/helper-compilation-targets/7.21.5_@babel+core@7.21.4: @@ -2247,7 +2247,7 @@ packages: '@babel/helper-validator-option': 7.21.0 browserslist: 4.21.5 lru-cache: 5.1.1 - semver: 6.3.0 + semver: 6.3.1 dev: true /@babel/helper-create-class-features-plugin/7.20.5: @@ -2318,7 +2318,7 @@ packages: '@babel/helper-replace-supers': 7.21.5 '@babel/helper-skip-transparent-expression-wrappers': 7.20.0 '@babel/helper-split-export-declaration': 7.18.6 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true @@ -2338,7 +2338,7 @@ packages: '@babel/helper-replace-supers': 7.21.5 '@babel/helper-skip-transparent-expression-wrappers': 7.20.0 '@babel/helper-split-export-declaration': 7.18.6 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true @@ -2358,7 +2358,7 @@ packages: '@babel/helper-replace-supers': 7.22.5 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/helper-split-export-declaration': 7.22.5 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true @@ -2405,7 +2405,7 @@ packages: debug: 4.3.4 lodash.debounce: 4.0.8 resolve: 1.22.2 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -2420,7 +2420,7 @@ packages: debug: 4.3.4 lodash.debounce: 4.0.8 resolve: 1.22.2 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true @@ -2436,7 +2436,7 @@ packages: debug: 4.3.4 lodash.debounce: 4.0.8 resolve: 1.22.2 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true @@ -5122,7 +5122,7 @@ packages: babel-plugin-polyfill-corejs2: 0.3.3 babel-plugin-polyfill-corejs3: 0.6.0 babel-plugin-polyfill-regenerator: 0.4.1 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: false @@ -5139,7 +5139,7 @@ packages: babel-plugin-polyfill-corejs2: 0.3.3_@babel+core@7.21.4 babel-plugin-polyfill-corejs3: 0.6.0_@babel+core@7.21.4 babel-plugin-polyfill-regenerator: 0.4.1_@babel+core@7.21.4 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true @@ -5645,7 +5645,7 @@ packages: babel-plugin-polyfill-corejs3: 0.6.0_@babel+core@7.21.0 babel-plugin-polyfill-regenerator: 0.4.1_@babel+core@7.21.0 core-js-compat: 3.26.1 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true @@ -5731,7 +5731,7 @@ packages: babel-plugin-polyfill-corejs3: 0.6.0_@babel+core@7.21.4 babel-plugin-polyfill-regenerator: 0.4.1_@babel+core@7.21.4 core-js-compat: 3.26.1 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true @@ -12858,7 +12858,7 @@ packages: dependencies: '@babel/compat-data': 7.20.14 '@babel/helper-define-polyfill-provider': 0.3.3 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -12870,7 +12870,7 @@ packages: '@babel/compat-data': 7.20.14 '@babel/core': 7.21.0 '@babel/helper-define-polyfill-provider': 0.3.3_@babel+core@7.21.0 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true @@ -12883,7 +12883,7 @@ packages: '@babel/compat-data': 7.20.14 '@babel/core': 7.21.4 '@babel/helper-define-polyfill-provider': 0.3.3_@babel+core@7.21.4 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true @@ -18867,7 +18867,7 @@ packages: '@babel/parser': 7.21.8 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true @@ -20322,7 +20322,7 @@ packages: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} dependencies: - semver: 6.3.0 + semver: 6.3.1 /make-error/1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} @@ -21500,7 +21500,7 @@ packages: dependencies: hosted-git-info: 6.1.1 proc-log: 3.0.0 - semver: 7.4.0 + semver: 7.5.1 validate-npm-package-name: 5.0.0 dev: true @@ -21518,7 +21518,7 @@ packages: npm-install-checks: 6.1.1 npm-normalize-package-bin: 3.0.1 npm-package-arg: 10.1.0 - semver: 7.4.0 + semver: 7.5.1 dev: true /npm-registry-fetch/14.0.5: @@ -21986,7 +21986,7 @@ packages: got: 9.6.0 registry-auth-token: 4.2.2 registry-url: 5.1.0 - semver: 6.3.0 + semver: 6.3.1 dev: true /pacote/15.1.3: @@ -22518,7 +22518,7 @@ packages: cosmiconfig-typescript-loader: 4.3.0_6yivg75iccvv4hos4nr7lola4y klona: 2.0.6 postcss: 8.4.23 - semver: 7.4.0 + semver: 7.5.1 typescript: 4.9.4 webpack: 5.80.0_esbuild@0.17.18 transitivePeerDependencies: @@ -24572,7 +24572,7 @@ packages: resolution: {integrity: sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==} engines: {node: '>=8'} dependencies: - semver: 6.3.0 + semver: 6.3.1 dev: true /semver-regex/2.0.0: @@ -24603,6 +24603,10 @@ packages: resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} hasBin: true + /semver/6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + /semver/7.0.0: resolution: {integrity: sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==} hasBin: true @@ -26530,7 +26534,7 @@ packages: json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 - semver: 7.4.0 + semver: 7.5.1 typescript: 5.0.2 yargs-parser: 21.1.1 dev: true