feat: upgrade app-studio-toolkit-types version#141
Conversation
| "ws": "7.4.6" | ||
| }, | ||
| "devDependencies": { | ||
| "@sap-devx/app-studio-toolkit-types": "1.0.0", |
| if (context) { | ||
| switch (itemAction.action.actionType) { | ||
| case ActionType.Command: | ||
| case "COMMAND": |
There was a problem hiding this comment.
it gave you auto-complete suggestions here, correct?
| class testFileItemAction implements IFileAction { | ||
| actionType: ActionType; | ||
| uri: FileActionParams; | ||
| actionType: "FILE"; |
There was a problem hiding this comment.
should not we change this to "URI" as "File" will get deprecated in ~2 months?
|
|
||
| let action = new testFileItemAction(); | ||
| action.actionType = ActionType.File; | ||
| action.actionType = "FILE"; |
| vscode.commands.executeCommand("loadCodeSnippet", { contributorId: snippetAction.contributorId, snippetName: snippetAction.snippetName, context: snippetAction.context }); | ||
| break; | ||
| case ActionType.File: | ||
| case "FILE": |
| constructor() { | ||
| super(); | ||
| this.actionType = ActionType.File; | ||
| this.actionType = "FILE"; |
There was a problem hiding this comment.
- why are there two initializations here for
actionType - FILE or URI?
backend/tests/vscode-events.spec.ts
Outdated
| performAction: <T = void>(action: BasAction, options?: { schedule?: boolean }) => undefined, | ||
| actions: { | ||
| performAction: mockPerformAction, | ||
| performAction: <T = void>(action: BasAction, options?: { schedule?: boolean }) => undefined, |
There was a problem hiding this comment.
instead of copying a complex signature may be able to reuse it.
performAction: basAPI["performAction"]
| "dependencies": { | ||
| "@sap-devx/app-studio-toolkit-types": "0.0.1", | ||
| "@sap-devx/guided-development-types": "0.0.13", | ||
| "@sap-devx/app-studio-toolkit-types": "1.0.0", |
There was a problem hiding this comment.
wow its horrible managing all these versions manually
|
|
||
| let action = new testFileItemAction(); | ||
| action.actionType = ActionType.File; | ||
| action.actionType = "FILE"; |
backend/tests/vscode-events.spec.ts
Outdated
| import * as _ from "lodash"; | ||
| import { Contributors } from "../src/contributors"; | ||
| import { ICommandAction, IExecuteAction, IFileAction, ISnippetAction, bas, IAction, ActionType } from "@sap-devx/app-studio-toolkit-types"; | ||
| import { ICommandAction, IExecuteAction, IFileAction, ISnippetAction, bas, IAction, ActionType, BasAction } from "@sap-devx/app-studio-toolkit-types"; |
|
See inline comments |
|
Is this a
your case is a |
| } | ||
| break; | ||
| case ActionType.File: | ||
| case "FILE": |
There was a problem hiding this comment.
do we need to handle "URI" here as well?
If our consumers have such switch-cases could not we break them by adding the new "URI" value?
| console.log(`Mock executing command ${commandAction.name}`); | ||
| break; | ||
| case ActionType.File: | ||
| case "FILE": |
There was a problem hiding this comment.
do we need to handle "URI" as well?
No description provided.