Skip to content

Commit 9312c79

Browse files
committed
✨ Add detection for npm updates
1 parent 5294a51 commit 9312c79

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Show-Status.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ Begin
7676
}
7777
}}
7878

79+
function Get-NpmTest
80+
{{
81+
if(Get-Command npm -CommandType Application -ErrorAction Ignore)
82+
{
83+
if(npm outdated -g -parseable |Select-Object -First 1) {'npm'}
84+
}
85+
}}
86+
7987
function Get-PSModulesTest
8088
{{
8189
if(Get-Module -ListAvailable |
@@ -127,6 +135,7 @@ Begin
127135
$updates = @(
128136
(Invoke-CachedCommand.ps1 (Get-ChocoTest) -ExpiresAfter 20:00 -Force:$Force)
129137
(Invoke-CachedCommand.ps1 (Get-WingetTest) -ExpiresAfter 20:00 -Force:$Force)
138+
(Invoke-CachedCommand.ps1 (Get-NpmTest) -ExpiresAfter 20:00 -Force:$Force)
130139
(Invoke-CachedCommand.ps1 (Get-PSModulesTest) -ExpiresAfter 20:00 -Force:$Force)
131140
) |Where-Object {$_}
132141
$updates ? "${UP!} $updates" : $OK

0 commit comments

Comments
 (0)