File tree Expand file tree Collapse file tree 5 files changed +22
-20
lines changed
Expand file tree Collapse file tree 5 files changed +22
-20
lines changed Original file line number Diff line number Diff line change 55 "files.eol" : " \r\n " ,
66 "files.insertFinalNewline" : true ,
77 "files.trimTrailingWhitespace" : true ,
8- "powershell.codeFormatting.ignoreOneLineBlock" : false ,
8+ "powershell.codeFormatting.openBraceOnSameLine" : true ,
9+ "powershell.codeFormatting.newLineAfterOpenBrace" : false ,
910 "powershell.codeFormatting.newLineAfterCloseBrace" : true ,
10- "powershell.codeFormatting.newLineAfterOpenBrace" : true ,
11- "powershell.codeFormatting.openBraceOnSameLine" : false ,
12- "powershell.codeFormatting.whitespaceAfterSeparator" : true ,
11+ "powershell.codeFormatting.whitespaceBeforeOpenBrace" : true ,
12+ "powershell.codeFormatting.whitespaceBeforeOpenParen" : true ,
1313 "powershell.codeFormatting.whitespaceAroundOperator" : true ,
14- "powershell.codeFormatting.whitespaceBeforeOpenBrace " : false ,
15- "powershell.codeFormatting.whitespaceBeforeOpenParen " : false ,
14+ "powershell.codeFormatting.whitespaceAfterSeparator " : true ,
15+ "powershell.codeFormatting.ignoreOneLineBlock " : true ,
1616 "powershell.scriptAnalysis.settingsPath" : " PSScriptAnalyzerSettings.psd1" ,
1717 "[markdown]" : {
1818 "editor.wordwrap" : " on" ,
Original file line number Diff line number Diff line change 1+ # Change Log
2+
3+ ## 1.1.0 [ 2017-07-29]
4+ ### Enhancements
5+ * Use ` PSDefaultParameterValues ` decalred by the user in global scope
6+ _ Previously these were not passed on to the scriptblock_
7+
18## 1.0.0 [ 2017-07-29]
29Initial release
Original file line number Diff line number Diff line change 1- function Invoke-WithParameter
2- {
1+ function Invoke-WithParameter {
32 [CmdletBinding ()]
43 param (
54 [Parameter (Mandatory = $true )]
@@ -9,28 +8,24 @@ function Invoke-WithParameter
98 $Parameter
109 )
1110
12- End
13- {
14- # Initialize local instance
15- $PSDefaultParameterValues = @ {}
11+ End {
12+ # Initialize local instance with global values
13+ $PSDefaultParameterValues = $global :PSDefaultParameterValues
1614
17- while ($Parameter )
18- {
15+ while ($Parameter ) {
1916 # Spread & Shift
2017 $param , $value , $Parameter = $Parameter
2118
2219 # Clean $param from `-` delim and support `Function:Param`
2320 $param = $param.trimStart (" -" ).trimEnd(" :" )
2421
25- if ($param -notmatch " :" )
26- {
22+ if ($param -notmatch " :" ) {
2723 $param = " *:" + $param
2824 }
2925
3026 $PSDefaultParameterValues [$param ] = $value
3127 }
32- if ($DebugPreference -ne " SilentlyContinue" )
33- {
28+ if ($DebugPreference -ne " SilentlyContinue" ) {
3429 $PSDefaultParameterValues | Out-Default
3530 }
3631
Original file line number Diff line number Diff line change 1212 RootModule = ' Spread.psm1'
1313
1414 # Version number of this module.
15- ModuleVersion = ' 1.0 .0'
15+ ModuleVersion = ' 1.1 .0'
1616
1717 # Supported PSEditions
1818 # CompatiblePSEditions = @()
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ environment:
1010 PSGalleryAPIKey :
1111 secure : s9Uw6gnBI2xdDYtpJE5m8C3eDvrXBDGO/abptsu9NCtCrdxoU/N+3YfjffOTysw+
1212
13- version : 1.0 .0.{build}
13+ version : 1.1 .0.{build}
1414
1515# Don't rebuild when I tag a release on GitHub
1616skip_tags : true
You can’t perform that action at this time.
0 commit comments