Commit graph

6650 commits

Author SHA1 Message Date
Christoph Bergmeister [MVP]
7c021e42e9 Update resgen, typegen to use .Net Core 2.1 (#8369) 2018-12-04 09:40:40 -08:00
Aditya Patwardhan
13cf8af667 Remove dependabot attribution and generate changelog sections using CL-* labels (#8386)
* Remove dependabot attribution from change log.
* Create sections in generated change log using the `CL-*` labels.
2018-12-03 14:34:29 -08:00
Travis Plunk
142814c12a
Fix an intermittent failure in macOS logging tests (#8385)
Fix an intermittent failure in macOS logging tests
  - make tests wait for the correct number of log entries
  - make tests not fail with an `Index was outside the bounds of the array.` error
2018-12-03 14:29:49 -08:00
dependabot[bot]
ca204599ac Bump NJsonSchema from 9.12.6 to 9.12.7 (#8384) 2018-12-03 13:46:10 -08:00
Adam Gauthier
d150871af2 Change Newtonsoft deserializing bug comment to link to the new issue (#8377)
This is a follow up to reverted PR #8346. I removed a workaround that was used to avoid [a Newtonsoft.Json bug](https://github.com/JamesNK/Newtonsoft.Json/issues/1321) that caused some incomplete json array input to successfully be deserialized.

This bug being fixed, I thought the workaround was unnecessary, but after the merge some feature tests started to fail (which I did not run prior to merging).

It was discovered that the workaround is still needed because while the first Newtonsoft.Json bug was fixed, some cases of incomplete json array input still behave unexpectedly, namely json input `[`. 

This PR is just to update the comment explaining the workaround so it links to the newly created issue [here](https://github.com/JamesNK/Newtonsoft.Json/issues/1930).
2018-12-03 10:17:30 -08:00
dependabot[bot]
45f10a079c Bump PackageManagement from 1.2.3 to 1.2.4 in /src/Modules (#8383)
Bumps PackageManagement from 1.2.3 to 1.2.4.
2018-12-03 10:16:13 -08:00
Aditya Patwardhan
a62eb62701 Remove all reference to AppVeyor and Travis CI from docs (#8376) 2018-12-03 10:14:11 -08:00
Dongbo Wang
a11810bf33
Improve powershell startup time (#8341)
Major changes are as follows:
- Avoid `SecuritySupport.IsProductBinary` and unnecessary AMSI/suspicious code scan at startup time
   - Update `CompiledScriptBlockData.IsProductCode` to avoid unnecessary calls to `IsProductBinary`, which attempts to retrieve catalog signature of the target file.
   - Update `PerformSecurityChecks` to skip AMSI and suspicious code scan for the `.psd1` file that contains a safe `HashtableAst` only.
- Use customized `ReadOnlyBag` instead of `ImmutableHashSet` so that we can avoid loading the `System.Collections.Immutable.dll` completely.
- Replace `SHA1` with `CRC32` when generating module analysis cache file name
   - This remove the loading of `System.Security.Cryptography.Algorithms.dll` at startup
- Move `ConvertFrom-SddlString` to C# to remove the `Utility.psm1` file.
- Crossgen `Microsoft.ApplicationInsights.dll` and enable tiered compilation
   - Even pwsh with crossgen assemblies spends a lot time in jitting at the startup, about `191.6ms` comparing with `24.7ms` for Windows PowerShell.
   - Jitting `Microsoft.ApplicationInsights.dll` takes about `51.6ms`.
   - By crossgen `Microsoft.ApplicationInsights.dll` and enable tiered compilation, the jitting time drops to about `98.9ms`.
2018-12-02 12:52:39 -08:00
Travis Plunk
2a469b7d0f
Revert "Remove workaround for fixed invalid json array deserializing bug (#8346)" (#8375)
Revert "Remove workaround for fixed invalid json array deserializing bug (#8346)"

This reverts commit 60a4e2f346.

This change caused the test which verified the functionality this workaround enabled, to start failing
2018-11-30 14:32:11 -08:00
Aditya Patwardhan
3794a5e39f
Created a csproj to pin test modules and updated build.psm1 accordingly (#8350) 2018-11-30 11:49:38 -08:00
Paul Higinbotham
743a964392 Fix Export-ModuleMember bug for scriptblocks having no context (#8363)
Export-ModuleMember cmdlet throws an exception if module functions are exported across language boundaries (Windows only).  But a scriptblock LanguageMode property can be null if the scriptblock is created without a PowerShell context, and this can happen through the PowerShell API called from C#.  In this case Export-ModuleMember throws erroneously when no language mode restrictions are in play.

Fix is to check if LanguageMode is null before comparing context and scriptblock language modes.
2018-11-30 11:45:33 -08:00
dependabot[bot]
fc766e498f Bump NJsonSchema from 9.12.5 to 9.12.6 (#8371)
Bumps [NJsonSchema](https://github.com/rsuter/NJsonSchema) from 9.12.5 to 9.12.6.
- See full diff in [compare view](https://github.com/rsuter/NJsonSchema/commits)
[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=NJsonSchema&package-manager=nuget&previous-version=9.12.5&new-version=9.12.6)](https://dependabot.com/compatibility-score.html?dependency-name=NJsonSchema&package-manager=nuget&previous-version=9.12.5&new-version=9.12.6)
2018-11-30 11:10:11 -08:00
Aditya Patwardhan
13e2559392
Fix Get-Help for advanced functions with MAML help content (#8353) 2018-11-30 09:49:32 -08:00
Kirk Munro
e721f7bbc3 Debug parameter now sets debugpreference to continue (#8195)
With this commit, users who invoke a command with -Debug will no longer be presented with a prompt asking them if they want to enter a nested prompt, continue execution, or halt execution entirely. Instead, any messages sent to the debug stream will simply be sent to the debug stream and the script will continue execution.
2018-11-30 19:46:51 +05:00
Adam Gauthier
60a4e2f346 Remove workaround for fixed invalid json array deserializing bug (#8346) 2018-11-30 16:49:33 +05:00
Mathias R. Jessen
950377faab Conditionally mark getter/setter implementations virtual in generated classes (#8303)
When implementing interfaces, PowerShell incorrectly produces non-virtual get/set methods for interface-defined properties.
This commit adds a lookup method for interface-defined properties and marks get/set methods for properties with matching signatures virtual.
2018-11-30 16:48:27 +05:00
PRASOON KARUNAN V
6e523f21eb Fix for PSDrive creation with a UNC path with a trailing backslash or forward slash when combined with -Persist (#8305) 2018-11-30 08:49:22 +05:00
Ilya
4e58ee6426
Cleanup '#if !CORECLR' code (#8337)
* NewWinEventCommand.cs
* CredSSP.cs
* WsManHelper.cs
* debugger.cs
* InternalHost.cs
* InitialSessionState.cs
* BaseTransportManager.cs
* Types_Ps1Xml.cs
* FileSystemProvider.cs
* Restore XmlResolver = null
2018-11-30 08:11:20 +05:00
Aditya Patwardhan
8c3de33ae1
Update help content for TabCompletion tests only if it does not exist (#8355) 2018-11-29 16:16:36 -08:00
Ilya
6dcd3ad000 Cleanup updatablehelpsystem and enable XSD validation on MAML help content (#8335) 2018-11-29 10:13:19 -08:00
Luke Jeremy
0cc1f06be4 Remove Persist parameter from New-PSDrive on non-Windows platform (#8291) 2018-11-29 19:02:08 +05:00
dependabot[bot]
de5f69cf94 Bump Newtonsoft.Json from 11.0.2 to 12.0.1 (#8348) 2018-11-28 10:56:00 -08:00
Ilya
9381d03a7b Fix race condition to access powershell.config.json (#8249) 2018-11-28 10:09:56 -08:00
Paul Higinbotham
06571637e4 Add SkipCA and SkipCN check requirement to WinRM/OMI HTTPS connection (#8279) 2018-11-27 16:16:00 -08:00
Aditya Patwardhan
9510fe56f5 Enable pipeline to sync PSGallery modules to AzArtifacts feed (#8316)
Compare the PowerShell modules dependencies on PowerShell Gallery and sync them to AzDevOps artifacts feed if a newer is available. The release builds pick up modules from AzDevOps feed.
2018-11-27 11:15:09 -08:00
Aditya Patwardhan
b0daa1e724 Build Alpine tar.gz package in release builds (#8340)
Enable building tar.gz package for Alpine in release builds.

## PR Checklist

- [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
    - Use the present tense and imperative mood when describing your changes
- [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
- [x] [Change is not breaking](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)
- [x] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
- [x] This PR is ready to merge and is not [Work in Progress](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---work-in-progress).
    - If the PR is work in progress, please add the prefix `WIP:` to the beginning of the title and remove the prefix when the PR is ready.
- **User-facing changes**
    - [x] Not Applicable
    - **OR**
    - [ ] User-facing [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
        - [ ] Issue filed - Issue link:
- **Testing - New and feature**
    - [x] Not Applicable or can only be tested interactively
    - **OR**
    - [ ] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting)
        - [ ] [Add `[feature]` if the change is significant or affects feature tests](https://github.com/PowerShell/PowerShell/blob/master/docs/testing-guidelines/testing-guidelines.md#requesting-additional-tests-for-a-pr)
2018-11-27 10:45:49 -08:00
Meir Blachman
58bbfe8396 Fix GetLocationCommand output type parameter set and style issues (#8324) 2018-11-27 08:59:34 +05:00
Aditya Patwardhan
9fda1d0e4f
Publish test package to AppVeyor daily build (#8273) 2018-11-26 10:44:42 -08:00
Paul Higinbotham
6a388f0b7d Add fix for Start-Job initialization script should not be executed as trusted in system lockdown (#8284) 2018-11-26 10:38:13 -08:00
Ilya
e2b5aaca20
Remove old 'customPSSnapInType' parameter from PSSnapInInfo() (#8333) 2018-11-26 11:21:46 +05:00
Ilya
9953ccb765
Cleanup '#if CORECLR' from some files (#8332)
* CommonUtilities
* CredSSP
* WsManHelper.cs
* InternalHost
2018-11-26 10:08:10 +05:00
dependabot[bot]
cae5f4a18e Bump NJsonSchema from 9.12.3 to 9.12.5 (#8328) 2018-11-21 11:45:15 -08:00
Joel Sallow (/u/ta11ow)
775552c0f5 Test-Path: Return $false when given an empty or $null -Path/-LiteralPath value (#8080) 2018-11-21 10:08:31 +05:00
dependabot[bot]
7193763467 Bump Microsoft.CodeAnalysis.CSharp from 2.9.0 to 2.10.0 (#8294) 2018-11-20 16:49:37 -08:00
dependabot[bot]
8563f9917e Bump PowerShellGet from 2.0.1 to 2.0.3 in /src/Modules (#8321) 2018-11-20 12:28:36 -08:00
dependabot[bot]
d8d0705a4d Bump PackageManagement from 1.2.2 to 1.2.3 in /src/Modules (#8320) 2018-11-20 11:21:30 -08:00
dependabot[bot]
e9925ef1cd Bump NJsonSchema from 9.12.2 to 9.12.3 (#8319) 2018-11-20 11:20:52 -08:00
Hubert Bukowski
a8627b83e5 Token calculation fix for Get-Help executed on ScriptBlock for comment help. (#8238) 2018-11-20 11:11:17 -08:00
Aditya Patwardhan
f27dfea065
Skip Enter-PSHostProcess tests on Appveyor due to PSReadline issue (#8317) 2018-11-20 10:17:33 -08:00
Steve Lee
b7daa796a3 Enable Open Here context menu on Windows to work with root of a drive (#8287)
support being started by Windows Shell (Open Here) where a trailing slash followed by a quote is handled incorrectly
2018-11-19 11:12:40 -08:00
dependabot[bot]
dedddb6b59 Bump System.Data.SqlClient from 4.5.1 to 4.6.0 (#8266)
Bumps System.Data.SqlClient from 4.5.1 to 4.6.0.
2018-11-16 10:32:15 -08:00
Ilya
2c3e93512d Cleanup assemblyinfo (#8190)
Remove old code from AssemblyInfo.cs
2018-11-16 10:20:12 -08:00
Steve Lee
c3143251b4 Change default issue template to use different categories (#8203)
Leverage GitHub ability to have multiple options when user clicks "New Issue" to have better issues opened and direct users to Docs repo and UserVoice for Windows PowerShell issues.
2018-11-16 10:18:13 -08:00
Aditya Patwardhan
82091d6a45
Merge release-v6.2.0-preview.2 to master
Merge Release-v6.2.0-preview.2
2018-11-15 17:59:42 -08:00
Travis Plunk
9682f0c64d Merged PR 5876: Update date in changelog
Update date in changelog
2018-11-16 01:46:59 +00:00
Travis Plunk
40857a25c3
Merge changelogs from 6.1.1 and 6.0.5 into master (#8283)
* Add 6.1.1 change log
* Add 6.0.5 change log
* Change filters for spelling CI
2018-11-15 15:17:48 -08:00
Travis Plunk
fc71da7c75 Merged PR 5847: Create 6.2.0-preview.2 changelog
Create 6.2.0-preview.2
2018-11-15 21:47:45 +00:00
Aditya Patwardhan
2df31b91e2 Merged PR 5861: Update links README to point to latest version 2018-11-15 21:27:48 +00:00
Andrew Menagarishvili
42cfa2c0b1 Merged PR 5863: Lowering Pester module version to avoid test infra failures on some Linux systems
Without this change package validation tests fail during Pester module import on some Linux systems.
2018-11-15 21:26:11 +00:00
Steve Lee
c5dd3bd2c9 Support 'Get-PSHostProcessInfo' and 'Enter-PSHostProcess' on Unix platforms (#8232)
There a some differences in support of named pipes for Windows and non-Windows.  Named pipes on Unix have a 104 character path limit.  On macOS, the `$env:TMPDIR` (on my system) is already 49 characters; corefx adds 12 more.  Since AppDomainName isn't really used, changed it from `DefaultAppDomain` to `None` to shorten the name.  Need to keep it since Windows PowerShell expects it.  Changed `starttime` part of pipe name to 8 hex characters which is to provide uniqueness to the pipe name.
2018-11-15 12:50:04 -08:00