46 Commits

Author SHA1 Message Date
Isaac Mann
3b91e0b32d
docs(core): add search keywords (#30636)
Adds keywords to improve search indexing
2025-04-09 15:47:49 -04:00
Leosvel Pérez Espinosa
cbf80c18d1
feat(misc): add useProjectJson flag to project generators (#30319)
Add a `useProjectJson` option to project generators to allow users to
opt in/out of generating the Nx configuration in a `project.json` file.

## Current Behavior

## Expected Behavior

## Related Issue(s)

Fixes #
2025-03-11 12:12:03 -04:00
Juri
437bad4aac docs(misc): add description frontmatter for better SEO 2025-03-04 16:58:14 +01:00
Jack Hsu
8bd0bcdd97
fix(js): generate pacakge.json for non-buildable nest and expo libs (#29891)
This PR fixes a couple of issues for TS solution setup:
1. Expo library should generate with correct `package.json` file (e.g.
`exports` maps either to source or dist). See [spec
file](https://github.com/nrwl/nx/pull/29891/files#diff-ae2eb3d10d58786c17aa21f5603043b68043faaebafaec77912f3d69ac0c5295).
2. Nest library should generate `package.json` when non-buildable. See
[spec
file](https://github.com/nrwl/nx/pull/29891/files#diff-368467bcd2215def98ef14aaff9dcb056a915b0a724d0eb857f3a0badef8b40a).

**Notes:**
- Also removed an unsupported `standaloneConfig` option from
`@nx/nest:lib` generator. This was removed a long time ago in other
generators.
- Expo lib generator isn't crystalized when using Rollup for build. This
is a separate issue and we'll handle it in another task.

## Current Behavior
- Non-buildable Expo libs generate without `exports`
- Buildable Expo libs fail to generate due to error
- Non-buildable Nest libs do not generate `package.json`

## Expected Behavior
Expo and Nest libs generate correct `package.json` files depending on
whether they are build or non-buildable.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2025-02-05 16:27:56 -05:00
Jack Hsu
a8de7df0e0
feat(js): update vue/node app and lib generators to support TS solutions (#29299)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

---------

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2024-12-12 15:43:14 -05:00
Leosvel Pérez Espinosa
28c53f942b
feat(misc): handle artifact generators' path options including file extensions (#29111)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

Artifact generators don't handle consistently receiving a file extension
in the `path` option.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

Artifact generators should handle receiving a file extension in the
`path` option. If the file extension is passed, the file path will be
treated as "complete" and used fully as provided. If the `path` provided
doesn't contain a file extension, the default extension will be appended
to it (or the one provided in a related option, e.g. `--language`,
`--js`, etc) together with the suffix for generators that use it.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-12-09 09:13:15 -05:00
Leosvel Pérez Espinosa
dc67660fec
fix(misc): update artifact generator option descriptions and cleanup leftovers (#29077)
- Update artifact generator schemas:
- Clarify `path` is the artifact file path relative to the current
working directory
  - Clarify `name` is the artifact symbol name
- Remove prompt for `name` and remove it from the important options
(won't be displayed by default in Nx Console generation UI, it will be
part of the collapsed options) given that most of the time, it's meant
to match the filename (last segment of the `path`)
- Remove some leftover options related to the name and path formats that
were previously missed
- Fix an issue with NestJS generators
- Fix an issue with Next `page` generator

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-11-28 09:44:44 -05:00
Nicholas Cunningham
25c5643283
fix(nest): Fix generators (guard, interceptor etc...) path to not duplicate when provided (#29084)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->
When we run the nest generators (interceptor, resource, guard etc...) it
tends to duplicate the path and leads to unexpected folder creations.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
It should generate in the path provided.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #29076
2024-11-27 10:24:06 -07:00
pawel-twardziak
3c6c38773b
fix(nest): repair nestjs service generator schema (#28928)
# Related Issue(s)

Fixes #28910
2024-11-14 14:26:34 -07:00
Jack Hsu
27edf71cef
feat(misc): make directory a required option for generators (#28093)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
2024-10-01 09:29:44 -04:00
Nicholas Cunningham
bc8b71ac6c
fix(core): Remove nameAndDirectoryFormat option from generators (#28110)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

Currently, when we use generator's via the CLI passing the `name` arg
has more than one responsibility:
1.  it can be used as a path
2. it can be used as the generator's name (e.g. Component name)

This is not intuitive as if we use via Nx Console because it creates
some ambiguity around the `--name` property which is normally described
as only 2.

![image](https://github.com/user-attachments/assets/b05fa2a7-36e7-44a1-af82-6f55f53d6c43)

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

What is expected is that the `name` property should only have the
responsibility of determining the name of the generated module
(Component, Directive etc...).

The new property `path` replaces the `directory` property but fulfils
the same purpose as determining where the module should be created.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

---------

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-10-01 08:26:27 -04:00
Jack Hsu
8fa7065cf1
docs(misc): update generator examples to use new directory/path positional args (#28144)
This PR updates examples in `.md` files (both docs and blog posts) to
use positional args. Nx 20 changes the position arg to be either
`directory` for apps/libs or `path` for artifacts (e.g. components).

So before you'd do this:

```
nx g app myapp --directory=apps/myapp
nx g lib mylib --directory=libs/mylib
nx g lib mylib --directory=libs/nested/mylib
nx g lib @acme/foo --directory=libs/@acme/foo --importPath=@acme/foo
nx g component foo --directory=libs/ui/src/foo --pascalCaseFiles
```

Will now be simplified to

```
nx g app apps/myapp
nx g lib libs/mylib
nx g lib libs/nested/mylib
nx g lib libs/@acme/foo # name and import path are both "@acme/foo"
nx g component libs/ui/src/foo/Foo
```

For cases where `name` and `importPath` need to be changed, you can
always manually specify them.

```
nx g lib libs/nested/foo # name is foo
nx g lib libs/nested/foo --name=nested-foo # specify name with prefix
nx g lib libs/@acme/foo --name # use "foo" as name and don't match importPath
nx g lib libs/@internal/foo --importPath=@acme/foo # different importPath from name

<!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR -->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is merged. -->

Fixes #
2024-09-30 13:20:10 -04:00
Leosvel Pérez Espinosa
c92528f65d
feat(misc): remove derived generator paths (#27714)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

---------

Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
2024-09-23 09:19:42 -04:00
Milan Kovacic
ac02118327
docs(nest): add nest cli plugin usage section (#27293)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
https://github.com/nrwl/nx/discussions/23105#discussioncomment-9281248

Fixes #

---------

Co-authored-by: MilanKovacic <9189985+MilanKovacic@users.noreply.github.com>
2024-08-09 13:41:24 -04:00
Colum Ferry
7b9ee39c22
docs(webpack): update NxAppWebpackPlugin reference (#27156)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-07-26 17:02:35 +01:00
Milan Kovacic
b623104aac
docs(nest): add deployment section (#26048)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
nx/nest documentation contains no deployment information.

## Expected Behavior
Deployment information is present, as it is a common question in
Discord.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

---------

Co-authored-by: MilanKovacic <9189985+MilanKovacic@users.noreply.github.com>
2024-07-19 13:16:43 -06:00
Jack Hsu
86954ae96b
fix(misc): rename @nrwl/* to @nx/* in init generator descriptions (#26610)
We forgot to rename these in the init generator descriptions. This
affects tutorials since we've been including the terminal output with
the wrong scope.


## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-06-20 13:08:39 -04:00
Nicholas Cunningham
c467129758
fix(nest): Add missing props (#26534)
Add missing props back to the schema so that they can be
defaulted/overwritten.


closes: #26384
2024-06-17 06:23:11 -07:00
Isaac Mann
186a420a74
docs(core): decisions section (#23038)
Create an "Organizational Decisions" section under Concepts for
recommendations and discussions about how to set up Nx that aren't firm
requirements.
2024-05-10 15:42:46 -04:00
Jason Jean
8f705e31e2
fix(misc): adjust deprecation messages to v20 (#23223)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Breaking Changes:


BREAKING CHANGE: `nx print-affected` was deprecated in 16.4.0 and has
been removed.
BREAKING CHANGE: `nx affected:graph` was deprecated in 16.4.0 and has
been removed.
BREAKING CHANGE: The `criticalPath` and `affectedProjects` properties of
the JSON created by `nx graph --file graph.json` was deprecated in
16.2.0 and has been removed.

## Current Behavior
<!-- This is the behavior we have today -->

Some deprecation messages still reference v19.

`nx print-affected` was deprecated in 16.4.0 to be removed in Nx 19 but
was not removed.
`nx affected:graph` was deprecated in 16.4.0 to be removed in Nx 19 but
was not removed.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

Deprecation messages reference v20 now.

`nx print-affected` is removed.
`nx affected:graph` is removed.

There are redirects to a `deprecated` page describing those commands for
Nx users using Nx <19

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-05-08 21:54:41 -04:00
Miroslav Jonaš
3ead01987b
fix(nx-dev): remove fence from new packages and "nx add" commands (#21705) 2024-02-08 14:43:50 +01:00
Isaac Mann
61436a64ef
docs(core): inferred targets (#21167)
Co-authored-by: Katerina Skroumpelou <mandarini@users.noreply.github.com>
Co-authored-by: Colum Ferry <cferry09@gmail.com>
Co-authored-by: Emily Xiong <xiongemi@gmail.com>
Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
Co-authored-by: Victor Savkin <mail@vsavkin.com>
Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-02-03 00:14:05 -05:00
Craigory Coppola
deb0f1a492
chore(repo): bump deprecation messages to v19 (#21430) 2024-01-30 16:29:05 -05:00
beeman
a9974d3f25
docs(misc): change http:// to https:// (#19534) 2024-01-30 11:33:13 -05:00
Leosvel Pérez Espinosa
e4758358b0
feat(misc): optionally update package.json scripts in init generators (#21204) 2024-01-22 13:51:41 -05:00
Aditya Mathur
dd5f3c8d17
docs(misc): standardize all the install commands with different pm (#21226) 2024-01-19 15:21:42 +01:00
Emily Xiong
6141f44203
feat(core): add keepExistingVersions to all packages (#21169) 2024-01-17 14:22:58 -05:00
Leosvel Pérez Espinosa
047dc22aed
cleanup(misc): clean up init generators (#21088) 2024-01-16 15:29:44 +01:00
Leosvel Pérez Espinosa
62240262d6
fix(nest): add deprecated messages to generator js schema and fix casing (#19678) 2023-10-18 08:42:40 -04:00
Jonathan Cammisuli
aa7625b76f
feat(nest): update nest generators to support name and directory format option (#19668)
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2023-10-17 18:14:36 -04:00
Miroslav Jonaš
a3a0496856
feat(linter): remove tslint logic (#19002) 2023-10-06 08:32:51 -04:00
Isaac Mann
d1fe398ea0
docs(core): packages to api (#19281) 2023-09-22 14:24:35 -04:00
Isaac Mann
4f3988cb2c
docs(core): sync nx package versions (#18973) 2023-09-08 08:25:19 -04:00
Leosvel Pérez Espinosa
e1b76e26f8
feat(nest): use helper to determine project name and root in project generators (#18701) 2023-08-22 15:26:10 +01:00
Miroslav Jonaš
ab9019df1b
feat(linter): deprecate tslint (#18464) 2023-08-10 09:39:23 -04:00
Miroslav Jonaš
331707d6eb
docs(nx-dev): make more concepts submenu (#18266) 2023-07-24 14:20:48 +00:00
Gustavo Perdomo
6cb159e9f7
feat(nest): added es2021 support for nest generators (#17726)
Co-authored-by: Caleb Ukle <caleb.ukle+github@pm.me>
2023-06-22 16:38:54 -05:00
Isaac Mann
afa5eb59fa
docs(core): document the @nrwl => @nx rescope (#16403)
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2023-04-27 18:14:59 -04:00
Ashley Hunter
2be25eb45c
feat(nest): adding simpleName option to library generator (#16024) 2023-04-27 14:38:31 +00:00
Zachary DeRose
5e2bf07908
docs(core): fixing some references to old architect terminology (#16424)
Co-authored-by: Isaac Mann <isaacplmann@gmail.com>
2023-04-27 08:28:53 -04:00
Nicholas Cunningham
ce4a76a975
feat(nest): Add strict option (#16371) 2023-04-18 12:47:02 -06:00
Luka Furlan
3af649dc3f
feat(node): Added E2E project generation option to NestJs app generator (#14805) 2023-03-31 12:20:03 -04:00
Emily Xiong
3ef5406fb8
chore(testing): reduce create-workspace --preset=npm e2e time (#15239) 2023-03-02 10:38:18 -05:00
Chau Tran
5d1c8eacd7
docs(nest): add prioritize flags for nestjs generators (#14262) 2023-01-30 11:56:19 +01:00
Jack Hsu
d7536aa7e3 feat(core): clean up workspace configuration code 2023-01-23 19:35:15 -05:00
Benjamin Cabanes
19fd40ddc7
docs(nxdev): refactor docs sources generation and app consumption (#13834) 2022-12-19 18:59:50 +00:00