Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
623acb4
Change min depth to 0 for convertto-json
kvprasoon Sep 24, 2020
976e43f
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
kvprasoon Sep 25, 2020
c23939e
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
kvprasoon Oct 3, 2020
671699b
Merge branch 'master' into json-depth
kvprasoon Nov 18, 2020
6fccf10
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
kvprasoon Dec 16, 2020
a62707b
add test as per review comment
kvprasoon Dec 16, 2020
1a7f051
Update test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo…
kvprasoon Dec 16, 2020
9f0c32f
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
kvprasoon Dec 18, 2020
9463bfe
use more complex object to test
kvprasoon Dec 18, 2020
e12a4dc
Fix the nuget feed name and url for dotnet 6
adityapatwardhan Feb 10, 2021
894b7de
Merged PR 14481: Update ChangeLog for v7.2.0-preview.3 release
daxian-dbw Feb 12, 2021
afb155c
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
kvprasoon Feb 12, 2021
ac560d8
Merge branch 'release/v7.2.0-preview.3' into master-merge-preview-3
TravisEz13 Feb 12, 2021
d7370cf
Refactor MSI CI (#14753)
TravisEz13 Feb 12, 2021
750b2ed
Merged PR 14479: Update ChangeLog for v7.0.5 release (#14782)
TravisEz13 Feb 13, 2021
11a5d94
Update ChangeLog for v7.1.2 release (#14783)
TravisEz13 Feb 13, 2021
e06f099
Change min depth to 0 for convertto-json
kvprasoon Sep 24, 2020
010dcd6
add test as per review comment
kvprasoon Dec 16, 2020
83348cd
Update test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo…
kvprasoon Dec 16, 2020
62da9d4
use more complex object to test
kvprasoon Dec 18, 2020
6214ccb
Merge branch 'json-depth' of https://github.com/kvprasoon/PowerShell …
kvprasoon Feb 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ launch.json
ldspits
lee303
Leonhardt
libicu
libpsl
libpsl-native
libunwind8
Expand Down Expand Up @@ -953,6 +954,7 @@ v6.2.3
v6.2.4
v7.0.0
v7.0.3
v7.0.4
v7.1.0
validatenotnullorempty
versioned
Expand Down Expand Up @@ -1263,5 +1265,18 @@ GetListOfFilesFromData
RPMs
NullableAttribute
PSDesiredStateConfiguration
brianary
Fs00
MartinGC94
jakekerr
strikethrough
string.Contains
imba-tjd
url
ArrayList
SDKs
XunitXml.TestLogger
Backport
v7.1.1
about_PSDesiredStateConfiguration

65 changes: 34 additions & 31 deletions .vsts-ci/windows/windows-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ trigger:
- release*
- feature*
paths:
include:
- /.vsts-ci/templates/windows-packaging.yml
- /.vsts-ci/windows-packaging.yml
- /global.json
- /src/*
- /tools/ci.psm1
- /tools/packaging/*
- /assets/*
exclude:
- tests/*
- docs/*
- demos/*
- CHANGELOG/*
- .devcontainer/*
- .github/*
- .poshchan/*
- .vscode/*
- code-server/*
- docker/*

pr:
branches:
Expand All @@ -27,29 +30,29 @@ pr:
# file extension filters are not supported when this was written.
# This really should be /src/**/*.csproj
include:
- /.vsts-ci/templates/windows-packaging.yml
- /.vsts-ci/windows-packaging.yml
- /global.json
- /src/Microsoft.Management.Infrastructure.CimCmdlets/Microsoft.Management.Infrastructure.CimCmdlets.csproj
- /src/Microsoft.Management.UI.Internal/Microsoft.PowerShell.GraphicalHost.csproj
- /src/Microsoft.PowerShell.Commands.Diagnostics/Microsoft.PowerShell.Commands.Diagnostics.csproj
- /src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj
- /src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
- /src/Microsoft.PowerShell.ConsoleHost/Microsoft.PowerShell.ConsoleHost.csproj
- /src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj
- /src/Microsoft.PowerShell.GlobalTool.Shim/Microsoft.PowerShell.GlobalTool.Shim.csproj
- /src/Microsoft.PowerShell.LocalAccounts/Microsoft.PowerShell.LocalAccounts.csproj
- /src/Microsoft.PowerShell.MarkdownRender/Microsoft.PowerShell.MarkdownRender.csproj
- /src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj
- /src/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.csproj
- /src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj
- /src/Microsoft.WSMan.Runtime/Microsoft.WSMan.Runtime.csproj
- /src/Modules/PSGalleryModules.csproj
- /src/powershell-win-core/powershell-win-core.csproj
- /tools/ci.psm1
- /tools/packaging/*
- /assets/files.wxs
- /assets/Product.wxs
- .vsts-ci/windows/*
- assets/wix/*
- build.psm1
- global.json
- nuget.config
- PowerShell.Common.props
- src/Microsoft.Management.Infrastructure.CimCmdlets/Microsoft.Management.Infrastructure.CimCmdlets.csproj
- src/Microsoft.Management.UI.Internal/Microsoft.PowerShell.GraphicalHost.csproj
- src/Microsoft.PowerShell.Commands.Diagnostics/Microsoft.PowerShell.Commands.Diagnostics.csproj
- src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj
- src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
- src/Microsoft.PowerShell.ConsoleHost/Microsoft.PowerShell.ConsoleHost.csproj
- src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj
- src/Microsoft.PowerShell.GlobalTool.Shim/Microsoft.PowerShell.GlobalTool.Shim.csproj
- src/Microsoft.PowerShell.MarkdownRender/Microsoft.PowerShell.MarkdownRender.csproj
- src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj
- src/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.csproj
- src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj
- src/Microsoft.WSMan.Runtime/Microsoft.WSMan.Runtime.csproj
- src/Modules/PSGalleryModules.csproj
- src/powershell-win-core/powershell-win-core.csproj
- tools/ci.psm1
- tools/packaging/*

variables:
- name: GIT_CONFIG_PARAMETERS
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG/7.0.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# 7.0 Changelog

## [7.0.5] - 2021-02-11

### Build and Packaging Improvements

<details>

<summary>
Bump .NET SDK to version <code>3.1.406</code>
</summary>

<ul>
<li>Fix third party signing for files in sub-folders (#14751)</li>
<li>Bump .NET SDK to 3.1.12 (Internal 14462)</li>
</ul>

</details>

[7.0.5]: https://github.com/PowerShell/PowerShell/compare/v7.0.4...v7.0.5

## [7.0.4] - 2021-01-19

### Build and Packaging Improvements
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG/7.1.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# 7.1 Changelog

## [7.1.2] - 2021-02-11

### Build and Packaging Improvements

<details>

<summary>
Bump .NET SDK to version <code>5.0.103</code>
</summary>

<ul>
<li>Fix third party signing for files in sub-folders (#14751)</li>
<li>Bump .NET SDK to version 5.0.103 (Internal 14459)</li>
<li>Publish the global tool package for stable release</li>
</ul>

</details>

[7.1.2]: https://github.com/PowerShell/PowerShell/compare/v7.1.1...v7.1.2

## [7.1.1] - 2021-01-14

### General Cmdlet Updates and Fixes
Expand Down
106 changes: 106 additions & 0 deletions CHANGELOG/preview.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,111 @@
# Current preview release

## [7.2.0-preview.3] - 2021-02-11

### Breaking Changes

- Fix `Get-Date -UFormat %u` behavior to comply with ISO 8601 (#14549) (Thanks @brianary!)

### Engine Updates and Fixes

- Together with `PSDesiredStateConfiguration` `v3` module allows `Get-DscResource`, `Invoke-DscResource` and DSC configuration compilation on all platforms, supported by PowerShell (using class-based DSC resources).

### Performance

- Avoid array allocations from `Directory.GetDirectories` and `Directory.GetFiles`. (#14326) (Thanks @xtqqczze!)
- Avoid `string.ToLowerInvariant()` from `GetEnvironmentVariableAsBool()` to avoid loading libicu at startup (#14323) (Thanks @iSazonov!)
- Get PowerShell version in `PSVersionInfo` using assembly attribute instead of `FileVersionInfo` (#14332) (Thanks @Fs00!)

### General Cmdlet Updates and Fixes

- Suppress `Write-Progress` in `ConsoleHost` if output is redirected and fix tests (#14716)
- Experimental feature `PSAnsiProgress`: Add minimal progress bar using ANSI rendering (#14414)
- Fix web cmdlets to properly construct URI from body when using `-NoProxy` (#14673)
- Update the `ICommandPredictor` to provide more feedback and also make feedback easier to be correlated (#14649)
- Reset color after writing `Verbose`, `Debug`, and `Warning` messages (#14698)
- Fix using variable for nested `ForEach-Object -Parallel` calls (#14548)
- When formatting, if collection is modified, don't fail the entire pipeline (#14438)
- Improve completion of parameters for attributes (#14525) (Thanks @MartinGC94!)
- Write proper error messages for `Get-Command ' '` (#13564) (Thanks @jakekerr!)
- Fix typo in the resource string `ProxyURINotSupplied` (#14526) (Thanks @romero126!)
- Add support to `$PSStyle` for strikethrough and hyperlinks (#14461)
- Fix `$PSStyle` blink codes (#14447) (Thanks @iSazonov!)

### Code Cleanup

<details>

<summary>

<p>We thank the following contributors!</p>
<p>@xtqqczze, @powercode</p>

</summary>

<ul>
<li>Fix coding style issues: RCS1215, IDE0090, SA1504, SA1119, RCS1139, IDE0032 (#14356, #14341, #14241, #14204, #14442, #14443) (Thanks @xtqqczze!)</li>
<li>Enable coding style checks: CA2249, CA1052, IDE0076, IDE0077, SA1205, SA1003, SA1314, SA1216, SA1217, SA1213 (#14395, #14483, #14494, #14495, #14441, #14476, #14470, #14471, #14472) (Thanks @xtqqczze!)</li>
<li>Enable nullable in PowerShell codebase (#14160, #14172, #14088, #14154, #14166, #14184, #14178) (Thanks @powercode!)</li>
<li>Use <code>string.Split(char)</code> instead of <code>string.Split(string)</code> (#14465) (Thanks @xtqqczze!)</li>
<li>Use <code>string.Contains(char)</code> overload (#14368) (Thanks @xtqqczze!)</li>
<li>Refactor complex <code>if</code> statements (#14398) (Thanks @xtqqczze!)</li>
</ul>

</details>

### Tools

- Update script to use .NET 6 build resources (#14705)
- Fix the daily GitHub action (#14711) (Thanks @imba-tjd!)
- GitHub Actions: fix deprecated `::set-env` (#14629) (Thanks @imba-tjd!)
- Update markdown test tools (#14325) (Thanks @RDIL!)
- Upgrade `StyleCopAnalyzers` to `v1.2.0-beta.312` (#14354) (Thanks @xtqqczze!)

### Tests

- Remove packaging from daily Windows build (#14749)
- Update link to the Manning book (#14750)
- A separate Windows packaging CI (#14670)
- Update `ini` component version in test `package.json` (#14454)
- Disable `libmi` dependent tests for macOS. (#14446)

### Build and Packaging Improvements

<details>

<ul>
<li>Fix the NuGet feed name and URL for .NET 6</li>
<li>Fix third party signing for files in sub-folders (#14751)</li>
<li>Make build script variable an <code>ArrayList</code> to enable <code>Add()</code> method (#14748)</li>
<li>Remove old .NET SDKs to make <code>dotnet restore</code> work with the latest SDK in CI pipeline (#14746)</li>
<li>Remove outdated Linux dependencies (#14688)</li>
<li>Bump .NET SDK version to 6.0.0-preview.1 (#14719)</li>
<li>Bump <code>NJsonSchema</code> to 10.3.4 (#14714)</li>
<li>Update daily GitHub action to allow manual trigger (#14718)</li>
<li>Bump <code>XunitXml.TestLogger</code> to 3.0.62 (#14702)</li>
<li>Make universal deb package based on the deb package specification (#14681)</li>
<li>Add manual release automation steps and improve changelog script (#14445)</li>
<li>Fix release build to upload global tool packages to artifacts (#14620)</li>
<li>Port changes from the PowerShell v7.0.4 release (#14637)</li>
<li>Port changes from the PowerShell v7.1.1 release (#14621)</li>
<li>Updated README and <code>metadata.json</code> (#14401, #14606, #14612)</li>
<li>Do not push nupkg artifacts to MyGet (#14613)</li>
<li>Use one feed in each <code>nuget.config</code> in official builds (#14363)</li>
<li>Fix path signed RPMs are uploaded from in release build (#14424)</li>
</ul>

</details>

### Documentation and Help Content

- Update distribution support request template to point to .NET 5.0 support document (#14578)
- Remove security GitHub issue template (#14453)
- Add intent for using the Discussions feature in repo (#14399)
- Fix Universal Dashboard to refer to PowerShell Universal (#14437)
- Update document link because of HTTP 301 redirect (#14431) (Thanks @xtqqczze!)

[7.2.0-preview.3]: https://github.com/PowerShell/PowerShell/compare/v7.2.0-preview.2...v7.2.0-preview.3

## [7.2.0-preview.2] - 2020-12-15

### Breaking Changes
Expand Down
6 changes: 3 additions & 3 deletions assets/Product.wxs → assets/wix/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
<!-- Set properties for add/remove programs -->
<Property Id="ARPHELPLINK" Value="$(var.InfoURL)" />
<!-- custom images -->
<WixVariable Id="WixUIBannerBmp" Value="assets\WixUIBannerBmp.png" />
<WixVariable Id="WixUIDialogBmp" Value="assets\WixUIDialogBmp.png" />
<WixVariable Id="WixUIExclamationIco" Value="assets\WixUIInfoIco.png" />
<WixVariable Id="WixUIBannerBmp" Value="assets\wix\WixUIBannerBmp.png" />
<WixVariable Id="WixUIDialogBmp" Value="assets\wix\WixUIDialogBmp.png" />
<WixVariable Id="WixUIExclamationIco" Value="assets\wix\WixUIInfoIco.png" />
<WixVariable Id="WixUIInfoIco" Value="assets\ps_black_32x32.ico" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Open $(var.ProductName)" />
<!-- Default value of Checkbox of starting PowerShell after installation -->
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class ConvertToJsonCommand : PSCmdlet
/// Gets or sets the Depth property.
/// </summary>
[Parameter]
[ValidateRange(1, int.MaxValue)]
[ValidateRange(0, int.MaxValue)]
public int Depth
{
get { return _depth; }
Expand Down
2 changes: 1 addition & 1 deletion test/powershell/Installer/WindowsInstaller.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Describe "Windows Installer" -Tags "Scenario" {
}

It "WiX (Windows Installer XML) file contains pre-requisites link $preRequisitesLink" -Skip:$skipTest {
$wixProductFile = Join-Path -Path $PSScriptRoot -ChildPath "..\..\..\assets\Product.wxs"
$wixProductFile = Join-Path -Path $PSScriptRoot -ChildPath "..\..\..\assets\wix\Product.wxs"
(Get-Content $wixProductFile -Raw).Contains($preRequisitesLink) | Should -BeTrue
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,28 @@ Describe 'ConvertTo-Json' -tags "CI" {
$ps.Dispose()
}

It "Should accept minimum depth as 0." {
$ComplexObject = [PSCustomObject] @{
FirstLevel1 = @{
Child1_1 = 0
}
FirstLevel2 = @{
Child2_1 = 'Child_2_1_Value'
Child2_2 = @{
ChildOfChild2_2= @(1,2,3)
}
}
}

$ExpectedOutput = '{
"FirstLevel1": "System.Collections.Hashtable",
"FirstLevel2": "System.Collections.Hashtable"
}'

$output = $ComplexObject | ConvertTo-Json -Depth 0
$output | Should -Be $ExpectedOutput
}

It "The result string is packed in an array symbols when AsArray parameter is used." {
$output = 1 | ConvertTo-Json -AsArray
$output | Should -BeLike "``[*1*]"
Expand Down
10 changes: 5 additions & 5 deletions tools/packaging/packaging.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -2844,7 +2844,7 @@ function New-MSIPatch
[Parameter(HelpMessage='Path to the patch template WXS. Usually you do not need to specify this')]
[ValidateNotNullOrEmpty()]
[ValidateScript( {Test-Path $_})]
[string] $PatchWxsPath = "$RepoRoot\assets\patch-template.wxs",
[string] $PatchWxsPath = "$RepoRoot\assets\wix\patch-template.wxs",

[Parameter(HelpMessage='Produce a delta patch instead of a full patch. Usually not worth it.')]
[switch] $Delta
Expand Down Expand Up @@ -2884,7 +2884,7 @@ function New-MSIPatch
Copy-Item -Path $BaselineWixPdbPath -Destination $wixBaselineOriginalPdbPath -Force
Copy-Item -Path $PatchWixPdbPath -Destination $wixPatchOriginalPdbPath -Force

[xml] $filesAssetXml = Get-Content -Raw -Path "$RepoRoot\assets\files.wxs"
[xml] $filesAssetXml = Get-Content -Raw -Path "$RepoRoot\assets\wix\files.wxs"
[xml] $patchTemplateXml = Get-Content -Raw -Path $PatchWxsPath

# Update the patch version
Expand Down Expand Up @@ -2975,12 +2975,12 @@ function New-MSIPackage
# File describing the MSI Package creation semantics
[ValidateNotNullOrEmpty()]
[ValidateScript( {Test-Path $_})]
[string] $ProductWxsPath = "$RepoRoot\assets\Product.wxs",
[string] $ProductWxsPath = "$RepoRoot\assets\wix\Product.wxs",

# File describing the MSI file components
[ValidateNotNullOrEmpty()]
[ValidateScript( {Test-Path $_})]
[string] $FilesWxsPath = "$RepoRoot\assets\Files.wxs",
[string] $FilesWxsPath = "$RepoRoot\assets\wix\Files.wxs",

# Path to Assets folder containing artifacts such as icons, images
[ValidateNotNullOrEmpty()]
Expand Down Expand Up @@ -3331,7 +3331,7 @@ function Test-FileWxs
# File describing the MSI file components from the asset folder
[ValidateNotNullOrEmpty()]
[ValidateScript( {Test-Path $_})]
[string] $FilesWxsPath = "$RepoRoot\assets\Files.wxs",
[string] $FilesWxsPath = "$RepoRoot\assets\wix\Files.wxs",

# File describing the MSI file components generated by heat
[ValidateNotNullOrEmpty()]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ jobs:

Find-Dotnet

if(-not (Get-PackageSource -Name 'dotnet5' -ErrorAction SilentlyContinue))
if(-not (Get-PackageSource -Name 'dotnet' -ErrorAction SilentlyContinue))
{
$nugetFeed = ([xml](Get-Content $(Build.SourcesDirectory)/nuget.config -Raw)).Configuration.packagesources.add | Where-Object { $_.Key -eq 'dotnet5' } | Select-Object -ExpandProperty Value
Register-PackageSource -Name 'dotnet5' -Location $nugetFeed -ProviderName NuGet
Write-Verbose -Message "Register new package source 'dotnet5'" -verbose
$nugetFeed = ([xml](Get-Content $(Build.SourcesDirectory)/nuget.config -Raw)).Configuration.packagesources.add | Where-Object { $_.Key -eq 'dotnet' } | Select-Object -ExpandProperty Value
Register-PackageSource -Name 'dotnet' -Location $nugetFeed -ProviderName NuGet
Write-Verbose -Message "Register new package source 'dotnet'" -verbose
}

## Install latest version from the channel
Expand Down
Loading