mirror of
https://github.com/pesde-pkg/pesde.git
synced 2024-12-13 11:50:36 +00:00
feat: print no updates available in outdated command
This commit is contained in:
parent
9268159dc6
commit
33917424a8
2 changed files with 16 additions and 5 deletions
|
@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
### Added
|
||||||
|
- Print that no updates are available in `outdated` command by @daimond113
|
||||||
|
|
||||||
## [0.5.0-rc.12] - 2024-11-22
|
## [0.5.0-rc.12] - 2024-11-22
|
||||||
### Added
|
### Added
|
||||||
- Support fallback Wally registries by @daimond113
|
- Support fallback Wally registries by @daimond113
|
||||||
|
|
|
@ -54,7 +54,7 @@ impl OutdatedCommand {
|
||||||
|
|
||||||
let refreshed_sources = Arc::new(Mutex::new(refreshed_sources));
|
let refreshed_sources = Arc::new(Mutex::new(refreshed_sources));
|
||||||
|
|
||||||
try_join_all(
|
if try_join_all(
|
||||||
graph
|
graph
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.flat_map(|(_, versions)| versions.into_iter())
|
.flat_map(|(_, versions)| versions.into_iter())
|
||||||
|
@ -63,14 +63,14 @@ impl OutdatedCommand {
|
||||||
let refreshed_sources = refreshed_sources.clone();
|
let refreshed_sources = refreshed_sources.clone();
|
||||||
async move {
|
async move {
|
||||||
let Some((alias, mut specifier, _)) = node.node.direct else {
|
let Some((alias, mut specifier, _)) = node.node.direct else {
|
||||||
return Ok::<(), anyhow::Error>(());
|
return Ok::<bool, anyhow::Error>(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
if matches!(
|
if matches!(
|
||||||
specifier,
|
specifier,
|
||||||
DependencySpecifiers::Git(_) | DependencySpecifiers::Workspace(_)
|
DependencySpecifiers::Git(_) | DependencySpecifiers::Workspace(_)
|
||||||
) {
|
) {
|
||||||
return Ok(());
|
return Ok(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
let source = node.node.pkg_ref.source();
|
let source = node.node.pkg_ref.source();
|
||||||
|
@ -116,13 +116,20 @@ impl OutdatedCommand {
|
||||||
current_version_id.version(),
|
current_version_id.version(),
|
||||||
version_id.version()
|
version_id.version()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
return Ok(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(true)
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.await?;
|
.await?
|
||||||
|
.into_iter()
|
||||||
|
.all(|b| b)
|
||||||
|
{
|
||||||
|
println!("all packages are up to date");
|
||||||
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue