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/update nest new command #97

Merged
merged 7 commits into from
Nov 27, 2023
Merged

Conversation

neodmy
Copy link
Contributor

@neodmy neodmy commented Nov 25, 2023

Description

  • Update the nest new command:
    • Ask for package manager and providing the option to @nestjs/cli
    • Use basic-tooling and nestjs-config schematics
  • Other changes:
    • Add inquirer for prompting
    • Add a PackageManager util to handle initialization and installation of packages with different package managers
    • Extract child_process' spawn to a util
  • Fixes:
    • Amend paths in husky and nestjs-config schematics as they didn't work properly when executing from a different path from the root project directory

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@types/inquirer 7.3.3 None +1 74.1 kB types
detect-package-manager 3.0.1 filesystem +0 10.5 kB egoist

@neodmy neodmy self-assigned this Nov 25, 2023
@neodmy neodmy marked this pull request as ready for review November 25, 2023 20:21
Copy link
Contributor

@inigomarquinez inigomarquinez left a comment

Choose a reason for hiding this comment

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

LGTM!

By the way, in another project we've discovered that using pnpm as package manager has some problems as it doesn't run pre and post scripts by default and you need to do some extra configuration. Just to keep in mind!

@neodmy neodmy merged commit 3464302 into main Nov 27, 2023
3 checks passed
@neodmy neodmy deleted the refactor/update-nest-new-command branch November 27, 2023 09:43
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