Skip to content

feat: upgrade app-studio-toolkit-types version#141

Merged
NetaMolcho merged 2 commits intomasterfrom
toolkit
Jun 14, 2021
Merged

feat: upgrade app-studio-toolkit-types version#141
NetaMolcho merged 2 commits intomasterfrom
toolkit

Conversation

@NetaMolcho
Copy link
Copy Markdown
Collaborator

No description provided.

@NetaMolcho NetaMolcho requested a review from bd82 June 10, 2021 12:25
"ws": "7.4.6"
},
"devDependencies": {
"@sap-devx/app-studio-toolkit-types": "1.0.0",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

if (context) {
switch (itemAction.action.actionType) {
case ActionType.Command:
case "COMMAND":
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it gave you auto-complete suggestions here, correct?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

class testFileItemAction implements IFileAction {
actionType: ActionType;
uri: FileActionParams;
actionType: "FILE";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FILE or URI?

vscode.commands.executeCommand("loadCodeSnippet", { contributorId: snippetAction.contributorId, snippetName: snippetAction.snippetName, context: snippetAction.context });
break;
case ActionType.File:
case "FILE":
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about the case of "URI"?

constructor() {
super();
this.actionType = ActionType.File;
this.actionType = "FILE";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • why are there two initializations here for actionType
  • FILE or URI?

performAction: <T = void>(action: BasAction, options?: { schedule?: boolean }) => undefined,
actions: {
performAction: mockPerformAction,
performAction: <T = void>(action: BasAction, options?: { schedule?: boolean }) => undefined,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow its horrible managing all these versions manually


let action = new testFileItemAction();
action.actionType = ActionType.File;
action.actionType = "FILE";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FILE or URI?

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";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IUriAction?

@bd82
Copy link
Copy Markdown
Member

bd82 commented Jun 10, 2021

See inline comments

@bd82
Copy link
Copy Markdown
Member

bd82 commented Jun 10, 2021

Is this a feat ?
or just a dep update, like

  • build(deps): bump vscode-languageserver from 6.1.1 to 7.0.0

your case is a dev-dep

}
break;
case ActionType.File:
case "FILE":
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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":
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to handle "URI" as well?

@NetaMolcho NetaMolcho merged commit 1e3e39b into master Jun 14, 2021
@NetaMolcho NetaMolcho deleted the toolkit branch June 14, 2021 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants