Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1344,10 +1344,12 @@ For more information on this, we invite you to read [this blog post explaining P
Even if the module isn't owned by the PowerShell Team, please tell us what works and what doesn't by leaving a comment in [issue #4062][issue-4062]! (#3981)
- Enhance type inference in tab completion based on runtime variable values. (#2744) (Thanks to @powercode!)
This enables tab completion in situations like:

```powershell
$p = Get-Process
$p | Foreach-Object Prio<tab>
```

- Add `GitCommitId` to PowerShell Core banner.
Now you don't have to run `$PSVersionTable` as soon as you start PowerShell to get the version! (#3916) (Thanks to @iSazonov!)
- Fix a bug in tab completion to make `native.exe --<tab>` call into native completer. (#3633) (Thanks to @powercode!)
Expand Down Expand Up @@ -1530,9 +1532,9 @@ We made a number of fixes to the progress bar rendering and the `ProgressRecord`
- Add the `-TimeOut` parameter to `Test-Connection`. (#2492)
- Add `ShouldProcess` support to `New-FileCatalog` and `Test-FileCatalog` (fixes `-WhatIf` and `-Confirm`). (#3074) (Thanks to @iSazonov!)
- Fix `Test-ModuleManifest` to normalize paths correctly before validating.
- This fixes some problems when using `Publish-Module` on non-Windows platforms. (#3097)
- This fixes some problems when using `Publish-Module` on non-Windows platforms. (#3097)
- Remove the `AliasProperty "Count"` defined for `System.Array`.
- This removes the extraneous `Count` property on some `ConvertFrom-Json` output. (#3231) (Thanks to @PetSerAl!)
- This removes the extraneous `Count` property on some `ConvertFrom-Json` output. (#3231) (Thanks to @PetSerAl!)
- Port `Import-PowerShellDatafile` from PowerShell script to C#. (#2750) (Thanks to @powercode!)
- Add `-CustomMethod` parameter to web cmdlets to allow for non-standard method verbs. (#3142) (Thanks to @Lee303!)
- Fix web cmdlets to include the HTTP response in the exception when the response status code is not success. (#3201)
Expand Down
3 changes: 3 additions & 0 deletions docs/cmdlet-example/command-line-simple-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,19 @@ If you copy `netstandard.dll` from this directory to the directory containing
get it to reload `MyModule.dll`.

1. Copy the `netstandard.dll` implementation assembly for .NET 4.6.1 to the module's directory.

```powershell
cd 'path-to-where-you-copied-module.dll'
Copy-Item 'C:\Program Files\dotnet\sdk\<version-number>\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\netstandard.dll' .
```

1. Import the module and execute the command:

```powershell
Import-Module .\MyModule.dll
Write-TimestampedMessage "Test message."
```

Now the command should succeed.

Note: If it fails, restart Windows PowerShell to make sure
Expand Down
4 changes: 2 additions & 2 deletions docs/maintainers/best-practice.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

- Use `Squash and merge` by default to keep clean commit history in Master branch.

![](./Images/squash-merge.png)&nbsp;&nbsp;&nbsp;&nbsp;![](./Images/squash-confirm.png)
![Squash Merge Example](./Images/squash-merge.png)&nbsp;&nbsp;&nbsp;&nbsp;![Squash Confirm Example](./Images/squash-confirm.png)

- Use `Create a merge commit` for feature-work PRs **only if** the commit history of the PR is reasonably clean.
After using this option, GitHub will make it your default option for merging a PR.
Do remember to change the default back to `Squash and merge`.

![](./Images/merge-commit.png)&nbsp;&nbsp;&nbsp;&nbsp;![](./Images/merge-commit-confirm.png)
![Merge Commit Example](./Images/merge-commit.png)&nbsp;&nbsp;&nbsp;&nbsp;![Merge Confirm Example](./Images/merge-commit-confirm.png)

- Avoid `Rebase and merge` unless you have a strong argument for using it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.9.0" />
<PackageReference Include="NJsonSchema" Version="9.10.74" />
<PackageReference Include="NJsonSchema" Version="9.10.75" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion test/common/markdown/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function RunTest() {
function callback(err, result) {
var resultString = (result || "").toString();
if (resultString) {
file.contents = new Buffer(resultString);
file.contents = Buffer.from(resultString);
}
next(err, file);
});
Expand Down
34 changes: 16 additions & 18 deletions test/common/markdown/markdown.tests.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

Import-Module HelpersCommon
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Autoloading should works.

$moduleRootFilePath = Split-Path -Path $PSScriptRoot -Parent

# Identify the repository root path of the resource module
Expand All @@ -25,7 +27,7 @@ Describe 'Common Tests - Validate Markdown Files' -Tag 'CI' {
-NoNewWindow
Start-Process `
-FilePath "npm" `
-ArgumentList @('install','-g','gulp','--silent') `
-ArgumentList @('install','-g','gulp@4.0.0','--silent') `
-Wait `
-WorkingDirectory $PSScriptRoot `
-NoNewWindow
Expand All @@ -40,6 +42,9 @@ Describe 'Common Tests - Validate Markdown Files' -Tag 'CI' {
Write-Warning "Node and npm are required to run this test"
$skip = $true
}

$mdIssuesPath = Join-Path -Path $PSScriptRoot -ChildPath "markdownissues.txt"
Remove-Item -Path $mdIssuesPath -Force -ErrorAction SilentlyContinue
}
}

Expand Down Expand Up @@ -88,37 +93,30 @@ Describe 'Common Tests - Validate Markdown Files' -Tag 'CI' {
'./tools/*.md'
)
$filter = ($docsToTest -join ',')
&"gulp" test-mdsyntax --silent `
--rootpath $repoRootPath `
--filter $filter

}
catch
{
Write-Warning -Message ("Unable to run gulp to test markdown files. Please " + `
"be sure that you have installed nodejs and have " + `
"run 'npm install -g gulp' in order to have this " + `
"text execute.")
# Gulp 4 beta is returning non-zero exit code even when there is not an error
Start-NativeExecution {
&"gulp" test-mdsyntax --silent `
--rootpath $repoRootPath `
--filter $filter
} -VerboseOutputOnError -IgnoreExitcode

}
finally
{
Pop-Location
}

$LASTEXITCODE | Should beexactly 0

$mdIssuesPath = Join-Path -Path $PSScriptRoot -ChildPath "markdownissues.txt"

$mdIssuesPath | should exist
$mdIssuesPath | Should -Exist

[string] $markdownErrors = Get-Content -Path $mdIssuesPath
[string[]] $markdownErrors = Get-Content -Path $mdIssuesPath
Remove-Item -Path $mdIssuesPath -Force -ErrorAction SilentlyContinue

if ($markdownErrors -ne "--EMPTY--")
{
$markdownErrors += ' (See https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md for an explanation of the error codes)'
}

$markdownErrors | Should BeExactly "--EMPTY--"
$markdownErrors -join "`n" | Should -BeExactly "--EMPTY--"
}
}
Loading