PowerShell / PowerShell/PSResourceGet
Auto-Update and New Version Notification for PowerShellGallery Modules imported/installed
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 576
- Forks
- 114
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 7
Description
Summary of the new feature / enhancement
Related to #495
Problem Statement
Module owners have difficulty getting users to upgrade to the latest stable version of their module. This means that users are often are on older and worse versions of modules, which has the potential to have security flaws, breaking bugs and issues.
Potential Solution
Have PowerShellGet somehow check for newer versions with the PowerShellGallery automatically and in the background. There are two approaches to encourage updating to the latest version
-
Notify the user with a prompt explaining there current module is not the latest release and they should update via
Update-PSResource -Name <MODULE_NAME>- Potential notification
There is a version of <MODULE_NAME> available from the PowerShellGallery, would you like to install it? [Y] Yes [N] No:
- Potential notification
-
Allow the users to opt into automatic updates for specified modules
- When installing specific module (parameter
-EnableAutoUpdatefor example) - Or later configuration
- When installing specific module (parameter
Proposed technical implementation details (optional)
Potential Example Scenarios
On terminal startup (module import)
When the user opens a new PowerShell terminal, a check of the imported modules for newer versions is ran to notify the users that ModuleA, ModuleB...etc has a newer version available on PowerShellGallery.
On cmdlet use
User uses a cmdlet from a specific PowerShell module, <ModuleA_Cmdlet>, after cmdlet is run, a check against that module is run and user is notified if there is a newer version available.
When installing module
When installing a module user has a -EnableAutoUpdate Parameter they can set with Install-PSResource to have PowerShellGet auto-update module on import.
Security Considerations
In the scenarios for auto-updating, there would have to be some form of package signing within PowerShell Gallery. If a previous version of a package was signed, then the next version should be signed with the same certificate. Additionally have a way to override this requirement to account
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by reading related issue #495 and tracing the existing Install-PSResource, Update-PSResource, and module-import flows; define the notification, opt-in update, background-check, and package-signing requirements before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cli, security, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100