Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Commit a20f8e9

Browse files
authored
Merge development into master (#431)
1 parent 8902813 commit a20f8e9

File tree

57 files changed

+6706
-697
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+6706
-697
lines changed

.MetaTestOptIn.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[
2+
"Common Tests - Validate Module Files",
3+
"Common Tests - Validate Script Files",
4+
"Common Tests - Validate Example Files",
5+
"Common Tests - Validate Example Files To Be Published",
6+
"Common Tests - Required Script Analyzer Rules",
7+
"Common Tests - New Error-Level Script Analyzer Rules",
8+
"Common Tests - Custom Script Analyzer Rules",
9+
"Common Tests - Validate Markdown Links",
10+
"Common Tests - Relative Path Length"
11+
]

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,3 +269,7 @@ FakesAssemblies/
269269
*.xproj
270270
*.xproj.user
271271
*.suo
272+
273+
# Ignore DscResource.Tests repository when it is cloned
274+
# when running DSC resource unit tests locally.
275+
DSC/DscResource.Tests

.travis.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
language: csharp
32
dotnet: 2.0.2
43
mono: none
@@ -37,14 +36,4 @@ install:
3736

3837
script:
3938
- echo "TRAVIS_EVENT_TYPE value $TRAVIS_EVENT_TYPE"
40-
- ./tools/travis.sh
41-
42-
43-
44-
45-
46-
47-
48-
49-
50-
39+
- bash ./tools/travis.sh

CHANGELOG.md

Lines changed: 95 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,107 @@
11
# Changelog
2+
3+
## 2.1.0
4+
5+
Breaking Change
6+
7+
- Default installation scope for Update-Module and Update-Script has changed to match Install-Module and Install-Script. For Windows PowerShell (version 5.1 or below), the default scope is AllUsers when running in an elevated session, and CurrentUser at all other times.
8+
For PowerShell version 6.0.0 and above, the default installation scope is always CurrentUser. (#421)
9+
10+
Bug Fixes
11+
12+
- Update-ModuleManifest no longer clears FunctionsToExport, AliasesToExport, nor NestModules (#415 & #425) (Thanks @pougetat and @tnieto88!)
13+
- Update-Module no longer changes repository URL (#407)
14+
- Update-ModuleManifest no longer preprends 'PSGet_' to module name (#403) (Thanks @ThePoShWolf)
15+
- Update-ModuleManifest now throws error and fails to update when provided invalid entries (#398) (Thanks @pougetat!)
16+
- Ignore files no longer being included when uploading modules (#396)
17+
18+
New Features
19+
20+
- New DSC resource, PSRepository (#426) (Thanks @johlju!)
21+
- Piping of PS respositories (#420)
22+
- utf8 support for .nuspec (#419)
23+
224
## 2.0.4
25+
326
Bug Fix
4-
* Remove PSGallery availability checks (#374)
27+
28+
- Remove PSGallery availability checks (#374)
529

630
## 2.0.3
31+
732
Bug fixes and Improvements
8-
* Fix CommandAlreadyAvailable error for PackageManagement module (#333)
9-
* Remove trailing whitespace when value is not provided for Get-PSScriptInfoString (#337) (Thanks @thomasrayner)
10-
* Expanded aliases for improved readability (#338) (Thanks @lazywinadmin)
11-
* Improvements for Catalog tests (#343)
12-
* Fix Update-ScriptInfoFile to preserve PrivateData (#346) (Thanks @tnieto88)
13-
* Install modules with many commands faster (#351)
33+
34+
- Fix CommandAlreadyAvailable error for PackageManagement module (#333)
35+
- Remove trailing whitespace when value is not provided for Get-PSScriptInfoString (#337) (Thanks @thomasrayner)
36+
- Expanded aliases for improved readability (#338) (Thanks @lazywinadmin)
37+
- Improvements for Catalog tests (#343)
38+
- Fix Update-ScriptInfoFile to preserve PrivateData (#346) (Thanks @tnieto88)
39+
- Install modules with many commands faster (#351)
1440

1541
New Features
16-
* Tab completion for -Repository parameter (#339) and for Publish-Module -Name (#359) (Thanks @matt9ucci)
42+
43+
- Tab completion for -Repository parameter (#339) and for Publish-Module -Name (#359) (Thanks @matt9ucci)
1744

1845
## 2.0.1
46+
1947
Bug fixes
48+
2049
- Resolved Publish-Module doesn't report error but fails to publish module (#316)
2150
- Resolved CommandAlreadyAvailable error while installing the latest version of PackageManagement module (#333)
2251

2352
## 2.0.0
53+
2454
Breaking Change
55+
2556
- Default installation scope for Install-Module, Install-Script, and Install-Package has changed. For Windows PowerShell (version 5.1 or below), the default scope is AllUsers when running in an elevated session, and CurrentUser at all other times.
2657
For PowerShell version 6.0.0 and above, the default installation scope is always CurrentUser.
2758

28-
2959
## 1.6.7
3060

3161
Bug fixes
62+
3263
- Resolved Install/Save-Module error in PSCore 6.1.0-preview.4 on Ubuntu 18.04 OS (WSL/Azure) (#313)
3364
- Updated error message in Save-Module cmdlet when the specified path is not accessible (#313)
3465
- Added few additional verbose messages (#313)
3566

3667
## 1.6.6
3768

3869
Dependency Updates
39-
* Add dependency on version 4.1.0 or newer of NuGet.exe
40-
* Update NuGet.exe bootstrap URL to https://aka.ms/psget-nugetexe
70+
71+
- Add dependency on version 4.1.0 or newer of NuGet.exe
72+
- Update NuGet.exe bootstrap URL to https://aka.ms/psget-nugetexe
4173

4274
Build and Code Cleanup Improvements
43-
* Improved error handling in network connectivity tests.
75+
76+
- Improved error handling in network connectivity tests.
4477

4578
Bug fixes
79+
4680
- Change Update ModuleManifest so that prefix is not added to CmdletsToExport.
4781
- Change Update ModuleManifest so that parameters will not reset to default values.
48-
- Specify AllowPrereleseVersions provider option only when AllowPrerelease is specified on the PowerShellGet cmdlets.
82+
- Specify AllowPrereleaseVersions provider option only when AllowPrerelease is specified on the PowerShellGet cmdlets.
4983

5084
## 1.6.5
5185

5286
New features
53-
* Allow Pester/PSReadline installation when signed by non-Microsoft certificate (#258)
87+
88+
- Allow Pester/PSReadline installation when signed by non-Microsoft certificate (#258)
5489
- Whitelist installation of non-Microsoft signed Pester and PSReadline over Microsoft signed Pester and PSReadline.
5590

5691
Build and Code Cleanup Improvements
57-
* Splitting of functions (#229) (Thanks @Benny1007)
92+
93+
- Splitting of functions (#229) (Thanks @Benny1007)
5894
- Moves private functions into respective private folder.
5995
- Moves public functions as defined in PSModule.psd1 into respective public folder.
6096
- Removes all functions from PSModule.psm1 file.
6197
- Dot sources the functions from PSModule.psm1 file.
6298
- Uses Export-ModuleMember to export the public functions from PSModule.psm1 file.
6399

64-
* Add build step to construct a single .psm1 file (#242) (Thanks @Benny1007)
100+
- Add build step to construct a single .psm1 file (#242) (Thanks @Benny1007)
65101
- Merged public and private functions into one .psm1 file to increase load time performance.
66102

67103
Bug fixes
104+
68105
- Fix null parameter error caused by MinimumVersion in Publish-PackageUtility (#201)
69106
- Change .ExternalHelp link from PSGet.psm1-help.xml to PSModule-help.xml in PSModule.psm1 file (#215)
70107
- Change Publish-* to allow version comparison instead of string comparison (#219)
@@ -76,87 +113,95 @@ Bug fixes
76113
## 1.6.0
77114

78115
New features
79-
* Prerelease Version Support (#185)
116+
117+
- Prerelease Version Support (#185)
80118
- Implemented prerelease versions functionality in PowerShellGet cmdlets.
81119
- Enables publishing, discovering, and installing the prerelease versions of modules and scripts from the PowerShell Gallery.
82120
- [Documentation](https://docs.microsoft.com/en-us/powershell/gallery/psget/module/PrereleaseModule)
83121

84-
* Enabled publish cmdlets on PWSH and Nano Server (#196)
122+
- Enabled publish cmdlets on PWSH and Nano Server (#196)
85123
- Dotnet command version 2.0.0 or newer should be installed by the user prior to using the publish cmdlets on PWSH and Windows Nano Server.
86124
- Users can install the dotnet command by following the instructions specified at https://aka.ms/dotnet-install-script .
87125
- On Windows, users can install the dotnet command by running *Invoke-WebRequest -Uri 'https://dot.net/v1/dotnet-install.ps1' -OutFile '.\dotnet-install.ps1'; & '.\dotnet-install.ps1' -Channel Current -Version '2.0.0'*
88126
- Publish cmdlets on Windows PowerShell supports using the dotnet command for publishing operations.
89127

90128
Breaking Change
129+
91130
- PWSH: Changed the installation location of AllUsers scope to the parent of $PSHOME instead of $PSHOME. It is the SHARED_MODULES folder on PWSH.
92131

93132
Bug fixes
133+
94134
- Update HelpInfoURI to 'https://go.microsoft.com/fwlink/?linkid=855963' (#195)
95135
- Ensure MyDocumentsPSPath path is correct (#179) (Thanks @lwsrbrts)
96136

97137
## 1.5.0.0
98138

99139
New features
100-
* Added support for modules requiring license acceptance (#150)
140+
141+
- Added support for modules requiring license acceptance (#150)
101142
- [Documentation](https://docs.microsoft.com/en-us/powershell/gallery/psget/module/RequireLicenseAcceptance)
102143

103-
* Added version for REQUIREDSCRIPTS (#162)
144+
- Added version for REQUIREDSCRIPTS (#162)
104145
- Enabled following scenarios for REQUIREDSCRIPTS
105146
- [1.0] - RequiredVersion
106147
- [1.0,2.0] - Min and Max Version
107148
- (,1.0] - Max Version
108149
- 1.0 - Min Version
109150

110151
Bug fixes
111-
* Fixed empty version value in nuspec (#157)
152+
153+
- Fixed empty version value in nuspec (#157)
112154

113155
## 1.1.3.2
114-
* Disabled PowerShellGet Telemetry on PS Core as PowerShell Telemetry APIs got removed in PowerShell Core beta builds. (#153)
115-
* Fixed for DateTime format serialization issue. (#141)
116-
* Update-ModuleManifest should add ExternalModuleDependencies value as a collection. (#129)
156+
157+
- Disabled PowerShellGet Telemetry on PS Core as PowerShell Telemetry APIs got removed in PowerShell Core beta builds. (#153)
158+
- Fixed for DateTime format serialization issue. (#141)
159+
- Update-ModuleManifest should add ExternalModuleDependencies value as a collection. (#129)
117160

118161
## 1.1.3.1
119162

120163
New features
121-
* Added `PrivateData` field to ScriptFileInfo. (#119)
164+
165+
- Added `PrivateData` field to ScriptFileInfo. (#119)
122166

123167
Bug fixes
124-
* Fixed Add-Type issue in v6.0.0-beta.1 release of PowerShellCore. (#125, #124)
125-
* Install-Script -Scope CurrentUser PATH changes should not require a reboot for new PS processes. (#124)
126-
- Made changes to broadcast the Environment variable changes, so that other processes pick changes to Environment variables without having to reboot or logoff/logon.
127-
* Changed `Get-EnvironmentVariable` to get the unexpanded version of `%path%`. (#117)
128-
* Refactor credential parameter propagation to sub-functions. (#104)
129-
* Added credential parameter to subsequent calls of `Publish-Module/Script`. (#93)
130-
- This is needed when a module is published that has the RequiredModules attribute in the manifest on a repository that does not have anonymous access because the required module lookups will fail.
168+
169+
- Fixed Add-Type issue in v6.0.0-beta.1 release of PowerShellCore. (#125, #124)
170+
- Install-Script -Scope CurrentUser PATH changes should not require a reboot for new PS processes. (#124)
171+
- Made changes to broadcast the Environment variable changes, so that other processes pick changes to Environment variables without having to reboot or logoff/logon.
172+
- Changed `Get-EnvironmentVariable` to get the unexpanded version of `%path%`. (#117)
173+
- Refactor credential parameter propagation to sub-functions. (#104)
174+
- Added credential parameter to subsequent calls of `Publish-Module/Script`. (#93)
175+
- This is needed when a module is published that has the RequiredModules attribute in the manifest on a repository that does not have anonymous access because the required module lookups will fail.
131176

132177
## 1.1.2.0
133178

134179
Bug fixes
135-
* Renamed `PublishModuleIsNotSupportedOnNanoServer` errorid to `PublishModuleIsNotSupportedOnPowerShellCoreEdition`. (#44)
136-
- Also renamed `PublishScriptIsNotSupportedOnNanoServer` to `PublishScriptIsNotSupportedOnPowerShellCoreEdition`.
137-
* Fixed an issue in `Update-Module` and `Update-Script` cmdlets to show proper version of current item being updated in `Confirm`/`WhatIf` message. (#44)
138-
* Updated `Test-ModuleInstalled` function to return single module instead of multiple modules. (#44)
139-
* Updated `ModuleCommandAlreadyAvailable` error message to include all conflicting commands instead of one. (#44)
140-
- Corresponding changes to collect the complete set of conflicting commands from the being installed.
141-
- Also ensured that conflicting commands from PSModule.psm1 are ignored in the command collision analysis as Get-Command includes the commands from current local scope as well.
142180

143-
* Fixed '[Test-ScriptFileInfo] Fails on *NIX newlines (LF vs. CRLF)' (#18)
181+
- Renamed `PublishModuleIsNotSupportedOnNanoServer` errorid to `PublishModuleIsNotSupportedOnPowerShellCoreEdition`. (#44)
182+
- Also renamed `PublishScriptIsNotSupportedOnNanoServer` to `PublishScriptIsNotSupportedOnPowerShellCoreEdition`.
183+
- Fixed an issue in `Update-Module` and `Update-Script` cmdlets to show proper version of current item being updated in `Confirm`/`WhatIf` message. (#44)
184+
- Updated `Test-ModuleInstalled` function to return single module instead of multiple modules. (#44)
185+
- Updated `ModuleCommandAlreadyAvailable` error message to include all conflicting commands instead of one. (#44)
186+
- Corresponding changes to collect the complete set of conflicting commands from the being installed.
187+
- Also ensured that conflicting commands from PSModule.psm1 are ignored in the command collision analysis as Get-Command includes the commands from current local scope as well.
144188

189+
- Fixed '[Test-ScriptFileInfo] Fails on *NIX newlines (LF vs. CRLF)' (#18)
145190

146191
## 1.1.1.0
147192

148193
Bug fixes
149-
* Fixed 'Update-Module fails with `ModuleAuthenticodeSignature` error for modules with signed PSD1'. (#12) (#8)
150-
* Fixed 'Properties of `AdditionalMetadata` are case-sensitive'. #7
151-
* Changed `ErrorAction` to `Ignore` for few cmdlet usages as they should not show up in ErrorVariable.
152-
- For example, error returned by `Get-Command Test-FileCatalog` should be ignored.
153194

195+
- Fixed 'Update-Module fails with `ModuleAuthenticodeSignature` error for modules with signed PSD1'. (#12) (#8)
196+
- Fixed 'Properties of `AdditionalMetadata` are case-sensitive'. #7
197+
- Changed `ErrorAction` to `Ignore` for few cmdlet usages as they should not show up in ErrorVariable.
198+
- For example, error returned by `Get-Command Test-FileCatalog` should be ignored.
154199

155200
## 1.1.0.0
156201

157-
* Initial release from GitHub.
158-
* PowerShellCore support.
159-
* Security enhancements including the enforcement of catalog-signed modules during installation.
160-
* Authenticated Repository support.
161-
* Proxy Authentication support.
162-
* Responses to a number of user requests and issues.
202+
- Initial release from GitHub.
203+
- PowerShellCore support.
204+
- Security enhancements including the enforcement of catalog-signed modules during installation.
205+
- Authenticated Repository support.
206+
- Proxy Authentication support.
207+
- Responses to a number of user requests and issues.

CODE_OF_CONDUCT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
This project has adopted the [Microsoft Open Source Code of Conduct][conduct-code].
44
For more information see the [Code of Conduct FAQ][conduct-FAQ] or contact [opencode@microsoft.com][conduct-email] with any additional questions or comments.
55

6-
[conduct-code]: http://opensource.microsoft.com/codeofconduct/
7-
[conduct-FAQ]: http://opensource.microsoft.com/codeofconduct/faq/
6+
[conduct-code]: https://opensource.microsoft.com/codeofconduct/
7+
[conduct-FAQ]: https://opensource.microsoft.com/codeofconduct/faq/
88
[conduct-email]: mailto:opencode@microsoft.com

DSC/DSC.psd1

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<#
2+
This is a dummy PowerShell manifest file so that the DscResource.Tests
3+
test framework recognize the module folder as correct (expected) folder
4+
and file structure.
5+
THIS FILE IS NOT USE DURING DEPLOYMENT.
6+
#>
7+
@{
8+
# Version number of this module.
9+
moduleVersion = '0.0.0.1'
10+
11+
# ID used to uniquely identify this module
12+
GUID = 'e102ebd2-bdc3-4d0f-bc93-4b8cc3eb7074'
13+
14+
# Author of this module
15+
Author = 'Microsoft Corporation'
16+
17+
# Company or vendor of this module
18+
CompanyName = 'Microsoft Corporation'
19+
20+
# Copyright statement for this module
21+
Copyright = '(c) 2019 Microsoft Corporation. All rights reserved.'
22+
23+
# Description of the functionality provided by this module
24+
Description = 'Module with DSC Resources for deployment of PowerShell modules.'
25+
26+
# Minimum version of the Windows PowerShell engine required by this module
27+
PowerShellVersion = '5.0'
28+
29+
# Minimum version of the common language runtime (CLR) required by this module
30+
CLRVersion = '4.0'
31+
32+
# Functions to export from this module
33+
FunctionsToExport = @()
34+
35+
# Cmdlets to export from this module
36+
CmdletsToExport = @()
37+
38+
RequiredAssemblies = @()
39+
40+
<#
41+
Private data to pass to the module specified in RootModule/ModuleToProcess.
42+
This may also contain a PSData hashtable with additional module metadata used by PowerShell.
43+
#>
44+
PrivateData = @{
45+
46+
PSData = @{
47+
48+
# Tags applied to this module. These help with module discovery in online galleries.
49+
Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResource')
50+
51+
# A URL to the license for this module.
52+
LicenseUri = 'https://github.com/PowerShell/PowerShellGet/blob/master/LICENSE'
53+
54+
# A URL to the main website for this project.
55+
ProjectUri = 'https://github.com/PowerShell/PowerShellGet'
56+
57+
# ReleaseNotes of this module
58+
ReleaseNotes = ''
59+
60+
} # End of PSData hashtable
61+
62+
} # End of PrivateData hashtable
63+
}

0 commit comments

Comments
 (0)