Commit graph

6261 commits

Author SHA1 Message Date
Steve Lee 1244278e7e [package] (#7345)
enable `pwsh-preview` to work on Windows
2018-07-25 13:32:10 -07:00
Dan Travison 936626b7e8 Update PowerShell to reference 'psrp.1.4.5-0' on Unix build (#7350) 2018-07-25 10:04:00 -07:00
Ilya e3854815ab Cleanup: replace 'Utils.FileExists()/DirectoryExists()/ItemExists()' with .NET methods (#7129) 2018-07-25 10:02:09 -07:00
Dongbo Wang 87d8fc969c
Fix sequence point update for switch/if/for/while/do-while/do-until statements (#7305)
- Make switch-statement report correct error position when it fails to evaluate the condition.
- Make for-statement report correct error position when it fails to evaluate the initializer.
- For the condition of `if/for/while/do-while/do-until` statements, the sequence point update is either duplicate in some cases (for `if/for/while`) which causes debugger to stop at the condition twice  before moving forward, or missing (for `do-while/do-until`) which causes debugger to skip the condition. They are fixed.
2018-07-25 09:56:32 -07:00
Joshua Cooper 439f97c533 Update Docker link to PowerShell-Docker (#7351) 2018-07-25 12:28:37 +05:00
Adam Gauthier e34554c3ca Ignore Newtonsoft.Json metadata properties in ConvertFrom-Json (#7308)
Some values are not converted from json to PSCustomObject, because Newtonsoft.Json reads them and thinks they are metadata properties only useful for deserialization. This change makes Newtonsoft.Json "ignore" those properties so they are converted correctly from json to PSCustomObject.
2018-07-25 08:56:49 +05:00
Steve Lee f5a7d79175 Add support for parsing Link Header with variable whitespace (#7322)
Fix is to change the regex to allow for variable or no whitespace and associated tests to handle these two cases.
2018-07-24 10:56:00 +05:00
Travis Plunk 80d2af8934
Cleanup Docker files (#7328)
* update docker read me to point to new repo
* remove unused files
2018-07-23 15:19:58 -07:00
Dongbo Wang 5c11f09706
Add maintainer's best practice document and update maintainer list (#7311) 2018-07-20 21:31:21 -07:00
Ilya e9d5f68ba5 Format Utility csproj with updated codeformatter (#7263)
Related #4708.

Format Microsoft.PowerShell.Commands.Utility.csproj by codeformatter with default options.

The codeformatter is used that I compiled with newest Roslyn packages (version 2.8.2).
2018-07-20 18:51:13 -07:00
Dan Travison 6febd1f883 Update Build script owners (#7321) 2018-07-20 12:32:49 -07:00
Aditya Patwardhan ed4a454ac4 Make MUSL NuGet package optional (#7316) 2018-07-20 11:08:25 -07:00
Greg Zimmerman d9c570a90d Fix macOS launcher app to allow release and preview versions. (#7306)
Fixes #7074. This PR allows concurrent versions of the macOS launcher app to exist. The application name will be either PowerShell or PowerShell-preview. It is now dynamically built and removed post fpm to avoid post build conflicts, see #5262 .
2018-07-20 10:53:09 -07:00
Travis Plunk fd4494f224 Add 'Snapcraft' to spelling dictionary (#7318) 2018-07-19 19:55:04 -07:00
Travis Plunk 90dcce6c40 Merge branch 'release-v6.1.0-preview.4' into master 2018-07-19 16:38:26 -07:00
Dongbo Wang 08e3955231 Merged PR 3912: Update package versions for the new release 2018-07-19 22:15:44 +00:00
Travis Plunk c74be0ba40 Merged PR 3869: initial draft of changelog
initial draft of changelog
2018-07-19 21:09:30 +00:00
Ilya a3786158ca
Fix docs comments in utility folder (#7192) 2018-07-17 10:07:16 +05:00
Steve Lee 63041b4aec Update Enable-PSRemoting so configuration name for Preview releases (#7202)
The intent was to have the version of the PSSessionConfiguration name not include the `v` for the version string.  Also, Preview releases should standardize on `PowerShell.6-Preview` instead of clobbering `PowerShell.6` so that stable and preview can co-exist side-by-side.

Need to verify on Win10 IoT if `Install-PowerShellRemoting.ps1` is still needed anymore as it may be possible to run `pwsh -c enable-psremoting` from within Windows PowerShell Core removing the need for that script which duplicates `Enable-PSRemoting` capability.

Update: Not able to get the current master build working on Win10 IoT, getting `Invalid access to memory` error.  Will have to investigate this separately from this PR and keep `Install-PowerShellRemoting.ps1` for now.

Fix https://github.com/PowerShell/PowerShell/issues/7119
2018-07-16 19:40:46 -07:00
Robert Holt e857135d3c Enforce the 'CompatiblePSEditions' check for modules from the legacy 'System32' module path (#7183)
- Add `%WINDIR%\System32\WindowsPowerShell\v1.0\Modules` (Windows PowerShell $PSHOME) to the end of the default PSCore 6 module path (i.e. the module path as initially set at startup).
- Cause an error to be thrown by `Import-Module` when a module with `CompatiblePSEditions` not containing `"Core"` is being loaded from the 'System32' module path.
- Suppress output of modules listed by `Get-Module -ListAvailable` from Windows PowerShell $PSHOME when `CompatiblePSEditions` does not contain `"Core"`.
- Introduce the `-SkipCompatibilityCheck` switch parameter on both `Import-Module` and `Get-Module` to respectively allow importing incompatible modules and listing incompatible modules.
- Adds a  `PSEdition` column to the `PSModuleInfo` table view format.
- Ensures that completions are not given for incompatible modules on the System32 module path.
2018-07-16 19:40:46 -07:00
Steve Lee 0a2f9c8821 Update Enable-PSRemoting so configuration name for Preview releases (#7202)
The intent was to have the version of the PSSessionConfiguration name not include the `v` for the version string.  Also, Preview releases should standardize on `PowerShell.6-Preview` instead of clobbering `PowerShell.6` so that stable and preview can co-exist side-by-side.

Need to verify on Win10 IoT if `Install-PowerShellRemoting.ps1` is still needed anymore as it may be possible to run `pwsh -c enable-psremoting` from within Windows PowerShell Core removing the need for that script which duplicates `Enable-PSRemoting` capability.

Update: Not able to get the current master build working on Win10 IoT, getting `Invalid access to memory` error.  Will have to investigate this separately from this PR and keep `Install-PowerShellRemoting.ps1` for now.

Fix https://github.com/PowerShell/PowerShell/issues/7119
2018-07-16 19:35:48 -07:00
Robert Holt c94fc31f97 Enforce the 'CompatiblePSEditions' check for modules from the legacy 'System32' module path (#7183)
- Add `%WINDIR%\System32\WindowsPowerShell\v1.0\Modules` (Windows PowerShell $PSHOME) to the end of the default PSCore 6 module path (i.e. the module path as initially set at startup).
- Cause an error to be thrown by `Import-Module` when a module with `CompatiblePSEditions` not containing `"Core"` is being loaded from the 'System32' module path.
- Suppress output of modules listed by `Get-Module -ListAvailable` from Windows PowerShell $PSHOME when `CompatiblePSEditions` does not contain `"Core"`.
- Introduce the `-SkipCompatibilityCheck` switch parameter on both `Import-Module` and `Get-Module` to respectively allow importing incompatible modules and listing incompatible modules.
- Adds a  `PSEdition` column to the `PSModuleInfo` table view format.
- Ensures that completions are not given for incompatible modules on the System32 module path.
2018-07-16 16:58:40 -07:00
Steve Lee da7b5216b5 Update remote prompt when using ssh to show username if different (#7191)
Currently, the remote prompt only shows the remote computer name:

> [computer] PS:\foo>

With this change, if you use PSRP over SSH and you specified a different username, it shows whom you logged in as:

> [user@computer] PS:\foo>

The fix is when the remote prompt is being created to check if using SSH if so, check if the current user is different than the specified user and specified.  If different, use `[user@computer]`, otherwise fallback to default `[computer]` prompt.

Fix https://github.com/PowerShell/PowerShell/issues/7156
2018-07-16 11:45:32 -07:00
Dongbo Wang ee0a643f19
Fix the encoding of 'PowerShell.sln' to be utf-8 (#7289) 2018-07-13 20:43:26 -07:00
Aditya Patwardhan 7ba4d65a42 Fix the file 'PowerShell.sln' that was corrupted by accident (#7288) 2018-07-13 18:11:55 -07:00
Dongbo Wang 6f3e9d0881
Added Markdown rendering cmdlets (#6926)
- `ConvertFrom-Markdown` is used for converting a markdown document or string to a MarkdownInfo object. It can optionally return an HTML or a VT100 encoded string in addition to an AST of the markdown document.
- `Show-Markdown` is used to either display the VT100 encoded string on the console or redirect the HTML string to the browser.
- `Set/Get-MarkdownOption` cmdlets are used to view or set markdown rendering options.
2018-07-13 13:56:17 -07:00
Aditya Patwardhan ab07b85f01
Merge pull request #7284 from daxian-dbw/removeVB
Remove the 'VisualBasic' support from Add-Type
2018-07-13 13:48:50 -07:00
Aditya Patwardhan a1627a396d [Feature] Changed AsEscapeSequence to accept an enum and update Markdig version to latest 2018-07-13 12:50:43 -07:00
Aditya Patwardhan ce5f9f9af7 [Feature] Fix comments and other code review comments 2018-07-13 11:18:14 -07:00
Bruce Payette f4a50eda0d Fix prompt string to be platform agnostic and keep its trailing spaces (#7255) 2018-07-13 01:22:10 -07:00
Bruce Payette 716ed2acbd Fix a parsing error when 'break' and 'continue' are used in a switch statement in a finally block (#7273) 2018-07-13 01:19:47 -07:00
Dongbo Wang c34866d0fa [Feature] Remove 'VisualBasic' support from Add-Type 2018-07-12 23:50:09 -07:00
Travis Plunk b15709f444 update to latest package references, runtime framework, and SDK (#7272)
* update to latest package references

* update runtime framework

* update sdk

* automatically read NuGet package dependency info from csproj, where version info is fully qualified

* update file.wxs
2018-07-13 09:00:35 +05:00
Aditya Patwardhan b5601cfb66 [Feature] Added wix component updates 2018-07-12 17:17:52 -07:00
Aditya Patwardhan 67b29151f6 Style fixes 2018-07-12 17:17:51 -07:00
Aditya Patwardhan e711c5dcc3 [Feature] Address code review comments 2018-07-12 17:17:50 -07:00
Aditya Patwardhan 731afbf14d [Feature] Add markdown cmdlets to default commands list 2018-07-12 17:17:50 -07:00
Aditya Patwardhan a78d006ac1 Added missing error messages 2018-07-12 17:17:50 -07:00
Aditya Patwardhan 7bf1604f97 Codefactor style fixes 2018-07-12 17:17:49 -07:00
Aditya Patwardhan 481d3b1ebf [Feature] Add more tests 2018-07-12 17:13:55 -07:00
Aditya Patwardhan 275e109202 [Feature] Address code review comments 2018-07-12 17:13:55 -07:00
Aditya Patwardhan 32876c89e7 Added Tests for Markdown cmdlets 2018-07-12 17:13:55 -07:00
Aditya Patwardhan 1cf14bd596 Added Markdown rendering cmdlets
ConvertFrom-Markdown is used for converting a markdown document or string to a MarkdownInfo object.
It can optionally return a HTML or VT100 encoded string in addition to a AST of the markdown document.

Show-Markdown is used to either display the VT100 encoded string on console or redirect the HTML string to the browser.

Set/Get-MarkdownOption cmdlets get be used to view or set markdown rendering options.
2018-07-12 17:13:55 -07:00
Aditya Patwardhan 75ba74cce6
Merge pull request #7242 from daxian-dbw/exp
Add support to experimental features

RFC: https://github.com/PowerShell/PowerShell-RFC/pull/114

Goals:

Allow experimental features to be declared by PowerShell engine and modules.
Allow experimental features to be enabled via powershell.config.json
Allow Function, Cmdlet, parameters and parameter sets to be shown to the user or hiden from the user depending on whether the associated experimetnal feature is on or off.
Allow discover experimental features using cmdlet Get-ExperimentalFeature
2018-07-12 15:52:04 -07:00
James Truher [MSFT] d61ea03694 Make pwsh able to start in a directory with wildcards in the name (#7240) 2018-07-12 15:10:31 -07:00
Aditya Patwardhan 5702e3f57a Added markdown rendering feature assemblies to the trusted assembly list (#7280) 2018-07-12 14:19:19 -07:00
Robert Holt 6a66a6e0f0 Add more information to job process failure error (#7251) 2018-07-12 08:06:07 +05:00
Dongbo Wang d12230f188 [Feature] Address Feedback: Use value tuple (int, string) as the sorting key 2018-07-11 17:53:24 -07:00
Travis Plunk 79d20a1873
Update PowerShell Direct to try pwsh then fallback to powershell (#7241)
Update PowerShell Direct to try pwsh then fallback to powershell

  - Forward port changes from Windows Powershell to fall back
  - change the order from powershell->pwsh to pwsh->powershell

fixes #7237
2018-07-11 15:44:31 -07:00
Aditya Patwardhan 749d1609bb
Update README files for native code for migration (#7248) 2018-07-11 14:32:01 -07:00