Skip to content

Conversation

MarvinXu
Copy link
Contributor

@MarvinXu MarvinXu commented Nov 22, 2022

PR Checklist

Please check to confirm your PR fulfills the following requirements:

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
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Can't specify packageManager when running a schematic

Issue Number: N/A

What is the new behavior?

Detect packageManager by the lock file, and use the right package manager to install dependencies. Behave like ng generate <schematic>

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

This PR originates from nestjs/nest-cli#1115

As I look into the problem, first I wanted to fix it in @nestjs/schematics

but then I checked Angular cli, and run the following command, it worked as excepted(using correct package manager).

ng new test --no-install
cd test
touch yarn.lock
ng g @nestjs/schematics:resource --name=users --no-dry-run --no-skip-import --language="ts" --source-root="src" --spec --no-flat

So I thought maybe it's better to fix it in schematics-cli to make it behave just like angular-cli.

I am a new contributor, plz let me know If I did anything wrong ;)

@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Nov 22, 2022
@clydin clydin added merge: squash commits When the PR is merged, a squash and merge should be performed target: minor This PR is targeted for the next minor release action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 12, 2022
@clydin clydin added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jan 25, 2023
@clydin
Copy link
Member

clydin commented Jan 25, 2023

Thank you for the contribution.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker detected: feature PR contains a feature commit merge: squash commits When the PR is merged, a squash and merge should be performed target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants