Check package version number history for compliance.
Value
A data frame with one row for each problematic package and columns with the package names and version issues.
Details
This function checks the version number history of packages in R-multiverse and reports any packages with issues. The current released version of a given package must be unique, and it must be greater than all the versions of all the previous package releases.
See also
Other issues:
issues_advisories()
,
issues_dependencies()
,
issues_licenses()
,
issues_r_cmd_check()
,
issues_remotes()
,
issues_version_conflicts()
Examples
lines <- c(
"[",
" {",
" \"package\": \"package_unmodified\",",
" \"version_current\": \"1.0.0\",",
" \"hash_current\": \"hash_1.0.0\",",
" \"version_highest\": \"1.0.0\",",
" \"hash_highest\": \"hash_1.0.0\"",
" },",
" {",
" \"package\": \"version_decremented\",",
" \"version_current\": \"0.0.1\",",
" \"hash_current\": \"hash_0.0.1\",",
" \"version_highest\": \"1.0.0\",",
" \"hash_highest\": \"hash_1.0.0\"",
" },",
" {",
" \"package\": \"version_incremented\",",
" \"version_current\": \"2.0.0\",",
" \"hash_current\": \"hash_2.0.0\",",
" \"version_highest\": \"2.0.0\",",
" \"hash_highest\": \"hash_2.0.0\"",
" },",
" {",
" \"package\": \"version_unmodified\",",
" \"version_current\": \"1.0.0\",",
" \"hash_current\": \"hash_1.0.0-modified\",",
" \"version_highest\": \"1.0.0\",",
" \"hash_highest\": \"hash_1.0.0\"",
" }",
"]"
)
versions <- tempfile()
writeLines(lines, versions)
out <- issues_versions(versions)
str(out)
#> 'data.frame': 2 obs. of 2 variables:
#> $ package : chr "version_decremented" "version_unmodified"
#> $ versions:List of 2
#> ..$ :List of 4
#> .. ..$ version_current: chr "0.0.1"
#> .. ..$ hash_current : chr "hash_0.0.1"
#> .. ..$ version_highest: chr "1.0.0"
#> .. ..$ hash_highest : chr "hash_1.0.0"
#> ..$ :List of 4
#> .. ..$ version_current: chr "1.0.0"
#> .. ..$ hash_current : chr "hash_1.0.0-modified"
#> .. ..$ version_highest: chr "1.0.0"
#> .. ..$ hash_highest : chr "hash_1.0.0"