Skip to content

Commit 6018767

Browse files
fix automatic notebooks by making glob case-insensitive
* [Ignore] Update Notebook dts * fix CI by making glob case-insensitive Co-authored-by: TylerLeonhardt <TylerLeonhardt@users.noreply.github.com> Co-authored-by: Tyler Leonhardt <tylerl0706@gmail.com>
1 parent 4cae8d5 commit 6018767

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
"displayName": "Powershell Notebook",
121121
"selector": [
122122
{
123-
"filenamePattern": "*.Notebook.ps1"
123+
"filenamePattern": "*.[Nn]otebook.ps1"
124124
}
125125
],
126126
"priority": "default"

vscode.proposed.d.ts

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,27 @@ declare module 'vscode' {
8282

8383
export type CellOutput = CellStreamOutput | CellErrorOutput | CellDisplayOutput;
8484

85+
export class NotebookCellOutputItem {
86+
87+
readonly mime: string;
88+
readonly value: unknown;
89+
readonly metadata?: Record<string, string | number | boolean>;
90+
91+
constructor(mime: string, value: unknown, metadata?: Record<string, string | number | boolean>);
92+
}
93+
94+
//TODO@jrieken add id?
95+
export class NotebookCellOutput {
96+
97+
readonly outputs: NotebookCellOutputItem[];
98+
readonly metadata?: Record<string, string | number | boolean>;
99+
100+
constructor(outputs: NotebookCellOutputItem[], metadata?: Record<string, string | number | boolean>);
101+
102+
//TODO@jrieken HACK to workaround dependency issues...
103+
toJSON(): any;
104+
}
105+
85106
export enum NotebookCellRunState {
86107
Running = 1,
87108
Idle = 2,
@@ -263,14 +284,14 @@ declare module 'vscode' {
263284
export interface WorkspaceEdit {
264285
replaceNotebookMetadata(uri: Uri, value: NotebookDocumentMetadata): void;
265286
replaceNotebookCells(uri: Uri, start: number, end: number, cells: NotebookCellData[], metadata?: WorkspaceEditEntryMetadata): void;
266-
replaceNotebookCellOutput(uri: Uri, index: number, outputs: CellOutput[], metadata?: WorkspaceEditEntryMetadata): void;
287+
replaceNotebookCellOutput(uri: Uri, index: number, outputs: (NotebookCellOutput | CellOutput)[], metadata?: WorkspaceEditEntryMetadata): void;
267288
replaceNotebookCellMetadata(uri: Uri, index: number, cellMetadata: NotebookCellMetadata, metadata?: WorkspaceEditEntryMetadata): void;
268289
}
269290

270291
export interface NotebookEditorEdit {
271292
replaceMetadata(value: NotebookDocumentMetadata): void;
272293
replaceCells(start: number, end: number, cells: NotebookCellData[]): void;
273-
replaceCellOutput(index: number, outputs: CellOutput[]): void;
294+
replaceCellOutput(index: number, outputs: (NotebookCellOutput | CellOutput)[]): void;
274295
replaceCellMetadata(index: number, metadata: NotebookCellMetadata): void;
275296
}
276297

0 commit comments

Comments
 (0)