Skip to content

Commit 32f8f52

Browse files
committed
Fix when NPM view is shown
#104591
1 parent 1826b1f commit 32f8f52

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

extensions/npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
{
5757
"id": "npm",
5858
"name": "%view.name%",
59-
"when": "npm:showScriptExplorer",
6059
"icon": "images/code.svg",
6160
"visibility": "hidden"
6261
}
@@ -237,6 +236,7 @@
237236
"type": "boolean",
238237
"default": false,
239238
"scope": "resource",
239+
"deprecationMessage": "The NPM Script Explorer is now available in 'Views' menu in the Explorer in all folders.",
240240
"description": "%config.npm.enableScriptExplorer%"
241241
},
242242
"npm.enableRunFromFolder": {

extensions/npm/src/npmMain.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import * as vscode from 'vscode';
88
import { addJSONProviders } from './features/jsonContributions';
99
import { runSelectedScript, selectAndRunScriptFromFolder } from './commands';
1010
import { NpmScriptsTreeDataProvider } from './npmView';
11-
import { invalidateTasksCache, NpmTaskProvider, hasPackageJson } from './tasks';
11+
import { invalidateTasksCache, NpmTaskProvider } from './tasks';
1212
import { invalidateHoverScriptsCache, NpmScriptHoverProvider } from './scriptHover';
1313

1414
let treeDataProvider: NpmScriptsTreeDataProvider | undefined;
@@ -44,11 +44,6 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
4444
registerHoverProvider(context);
4545

4646
context.subscriptions.push(vscode.commands.registerCommand('npm.runSelectedScript', runSelectedScript));
47-
48-
if (await hasPackageJson()) {
49-
vscode.commands.executeCommand('setContext', 'npm:showScriptExplorer', true);
50-
}
51-
5247
context.subscriptions.push(vscode.commands.registerCommand('npm.runScriptFromFolder', selectAndRunScriptFromFolder));
5348
}
5449

0 commit comments

Comments
 (0)