Skip to content

Commit

Permalink
feat: add Flix: outdated command (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
sockmaster27 authored Mar 24, 2024
1 parent 1ebe008 commit 990df22
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
13 changes: 13 additions & 0 deletions client/src/handlers/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
"command": "flix.cmdDoc",
"title": "Flix: doc"
},
{
"command": "flix.cmdOutdated",
"title": "Flix: outdated"
},
{
"command": "flix.showAst",
"title": "Flix: Show AST"
Expand Down

0 comments on commit 990df22

Please sign in to comment.