diff options
author | HasanAlrimawi <141642411+HasanAlrimawi@users.noreply.github.com> | 2024-08-20 20:53:53 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-20 19:53:53 +0200 |
commit | 07044547559cafe1a86afc0f1dec13967803eb11 (patch) | |
tree | 720f95efe02027406bf65b308bca6ef3987ef951 /cli/npm | |
parent | 5168700be669179382462214724115a3013cb58e (diff) |
feat: Print deprecation message for npm packages (#24992)
This commit adds ability to print deprecation notices
for npm packages that have been marked as deprecated.
Closes #24013
Diffstat (limited to 'cli/npm')
-rw-r--r-- | cli/npm/managed/resolvers/local.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/npm/managed/resolvers/local.rs b/cli/npm/managed/resolvers/local.rs index adfd04b9e..61e50ba8d 100644 --- a/cli/npm/managed/resolvers/local.rs +++ b/cli/npm/managed/resolvers/local.rs @@ -515,6 +515,15 @@ async fn sync_resolution_with_fs( .add(package.clone(), package_path); } + if let Some(deprecated) = &package.deprecated { + log::info!( + "{} {:?} is deprecated: {}", + crate::colors::yellow("Warning"), + package.id, + crate::colors::gray(deprecated), + ); + } + // finally stop showing the progress bar drop(pb_guard); // explicit for clarity Ok::<_, AnyError>(()) |