Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Print deprecation message for npm packages #24992

Merged
merged 11 commits into from
Aug 20, 2024

Conversation

HasanAlrimawi
Copy link
Contributor

@HasanAlrimawi HasanAlrimawi commented Aug 11, 2024

This commit adds ability to print deprecation notices
for npm packages that have been marked as deprecated.

Closes #24013

@HasanAlrimawi HasanAlrimawi changed the title added test for deno install deprecated package fix: added test for deno install deprecated package Aug 11, 2024
tests/util/server/src/npm.rs Outdated Show resolved Hide resolved
Comment on lines 518 to 524
if package.deprecated.is_some() {
log::info!(
"{} {:?} is deprecated",
crate::colors::yellow("Warning"),
package.id
);
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if package.deprecated.is_some() {
log::info!(
"{} {:?} is deprecated",
crate::colors::yellow("Warning"),
package.id
);
}
if let Some(deprecated) = &package.deprecated {
log::info!(
"{} {:?} is deprecated: {}",
crate::colors::yellow("Warning"),
package.id,
crate::colors::grah(deprecated),
);
}

@bartlomieju bartlomieju changed the title fix: added test for deno install deprecated package feat: Print deprecation message for npm packages Aug 20, 2024
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM

@bartlomieju bartlomieju merged commit 0704454 into denoland:main Aug 20, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: deno install doesn't print package deprecation warnings
2 participants