Skip to content

Instantly share code, notes, and snippets.

@ekishouTV
Last active November 18, 2023 08:10
Show Gist options
  • Save ekishouTV/629d80a67d6da289f0e15275f04da444 to your computer and use it in GitHub Desktop.
Save ekishouTV/629d80a67d6da289f0e15275f04da444 to your computer and use it in GitHub Desktop.
scoop-outdated: "scoop status" with last update time.
# Summary:
Update-FormatData "$PSScriptRoot\scoop-outdated.ps1xml"
$updates = scoop status | Where-Object Info -NotMatch 'Held'
if ($updates) {
$appUpdated = @{}; scoop list 6> $null | ForEach-Object { $appUpdated.Add($_.Name, $_.Updated) };
$updates `
| ForEach-Object {
$_ | Add-Member -Name 'Last Update Time' -MemberType NoteProperty $appUpdated[$_.Name]
}
$updates | Add-Member -TypeName 'ScoopOutdated' -PassThru
}
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<ViewDefinitions>
<View>
<Name>ScoopOutdatedType</Name>
<ViewSelectedBy>
<TypeName>ScoopOutdated</TypeName>
</ViewSelectedBy>
<TableControl>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Name</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Installed Version</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Latest Version</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Missing Dependencies</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Info</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Last Update Time</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
</ViewDefinitions>
</Configuration>
@ekishouTV
Copy link
Author

Example:

PS> scoop outdated
Scoop is up to date.

Name   Installed Version Latest Version Missing Dependencies Info Last Update Time
----   ----------------- -------------- -------------------- ---- ----------------   
nodejs 21.1.0            21.2.0                                   2023/10/30 22:16:16
pwsh   7.3.9             7.4.0                                    2023/10/30 22:16:57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment