Skip to content

Commit

Permalink
Backport PRs post 2019.5.0 (#2102)
Browse files Browse the repository at this point in the history
* Edit snippets to support $TM_SELECTED_TEXT (#1945)

Edit all-and-only applicable snippets to support $TM_SELECTED_TEXT,
where "applicable" is approximated by whether a snippet contains a
user-specified PowerShell expression, block, or body. Do not add,
remove, or otherwise change any placeholder number or name in order to
preserve backwards-compatibility.

Edit the following snippets (listed by name, not prefix):
- Class
- Constructor
- Method
- Enum
- Cmdlet
- Function-Advanced
- DSC Resource Provider (class-based)
- DSC Resource Provider (function-based)
- comment block
- do-until
- do-while
- while
- for
- for-reversed
- foreach
- function
- Function-Inline
- if
- elseif
- else
- switch
- try-catch
- try-catch-finally
- try-finally
- Workflow
- Workflow ForEachParallel
- Workflow InlineScript
- Workflow Parallel
- Workflow Sequence
- Region Block
- IfShouldProcess
- CalculatedProperty
- PesterDescribeContextIt
- PesterDescribeBlock
- PesterContextIt
- PesterContext
- PesterIt

* Add ArgumentCompleter snippets (#1946)

* Define snippet named 'ArgumentCompleterAttribute with ScriptBlock'

* Define snippet named 'IArgumentCompleter Class'

* Define snippet named 'ArgumentCompleterAttribute ScriptBlock'

* Add #Requires snippets (#1974)

* Add script requirement directive snippets

Adds the following snippets (listed by name, not prefix):
- Requires Assembly
- Requires Assembly Path
- Requires Assembly Version
- Requires Module
- Requires Module RequiredVersion
- Requires Module Version
- Requires PSEdition
- Requires PSSnapin
- Requires PSSnapin Version
- Requires RunAsAdministrator
- Requires ShellId
- Requires Version

* Fix node version detect logic to handle node v10 (#2025)

* #1019: Get format settings from document editor instead of global. (#2035)

* Update PSSA docs Url to point to master branch because master is now the default branch (#2037)

* add machine scope (#2039)

* add machine scope

* use a different setting for test and add user setting test

* remove isExecutable and remove powershell.developer.powerShellExePath

* Add param-block snippet (#2081)
  • Loading branch information
rjmholt authored Jul 26, 2019
1 parent 856d690 commit 34959b9
Show file tree
Hide file tree
Showing 6 changed files with 201 additions and 57 deletions.
11 changes: 8 additions & 3 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,17 @@ function needsVSCode () {

function needsNodeJS () {
try {
$nodeJSVersion = (node -v)

$nodeJSVersion = node -v
} catch {
return $true
}
return ($nodeJSVersion.Substring(1,1) -lt 6)

if ($nodeJSVersion -notmatch 'v(\d+\.\d+\.\d+)') {
return $true
}

$nodeVer = [System.Version]$matches[1]
return ($nodeVer.Major -lt 6)
}

function needsPowerShellGet () {
Expand Down
12 changes: 3 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"publisher": "ms-vscode",
"description": "Develop PowerShell scripts in Visual Studio Code!",
"engines": {
"vscode": "^1.31.0"
"vscode": "^1.34.0"
},
"license": "SEE LICENSE IN LICENSE.txt",
"homepage": "https://github.com/PowerShell/vscode-powershell/blob/master/README.md",
Expand Down Expand Up @@ -545,13 +545,13 @@
"powershell.powerShellExePath": {
"type": "string",
"default": "",
"isExecutable": true,
"scope": "machine",
"description": "Specifies the full path to a PowerShell executable. Changes the installation of PowerShell used for language and debugging services."
},
"powershell.powerShellAdditionalExePaths": {
"type": "array",
"description": "Specifies an array of versionName / exePath pairs where exePath points to a non-standard install location for PowerShell and versionName can be used to reference this path with the powershell.powerShellDefaultVersion setting.",
"isExecutable": true,
"scope": "machine",
"uniqueItems": true,
"items": {
"type": "object",
Expand Down Expand Up @@ -751,12 +751,6 @@
"type": "boolean",
"default": false,
"description": "Indicates that the powerShellExePath points to a developer build of Windows PowerShell and configures it for development."
},
"powershell.developer.powerShellExePath": {
"type": "string",
"default": "",
"isExecutable": true,
"description": "Deprecated. Please use the 'powershell.powerShellExePath' setting instead"
}
}
},
Expand Down
Loading

0 comments on commit 34959b9

Please sign in to comment.