feat: add WinGet upgrade option to PowerShell update notification (#5477) - #5558
feat: add WinGet upgrade option to PowerShell update notification (#5477)#5558PtJade Ceramic (PtJade-Ceramic) wants to merge 4 commits into
Conversation
|
Thanks for your submission! I'm going to convert this to draft status until tests pass, let us know when it is ready for review! |
|
The code changes are clean — the macOS failure is a CI environment issue (VS Code Insiders download/corruption), unrelated to this PR. Could someone with write access please re-run the failed jobs? Thanks! |
ff9fa3e to
3575846
Compare
Test-first: covers parsing of 'winget show' output and of winget-pkgs manifest listings, plus the buttons and notes the update prompt should show for each WinGet state, including that WinGet is not offered off Windows.
…werShell#5477) Detects WinGet via 'winget show --id Microsoft.PowerShell', falling back to the winget-pkgs listing when the CLI is missing. The prompt can upgrade with WinGet, install WinGet, and follow WinGet's progress, noting the version WinGet currently has. It is built by a pure buildUpdatePrompt() function, and WinGet options are only offered on Windows.
103d4f7 to
a4b0e45
Compare
|
All checks are green now — the first green
The CI changes are marked with TODOs — happy to drop them or move them into a separate PR if you prefer. The matrix also had the default Nothing here changes the feature itself: the branch is rebased on Two small asks: #5477 was closed as not planned after a misunderstanding — this is about upgrading PowerShell itself via WinGet (VS Code already manages the extension), not about shipping the extension via WinGet. And could a maintainer add the |
5d1b946 to
12e0256
Compare
Temporary workaround: PSES's nuget.config only lists an Azure DevOps feed, which returns 401 (Unauthorized) for anonymous downloads, so CI fails while restoring the .NET reference packs before any tests run. Drop this once that is fixed upstream.
0a3ccc1 to
fd56c92
Compare
VS Code 1.110 renamed the macOS main executable from 'Contents/MacOS/Electron' to the product name ('Code - Insiders' for Insiders), so v2's hardcoded path fails with 'spawn ... Electron ENOENT' before any test runs. v3 resolves it from the bundle's Info.plist. CI needs the `@vscode` scope served by npmjs meanwhile: the PowerShell npm mirror has not cached 3.1.0 yet and returns 401 for packages it has not cached, which npm silently skips for optional dependencies.
Fixes PowerShell#5592.
fd56c92 to
b17a977
Compare


PR Summary
When a new PowerShell version is available, this PR adds WinGet integration to the update notification:
winget showWinGet only exists on Windows, so its buttons are offered there only, and the prompt is built by a pure
buildUpdatePrompt()function so its buttons and message can be tested.Resolves #5477.
PR Checklist
Testing
npm run compile,npm run lint,npm run formatandnpx tsc --noEmitpass.test/features/UpdatePowerShell.test.tscover the version parsing (fromwinget showoutput and from winget-pkgs manifest listings) and the buttons and notes the prompt produces for each WinGet state, including that WinGet options are not offered off Windows.@vscode/test-electron3.x for the renamed macOS binary, npmjs for the@vscodescope until the PowerShell npm mirror has that version, andfail-fast: false. They are easy to drop or move into a separate PR.