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

"add" command doesn't follow skip-install convention. #1809

Closed
2 of 4 tasks
z3bra5hax opened this issue Oct 16, 2022 · 6 comments
Closed
2 of 4 tasks

"add" command doesn't follow skip-install convention. #1809

z3bra5hax opened this issue Oct 16, 2022 · 6 comments

Comments

@z3bra5hax
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

nest add [library] --skip-install

does not skip installation, nor does --skipInstall (which is documented in @nestjs libraries such as azure-func-http)

Minimum reproduction code

n/a

Steps to reproduce

  1. Install a package (here the reason is because the legacy-peer-deps flag was needed): npm install --save @nestjs/azure-func-http --legacy-peer-deps.

  2. Attempt to utilize schematic with "add" action: nest add @nestjs/azure-func-http --skip-install.

Optional: Attempt skipInstall as documented in the above @nestjs library: nest add @nestjs/azure-func-http --skip-install.

Expected behavior

Successful schematic build.
(e.g.)

CREATE .funcignore (66 bytes)
CREATE host.json (23 bytes)
CREATE local.settings.json (116 bytes)
CREATE proxies.json (72 bytes)
CREATE main/function.json (294 bytes)
CREATE main/index.ts (287 bytes)
CREATE main/sample.dat (23 bytes)
CREATE src/main.azure.ts (321 bytes)
UPDATE package.json (2136 bytes)

Package version

9.1.4

NestJS version

9.1.4

Node.js version

16.16.0

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

This may technically be more of a feature request; however as it would be more conventional and the aforementioned documentation in @nestjs libraries regarding skipping installation makes this seem like it falls more into the "bug" category.

Happy to pick this one up.

@z3bra5hax
Copy link
Contributor Author

I'm happy to pick this one up!

@micalevisk
Copy link
Member

micalevisk commented Oct 17, 2022

but that's not a valid option for nest add (only for nest new), see:

.command('add <library>')
.allowUnknownOption()
.description('Adds support for an external library to your project.')
.option(
'-d, --dry-run',
'Report actions that would be performed without writing out results.',
)
.option('-p, --project [project]', 'Project in which to generate files.')
.usage('<library> [options] [library-specific-options]')


Run nest add -h to see the available options

@z3bra5hax
Copy link
Contributor Author

Hey @micalevisk! Thank you, yeah I probably should have filed this as a feature request as opposed to bug: I noted my reasoning for the decision to go with "bug" in the "Other" section of the report but I certainly understand exactly where you're coming from.

@micalevisk
Copy link
Member

Sounds like a good feature. Feel free to open a PR anytime, thanks 😺

@z3bra5hax
Copy link
Contributor Author

Related PR: #1810

@kamilmysliwiec
Copy link
Member

Let's track this here #1810

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants