22 lines
1.1 KiB
PowerShell
22 lines
1.1 KiB
PowerShell
# Check only: Renovate runs with the "local" platform directly on this directory
|
|
# and changes nothing. Found updates are read from the JSON report and printed.
|
|
# Renovate requires Node.js >= 24.11
|
|
if ([version](node -v).TrimStart('v') -lt [version]'24.11.0') { throw "Renovate requires Node.js >= 24.11, found: $(node -v). E.g.: volta install node@24" }
|
|
$report = Join-Path ([IO.Path]::GetTempPath()) 'renovate-report.json'
|
|
|
|
Push-Location (Join-Path $PSScriptRoot '..') # repository root
|
|
npx --yes renovate@44.149.3 --platform=local --dry-run=lookup --report-type=file --report-path=$report
|
|
Pop-Location
|
|
|
|
Write-Host "`nAvailable updates:" -ForegroundColor Cyan
|
|
$packageFiles = (Get-Content $report -Raw -Encoding UTF8 | ConvertFrom-Json).repositories.local.packageFiles
|
|
foreach ($manager in $packageFiles.PSObject.Properties) {
|
|
foreach ($file in $manager.Value) {
|
|
foreach ($dep in $file.deps) {
|
|
foreach ($update in $dep.updates) {
|
|
Write-Host " [$($manager.Name)] $($file.packageFile): $($dep.depName) $($dep.currentValue) -> $($update.newValue) ($($update.updateType))"
|
|
}
|
|
}
|
|
}
|
|
}
|