Skip to content

Commit 34959b9

Browse files
authored
Backport PRs post 2019.5.0 (#2102)
* 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)
1 parent 856d690 commit 34959b9

File tree

6 files changed

+201
-57
lines changed

6 files changed

+201
-57
lines changed

build.ps1

+8-3
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,17 @@ function needsVSCode () {
4545

4646
function needsNodeJS () {
4747
try {
48-
$nodeJSVersion = (node -v)
49-
48+
$nodeJSVersion = node -v
5049
} catch {
5150
return $true
5251
}
53-
return ($nodeJSVersion.Substring(1,1) -lt 6)
52+
53+
if ($nodeJSVersion -notmatch 'v(\d+\.\d+\.\d+)') {
54+
return $true
55+
}
56+
57+
$nodeVer = [System.Version]$matches[1]
58+
return ($nodeVer.Major -lt 6)
5459
}
5560

5661
function needsPowerShellGet () {

package.json

+3-9
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"publisher": "ms-vscode",
77
"description": "Develop PowerShell scripts in Visual Studio Code!",
88
"engines": {
9-
"vscode": "^1.31.0"
9+
"vscode": "^1.34.0"
1010
},
1111
"license": "SEE LICENSE IN LICENSE.txt",
1212
"homepage": "https://github.com/PowerShell/vscode-powershell/blob/master/README.md",
@@ -545,13 +545,13 @@
545545
"powershell.powerShellExePath": {
546546
"type": "string",
547547
"default": "",
548-
"isExecutable": true,
548+
"scope": "machine",
549549
"description": "Specifies the full path to a PowerShell executable. Changes the installation of PowerShell used for language and debugging services."
550550
},
551551
"powershell.powerShellAdditionalExePaths": {
552552
"type": "array",
553553
"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.",
554-
"isExecutable": true,
554+
"scope": "machine",
555555
"uniqueItems": true,
556556
"items": {
557557
"type": "object",
@@ -751,12 +751,6 @@
751751
"type": "boolean",
752752
"default": false,
753753
"description": "Indicates that the powerShellExePath points to a developer build of Windows PowerShell and configures it for development."
754-
},
755-
"powershell.developer.powerShellExePath": {
756-
"type": "string",
757-
"default": "",
758-
"isExecutable": true,
759-
"description": "Deprecated. Please use the 'powershell.powerShellExePath' setting instead"
760754
}
761755
}
762756
},

0 commit comments

Comments
 (0)