diff --git a/.github/workflows/locker.yml b/.github/workflows/locker.yml index 5860349a43758..cc6e89aa6da11 100644 --- a/.github/workflows/locker.yml +++ b/.github/workflows/locker.yml @@ -21,8 +21,8 @@ jobs: uses: ./actions/locker with: daysSinceClose: 45 - appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}} daysSinceUpdate: 3 ignoredLabel: "*out-of-scope,accessibility" ignoreLabelUntil: "author-verification-requested" + ignoredMilestones: "Backlog Candidates" labelUntil: "verified" diff --git a/package.json b/package.json index f259cb2882382..8d306cca71208 100644 --- a/package.json +++ b/package.json @@ -82,13 +82,13 @@ "@vscode/windows-mutex": "^0.5.0", "@vscode/windows-process-tree": "^0.6.0", "@vscode/windows-registry": "^1.1.0", - "@xterm/addon-image": "0.9.0-beta.17", - "@xterm/addon-search": "0.16.0-beta.17", - "@xterm/addon-serialize": "0.14.0-beta.17", - "@xterm/addon-unicode11": "0.9.0-beta.17", - "@xterm/addon-webgl": "0.19.0-beta.17", - "@xterm/headless": "5.6.0-beta.17", - "@xterm/xterm": "5.6.0-beta.17", + "@xterm/addon-image": "0.9.0-beta.18", + "@xterm/addon-search": "0.16.0-beta.18", + "@xterm/addon-serialize": "0.14.0-beta.18", + "@xterm/addon-unicode11": "0.9.0-beta.18", + "@xterm/addon-webgl": "0.19.0-beta.18", + "@xterm/headless": "5.6.0-beta.18", + "@xterm/xterm": "5.6.0-beta.18", "graceful-fs": "4.2.11", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.2", diff --git a/remote/package.json b/remote/package.json index 5733a75fe7393..cded7ebea1a39 100644 --- a/remote/package.json +++ b/remote/package.json @@ -14,13 +14,13 @@ "@vscode/vscode-languagedetection": "1.0.21", "@vscode/windows-process-tree": "^0.6.0", "@vscode/windows-registry": "^1.1.0", - "@xterm/addon-image": "0.9.0-beta.17", - "@xterm/addon-search": "0.16.0-beta.17", - "@xterm/addon-serialize": "0.14.0-beta.17", - "@xterm/addon-unicode11": "0.9.0-beta.17", - "@xterm/addon-webgl": "0.19.0-beta.17", - "@xterm/headless": "5.6.0-beta.17", - "@xterm/xterm": "5.6.0-beta.17", + "@xterm/addon-image": "0.9.0-beta.18", + "@xterm/addon-search": "0.16.0-beta.18", + "@xterm/addon-serialize": "0.14.0-beta.18", + "@xterm/addon-unicode11": "0.9.0-beta.18", + "@xterm/addon-webgl": "0.19.0-beta.18", + "@xterm/headless": "5.6.0-beta.18", + "@xterm/xterm": "5.6.0-beta.18", "cookie": "^0.4.0", "graceful-fs": "4.2.11", "http-proxy-agent": "^7.0.0", diff --git a/remote/web/package.json b/remote/web/package.json index 598e1607beb25..d920465ca2eff 100644 --- a/remote/web/package.json +++ b/remote/web/package.json @@ -7,12 +7,12 @@ "@microsoft/1ds-post-js": "^3.2.13", "@vscode/iconv-lite-umd": "0.7.0", "@vscode/vscode-languagedetection": "1.0.21", - "@xterm/addon-image": "0.9.0-beta.17", - "@xterm/addon-search": "0.16.0-beta.17", - "@xterm/addon-serialize": "0.14.0-beta.17", - "@xterm/addon-unicode11": "0.9.0-beta.17", - "@xterm/addon-webgl": "0.19.0-beta.17", - "@xterm/xterm": "5.6.0-beta.17", + "@xterm/addon-image": "0.9.0-beta.18", + "@xterm/addon-search": "0.16.0-beta.18", + "@xterm/addon-serialize": "0.14.0-beta.18", + "@xterm/addon-unicode11": "0.9.0-beta.18", + "@xterm/addon-webgl": "0.19.0-beta.18", + "@xterm/xterm": "5.6.0-beta.18", "jschardet": "3.1.2", "tas-client-umd": "0.2.0", "vscode-oniguruma": "1.7.0", diff --git a/remote/web/yarn.lock b/remote/web/yarn.lock index b207dffd0e9bd..e77a58360ab57 100644 --- a/remote/web/yarn.lock +++ b/remote/web/yarn.lock @@ -48,35 +48,35 @@ resolved "https://registry.yarnpkg.com/@vscode/vscode-languagedetection/-/vscode-languagedetection-1.0.21.tgz#89b48f293f6aa3341bb888c1118d16ff13b032d3" integrity sha512-zSUH9HYCw5qsCtd7b31yqkpaCU6jhtkKLkvOOA8yTrIRfBSOFb8PPhgmMicD7B/m+t4PwOJXzU1XDtrM9Fd3/g== -"@xterm/addon-image@0.9.0-beta.17": - version "0.9.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/addon-image/-/addon-image-0.9.0-beta.17.tgz#343d0665a6060d4f893b4f2d32de6ccbbd00bb63" - integrity sha512-g0r2hpBcLABY5as4llsMP36RHtkWooEn7tf+7U0/hTndJoCAvs4uGDqZNQigFgeAM3lJ4PnRYh4lfnEh9bGt8A== - -"@xterm/addon-search@0.16.0-beta.17": - version "0.16.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/addon-search/-/addon-search-0.16.0-beta.17.tgz#7cb01c7f498405909d37040884ee22d1889a36d2" - integrity sha512-wBfxmWOeqG6HHHE5mVamDJ75zBdHC35ERNy5/aTpQsQsyxrnV0Ks76c8ZVTaTu9wyBCAyx7UmZT42Ot80khY/g== - -"@xterm/addon-serialize@0.14.0-beta.17": - version "0.14.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.17.tgz#1cb8e35c0d118060a807adb340624fa7f80dd9c5" - integrity sha512-/c3W39kdRgGGYDoYjXb5HrUC421qwPn6NryAT4WJuJWnyMtFbe2DPwKsTfHuCBPiPyovS3a9j950Md3O3YXDZA== - -"@xterm/addon-unicode11@0.9.0-beta.17": - version "0.9.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.17.tgz#b5558148029a796c6a6d78e2a8b7255f92a51530" - integrity sha512-z7v8uojFVrO1aLSWtnz5MzSrfWRT8phde7kh9ufqHLBv7YYtMHxlPVjSuW8PZ2h4eY1LOZf6icUAzrmyJmJ7Kg== - -"@xterm/addon-webgl@0.19.0-beta.17": - version "0.19.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.17.tgz#68ad9e68dd1cf581b391971de33f5c04966b0d8e" - integrity sha512-X8ObRgoZl7UZTgdndM+mpSO3hLzAhWKoXXrGvUQg/7XabRKAPrQ2XvdyZm04nYwibE6Tpit2h5kkxjlVqupIig== - -"@xterm/xterm@5.6.0-beta.17": - version "5.6.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/xterm/-/xterm-5.6.0-beta.17.tgz#67ce2e2ff45bd6cc9f26d455d5522c6c4a122ed9" - integrity sha512-+wAv8PhaGQSN9yXWIa8EFtT33pbrA4lZakMB1P05fr+DQ7zoH66QOAUoDY95uOf/4+S6Ihz8wzP2+FH8zETQEA== +"@xterm/addon-image@0.9.0-beta.18": + version "0.9.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/addon-image/-/addon-image-0.9.0-beta.18.tgz#c33c0612349f2446399f9da8db4d71252b0c1c73" + integrity sha512-X1m2lwxfxma1oZaH1w5UalE1VFqTuof2pw23UqP2ol0nGIcpd1KN+0LKrd0g+GvyFbiAgNi0ANuDfupNfjVLQQ== + +"@xterm/addon-search@0.16.0-beta.18": + version "0.16.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/addon-search/-/addon-search-0.16.0-beta.18.tgz#7271cb43a56892de0ce35e650bcaec742b220fcb" + integrity sha512-iYqzlg9ujecT8opZjmjrSrFHcDt9bq6SruKlxXzWMQapMA9cdQGOJZe74tRjwQxkG3wySDHm3bPHNPB5iPKLfQ== + +"@xterm/addon-serialize@0.14.0-beta.18": + version "0.14.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.18.tgz#22a59ce3135326073cfc146123f9113e87de331d" + integrity sha512-ebNfRggeIx9hOs0kM0XaquMAvKfLwjOGRRhXCK3OAJSqkG6jNPIZ+7foHIUVxcFYb8EKfvS67ZoDStO4mZCiEg== + +"@xterm/addon-unicode11@0.9.0-beta.18": + version "0.9.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.18.tgz#993e872c7f1a58fd35c4c64aef6f34259d099e8e" + integrity sha512-kfF9i0MS/T6wGwv7Y6+nVGd/cf4GT5OdPDldiyYpINCusIkFfTC5UMojNucvbL0nN0rvRoCBhTjh8LkafQV5hw== + +"@xterm/addon-webgl@0.19.0-beta.18": + version "0.19.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.18.tgz#62f961e1255cde12444559e5ea105409598aa6d8" + integrity sha512-3vFr51TrbjXtR9RBbY4o3amGKsoni5sdgKg4NKSNZew/K3TyTFwCkj7z1HjyEsW/j9ee9KXH435pTMSmH/L40g== + +"@xterm/xterm@5.6.0-beta.18": + version "5.6.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/xterm/-/xterm-5.6.0-beta.18.tgz#c346d5773b1e253b2cef986b5c7f9bfe372e5c54" + integrity sha512-PKpqGVlJ5e65RFxG9CgCR1Gdpz1eSttdRZZd5eEFJIyz3VQv1DUlZgfwlFhMMGRi42zyw40HuArkrw+fRRDU7Q== jschardet@3.1.2: version "3.1.2" diff --git a/remote/yarn.lock b/remote/yarn.lock index 41ffebe6c4a8b..dcf8b277eca57 100644 --- a/remote/yarn.lock +++ b/remote/yarn.lock @@ -122,40 +122,40 @@ resolved "https://registry.yarnpkg.com/@vscode/windows-registry/-/windows-registry-1.1.0.tgz#03dace7c29c46f658588b9885b9580e453ad21f9" integrity sha512-5AZzuWJpGscyiMOed0IuyEwt6iKmV5Us7zuwCDCFYMIq7tsvooO9BUiciywsvuthGz6UG4LSpeDeCxvgMVhnIw== -"@xterm/addon-image@0.9.0-beta.17": - version "0.9.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/addon-image/-/addon-image-0.9.0-beta.17.tgz#343d0665a6060d4f893b4f2d32de6ccbbd00bb63" - integrity sha512-g0r2hpBcLABY5as4llsMP36RHtkWooEn7tf+7U0/hTndJoCAvs4uGDqZNQigFgeAM3lJ4PnRYh4lfnEh9bGt8A== - -"@xterm/addon-search@0.16.0-beta.17": - version "0.16.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/addon-search/-/addon-search-0.16.0-beta.17.tgz#7cb01c7f498405909d37040884ee22d1889a36d2" - integrity sha512-wBfxmWOeqG6HHHE5mVamDJ75zBdHC35ERNy5/aTpQsQsyxrnV0Ks76c8ZVTaTu9wyBCAyx7UmZT42Ot80khY/g== - -"@xterm/addon-serialize@0.14.0-beta.17": - version "0.14.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.17.tgz#1cb8e35c0d118060a807adb340624fa7f80dd9c5" - integrity sha512-/c3W39kdRgGGYDoYjXb5HrUC421qwPn6NryAT4WJuJWnyMtFbe2DPwKsTfHuCBPiPyovS3a9j950Md3O3YXDZA== - -"@xterm/addon-unicode11@0.9.0-beta.17": - version "0.9.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.17.tgz#b5558148029a796c6a6d78e2a8b7255f92a51530" - integrity sha512-z7v8uojFVrO1aLSWtnz5MzSrfWRT8phde7kh9ufqHLBv7YYtMHxlPVjSuW8PZ2h4eY1LOZf6icUAzrmyJmJ7Kg== - -"@xterm/addon-webgl@0.19.0-beta.17": - version "0.19.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.17.tgz#68ad9e68dd1cf581b391971de33f5c04966b0d8e" - integrity sha512-X8ObRgoZl7UZTgdndM+mpSO3hLzAhWKoXXrGvUQg/7XabRKAPrQ2XvdyZm04nYwibE6Tpit2h5kkxjlVqupIig== - -"@xterm/headless@5.6.0-beta.17": - version "5.6.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/headless/-/headless-5.6.0-beta.17.tgz#bff1d67c9c061c57adff22571e733d54e3aba2b7" - integrity sha512-ehS7y/XRqX1ppx4RPiYc0vu0SdIQ91aA4lSN/2XNOf3IGdP0A38Q7a0T6mzqxRGZKiiyA0kTR1szr78wnY+wmA== - -"@xterm/xterm@5.6.0-beta.17": - version "5.6.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/xterm/-/xterm-5.6.0-beta.17.tgz#67ce2e2ff45bd6cc9f26d455d5522c6c4a122ed9" - integrity sha512-+wAv8PhaGQSN9yXWIa8EFtT33pbrA4lZakMB1P05fr+DQ7zoH66QOAUoDY95uOf/4+S6Ihz8wzP2+FH8zETQEA== +"@xterm/addon-image@0.9.0-beta.18": + version "0.9.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/addon-image/-/addon-image-0.9.0-beta.18.tgz#c33c0612349f2446399f9da8db4d71252b0c1c73" + integrity sha512-X1m2lwxfxma1oZaH1w5UalE1VFqTuof2pw23UqP2ol0nGIcpd1KN+0LKrd0g+GvyFbiAgNi0ANuDfupNfjVLQQ== + +"@xterm/addon-search@0.16.0-beta.18": + version "0.16.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/addon-search/-/addon-search-0.16.0-beta.18.tgz#7271cb43a56892de0ce35e650bcaec742b220fcb" + integrity sha512-iYqzlg9ujecT8opZjmjrSrFHcDt9bq6SruKlxXzWMQapMA9cdQGOJZe74tRjwQxkG3wySDHm3bPHNPB5iPKLfQ== + +"@xterm/addon-serialize@0.14.0-beta.18": + version "0.14.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.18.tgz#22a59ce3135326073cfc146123f9113e87de331d" + integrity sha512-ebNfRggeIx9hOs0kM0XaquMAvKfLwjOGRRhXCK3OAJSqkG6jNPIZ+7foHIUVxcFYb8EKfvS67ZoDStO4mZCiEg== + +"@xterm/addon-unicode11@0.9.0-beta.18": + version "0.9.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.18.tgz#993e872c7f1a58fd35c4c64aef6f34259d099e8e" + integrity sha512-kfF9i0MS/T6wGwv7Y6+nVGd/cf4GT5OdPDldiyYpINCusIkFfTC5UMojNucvbL0nN0rvRoCBhTjh8LkafQV5hw== + +"@xterm/addon-webgl@0.19.0-beta.18": + version "0.19.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.18.tgz#62f961e1255cde12444559e5ea105409598aa6d8" + integrity sha512-3vFr51TrbjXtR9RBbY4o3amGKsoni5sdgKg4NKSNZew/K3TyTFwCkj7z1HjyEsW/j9ee9KXH435pTMSmH/L40g== + +"@xterm/headless@5.6.0-beta.18": + version "5.6.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/headless/-/headless-5.6.0-beta.18.tgz#27a774455bf68565257916a3355cc61151eb9d10" + integrity sha512-3EUxNyjki4YHRlI4p/uMT6Hok3Ln4fZVi1HbFDopk3CZ0W+TXUQW4F+4fy4nkcFWYnBR9egKBcRmP2Vxk13RKQ== + +"@xterm/xterm@5.6.0-beta.18": + version "5.6.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/xterm/-/xterm-5.6.0-beta.18.tgz#c346d5773b1e253b2cef986b5c7f9bfe372e5c54" + integrity sha512-PKpqGVlJ5e65RFxG9CgCR1Gdpz1eSttdRZZd5eEFJIyz3VQv1DUlZgfwlFhMMGRi42zyw40HuArkrw+fRRDU7Q== agent-base@^7.0.1, agent-base@^7.0.2, agent-base@^7.1.0: version "7.1.0" diff --git a/src/vs/workbench/contrib/interactive/browser/interactive.contribution.ts b/src/vs/workbench/contrib/interactive/browser/interactive.contribution.ts index cc21b0371a639..24e4478a2782f 100644 --- a/src/vs/workbench/contrib/interactive/browser/interactive.contribution.ts +++ b/src/vs/workbench/contrib/interactive/browser/interactive.contribution.ts @@ -816,7 +816,7 @@ Registry.as(ConfigurationExtensions.Configuration).regis }, ['interactiveWindow.executeWithShiftEnter']: { type: 'boolean', - default: true, + default: false, markdownDescription: localize('interactiveWindow.executeWithShiftEnter', "Execute the interactive window (REPL) input box with shift+enter, so that enter can be used to create a newline.") } } diff --git a/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.ts b/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.ts index 6a0fd2912769e..d7a74993bed63 100644 --- a/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.ts +++ b/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.ts @@ -697,6 +697,14 @@ export class NotebookService extends Disposable implements INotebookService { return result; } + tryGetDataProviderSync(viewType: string): SimpleNotebookProviderInfo | undefined { + const selected = this.notebookProviderInfoStore.get(viewType); + if (!selected) { + return undefined; + } + return this._notebookProviders.get(selected.id); + } + private _persistMementos(): void { this._memento.saveMemento(); diff --git a/src/vs/workbench/contrib/notebook/common/notebookEditorModel.ts b/src/vs/workbench/contrib/notebook/common/notebookEditorModel.ts index 3c26eff229a02..a6a06d6318600 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookEditorModel.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookEditorModel.ts @@ -15,6 +15,7 @@ import { assertType } from 'vs/base/common/types'; import { URI } from 'vs/base/common/uri'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IWriteFileOptions, IFileStatWithMetadata } from 'vs/platform/files/common/files'; +import { ILogService } from 'vs/platform/log/common/log'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IRevertOptions, ISaveOptions, IUntypedEditorInput } from 'vs/workbench/common/editor'; import { EditorModel } from 'vs/workbench/common/editor/editorModel'; @@ -197,7 +198,8 @@ export class NotebookFileWorkingCopyModel extends Disposable implements IStoredF private readonly _notebookModel: NotebookTextModel, private readonly _notebookService: INotebookService, private readonly _configurationService: IConfigurationService, - private readonly _telemetryService: ITelemetryService + private readonly _telemetryService: ITelemetryService, + private readonly _logService: ILogService ) { super(); @@ -237,13 +239,22 @@ export class NotebookFileWorkingCopyModel extends Disposable implements IStoredF } private async setSaveDelegate() { - const serializer = await this.getNotebookSerializer(); - this.save = async (options: IWriteFileOptions, token: CancellationToken) => { - if (token.isCancellationRequested) { - throw new CancellationError(); - } + // make sure we wait for a serializer to resolve before we try to handle saves in the EH + await this.getNotebookSerializer(); + this.save = async (options: IWriteFileOptions, token: CancellationToken) => { try { + let serializer = this._notebookService.tryGetDataProviderSync(this.notebookModel.viewType)?.serializer; + + if (!serializer) { + this._logService.warn('No serializer found for notebook model, checking if provider still needs to be resolved'); + serializer = await this.getNotebookSerializer(); + } + + if (token.isCancellationRequested) { + throw new CancellationError(); + } + const stat = await serializer.save(this._notebookModel.uri, this._notebookModel.versionId, options, token); return stat; } catch (error) { @@ -358,7 +369,8 @@ export class NotebookFileWorkingCopyModelFactory implements IStoredFileWorkingCo private readonly _viewType: string, @INotebookService private readonly _notebookService: INotebookService, @IConfigurationService private readonly _configurationService: IConfigurationService, - @ITelemetryService private readonly _telemetryService: ITelemetryService + @ITelemetryService private readonly _telemetryService: ITelemetryService, + @ILogService private readonly _logService: ILogService ) { } async createModel(resource: URI, stream: VSBufferReadableStream, token: CancellationToken): Promise { @@ -376,7 +388,7 @@ export class NotebookFileWorkingCopyModelFactory implements IStoredFileWorkingCo } const notebookModel = this._notebookService.createNotebookTextModel(info.viewType, resource, data, info.serializer.options); - return new NotebookFileWorkingCopyModel(notebookModel, this._notebookService, this._configurationService, this._telemetryService); + return new NotebookFileWorkingCopyModel(notebookModel, this._notebookService, this._configurationService, this._telemetryService, this._logService); } } diff --git a/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.ts b/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.ts index 9d0a90e457608..318a2a967315c 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.ts @@ -70,7 +70,7 @@ class NotebookModelReferenceCollection extends ReferenceCollection>this._instantiationService.createInstance( FileWorkingCopyManager, workingCopyTypeId, diff --git a/src/vs/workbench/contrib/notebook/common/notebookService.ts b/src/vs/workbench/contrib/notebook/common/notebookService.ts index 7709674b93787..50e49939035e6 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookService.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookService.ts @@ -65,6 +65,7 @@ export interface INotebookService { registerNotebookSerializer(viewType: string, extensionData: NotebookExtensionDescription, serializer: INotebookSerializer): IDisposable; withNotebookDataProvider(viewType: string): Promise; + tryGetDataProviderSync(viewType: string): SimpleNotebookProviderInfo | undefined; getOutputMimeTypeInfo(textModel: NotebookTextModel, kernelProvides: readonly string[] | undefined, output: IOutputDto): readonly IOrderedMimeType[]; diff --git a/src/vs/workbench/contrib/notebook/test/browser/notebookEditorModel.test.ts b/src/vs/workbench/contrib/notebook/test/browser/notebookEditorModel.test.ts index 071017d82d669..9e91b28392632 100644 --- a/src/vs/workbench/contrib/notebook/test/browser/notebookEditorModel.test.ts +++ b/src/vs/workbench/contrib/notebook/test/browser/notebookEditorModel.test.ts @@ -15,6 +15,7 @@ import { TestConfigurationService } from 'vs/platform/configuration/test/common/ import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; import { IFileStatWithMetadata } from 'vs/platform/files/common/files'; import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; +import { ILogService } from 'vs/platform/log/common/log'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { NotebookTextModel } from 'vs/workbench/contrib/notebook/common/model/notebookTextModel'; import { CellKind, IOutputDto, NotebookData, NotebookSetting, TransientOptions } from 'vs/workbench/contrib/notebook/common/notebookCommon'; @@ -28,7 +29,10 @@ suite('NotebookFileWorkingCopyModel', function () { let disposables: DisposableStore; let instantiationService: TestInstantiationService; const configurationService = new TestConfigurationService(); - const telemetryService = new class extends mock() { }; + const telemetryService = new class extends mock() { + override publicLogError2() { } + }; + const logservice = new class extends mock() { }; teardown(() => disposables.dispose()); @@ -65,7 +69,8 @@ suite('NotebookFileWorkingCopyModel', function () { } ), configurationService, - telemetryService + telemetryService, + logservice )); await model.snapshot(SnapshotContext.Save, CancellationToken.None); @@ -88,7 +93,8 @@ suite('NotebookFileWorkingCopyModel', function () { } ), configurationService, - telemetryService + telemetryService, + logservice )); await model.snapshot(SnapshotContext.Save, CancellationToken.None); assert.strictEqual(callCount, 1); @@ -123,7 +129,8 @@ suite('NotebookFileWorkingCopyModel', function () { } ), configurationService, - telemetryService + telemetryService, + logservice )); await model.snapshot(SnapshotContext.Save, CancellationToken.None); @@ -147,6 +154,7 @@ suite('NotebookFileWorkingCopyModel', function () { ), configurationService, telemetryService, + logservice )); await model.snapshot(SnapshotContext.Save, CancellationToken.None); @@ -181,7 +189,8 @@ suite('NotebookFileWorkingCopyModel', function () { } ), configurationService, - telemetryService + telemetryService, + logservice )); await model.snapshot(SnapshotContext.Save, CancellationToken.None); @@ -204,7 +213,8 @@ suite('NotebookFileWorkingCopyModel', function () { } ), configurationService, - telemetryService + telemetryService, + logservice )); await model.snapshot(SnapshotContext.Save, CancellationToken.None); assert.strictEqual(callCount, 1); @@ -239,7 +249,8 @@ suite('NotebookFileWorkingCopyModel', function () { } ), configurationService, - telemetryService + telemetryService, + logservice )); try { @@ -282,7 +293,8 @@ suite('NotebookFileWorkingCopyModel', function () { notebook, notebookService, configurationService, - telemetryService + telemetryService, + logservice )); // the save method should not be set if the serializer is not yet resolved @@ -299,11 +311,25 @@ suite('NotebookFileWorkingCopyModel', function () { function mockNotebookService(notebook: NotebookTextModel, notebookSerializer: Promise | INotebookSerializer) { return new class extends mock() { + private serializer: INotebookSerializer | undefined = undefined; override async withNotebookDataProvider(viewType: string): Promise { - const serializer = await notebookSerializer; + this.serializer = await notebookSerializer; + return new SimpleNotebookProviderInfo( + notebook.viewType, + this.serializer, + { + id: new ExtensionIdentifier('test'), + location: undefined + } + ); + } + override tryGetDataProviderSync(viewType: string): SimpleNotebookProviderInfo | undefined { + if (!this.serializer) { + return undefined; + } return new SimpleNotebookProviderInfo( notebook.viewType, - serializer, + this.serializer, { id: new ExtensionIdentifier('test'), location: undefined diff --git a/yarn.lock b/yarn.lock index fc0d5f8bf8751..ee60608ade2bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1982,40 +1982,40 @@ resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== -"@xterm/addon-image@0.9.0-beta.17": - version "0.9.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/addon-image/-/addon-image-0.9.0-beta.17.tgz#343d0665a6060d4f893b4f2d32de6ccbbd00bb63" - integrity sha512-g0r2hpBcLABY5as4llsMP36RHtkWooEn7tf+7U0/hTndJoCAvs4uGDqZNQigFgeAM3lJ4PnRYh4lfnEh9bGt8A== - -"@xterm/addon-search@0.16.0-beta.17": - version "0.16.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/addon-search/-/addon-search-0.16.0-beta.17.tgz#7cb01c7f498405909d37040884ee22d1889a36d2" - integrity sha512-wBfxmWOeqG6HHHE5mVamDJ75zBdHC35ERNy5/aTpQsQsyxrnV0Ks76c8ZVTaTu9wyBCAyx7UmZT42Ot80khY/g== - -"@xterm/addon-serialize@0.14.0-beta.17": - version "0.14.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.17.tgz#1cb8e35c0d118060a807adb340624fa7f80dd9c5" - integrity sha512-/c3W39kdRgGGYDoYjXb5HrUC421qwPn6NryAT4WJuJWnyMtFbe2DPwKsTfHuCBPiPyovS3a9j950Md3O3YXDZA== - -"@xterm/addon-unicode11@0.9.0-beta.17": - version "0.9.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.17.tgz#b5558148029a796c6a6d78e2a8b7255f92a51530" - integrity sha512-z7v8uojFVrO1aLSWtnz5MzSrfWRT8phde7kh9ufqHLBv7YYtMHxlPVjSuW8PZ2h4eY1LOZf6icUAzrmyJmJ7Kg== - -"@xterm/addon-webgl@0.19.0-beta.17": - version "0.19.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.17.tgz#68ad9e68dd1cf581b391971de33f5c04966b0d8e" - integrity sha512-X8ObRgoZl7UZTgdndM+mpSO3hLzAhWKoXXrGvUQg/7XabRKAPrQ2XvdyZm04nYwibE6Tpit2h5kkxjlVqupIig== - -"@xterm/headless@5.6.0-beta.17": - version "5.6.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/headless/-/headless-5.6.0-beta.17.tgz#bff1d67c9c061c57adff22571e733d54e3aba2b7" - integrity sha512-ehS7y/XRqX1ppx4RPiYc0vu0SdIQ91aA4lSN/2XNOf3IGdP0A38Q7a0T6mzqxRGZKiiyA0kTR1szr78wnY+wmA== - -"@xterm/xterm@5.6.0-beta.17": - version "5.6.0-beta.17" - resolved "https://registry.yarnpkg.com/@xterm/xterm/-/xterm-5.6.0-beta.17.tgz#67ce2e2ff45bd6cc9f26d455d5522c6c4a122ed9" - integrity sha512-+wAv8PhaGQSN9yXWIa8EFtT33pbrA4lZakMB1P05fr+DQ7zoH66QOAUoDY95uOf/4+S6Ihz8wzP2+FH8zETQEA== +"@xterm/addon-image@0.9.0-beta.18": + version "0.9.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/addon-image/-/addon-image-0.9.0-beta.18.tgz#c33c0612349f2446399f9da8db4d71252b0c1c73" + integrity sha512-X1m2lwxfxma1oZaH1w5UalE1VFqTuof2pw23UqP2ol0nGIcpd1KN+0LKrd0g+GvyFbiAgNi0ANuDfupNfjVLQQ== + +"@xterm/addon-search@0.16.0-beta.18": + version "0.16.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/addon-search/-/addon-search-0.16.0-beta.18.tgz#7271cb43a56892de0ce35e650bcaec742b220fcb" + integrity sha512-iYqzlg9ujecT8opZjmjrSrFHcDt9bq6SruKlxXzWMQapMA9cdQGOJZe74tRjwQxkG3wySDHm3bPHNPB5iPKLfQ== + +"@xterm/addon-serialize@0.14.0-beta.18": + version "0.14.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.18.tgz#22a59ce3135326073cfc146123f9113e87de331d" + integrity sha512-ebNfRggeIx9hOs0kM0XaquMAvKfLwjOGRRhXCK3OAJSqkG6jNPIZ+7foHIUVxcFYb8EKfvS67ZoDStO4mZCiEg== + +"@xterm/addon-unicode11@0.9.0-beta.18": + version "0.9.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.18.tgz#993e872c7f1a58fd35c4c64aef6f34259d099e8e" + integrity sha512-kfF9i0MS/T6wGwv7Y6+nVGd/cf4GT5OdPDldiyYpINCusIkFfTC5UMojNucvbL0nN0rvRoCBhTjh8LkafQV5hw== + +"@xterm/addon-webgl@0.19.0-beta.18": + version "0.19.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.18.tgz#62f961e1255cde12444559e5ea105409598aa6d8" + integrity sha512-3vFr51TrbjXtR9RBbY4o3amGKsoni5sdgKg4NKSNZew/K3TyTFwCkj7z1HjyEsW/j9ee9KXH435pTMSmH/L40g== + +"@xterm/headless@5.6.0-beta.18": + version "5.6.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/headless/-/headless-5.6.0-beta.18.tgz#27a774455bf68565257916a3355cc61151eb9d10" + integrity sha512-3EUxNyjki4YHRlI4p/uMT6Hok3Ln4fZVi1HbFDopk3CZ0W+TXUQW4F+4fy4nkcFWYnBR9egKBcRmP2Vxk13RKQ== + +"@xterm/xterm@5.6.0-beta.18": + version "5.6.0-beta.18" + resolved "https://registry.yarnpkg.com/@xterm/xterm/-/xterm-5.6.0-beta.18.tgz#c346d5773b1e253b2cef986b5c7f9bfe372e5c54" + integrity sha512-PKpqGVlJ5e65RFxG9CgCR1Gdpz1eSttdRZZd5eEFJIyz3VQv1DUlZgfwlFhMMGRi42zyw40HuArkrw+fRRDU7Q== "@xtuc/ieee754@^1.2.0": version "1.2.0"