diff --git a/client/src/extension.ts b/client/src/extension.ts index 48069102..d3a922a8 100644 --- a/client/src/extension.ts +++ b/client/src/extension.ts @@ -144,6 +144,7 @@ export async function activate(context: vscode.ExtensionContext, launchOptions: registerCommand('flix.cmdRunProject', handlers.cmdRunProject(context, launchOptions)) registerCommand('flix.cmdTests', handlers.cmdTests(context, launchOptions)) registerCommand('flix.cmdDoc', handlers.cmdDoc(context, launchOptions)) + registerCommand('flix.cmdOutdated', handlers.cmdOutdated(context, launchOptions)) registerCommand('flix.showAst', handlers.showAst(client)) registerCommand('flix.startRepl', handlers.startRepl(context, launchOptions)) diff --git a/client/src/handlers/handlers.ts b/client/src/handlers/handlers.ts index 2a0fbe56..47c0bc1b 100644 --- a/client/src/handlers/handlers.ts +++ b/client/src/handlers/handlers.ts @@ -316,6 +316,19 @@ export function cmdDoc(context: vscode.ExtensionContext, launchOptions: LaunchOp return runReplCmd(context, launchOptions, ':doc') } +/** + * Shows dependencies which have newer versions available using the command `:outdated`. + * + * @param context vscode.ExtensionContext + * + * @param launchOptions LaunchOptions + * + * @returns function handler + */ +export function cmdOutdated(context: vscode.ExtensionContext, launchOptions: LaunchOptions = defaultLaunchOptions) { + return runReplCmd(context, launchOptions, ':outdated') +} + /** * Prompt the user for a phase and show the AST for that phase. * diff --git a/package.json b/package.json index a2d9370a..5f69b60b 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,10 @@ "command": "flix.cmdDoc", "title": "Flix: doc" }, + { + "command": "flix.cmdOutdated", + "title": "Flix: outdated" + }, { "command": "flix.showAst", "title": "Flix: Show AST"