Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(createProject): add types and remove useless projectForm arg… #17

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

joaoneto
Copy link

…s iteration

Pull Request Guidelines

Our guidelines for submitting a pull request.

Before submitting a Pull Request, please make sure you have verified the following:

  • The commit message follows our guidelines:
    • A good commit message should be two things: meaningful and concise. It should not contain every single detail, describing each changed line—we can see all the changes in Git—but, at the same time, it should say enough to avoid ambiguity.
    • We use Microverse's commit message convention
    • The convention stablish that a commit message has to be in the present tense, imperative and lowercase.
    • Example: fix typo in README.md
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Please describe the current behavior that you are modifying, or link to a relevant issue.

Issue Number: N/A

What is the new behavior?

Describe the new behavior or link to a relevant issue.

Does this PR introduce a breaking change?

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications below.

Other information

Since the projectForm already sends in the order of the arguments correctly, to set the variables, it is not necessary to use an iteration, just use the deconstructure

@ghost
Copy link

ghost commented Aug 21, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@rsaz rsaz added the enhancement New feature or request label Aug 21, 2023
@rsaz
Copy link
Member

rsaz commented Aug 21, 2023

@Daniel-Boll @juliano-soares please review the PR,:

1 - Test with npm pack and install it globally
2 - Test on windows and wsl
3 - Verify the scenarios in which the change has code impact, scaffold, command responses.

Waiting your return for approval and publishing

@joaoneto joaoneto mentioned this pull request Aug 21, 2023
12 tasks
Copy link
Member

@juliano-soares juliano-soares left a comment

Choose a reason for hiding this comment

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

Great job!!

src/new/form.ts Outdated
packageManager: string;
template: Template;
confirm: boolean;
};
const projName: string = projectName;
Copy link
Contributor

Choose a reason for hiding this comment

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

It is not related to your changes, but thinking enough about it, this variable is useless this way, we can already use the projectName it self, can you add this change as well?

Copy link
Contributor

@Daniel-Boll Daniel-Boll left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@rsaz rsaz left a comment

Choose a reason for hiding this comment

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

Removing the argument order code will delete the option of the user silently install the application at any order. Your code change only allow users to create projects in this form:

expressots new app-demo -p npm -t opinionated

Our current solution allows the user to pass the -p (package manager) and -t (template) at any order

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 📋 Draft
Development

Successfully merging this pull request may close these issues.

None yet

4 participants