Change:
The has been finalized with VS Code 1.68 (). If your extension was using the proposal, you should now switch to the finalized version of this API. In the majority of cases, this switch is as simple as: your extension to target VS Code in the new from your list of enabled API proposal. However there are few small bumps to be aware of: has been renamed . Please make sure to switch over to the new property name as part of this migrationWe did not finalize the version of that takes a uri. Instead you can use Here's a list of all current consumers of the old API proposal: [x] ms-vsliveshare.vsliveshare — [X] ms- — [x] Dot net interactive — [x] GitHub.codespaces — [x] ms- — If you own one of these extensions, please migrate to the finalized notebook editor API. Let me know once the new version of your extension is published and I will remove your extension from the list of api consumers
I am actually fine in ESLint. The dependency was because of notebook support in LSP and LSP already converted to the final version for the 8.x release of the LSP libs.
Thank you everyone who's checked off their extension so far! If you have, I plan to remove your extension from the list of API consumers in July. This will only start effecting the insiders builds of VS Code at first, but please let me know if you notice any issues
I'm working on the change for Codespaces and expect it to be in our next extension release (1.10.0) in a few days. I'll reply back once it's on the marketplace.
We just published GitHub Codespaces 1.10.0 with this change, so you should be able to remove our extension from the list of proposed API consumers.

Discussion:
test('Opening a notebook should fire activeNotebook event changed only once', async function () { const openedEditor = onDidOpenNotebookEditor(); const resource = await utils.createRandomFile(undefined, undefined, '.nbdtest'); <del> const editor = await vscode.window.showNotebookDocument(resource); </del> <ins> const document = await vscode.workspace.openNotebookDocument(resource); const editor = await vscode.window.showNotebookDocument(document); </ins> assert.ok(await openedEditor); assert.strictEqual(editor.notebook.uri.toString(), resource.toString()); });

test('Active/Visible Editor', async function () { const firstEditorOpen = onDidOpenNotebookEditor(); const resource = await utils.createRandomFile(undefined, undefined, '.nbdtest'); <del> const firstEditor = await vscode.window.showNotebookDocument(resource); </del> <ins> const document = await vscode.workspace.openNotebookDocument(resource); const firstEditor = await vscode.window.showNotebookDocument(document); </ins> await firstEditorOpen; assert.strictEqual(vscode.window.activeNotebookEditor, firstEditor); assert.strictEqual(vscode.window.visibleNotebookEditors.includes(firstEditor), true); <del> const secondEditor = await vscode.window.showNotebookDocument(resource, { viewColumn: vscode.ViewColumn.Beside }); </del> <ins> const secondEditor = await vscode.window.showNotebookDocument(document, { viewColumn: vscode.ViewColumn.Beside }); </ins> // There is no guarantee that when `showNotebookDocument` resolves, the active notebook editor is already updated correctly. // assert.strictEqual(secondEditor === vscode.window.activeNotebookEditor, true); assert.notStrictEqual(firstEditor, secondEditor);

test('Notebook Editor Event - onDidChangeVisibleNotebookEditors on open/close', async function () { const openedEditor = utils.asPromise(vscode.window.onDidChangeVisibleNotebookEditors); const resource = await utils.createRandomFile(undefined, undefined, '.nbdtest'); <del> await vscode.window.showNotebookDocument(resource); </del> <ins> const document = await vscode.workspace.openNotebookDocument(resource); await vscode.window.showNotebookDocument(document); </ins> assert.ok(await openedEditor); const firstEditorClose = utils.asPromise(vscode.window.onDidChangeVisibleNotebookEditors);

test('Notebook Editor Event - onDidChangeVisibleNotebookEditors on two editor groups', async function () { const resource = await utils.createRandomFile(undefined, undefined, '.nbdtest'); <ins> const document = await vscode.workspace.openNotebookDocument(resource); </ins> let count = 0; testDisposables.push(vscode.window.onDidChangeVisibleNotebookEditors(() => { count = vscode.window.visibleNotebookEditors.length; })); <del> await vscode.window.showNotebookDocument(resource, { viewColumn: vscode.ViewColumn.Active }); </del> <ins> await vscode.window.showNotebookDocument(document, { viewColumn: vscode.ViewColumn.Active }); </ins> assert.strictEqual(count, 1); <del> await vscode.window.showNotebookDocument(resource, { viewColumn: vscode.ViewColumn.Beside }); </del> <ins> await vscode.window.showNotebookDocument(document, { viewColumn: vscode.ViewColumn.Beside }); </ins> assert.strictEqual(count, 2); await utils.closeAllEditors();

onDidChangeNotebookEditorVisibleRanges(listener, thisArgs?, disposables?) { return extHostNotebookEditors.onDidChangeNotebookEditorVisibleRanges(listener, thisArgs, disposables); }, <del> showNotebookDocument(uriOrDocument, options?) { if (URI.isUri(uriOrDocument)) { extHostApiDeprecation.report('window.showNotebookDocument(uri)', extension, `Please use 'workspace.openNotebookDocument' and 'window.showNotebookDocument'`); } return extHostNotebook.showNotebookDocument(uriOrDocument, options); </del> <ins> showNotebookDocument(document, options?) { return extHostNotebook.showNotebookDocument(document, options); </ins> }, registerExternalUriOpener(id: string, opener: vscode.ExternalUriOpener, metadata: vscode.ExternalUriOpenerMetadata) { checkProposedApiEnabled(extension, 'externalUriOpener');

if (!this._editor) { const that = this; this._editor = { <del> get document() { return that.notebookData.apiNotebook; }, </del> get notebook() { return that.notebookData.apiNotebook; },

} else if (v && 'notebookEditor' in v) { const notebookEditorId = this._extHostNotebook.getIdByEditor(v.notebookEditor); if (notebookEditorId === undefined) { <del> throw new Error(`Cannot invoke 'notebook.selectKernel' for unrecognized notebook editor ${v.notebookEditor.document.uri.toString()}`); </del> <ins> throw new Error(`Cannot invoke 'notebook.selectKernel' for unrecognized notebook editor ${v.notebookEditor.notebook.uri.toString()}`); </ins> } return { notebookEditorId }; }

// https://github.com/microsoft/vscode/issues/149271 // ❗️ Important: The main NotebookEditor api has been finalized. <del> // This file only contains deprecated properties/functions from the proposal. export interface NotebookEditor { /** * The document associated with this notebook editor. * * @deprecated Use {@linkcode NotebookEditor.notebook} instead. */ readonly document: NotebookDocument; } export namespace window { /** * A short-hand for `openNotebookDocument(uri).then(document => showNotebookDocument(document, options))`. * * @deprecated Will not be finalized. * * @see {@link workspace.openNotebookDocument} * * @param uri The resource to open. * @param options {@link NotebookDocumentShowOptions Editor options} to configure the behavior of showing the {@link NotebookEditor notebook editor}. * * @return A promise that resolves to an {@link NotebookEditor notebook editor}. */ export function showNotebookDocument(uri: Uri, options?: NotebookDocumentShowOptions): Thenable<NotebookEditor>; } </del> <ins> // This file only tracks the `notebook/cell/executePrimary` contribution, which will be removed </ins> }