Commit graph

7304 commits

Author SHA1 Message Date
dependabot-preview[bot] 6ad4fb00df Bump Markdig.Signed from 0.17.0 to 0.17.1 (#10062) 2019-07-05 13:33:01 -07:00
Dongbo Wang 0bb122b193 Use a static cache for PSVersionInfo.PSVersion to avoid casting SemanticVersion to Version very time accessing that property (#10028) 2019-07-04 09:13:41 +05:00
Reece Dunham 2a80ed728f Indent fix in markdown-link.tests.ps1 (#10049) 2019-07-04 08:08:52 +05:00
Ilya ad45fb05d2 Reduce allocations in NavigationCmdletProvider.NormalizePath() (#10038) 2019-07-03 12:52:27 -07:00
Ilya 7304ec3239 Use AddOrUpdate() instead of Remove then Add to register runspace (#10007) 2019-07-03 11:16:38 -07:00
xtqqczze 0d55a7249b Suppress PossibleIncorrectUsageOfAssignmentOperator rule violation by adding extra parenthesis (#9460) 2019-07-02 13:23:58 -07:00
Mark Kraus 2285ece613 Set request headers when request body is empty in Web Cmdlets (#10034) 2019-07-02 12:01:06 -07:00
Dongbo Wang 6d8dd92759 Add fast path for wildcard patterns that contains no wildcard characters (#10020) 2019-07-02 11:25:09 -07:00
Ilya dc98b0f5a9
Use AddRange in GetModules() (#9975) 2019-07-02 11:18:24 +05:00
Ilya e7e53b603a Avoid Assembly.GetName() in 'ClrFacade.GetAssemblies(string)' to reduce allocations of 'CultureInfo' objects (#10024) 2019-07-01 08:37:59 -07:00
Joel Sallow (/u/ta11ow) bf71b2c616 Start-PSBuild -Clean doeas not remove all untracked files (#10022) 2019-07-01 08:34:36 +05:00
Joel Sallow (/u/ta11ow) b34e331d63 Consider DBNull.Value and NullString.Value the same as $null when comparing with $null and casting to bool (#9794)
- Adds `LanguagePrimitives.IsNullLike()` method to account for `DBNull.Value` and `NullString.Value` so that they can be considered the same as a null value where sensible in PowerShell.
- Updates `-ne` and `-eq` binders to treat `DBNull.Value` and `NullString.Value` as equal to null/AutomationNull.
- Update code paths for comparing objects in LanguagePrimitives to ensure consistency with how the `-eq` and `-ne` binders work when calling LanguagePrimitives methods to do the comparisons.
- Make `LanguagePrimitives.IsNull()` and `LanguagePrimitives.IsNullLike()` public methods.
- Added tests for null behaviours in `NullRepresentatives.Tests.ps1`
2019-06-28 11:39:34 -07:00
dependabot-preview[bot] f3a3922285 Bump NJsonSchema from 10.0.20 to 10.0.21 (#10017)
Bumps [NJsonSchema](https://github.com/rsuter/NJsonSchema) from 10.0.20 to 10.0.21.
- [Release notes](https://github.com/rsuter/NJsonSchema/releases)
- [Commits](https://github.com/rsuter/NJsonSchema/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-28 09:13:19 +05:00
Dongbo Wang 026a8f1f41 Avoid the int[] and int[,] allocation when tokenizing line comments and matching wildcard pattern (#10009)
- Reusing the same 2-dimensional integer array for processing line comments in the same Tokenizer.
- Use ArrayPool<int> in PatternPositionVisitor to avoid creating transient int[].
2019-06-28 08:14:41 +05:00
Aditya Patwardhan 142f5dcad5
Update copyright symbol for NuGet packages (#9936) 2019-06-27 17:27:19 -07:00
Amit Saraf 7bce46bc5b Download latest version (6.2.0) of PSDesiredStateConfiguration nuget package. (#9932) 2019-06-27 10:22:32 -07:00
Travis Plunk f24428a00c
Add automated RPM signing to release build (#10013) 2019-06-27 10:21:44 -07:00
Ilya dd7e45fe2e
Code cleanup: use IndexOf(char) overload (#9722)
- Use IndexOf(char) overload instead of IndexOf(string) to benefit from Ordinal search
- Replace IndexOf with Contains to get more understandable code
- Use StringComparison.Ordinal for ASCII chars
2019-06-26 11:02:07 +05:00
dependabot-preview[bot] a5e27debc1 Build(deps): Bump ThreadJob from 1.1.2 to 2.0.1 in /src/Modules (#10003) 2019-06-25 16:53:05 -07:00
Ilya d6390461b2 Move consts and methods to single CharExtensions class (#9992) 2019-06-25 15:37:47 -07:00
Joel Sallow (/u/ta11ow) 86a1697da9 Allow methods to be named after keywords (#9812) 2019-06-25 11:04:00 -07:00
robdy aa07eef187 Add test for New-Item -Force (#9971) 2019-06-25 11:03:07 -07:00
Ilya 74c87ab20b Cleanup: Use EndsWith(char) and StartsWith(char) (#9994) 2019-06-25 11:02:31 -07:00
Tyler James Leonhardt d712d5817b Add quick steps for adding docs to cmdlets (#9978) 2019-06-25 10:55:42 -07:00
Reece Dunham 0f46b25c99 Fix gulp versions (#9916) 2019-06-25 10:42:52 -07:00
Ilya e3d8131390
Remove LCIDToLocaleName P/Invoke from GetComputerInfoCommand (#9716)
- Remove LCIDToLocaleName P/Invoke with StringBuilder
- Reduce allocations by using GetCultureInfo to get cached CultureInfo
- Use UInt32.TryParse to parse Hex
- Minor cleanups after above changes
2019-06-25 08:22:00 +05:00
Joel Sallow (/u/ta11ow) 17b2cec163 Cleanup Parser tests (#9792)
Co-Authored-By: Ilya <darpa@yandex.ru>
2019-06-24 11:22:54 -07:00
Ilya fae03446dc Fix wrong comparison in CertificateProvider (#9987) 2019-06-24 10:24:49 -07:00
Bram Crielaard 4967416067 Fix amazonlinux install script (#9967) 2019-06-21 13:36:11 -07:00
Sean Wheeler 825399617b Sync docs changes into the embedded help for pwsh (#9952) 2019-06-21 17:22:10 +05:00
Reece Dunham c0fd96fe4b Remove EtwActivity empty constructor and make minor style fixes (#9958) 2019-06-21 17:21:06 +05:00
Christoph Bergmeister [MVP] 5d8468c398 Suppress sporadic exceptions from JumpList creation code (#9928) 2019-06-21 10:13:43 +05:00
Ilya 099406e065
Fix style issues from last commits (#9937) 2019-06-21 09:23:19 +05:00
Dongbo Wang 9dfec6ca84 Remove dead code about 'IsTransparentProxy' (#9966) 2019-06-21 09:12:09 +05:00
Keith Hill 482c64b35f Display Duration when displaying HistoryInfo (#9751) 2019-06-20 13:39:41 -07:00
nbkalex 358d12ea93 Display com method signature with argument names (#9858) 2019-06-20 13:22:30 -07:00
Reece Dunham 1d2011fc22 Update readme gitter badge (#9920) 2019-06-20 13:07:42 -07:00
Reece Dunham 052ee86aa4 Indentation fixes in ci.psm1 (#9947) 2019-06-20 13:03:56 -07:00
Reece Dunham db3c114587 Fix minor typos in code comments (#9917) 2019-06-20 12:11:20 -07:00
Reece Dunham 4223bf1f8e Remove some Travis-CI references (#9919) 2019-06-20 11:08:32 -07:00
Reece Dunham 66e571b19f Improve release testing Docker images (#9942) 2019-06-20 10:16:45 -07:00
Reece Dunham 4ae04335a4 Style fixes for CimAsyncOperations (#9945) 2019-06-20 16:36:49 +05:00
dependabot-preview[bot] 092ab5f6eb Build(deps): Bump NJsonSchema from 10.0.19 to 10.0.20 (#9954)
Bumps [NJsonSchema](https://github.com/rsuter/NJsonSchema) from 10.0.19 to 10.0.20.
- [Release notes](https://github.com/rsuter/NJsonSchema/releases)
- [Commits](https://github.com/rsuter/NJsonSchema/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-20 15:44:51 +05:00
Reece Dunham 92f13b9b60 Fix minor CodeFactor style issues in ModuleCmdletBase (#9915) 2019-06-19 10:56:34 -07:00
Steve Lee 4d3f74eddc Update console startup and help url for PowerShell docs (#9775) 2019-06-19 10:45:47 -07:00
Dongbo Wang 94b6b6f4f7 Clean up the use of 'SetProfileRoot' and 'StartProfile' in ConsoleHost (#9931)
* Clean up the use of 'SetProfileRoot' and 'StartProfile' in ConsoleHost
* Remove 'pwsh.pdb' from our component file list
2019-06-19 11:34:47 +05:00
dependabot-preview[bot] 7b1f674ac8 Build(deps): Bump PowerShellGet from 2.1.4 to 2.1.5 in /src/Modules (#9933)
Bumps [PowerShellGet](https://github.com/PowerShell/PowerShellGet) from 2.1.4 to 2.1.5.
- [Release notes](https://github.com/PowerShell/PowerShellGet/releases)
- [Changelog](https://github.com/PowerShell/PowerShellGet/blob/development/CHANGELOG.md)
- [Commits](https://github.com/PowerShell/PowerShellGet/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-19 09:27:40 +05:00
Dongbo Wang c684902fba Use the original precision (prior-dotnet-core-3) for double/fload-to-string conversion (#9893)
.NET Core changes to return "shortest roundtrippable string" by default for the ToString() method of double and float types. This results in ToString() for double/float values sometimes return a string in 17-digit/9-digit precision format. This PR updated the double/float-to-string conversion in PowerShell to continue using the old precision specifier before the change in .NET Core 3.0.
2019-06-19 08:56:43 +05:00
Amit Saraf 0673a481bb Import-DscResource should allow to overwrite DSC built-in resources. (#9879) 2019-06-18 10:07:45 -07:00
dependabot-preview[bot] f101e07681 Build(deps): Bump PackageManagement from 1.4.1 to 1.4.2 in /src/Modules (#9918) 2019-06-17 15:49:51 -07:00