Skip to content

Commit

Permalink
update api and engine version
Browse files Browse the repository at this point in the history
  • Loading branch information
colombod authored and jonsequitur committed Apr 5, 2023
1 parent 9ca2fc3 commit 51c33c6
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/polyglot-notebooks-vscode-insiders/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"//version": "The version '42.42.42' is auto-set during CI package creation.",
"version": "42.42.42",
"engines": {
"vscode": "1.77.0-insider"
"vscode": "1.78.0-insider"
},
"bugs": {
"url": "https://github.com/dotnet/interactive/issues"
Expand Down Expand Up @@ -218,7 +218,7 @@
},
"dotnet-interactive.requiredInteractiveToolVersion": {
"type": "string",
"default": "1.0.416504",
"default": "1.0.420401",
"description": "The required version of the .NET Interactive tool."
}
}
Expand Down
104 changes: 97 additions & 7 deletions src/polyglot-notebooks-vscode-insiders/src/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6499,7 +6499,7 @@ declare module 'vscode' {
/**
* Outputs the given trace message to the channel. Use this method to log verbose information.
*
* The message is only loggeed if the channel is configured to display {@link LogLevel.Trace trace} log level.
* The message is only logged if the channel is configured to display {@link LogLevel.Trace trace} log level.
*
* @param message trace message to log
*/
Expand All @@ -6508,7 +6508,7 @@ declare module 'vscode' {
/**
* Outputs the given debug message to the channel.
*
* The message is only loggeed if the channel is configured to display {@link LogLevel.Debug debug} log level or lower.
* The message is only logged if the channel is configured to display {@link LogLevel.Debug debug} log level or lower.
*
* @param message debug message to log
*/
Expand All @@ -6517,7 +6517,7 @@ declare module 'vscode' {
/**
* Outputs the given information message to the channel.
*
* The message is only loggeed if the channel is configured to display {@link LogLevel.Info info} log level or lower.
* The message is only logged if the channel is configured to display {@link LogLevel.Info info} log level or lower.
*
* @param message info message to log
*/
Expand All @@ -6526,7 +6526,7 @@ declare module 'vscode' {
/**
* Outputs the given warning message to the channel.
*
* The message is only loggeed if the channel is configured to display {@link LogLevel.Warning warning} log level or lower.
* The message is only logged if the channel is configured to display {@link LogLevel.Warning warning} log level or lower.
*
* @param message warning message to log
*/
Expand All @@ -6535,7 +6535,7 @@ declare module 'vscode' {
/**
* Outputs the given error or error message to the channel.
*
* The message is only loggeed if the channel is configured to display {@link LogLevel.Error error} log level or lower.
* The message is only logged if the channel is configured to display {@link LogLevel.Error error} log level or lower.
*
* @param error Error or error message to log
*/
Expand Down Expand Up @@ -12489,6 +12489,21 @@ declare module 'vscode' {
*/
export const onDidChangeNotebookDocument: Event<NotebookDocumentChangeEvent>;

/**
* An event that is emitted when a {@link NotebookDocument notebook document} will be saved to disk.
*
* *Note 1:* Subscribers can delay saving by registering asynchronous work. For the sake of data integrity the editor
* might save without firing this event. For instance when shutting down with dirty files.
*
* *Note 2:* Subscribers are called sequentially and they can {@link NotebookDocumentWillSaveEvent.waitUntil delay} saving
* by registering asynchronous work. Protection against misbehaving listeners is implemented as such:
* * there is an overall time budget that all listeners share and if that is exhausted no further listener is called
* * listeners that take a long time or produce errors frequently will not be called anymore
*
* The current thresholds are 1.5 seconds as overall time budget and a listener can misbehave 3 times before being ignored.
*/
export const onWillSaveNotebookDocument: Event<NotebookDocumentWillSaveEvent>;

/**
* An event that is emitted when a {@link NotebookDocument notebook} is saved.
*/
Expand Down Expand Up @@ -13558,6 +13573,61 @@ declare module 'vscode' {
readonly cellChanges: readonly NotebookDocumentCellChange[];
}

/**
* An event that is fired when a {@link NotebookDocument notebook document} will be saved.
*
* To make modifications to the document before it is being saved, call the
* {@linkcode NotebookDocumentWillSaveEvent.waitUntil waitUntil}-function with a thenable
* that resolves to a {@link WorkspaceEdit workspace edit}.
*/
export interface NotebookDocumentWillSaveEvent {
/**
* A cancellation token.
*/
readonly token: CancellationToken;

/**
* The {@link NotebookDocument notebook document} that will be saved.
*/
readonly notebook: NotebookDocument;

/**
* The reason why save was triggered.
*/
readonly reason: TextDocumentSaveReason;

/**
* Allows to pause the event loop and to apply {@link WorkspaceEdit workspace edit}.
* Edits of subsequent calls to this function will be applied in order. The
* edits will be *ignored* if concurrent modifications of the notebook document happened.
*
* *Note:* This function can only be called during event dispatch and not
* in an asynchronous manner:
*
* ```ts
* workspace.onWillSaveNotebookDocument(event => {
* // async, will *throw* an error
* setTimeout(() => event.waitUntil(promise));
*
* // sync, OK
* event.waitUntil(promise);
* })
* ```
*
* @param thenable A thenable that resolves to {@link WorkspaceEdit workspace edit}.
*/
waitUntil(thenable: Thenable<WorkspaceEdit>): void;

/**
* Allows to pause the event loop until the provided thenable resolved.
*
* *Note:* This function can only be called during event dispatch.
*
* @param thenable A thenable that delays saving.
*/
waitUntil(thenable: Thenable<any>): void;
}

/**
* The summary of a notebook cell execution.
*/
Expand Down Expand Up @@ -15946,6 +16016,13 @@ declare module 'vscode' {
*/
isDefault: boolean;

/**
* Whether this profile supports continuous running of requests. If so,
* then {@link TestRunRequest.continuous} may be set to `true`. Defaults
* to false.
*/
supportsContinuousRun: boolean;

/**
* Associated tag for the profile. If this is set, only {@link TestItem}
* instances with the same tag will be eligible to execute in this profile.
Expand All @@ -15966,6 +16043,11 @@ declare module 'vscode' {
* associated with the request should be created before the function returns
* or the returned promise is resolved.
*
* If {@link supportsContinuousRun} is set, then {@link TestRunRequest.continuous}
* may be `true`. In this case, the profile should observe changes to
* source code and create new test runs by calling {@link TestController.createTestRun},
* until the cancellation is requested on the `token`.
*
* @param request Request information for the test run.
* @param cancellationToken Token that signals the used asked to abort the
* test run. If cancellation is requested on this token, all {@link TestRun}
Expand Down Expand Up @@ -16020,10 +16102,11 @@ declare module 'vscode' {
* @param runHandler Function called to start a test run.
* @param isDefault Whether this is the default action for its kind.
* @param tag Profile test tag.
* @param supportsContinuousRun Whether the profile supports continuous running.
* @returns An instance of a {@link TestRunProfile}, which is automatically
* associated with this controller.
*/
createRunProfile(label: string, kind: TestRunProfileKind, runHandler: (request: TestRunRequest, token: CancellationToken) => Thenable<void> | void, isDefault?: boolean, tag?: TestTag): TestRunProfile;
createRunProfile(label: string, kind: TestRunProfileKind, runHandler: (request: TestRunRequest, token: CancellationToken) => Thenable<void> | void, isDefault?: boolean, tag?: TestTag, supportsContinuousRun?: boolean): TestRunProfile;

/**
* A function provided by the extension that the editor may call to request
Expand Down Expand Up @@ -16138,12 +16221,19 @@ declare module 'vscode' {
*/
readonly profile: TestRunProfile | undefined;

/**
* Whether the profile should run continuously as source code changes. Only
* relevant for profiles that set {@link TestRunProfile.supportsContinuousRun}.
*/
readonly continuous?: boolean;

/**
* @param include Array of specific tests to run, or undefined to run all tests
* @param exclude An array of tests to exclude from the run.
* @param profile The run profile used for this request.
* @param continuous Whether to run tests continuously as source changes.
*/
constructor(include?: readonly TestItem[], exclude?: readonly TestItem[], profile?: TestRunProfile);
constructor(include?: readonly TestItem[], exclude?: readonly TestItem[], profile?: TestRunProfile, continuous?: boolean);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/polyglot-notebooks-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"//version": "The version '42.42.42' is auto-set during CI package creation.",
"version": "42.42.42",
"engines": {
"vscode": "^1.76.0"
"vscode": "^1.77.0"
},
"bugs": {
"url": "https://github.com/dotnet/interactive/issues"
Expand Down Expand Up @@ -218,7 +218,7 @@
},
"dotnet-interactive.requiredInteractiveToolVersion": {
"type": "string",
"default": "1.0.416502",
"default": "1.0.420401",
"description": "The required version of the .NET Interactive tool."
}
}
Expand Down Expand Up @@ -840,4 +840,4 @@
"vscode-textmate": "6.0.0",
"vscode-uri": "3.0.6"
}
}
}
33 changes: 28 additions & 5 deletions src/polyglot-notebooks-vscode/src/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10481,6 +10481,7 @@ declare module 'vscode' {
* Retrieves the data transfer item for a given mime type.
*
* @param mimeType The mime type to get the data transfer item for, such as `text/plain` or `image/png`.
* Mimes type look ups are case-insensitive.
*
* Special mime types:
* - `text/uri-list` — A string with `toString()`ed Uris separated by `\r\n`. To specify a cursor position in the file,
Expand All @@ -10490,7 +10491,8 @@ declare module 'vscode' {

/**
* Sets a mime type to data transfer item mapping.
* @param mimeType The mime type to set the data for.
*
* @param mimeType The mime type to set the data for. Mimes types stored in lower case, with case-insensitive looks up.
* @param value The data transfer item for the given mime type.
*/
set(mimeType: string, value: DataTransferItem): void;
Expand Down Expand Up @@ -12261,7 +12263,7 @@ declare module 'vscode' {
* If you want to monitor file events across all opened workspace folders:
*
* ```ts
* vscode.workspace.createFileSystemWatcher('**​/*.js'));
* vscode.workspace.createFileSystemWatcher('**​/*.js');
* ```
*
* *Note:* the array of workspace folders can be empty if no workspace is opened (empty window).
Expand Down Expand Up @@ -15944,6 +15946,13 @@ declare module 'vscode' {
*/
isDefault: boolean;

/**
* Whether this profile supports continuous running of requests. If so,
* then {@link TestRunRequest.continuous} may be set to `true`. Defaults
* to false.
*/
supportsContinuousRun: boolean;

/**
* Associated tag for the profile. If this is set, only {@link TestItem}
* instances with the same tag will be eligible to execute in this profile.
Expand All @@ -15964,6 +15973,11 @@ declare module 'vscode' {
* associated with the request should be created before the function returns
* or the returned promise is resolved.
*
* If {@link supportsContinuousRun} is set, then {@link TestRunRequest.continuous}
* may be `true`. In this case, the profile should observe changes to
* source code and create new test runs by calling {@link TestController.createTestRun},
* until the cancellation is requested on the `token`.
*
* @param request Request information for the test run.
* @param cancellationToken Token that signals the used asked to abort the
* test run. If cancellation is requested on this token, all {@link TestRun}
Expand Down Expand Up @@ -16018,10 +16032,11 @@ declare module 'vscode' {
* @param runHandler Function called to start a test run.
* @param isDefault Whether this is the default action for its kind.
* @param tag Profile test tag.
* @param supportsContinuousRun Whether the profile supports continuous running.
* @returns An instance of a {@link TestRunProfile}, which is automatically
* associated with this controller.
*/
createRunProfile(label: string, kind: TestRunProfileKind, runHandler: (request: TestRunRequest, token: CancellationToken) => Thenable<void> | void, isDefault?: boolean, tag?: TestTag): TestRunProfile;
createRunProfile(label: string, kind: TestRunProfileKind, runHandler: (request: TestRunRequest, token: CancellationToken) => Thenable<void> | void, isDefault?: boolean, tag?: TestTag, supportsContinuousRun?: boolean): TestRunProfile;

/**
* A function provided by the extension that the editor may call to request
Expand Down Expand Up @@ -16136,12 +16151,19 @@ declare module 'vscode' {
*/
readonly profile: TestRunProfile | undefined;

/**
* Whether the profile should run continuously as source code changes. Only
* relevant for profiles that set {@link TestRunProfile.supportsContinuousRun}.
*/
readonly continuous?: boolean;

/**
* @param include Array of specific tests to run, or undefined to run all tests
* @param exclude An array of tests to exclude from the run.
* @param profile The run profile used for this request.
* @param continuous Whether to run tests continuously as source changes.
*/
constructor(include?: readonly TestItem[], exclude?: readonly TestItem[], profile?: TestRunProfile);
constructor(include?: readonly TestItem[], exclude?: readonly TestItem[], profile?: TestRunProfile, continuous?: boolean);
}

/**
Expand Down Expand Up @@ -16215,7 +16237,8 @@ declare module 'vscode' {
/**
* Appends raw output from the test runner. On the user's request, the
* output will be displayed in a terminal. ANSI escape sequences,
* such as colors and text styles, are supported.
* such as colors and text styles, are supported. New lines must be given
* as CRLF (`\r\n`) rather than LF (`\n`).
*
* @param output Output text to append.
* @param location Indicate that the output was logged at the given
Expand Down

0 comments on commit 51c33c6

Please sign in to comment.