Commit graph

6558 commits

Author SHA1 Message Date
Darwin 4dae2825e1 Ffixing syntax error in installpwsh-amazonlinux.sh (#7905)
* Fix syntax error for issue 7903. Typo come from #6849 

* Add identation after copyright message
2018-10-01 14:58:14 +05:00
Benjamin P. McKenna 39252b4938 Add '%F' case to Get-Date -UFormat (#7630) 2018-10-01 08:39:14 +05:00
James Truher [MSFT] 98cf44cdec Test changes needed for running in a container (#7869) 2018-09-28 13:49:31 -07:00
Steve Lee cc44781b5b Ensure NestedModules property gets populated by Test-ModuleManifest (#7859) 2018-09-28 13:28:08 -07:00
Joel Sallow 8f4b66af29 Add C#-style type accelerators and suffixes for ushort, uint, ulong, and short literals (#7813)
[breaking change]
Add the following type accelerators: [short], [ushort], [uint], [ulong].
Add the following numeric literal suffixes:
 - 'u' suffix (uint/ulong)
 - 's' suffix (short)
 - 'ul' suffix (ulong)
 - 'us' suffix (ushort)
2018-09-28 13:27:32 -07:00
PRASOON KARUNAN V e6702fe780 Get/Add-Content throws improved error when targeting a container (#7823) 2018-09-28 20:36:13 +05:00
Robert Holt bd5f7719bc Add version checking tests for Import-Module (#7499) 2018-09-27 17:08:54 -07:00
Andrew bc5fe72096 Updating test gallery URL in PackageManagement tests (#7879) 2018-09-27 14:23:10 -07:00
Sergey Vasin 2291a898c3 Add 'TimeToLive' and 'Hops' aliases to MaxHops parameter of Test-Connection cmdlet. (#7850)
Add the following aliases to MaxHops parameter of Test-Connection cmdlet:
- TimeToLive
 It is the similar parameter's name from Windows PowerShell Test-Connection cmdlet .
- Hops
 Similar parameter's name from Test-NetConnection cmdlet.
2018-09-27 15:59:10 +05:00
Dongbo Wang 0cce2ae44e Clean up MshObject.cs and MshMemberInfo.cs (#7446)
Clean up style issues.
2018-09-26 09:27:43 +05:00
Travis Plunk b5c39c1a36
Bump Microsoft.PowerShell.Native from 6.1.0-rc.1 to 6.1.0 (#7861) 2018-09-25 17:53:13 -07:00
Dongbo Wang 4926e15984
Make Start-PSPackage give better message about how to fix 'files.wxs' (#7841) 2018-09-25 09:53:42 -07:00
Steve Lee 769ba7b95c Update PowerShellGet to 2.0.0 (#7831) 2018-09-24 14:58:13 -07:00
Travis Plunk 8a0abf459c
update markdown tests (#7838)
update markdown tests

  - explicitly use gulp 4.0 beta because 3.9 depends on a vulnerable package
2018-09-24 10:14:43 -07:00
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