Skip to content

Commit d0fb7fd

Browse files
committed
use proposed api for autoclosing
1 parent fc216b0 commit d0fb7fd

File tree

6 files changed

+53
-11
lines changed

6 files changed

+53
-11
lines changed

src/polyglot-notebooks-vscode-insiders/package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
"author": "Microsoft Corporation",
88
"license": "MIT",
99
"enabledApiProposals": [
10-
"notebookMessaging"
10+
"notebookMessaging",
11+
"languageConfigurationAutoClosingPairs"
1112
],
1213
"preview": false,
1314
"//version": "%description.version%",
1415
"version": "42.42.42",
1516
"engines": {
16-
"vscode": "^1.78.0"
17+
"vscode": "^1.81.0"
1718
},
1819
"bugs": {
1920
"url": "https://github.com/dotnet/interactive/issues"
@@ -219,7 +220,7 @@
219220
},
220221
"dotnet-interactive.requiredInteractiveToolVersion": {
221222
"type": "string",
222-
"default": "1.0.435502",
223+
"default": "1.0.437401",
223224
"description": "%description.requiredInteractiveToolVersion%"
224225
}
225226
}
@@ -490,9 +491,6 @@
490491
"polyglot-notebook-comment": [
491492
"comment"
492493
],
493-
"polyglot-notebook-string-quoted-docstring": [
494-
"string.quoted.docstring"
495-
],
496494
"polyglot-notebook-constant-language": [
497495
"constant.language"
498496
],
@@ -847,4 +845,4 @@
847845
"vscode-uri": "3.0.6",
848846
"@vscode/l10n": "0.0.10"
849847
}
850-
}
848+
}

src/polyglot-notebooks-vscode-insiders/src/vscode.d.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1733,6 +1733,11 @@ declare module 'vscode' {
17331733
*/
17341734
kind?: QuickPickItemKind;
17351735

1736+
/**
1737+
* The icon path or {@link ThemeIcon} for the QuickPickItem.
1738+
*/
1739+
iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
1740+
17361741
/**
17371742
* A human-readable string which is rendered less prominent in the same line. Supports rendering of
17381743
* {@link ThemeIcon theme icons} via the `$(<name>)`-syntax.
@@ -16299,6 +16304,24 @@ declare module 'vscode' {
1629916304
*/
1630016305
createTestItem(id: string, label: string, uri?: Uri): TestItem;
1630116306

16307+
/**
16308+
* Marks an item's results as being outdated. This is commonly called when
16309+
* code or configuration changes and previous results should no longer
16310+
* be considered relevant. The same logic used to mark results as outdated
16311+
* may be used to drive {@link TestRunRequest.continuous continuous test runs}.
16312+
*
16313+
* If an item is passed to this method, test results for the item and all of
16314+
* its children will be marked as outdated. If no item is passed, then all
16315+
* test owned by the TestController will be marked as outdated.
16316+
*
16317+
* Any test runs started before the moment this method is called, including
16318+
* runs which may still be ongoing, will be marked as outdated and deprioritized
16319+
* in the editor's UI.
16320+
*
16321+
* @param item Item to mark as outdated. If undefined, all the controller's items are marked outdated.
16322+
*/
16323+
invalidateTestResults(items?: TestItem | readonly TestItem[]): void;
16324+
1630216325
/**
1630316326
* Unregisters the test controller, disposing of its associated tests
1630416327
* and unpersisted results.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
declare module 'vscode' {
7+
8+
// https://github.com/microsoft/vscode/issues/173738
9+
10+
export interface LanguageConfiguration {
11+
autoClosingPairs?: {
12+
open: string;
13+
close: string;
14+
notIn?: string[];
15+
}[];
16+
}
17+
}

src/polyglot-notebooks-vscode/do-version-upgrade.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ try {
2222

2323
$stablePackageJsonContents.scripts.package = $stablePackageJsonContents.scripts.package.Replace("--pre-release","").Trim()
2424

25+
# ensure the stable is using the available proposed apis
26+
$stablePackageJsonContents.enabledApiProposals = @("notebookMessaging")
27+
2528
$stablePackageJsonContents | ConvertTo-Json -depth 100 | Out-File "$stableDirectory\package.json"
2629

2730
# copy grammar files

src/polyglot-notebooks-vscode/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219
},
220220
"dotnet-interactive.requiredInteractiveToolVersion": {
221221
"type": "string",
222-
"default": "1.0.435502",
222+
"default": "1.0.437401",
223223
"description": "%description.requiredInteractiveToolVersion%"
224224
}
225225
}
@@ -490,9 +490,6 @@
490490
"polyglot-notebook-comment": [
491491
"comment"
492492
],
493-
"polyglot-notebook-string-quoted-docstring": [
494-
"string.quoted.docstring"
495-
],
496493
"polyglot-notebook-constant-language": [
497494
"constant.language"
498495
],

src/polyglot-notebooks-vscode/update-api.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ try {
1010
function DownloadVsCodeApi([string] $branchName, [string] $destinationDirectory, [bool] $isInsiders = $false) {
1111
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/microsoft/vscode/$branchName/src/vscode-dts/vscode.d.ts" -OutFile "$PSScriptRoot\$destinationDirectory\vscode.d.ts"
1212
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/microsoft/vscode/$branchName/src/vscode-dts/vscode.proposed.notebookMessaging.d.ts" -OutFile "$PSScriptRoot\$destinationDirectory\vscode.proposed.notebookMessaging.d.ts"
13+
if ($isInsiders) {
14+
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/microsoft/vscode/$branchName/src/vscode-dts/vscode.proposed.languageConfigurationAutoClosingPairs.d.ts" -OutFile "$PSScriptRoot\$destinationDirectory\vscode.proposed.languageConfigurationAutoClosingPairs.d.ts"
15+
}
16+
1317
}
1418

1519
# stable

0 commit comments

Comments
 (0)