-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release a proxy module of ThreadJob
that points to Microsoft.PowerShell.ThreadJob
#30
Comments
This is perhaps more work than I would expect is needed as a module author to do when renaming a module. Personally my plan for this would have been
ProxyModules are great but I personally think use of one in this instance is perhaps more work than needed, though as shown above there is also need for additional work in the gallery and other tooling too (which I'll raise about now) |
I went ahead and created the proxy module. It has a required dependency on @daxian-dbw how would you like the code to be merged in order to publish the updated module with the proxy/alias? ThreadJob.psd1 @{
RootModule = 'ThreadJob.psm1'
ModuleVersion = '3.0.0'
GUID = '0e7b895d-2fec-43f7-8cae-11e8d16f6e40'
Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
Copyright = '(c) Microsoft Corporation. All rights reserved.'
Description = 'ThreadJob module has been renamed to Microsoft.PowerShell.ThreadJob.'
PowerShellVersion = '5.1'
RequiredModules = @('Microsoft.PowerShell.ThreadJob')
FunctionsToExport = @()
CmdletsToExport = @()
AliasesToExport = @('Start-ThreadJob', 'ThreadJob\Start-ThreadJob')
PrivateData = @{
PSData = @{
LicenseUri = 'https://github.com/PowerShell/ThreadJob/blob/master/LICENSE'
ProjectUri = 'https://github.com/PowerShell/ThreadJob'
}
}
} ThreadJob.psm1 Write-Warning -Message "The ThreadJob has been renamed to Microsoft.PowerShell.ThreadJob. ThreadJob module will no longer be included with PowerShell as of 7.x"
Set-Alias -Name Start-ThreadJob -Value Microsoft.PowerShell.ThreadJob\Start-ThreadJob
Set-Alias -Name ThreadJob\Start-ThreadJob -Value Microsoft.PowerShell.ThreadJob\Start-ThreadJob
Export-ModuleMember -Alias Start-ThreadJob, ThreadJob\Start-ThreadJob |
@ThomasNieto Thanks for this! I will incorporate this and publish it using Microsoft's new guidelines. |
Prerequisites
Steps to reproduce
Given that the Microsoft.PowerShell.ThreadJob is going to replace the ThreadJob going forward, a proxy module of
ThreadJob
should be released to PowerShell Gallery to point toMicrosoft.PowerShell.ThreadJob
and to warn about deprecation ofThreadJob
.Here is the decision from PowerShell Committe:
Expected behavior
A proxy module of ThreadJob to be published to PowerShell Gallery, to call out it's being deprecated.
Actual behavior
N/A
Error details
No response
Environment data
N/A
Version
N/A
Visuals
No response
The text was updated successfully, but these errors were encountered: