Commit graph

6544 commits

Author SHA1 Message Date
Frank Behrens 84634445ce Improve markdown Formatting of beginners guide (#7684) 2018-09-24 09:57:53 -07:00
Dongbo Wang 0f0c46dfe5 Update to .NET Core 2.1.4 with SDK 2.1.402 (#7834) 2018-09-21 13:25:03 -07:00
Dongbo Wang b6d12a35ed [Feature] Fix .NET adapter to be able to get members from System.IntPtr (#7808)
The type System.IntPtr has an explicit cast operator defined that takes a pointer type System.void* parameter. Now we handle that type properly in GetPSMethodProjectedType.
2018-09-20 08:15:42 +05:00
Staffan Gustafsson eb286332cf Create inferred types for Select-Object, Group-Object, PSObject and Hashtable (#7231)
Fixes #7230.

Adding the concept of a PSSyntheticTypeName, derived from PSTypeName,
that extends it with a list of synthetic members.

This allows us to express the inferred type of
```
[pscustomobject] @{
   A = 1
   B = "2"
}
```
as a "PSObject#A:B" and with information about the types of A and B.

This is also used to annotate the output of
```
Select-Object -Property
Select-Object -ExcludeProperty
Select-Object -ExpandProperty
```
Finally, it adds information about the types of the
`Group` and `Value` properties of the output of `Group-Object`
2018-09-19 15:43:22 -07:00
Ilya 985928be7b
Remove extra space in LastWriteTime format (#7810) 2018-09-19 19:11:05 +05:00
Ilya cc5f36c67a
Allow numeric Ids and name of registered code pages in '-Encoding' parameters (#7636)
Enhance the encoding transformation attribute:
- to allow numeric Ids of registered code pages (like -Encoding 1251)
- to allow string names of registered code pages (like -Encoding "windows-1251")
2018-09-19 18:53:03 +05:00
Christoph Bergmeister [MVP] 4bc22d92df Add support for 'cd +' (#7206)
'cd +' adds the ability to revert 'cd -' by having another bounded stack with the same limit for 'redo' actions.
Behaviour is similar to back/forward navigation in explorer.exe
When the location is set to a path and the redo stack is non-empty then the redo stack gets flushed.
When cd + happens, then the redo stack is pushed to as well for a more intuitive way of navigating backwards and forwards.
All the work is done of course on the Set-location cmdlet, which is aliased to cd on all platforms.
2018-09-19 12:50:30 +05:00
Robert Holt 3c67fa3411 Add tests for Import-Module -Force (#7491) 2018-09-19 09:32:35 +05:00
Steve Lee 985c238aaf Remove badges for master build as it reflects last PR which is not actionable from the README file (#7816) 2018-09-18 17:59:20 -07:00
Travis Plunk ea83aea39e
Wait for package manager not to be locked (#7817) 2018-09-18 16:47:52 -07:00
Aditya Patwardhan 8d4dd1e58f Remove packaging, building and installation scripts for Ubuntu 17.10 (#7773) 2018-09-17 14:48:23 -07:00
Travis Plunk 2d4906c794
update build badges (#7792) 2018-09-17 14:26:27 -07:00
Andrew e725a030d7 Updating ModulePath.Tests for fxdependent package (#7772) 2018-09-17 13:22:00 -07:00
Dongbo Wang 285e471034
Fix .NET adapter to not throw when fails to create a PSMethod due to ByRef-like type (#7788) 2018-09-17 12:45:55 -07:00
Ilya f90fa8afc1
[Breaking change] Do not add PATHEXT environment variable on Unix (#7697)
* Don't create env:PATHEXT on Unix
* Use IsExecutable()
* Add conditional compile
2018-09-14 08:03:56 +05:00
Travis Plunk 8c10c1bcd1 Merge branch 'release-v6.1.0' into master
# Conflicts:
#	.spelling
#	tools/metadata.json
2018-09-13 15:11:12 -07:00
Aditya Patwardhan 855d2b9d75 Merged PR 4989: Update the release date
Update the release date
2018-09-13 18:42:13 +00:00
Aditya Patwardhan 0f81101f5c Merged PR 4985: Update metadata json for 6.1.0 release
Update metadata json for 6.1.0 release
2018-09-13 16:52:17 +00:00
Travis Plunk 812f16bfac Disable travis-ci (#7766) 2018-09-12 17:54:21 -07:00
Dongbo Wang 720e842c86
Support calling method with ByRef-like type parameters (#7721)
Support calling methods with ByRef-like type parameters in PowerShell, as long as the argument specified for the parameter can be implicitly/explicitly converted to the ByRef-like type.

We cannot create an instance of a ByRef-like type in PowerShell, but there are types that can be implicitly or explicitly converted to ByRef-like types, such as `T[] -> Span<T>`, `T[] -> ReadOnlySpan<T>`, `String -> ReadOnlySpan<T>`. `ArraySegment<T> -> Span<T>`, `ArraySegment<T> -> ReadOnlySpan<T>`. With changes in this PR, we can call methods with ByRef-like parameter types by providing the arguments of the types that can be cast to the target ByRef-like type.

**What is enabled?**
1. Invoking methods that have ByRef-like parameters, but the return type is not ByRef-like.
2. Invoking constructors with ByRef-like parameters via `[target-type]::new` syntax, but the `target-type` is not ByRef-like.
3. Accessing indexers that have ByRef-like parameters, but the return type is not ByRef-like.
2018-09-11 16:57:35 -07:00
Dongbo Wang 65d15f08f2 Merged PR 4961: Update versions in README.md 2018-09-11 23:17:23 +00:00
Dongbo Wang 131f1f9efb
Reference to the latest version of 'NJsonSchema' package (#7764) 2018-09-11 16:16:40 -07:00
Dongbo Wang 1ccdc3e5ce Merged PR 4959: Update the ChangeLog.md for 6.1.0 release 2018-09-11 21:27:49 +00:00
ThreeFive-O 32cdbe688e Fix pipeline test where SmtpServer key was set wrong in pipeline object (#7745)
Fix SmtpServer key (was $SmtpServer) in hashtable object.
Removed double quotes for all keys in hashtable object.
2018-09-11 09:29:10 +05:00
ThreeFive-O 4e98f244fd Add unified attribute for completion for Encoding parameter. (#7732)
Provide a tab completion attribute (ArgumentEncodingCompletionsAttribute) for an Encoding parameter.
This PR should fix the duplicated code warning in CodeFactor
2018-09-11 09:26:12 +05:00
Travis Plunk 15a3beb12d Make sure MSI build works when not preview (#7752)
The variable was set to empty (meaning to delete the variable) in the non-preview case and the build fails.
The fix avoids setting the variable to empty
2018-09-10 14:36:23 -07:00
Travis Plunk 172a8a014d
Make sure MSI build works when not preview (#7752)
The variable was set to empty (meaning to delete the variable) in the non-preview case and the build fails.
The fix avoids setting the variable to empty
2018-09-10 14:35:02 -07:00
Aditya Patwardhan 5a587b551e Update version for powershell release 6.1.0 (#7751) 2018-09-10 13:20:23 -07:00
Aditya Patwardhan 2e3069900b Update version for powershell release 6.1.0 (#7751) 2018-09-10 13:08:42 -07:00
Dan Travison ccee14dc65 Ensure the SSHClientSessionTransportManager stream writer and reader fields are cleared after dispose. (#7746)
Fix possible race conditions accessing the fields during CloseConnection.
2018-09-10 13:06:05 -07:00
Aditya Patwardhan 89278290d9 Build and package framework dependent package (#7729)
Add the functionality to build a framework dependent (shared framework) package for PowerShell.

The changes create two packages, one for Windows and other for Linux, due to #if code.
2018-09-10 12:55:06 -07:00
Aditya Patwardhan abad087fa1 Build and package framework dependent package (#7729)
Add the functionality to build a framework dependent (shared framework) package for PowerShell.

The changes create two packages, one for Windows and other for Linux, due to #if code.
2018-09-10 12:47:32 -07:00
Dan Travison 528d970850 Ensure the SSHClientSessionTransportManager stream writer and reader fields are cleared after dispose. (#7746)
Fix possible race conditions accessing the fields during CloseConnection.
2018-09-10 12:31:56 -07:00
Ilya 433ec46efb Cleanup FileSystemProvider from runtime checks (#7655)
Replace runtime checks with compile time checks.
Remove unneeded methods.
2018-09-10 11:18:50 -07:00
ThreeFive-O e74bd730fe Improve code style of Send-MailMessage cmdlet (#7723) 2018-09-10 11:18:50 -07:00
Travis Plunk 179ff6bc16 update metadata json in preparation for 6.1 release (#7741)
ReleaseTag is now StableReleaseTag
NextReleaseTag is not PreviewReleaseTag
Added ServicingReleaseTag for the N-1 Stable release
2018-09-10 11:18:50 -07:00
Ilya bec64a0743 Update CONTRIBUTION.md about adding an empty line after the copyright header (#7706) 2018-09-10 11:18:50 -07:00
Dan Travison 4683934793 Update PowerShell to handle the case where the Windows PowerShell module path is already in the environment's PSModulePath (#7727)
This change updates ModuleIntrinsics.GetModulePath to handle the case where the Windows PowerShell module path is already in the environment's PSModulePath or when launched from a different version of PowerShell.

Previously, GetModulePath would append $PSHOME\Modules to the PSModulePath after removing the path for the launching version without considering the Windows PowerShell module path. The result, was the Windows PowerShell modules were found first and loaded incompatible modules; such as the built-in modules.

The change detects the Windows PowerShell module path and inserts $PSHOME\Modules path before it. The new test simulates launching from a different version of pwsh that has already added the Windows PowerShell module path.

Fixes #7679
2018-09-10 10:58:38 -07:00
Ilya b8fb55340d
Cleanup FileSystemProvider from runtime checks (#7655)
Replace runtime checks with compile time checks.
Remove unneeded methods.
2018-09-09 00:40:06 +05:00
ThreeFive-O dfe415e4ef Improve code style of Send-MailMessage cmdlet (#7723) 2018-09-08 23:19:48 +05:00
Travis Plunk c7ed7129b2
update metadata json in preparation for 6.1 release (#7741)
ReleaseTag is now StableReleaseTag
NextReleaseTag is not PreviewReleaseTag
Added ServicingReleaseTag for the N-1 Stable release
2018-09-07 18:12:10 -07:00
Ilya 0c3ada7edc Update CONTRIBUTION.md about adding an empty line after the copyright header (#7706) 2018-09-07 16:53:22 -07:00
Aditya Patwardhan c41b19923e Fix docker image names for release build (#7726) 2018-09-06 18:00:46 -07:00
Travis Plunk 433a263a17 Add daily build non-windows platforms (#7683)
Add daily build non-windows platforms
  - Also, make the [Feature] tag work in VSTS for non-windows
  - Also, add a way to force feature tests to run
  - Also, fix an issue where `-workingdirectory` didn't work when running async
2018-09-06 18:00:46 -07:00
Steve Lee b17c5113f4 update PSReadLine to 2.0.0-beta3 (#7711)
Update PSReadLine shipped with PSCore6 to 2.0.0-beta3
2018-09-06 18:00:45 -07:00
Christoph Bergmeister [MVP] b19630d167 Make Windows MSI uninstallation shortcut remove work when more than one version is installed (#7701)
Fixes underlying problem of #3341. Related: #2881
When multiple versions (e.g. RTM and preview) of PowerShell are installed via the MSI and one is being uninstalled, then the start menu shortcut does not get removed due to the shortcut component being not unique per version. This also applies to an upgrade scenario. Therefore use an auto-generated Guid (`*`)
2018-09-06 18:00:45 -07:00
Sergey Vasin b31ccf90d0 Fix a typo in Credential.cs. (#7696) 2018-09-06 18:00:45 -07:00
Travis Plunk f27812a824 update njsonschema (#7705) 2018-09-06 18:00:45 -07:00
Aditya Patwardhan 2edbe70548
Fix docker image names for release build (#7726) 2018-09-06 14:49:48 -07:00
Travis Plunk 2141c2a8e3
Add daily build non-windows platforms (#7683)
Add daily build non-windows platforms
  - Also, make the [Feature] tag work in VSTS for non-windows
  - Also, add a way to force feature tests to run
  - Also, fix an issue where `-workingdirectory` didn't work when running async
2018-09-06 12:27:49 -07:00