diff --git a/extensions/npm/package.json b/extensions/npm/package.json index b50486c6bb3..6c8578ad784 100644 --- a/extensions/npm/package.json +++ b/extensions/npm/package.json @@ -7,6 +7,7 @@ "engines": { "vscode": "0.10.x" }, + "enableProposedApi": true, "icon": "images/npm_icon.png", "categories": [ "Other" diff --git a/extensions/npm/src/main.ts b/extensions/npm/src/main.ts index 5903d6ebb58..640c349334a 100644 --- a/extensions/npm/src/main.ts +++ b/extensions/npm/src/main.ts @@ -74,8 +74,8 @@ function registerTaskProvider(context: vscode.ExtensionContext): vscode.Disposab function registerExplorer(context: vscode.ExtensionContext): NpmScriptsTreeDataProvider | undefined { if (vscode.workspace.workspaceFolders) { let treeDataProvider = new NpmScriptsTreeDataProvider(context); - let disposable = vscode.window.registerTreeDataProvider('npm', treeDataProvider); - context.subscriptions.push(disposable); + const view = vscode.window.createTreeView('npm', { treeDataProvider: treeDataProvider, showCollapseAll: true }); + context.subscriptions.push(view); return treeDataProvider; } return undefined;