Compare commits

...

155 Commits

Author SHA1 Message Date
Craigory Coppola 7eecf06a44 fix(core): ensure daemon socket messenger is set on first message 2024-12-16 17:37:47 -05:00
Craigory Coppola 91c6c6fcf9 feat(core): transition daemon from queue to transaction based messaging 2024-12-16 17:37:16 -05:00
Benjamin Cabanes ee4de0b3ac docs(nx-dev): display image for testimonial on enterprise mobile screen (#29377)
Display the testimonial image associated to Hetzner Cloud on
enterprise's mobile screen. Adjusted styles and dimensions for improved
design consistency across breakpoints. Updated iframe dimensions to
better fit the layout.
2024-12-16 15:34:13 -05:00
Emily Xiong 1d7465b02e feat(core): not exit when one plugin installation failed (#28684)
<!-- 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 -->
it tries to install all plugins at once. if failed, it will stop the
remaining plugins from being installed.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
it will continue if one plugin failed.

success message:
<img width="301" alt="Screenshot 2024-12-11 at 11 36 14 AM"
src="https://github.com/user-attachments/assets/2bc389f0-4fda-4959-afab-57594c9d600b">
failed message:
<img width="894" alt="Screenshot 2024-12-12 at 2 58 17 PM"
src="https://github.com/user-attachments/assets/7b51d5e9-f308-48c3-9b7d-bc4219802acb"
/>


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

Fixes #
2024-12-16 14:38:22 -05:00
Craigory Coppola 67d0e33874 feat(core): add spinners when graph compute takes long time (#28966)
<!-- 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. -->

Sometimes graph computation can take longer than may be expected. In
these cases we can show a spinner, and if only one plugin is still
running **and the daemon is disabled** also show the plugin names.
2024-12-16 14:01:27 -05:00
Leosvel Pérez Espinosa f922e2bcf0 fix(misc): fix misc generation issues with the ts solution setup (#29350)
Fix misc generation issues related to the new TS solution setup:

- Improve Cypress config default formatting (when no prettier)
- Remove leftover compiler options from `tsconfig.json` files
- Do not add TS path mappings
- Update `outDir` for `typecheck` tasks to be `out-tsc/...`
- Generate Nx configuration in `package.json` files for e2e test runner
projects
- Fix issue with `@nx/js:library` and `--bundler=vite`
- Other smaller changes

<!-- 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-12-16 16:23:50 +00:00
Mike Hartington bf15e68de9 docs(core): add state management blog post (#29153)
<!-- 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-12-16 11:14:39 -05:00
Benjamin Cabanes e20f6079c5 docs(nx-dev): add video playback for Hetzner testimonial (#29371)
Introduced a modal feature to allow video playback for the Hetzner Cloud
customer testimonial. Adds tracking on play button clicks and
integrating analytics events. Updated styles, improved accessibility,
and replaced `img` with Next.js `Image`.
2024-12-16 10:42:33 -05:00
Dusty Greif c3709b2b84 fix(core): collect all logs from forked processes (#27778)
<!-- 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

We have a monorepo with ~450 packages and run tasks with 16x parallelism
in CI. We've recently noticed that running tasks with `static` logging
can lead to random tasks losing logs. Even if the task is a simple `echo
SOMETHING`, logs get lost sporadically.

After digging into the task runner, I found that the forked task runner
currently collects logs from `stdout` and `stderr`, then joins those
when the process `exit` event is emitted. The problem appears to stem
from the fact that the `exit` event is _occasionally_ emitted _before_
the `stdout` and `stderr` streams are closed, leading to lost logs.

## Expected Behavior

_All_ logs should be collected, even if they are emitted after the
process `exit` event.

I've updated the task runner to wait for the `stdout` and `stderr`
streams to end before collecting logs.

Note: I didn't see any tests specifically for this file, but it should
still run all the new code if theres is a happy path case of forked
tasks with static logging.
2024-12-16 09:16:20 -05:00
Leosvel Pérez Espinosa 99a0e7c5a0 fix(misc): ensure tsBuildInfoFile is generated inside outDir (#29343)
<!-- 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-12-16 14:53:18 +01:00
Leosvel Pérez Espinosa 13ec93c783 fix(js): ensure typescript-sync generator produces formatted references when no prettier is installed (#29368)
<!-- 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-12-16 14:53:05 +01:00
Benjamin Cabanes 4cd640a918 docs(nx-dev): load external script dynamically on route changes (#29355)
Moved the external script loading logic to a dynamic handler triggered
on route changes using `useEffect`. This ensures the script is reloaded
with each route change and prevents duplicates by removing any
pre-existing script.
2024-12-13 14:32:45 -05:00
Leosvel Pérez Espinosa 657814cd41 fix(core): resolve imports from linked workspace projects (#29328)
<!-- 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 using package manager workspaces and having a dependency between
buildable projects that define their entry points in the `package.json`
to point to the outputs, the imports from source files can't be resolved
to the corresponding workspace project.

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

When using package manager workspaces and having a dependency between
buildable projects that define their entry points in the `package.json`
to point to the outputs, the imports from source files should be
resolved to the corresponding workspace project.

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

Fixes #
2024-12-13 13:36:02 -05:00
Thomas Dekiere 313f6a9ebc docs(core): fix syntax to specify configuration flag (#29223)
```sh
nx build app --development
```

should be

```sh
nx build app --configuration development
```

Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-12-13 13:20:33 -05:00
Benjamin Cabanes 5d8a4e37cc docs(nx-dev): add Phillip Dacosta to the team section (#29353)
Included Phillip Dacosta as a new team member with relevant details such
as name, title, and image.
2024-12-13 13:12:29 -05:00
Isaac Mann 012d4e95a1 docs(core): createNodesV2 in plugin docs (#29346)
Update the project graph plugin recipe to use createNodesV2
2024-12-13 11:28:09 -05:00
Leosvel Pérez Espinosa 48cd50a550 feat(core): use custom resolution to resolve from source local plugins with artifacts pointing to the outputs (#29222)
<!-- 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 -->

Local Nx plugins in the new TS setup can't be resolved properly if they
aren't built first. Graph plugins can't be built either because the
graph is needed to run a task, but the plugin must be built to construct
the graph.

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

Local Nx plugins should work in the new TS setup. A custom resolution is
added to resolve the local plugin artifacts from the source.

It will try to use a `development` condition from the `exports` entry in
`package.json` if it exists. If it doesn't, it will fall back to guess
the source based on the artifact path and some commonly known/used
source dirs: `.`, `./src`, `./src/lib`.

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

Fixes #
2024-12-13 10:49:54 -05:00
Leosvel Pérez Espinosa 5bdda1daac docs(misc): fix plugin generation command in blog post (#29340) 2024-12-13 04:29:31 -08:00
Stian Morsund e0e6a23bd7 fix(angular): add-localize-polyfill-to-targets fails if polyfills is a string (#29324)
<!-- 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
Migration fails if polyfills is a string

## Expected Behavior
Migration should work even if polyfills is a string

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
2024-12-13 10:41:37 +01:00
Craigory Coppola 0d6667d156 fix(core): avoid storing hash details for empty fileset (#29316)
<!-- 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-12-12 22:13:58 -05:00
Craigory Coppola 99700c075c chore(repo): ensure actions runs use consistent pnpm version (#29337)
<!-- 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-12-12 21:56:28 -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
Konstantin Kai b6d41b617e fix(vite): resolves files with dot suffixes correctly (#28518)
Use `basename` for retrieving the filename in `findFile` function from
`nx-tsconfig-paths.plugin` that previously led to an unresolved error
for files with dot suffixes e.g.`/dir/file.suffix.ext`

<!-- 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
For files that have the same name but one of them has a suffix, e.g.
```ts
- lib1
  - file.ts
  - file.i18n.ts
- apps
  - app1
    - main.ts
- tsconfig.base.json // with { "paths": { "@lib1/*": ["lib1/*"] }}
```
The resolving process is incorrect because the `import value from
'@lib1/file.i18n'` from `apps/app1/main.ts` every time resolves to
`file.ts,` and the `parse` method from the `node:path` splits away the
suffix from the name.

## Expected Behavior
`import value from '@lib1/file.i18n'` should work correctly if you
import them from another package

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

Fixes #27852

---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2024-12-12 20:08:53 +00:00
Philip Fulcher fca739e5b5 docs(nx-dev): add tailoring nx for your org post (#29293)
Co-authored-by: Juri <juri.strumpflohner@gmail.com>
2024-12-12 12:33:51 -07:00
Emily Xiong a0f4260ebd feat(expo): upgrade Expo to v52 (#29142)
<!-- 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: Hassan Khan <h@twodoors.dev>
2024-12-12 13:06:13 -05:00
Emily Xiong cfcd4d1440 fix(react): fix tailwind for react library and component (#29319)
<!-- 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 https://github.com/nrwl/nx/issues/27954
2024-12-12 13:05:21 -05:00
Colum Ferry 36eaafdcfd feat(rsbuild): add rsbuild configuration generator (#29321)
## Current Behavior
Nx currently does not offer a generator to help scaffold configuration
for an Rsbuild project

## Expected Behavior
Add a `configuration` generator to the `@nx/rsbuild` package to help
scaffold a configuration for a basic app
2024-12-12 17:25:23 +00:00
Vojtech Mašek 22cec78331 docs(bundling): correct esbuild options nesting (#28748)
Fixes:

- [x] correct nesting of options in ESBuild docs

---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2024-12-12 17:01:43 +00:00
Sam Tsai 8bafc3b113 chore(rspack): update resource query to reduce confusion (#28967)
<!-- 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 -->
`withReact` in `rspack` adds svg rules to support svgs as assets/urls
and React components.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Svgr docs use `url` as resourceQuery value,
https://react-svgr.com/docs/webpack/#use-svgr-and-asset-svg-in-the-same-project
Having resource query match on `react` is confusing because you would
want the inverse, treat the url as a resource if it has the query and as
a React component otherwise.
2024-12-12 16:26:32 +00:00
Samar Panda 6fbd130322 fix: typo in environment-variables.md (#29294)
<!-- 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-12-12 11:23:01 -05:00
Benjamin Cabanes fbd622b8a5 docs(nx-dev): remove webinar event on enterprise screen (#29325)
The webinar is a thing of the past.
2024-12-12 10:28:21 -05:00
Sebastian Podgajny 0f9c93ceb8 fix(angular): correctly normalize dev-server options (#29322)
For Angular > 18 schema hmr option was ignored, it was impossible to
disable hmr and default value changed in ng19
https://github.com/angular/angular/issues/59058

<!-- 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-12-12 16:03:06 +01:00
Petr Plenkov f96fda95f4 feat(core): support rollup.config.ts (#28240)
I would like to be able to use rollup.config.ts. Same way it's used by
rollup and vite teams too.

## Current Behavior

Currently nx plugin does not reconize project containing
rollup.config.ts. It expects only {c|m}js files

## Expected Behavior
When project has rollup.config.ts rollup plugin infers build target
automatically. This build target should be able to find the
rollup.config.ts. For that purpose a special [configPlugin
](https://rollupjs.org/command-line-interface/#configplugin-plugin)CLI
parameter should be used

## Related Issue(s)

Feature request [#28226](https://github.com/nrwl/nx/discussions/28226)

---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2024-12-12 10:08:32 +00:00
Jason Jean 0d1c96085e chore(repo): update nx to 20.3.0-beta.0 (#29313)
<!-- 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 -->

This repo uses Nx `20.2.0-beta.7` and Powerpack `1.1.0-beta.6`

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

This repo uses Nx `20.3.0-beta.0` and Powerpack `1.1.0-beta.9`

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

Fixes #
2024-12-11 16:42:46 -05:00
Benjamin Cabanes f0172c2e55 docs(nx-dev): remove webinar banner (#29315)
The webinar has happened, no need of the banner anymore.
2024-12-11 16:31:35 -05:00
Emily Xiong b4aadccac8 fix(react-native): fix react native storybook for lib (#29210)
<!-- 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 https://github.com/nrwl/nx/issues/28802
2024-12-11 15:01:17 -05:00
Jack Hsu c2eae0e297 fix(react): fix issues with react ts setup (#29312)
Fixes a couple of things:

1. React application should ignore `eslint.config.js`,
`eslint.config.cjs`, and `eslint.config.mjs` files since they are not
part of the app runtime.
2. React lib generators should always run `npm install`. It currently
runs only when `package.json` has changed, but we need to run it to link
packages regardless of `package.json` changes.
2024-12-11 15:00:56 -05:00
Nicholas Cunningham 726c07d324 fix(webpack): Add useTsconfigPaths to app-webpack-plugin (#29291)
<!-- 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-12-11 09:20:57 -07:00
Colum Ferry c21d9928e1 fix(core): ensure rsbuild is part of nx package group (#29310)
## Current Behavior
The new `@nx/rsbuild` package is not listed as part of the Nx package
group.
This can lead to issues with reporting and migrations.

## Expected Behavior
Ensure `@nx/rsbuild` package is listed in the packageGroup
2024-12-11 16:14:51 +00:00
Isaac Mann 6434ab3da3 chore(nx-dev): enable search click through rate (#29311)
Enables `insights` on Algolia search component so that click through
rate will be tracked on the search analytics
2024-12-11 10:46:11 -05:00
Isaac Mann c9ef2f5d8a docs(core): update champions list (#29297)
- Updates the list of champions
- Restyles that champions list to be shown in a grid, rather than a
masonry layout (so that the champions list can be a single list and not
manually balanced between 3 arrays)
- Randomizes the champions list on page refresh so different champions
are shown at the top
2024-12-11 09:55:34 -05:00
Younes Jaaidi 77dc090a75 feat(vite): add angular option to vitest generator (#29055)
## Current Behavior

`@nx/vite:vitest` generator does not provide Angular support in the
`uiFramework` options.

## Expected Behavior

`angular` option should generate the vitest configuration just like
`@nx/angular:application` and `@nx/angular/library` do.
2024-12-11 13:42:12 +00:00
Edouard Bozon 5068a26ed6 chore(react): fix formatting for the style prompt (#28159)
## Current Behavior


![image](https://github.com/user-attachments/assets/39a12e28-e175-46e7-a3f7-7ac9b1b4cb82)


## Expected Behavior
Correct format

## Related Issue(s)
N/A

---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2024-12-11 13:41:38 +00:00
Nigel Sirisomphone e4939fa3ee fix(react): assert test property is defined on webpack rule in nx-react-webpack-plugin (#27525)
The `removeSvgLoaderIfPresent` method in `apply-react-config.ts`
iterates through each Webpack rule, calls `toString` on each `test`
property, and checks for the presence of the string `"svg"` to see if
any existing SVG plugins need to be removed.

Some of the Webpack rules in the config don't have the test property,
and calling `toString` without asserting the test property is defined
first throws type errors.

This commit introduces a very small change that simply asserts that
`rule.test` is not `undefined` before calling `.toString()`.

## Current Behavior
Running a React Webpack library with `svgr` enabled causes compilation
errors.

<img width="1171" alt="Screenshot 2024-08-20 at 10 36 09 AM"
src="https://github.com/user-attachments/assets/cb28d1ca-10d2-4d20-aa78-e69339a8273b">

<img width="487" alt="Screenshot 2024-08-20 at 10 39 28 AM"
src="https://github.com/user-attachments/assets/c170e0d8-8674-43b0-97a3-a5dffd398c17">

## Expected Behavior
Enabling SVGR in the `NxReactWebpackPlugin` config should compile as
normal.

---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2024-12-11 10:40:21 +00:00
Jason Jean a2670639db fix(repo): cleanup old plugins promise (#29295)
<!-- 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 plugins in `nx.json` are changed, the daemon can no longer
communicate with plugin workers and create the graph. It will just hang
waiting for messages to go through.

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

Proper cleanup is done when plugins in `nx.json` are changed and the
daemon continues responding properly with project graphs.

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

Fixes #
2024-12-10 15:36:41 -05:00
James Henry f415595508 chore(repo): update reference to upload-artifact from v3 to v4 (#29296) 2024-12-10 23:49:32 +04:00
Colum Ferry be2eab926b fix(core): ensure @nx/module-federation is listed in package group (#29292)
## Current Behavior
`@nx/module-federation` is not listed in the `nx` package's
`packageGroup`.
This reports it incorrectly in `nx report` and can impact `nx migrate`.

## Expected Behavior
`@nx/module-federation` should be listed in the `packageGroup`
2024-12-10 18:20:17 +00:00
Phillip Barta 098d8a64a1 feat(storybook): use createNodesV2 for init and convert-to-inferred generators (#28092)
<!-- 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 -->
createNodesV1 is used during init

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

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

Based on PR #28091
2024-12-10 12:41:23 -05:00
Tine Kondo cfb67cf124 feat(testing): allow custom address for local registry (#29050)
… output<!-- 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 -->
The `startLocalRegistry()` always assumed that the local registry was
started on `localhost` , which is not necessary the case, if for example
user has set the `listenAddress` option in the underlying `verdaccio
executor` or via the `verdaccio config
file`https://github.com/nrwl/nx/blob/128778e7d1a8d7f2b078b2401d47270c0c15a2ce/packages/js/src/executors/verdaccio/verdaccio.impl.ts#L130

As a result the `startLocalregistry()`, will never return as, it is
waiting forever to detect the local registry URL in the process output:
https://github.com/nrwl/nx/blob/128778e7d1a8d7f2b078b2401d47270c0c15a2ce/packages/js/src/plugins/jest/start-local-registry.ts#L40

This customization of `verdaccio` listen address is something required,
namely when running within a **devcontainer**. In that case, the address
must be set to `0.0.0.0`, so that the registry can be accessed from
`http://localhost:4873` from host machine.


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

Allow customizing the `listenAddress` when starting the local registry,
via an additional option that can be provided when calling the method.
It default value will be `localhost`.

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

Fixes https://github.com/nrwl/nx/issues/28238
2024-12-10 12:36:55 -05:00
Colum Ferry ee91b63b42 feat(rsbuild): add inferred targets plugin (#29192)
## Current Behavior
There is currently no way to execute Rsbuild targets via Nx.

## Expected Behavior
Add a `@nx/rsbuild/plugin` to infer targets based on the
`rsbuild.config` files in the workspace.
Also add an `init` generator to allow for `nx init` in existing rsbuild
projects.
2024-12-10 12:36:15 -05:00
Leosvel Pérez Espinosa 7fca6e236a fix(angular): normalize prerender and appShell options of the application executor correctly (#29281)
<!-- 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 #29276
2024-12-10 15:12:51 +01:00
Leosvel Pérez Espinosa df77fde81f fix(angular): handle removed angular-eslint rules in root eslint config files and update package (#29262)
<!-- 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 -->

The migration to remove Angular ESLint rules that were removed in v19
does not handle these rules in the root eslint config files.

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

The migration to remove Angular ESLint rules that were removed in v19
should handle these rules in the root eslint config files.

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

Fixes #
2024-12-10 14:10:53 +00:00
Jack Hsu 7e388243e0 fix(react): add files entry for publishable libraries (#29277)
<!-- 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-12-10 09:08:39 -05:00
James Henry d2564c6292 chore(repo): use extra-large resource class for memory intensive nx-dev build (#29285) 2024-12-10 16:26:26 +04:00
James Henry 0af50a9f9d docs(release): cover version reference updates in greater detail (#29259) 2024-12-10 15:19:27 +04:00
Leosvel Pérez Espinosa 6684fc0688 fix(vite)!: generate config with esm by default (#29270)
BREAKING CHANGE

When generating projects that use Vite, the Vite configuration will be
set to use the ESM format only. Previously, the configuration was set to
produce both ESM and CJS, but the dual format was not correctly
configured in the libraries' `package.json` files, nor was it producing
the correct declaration files.

<!-- 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-12-10 11:58:51 +01:00
Colum Ferry e82e69198f fix(rsbuild): set publish config correctly (#29282) 2024-12-10 09:44:37 +00:00
Ben McCann e3f8c813d6 fix(js): switch from fast-glob to tinyglobby (#29141) 2024-12-10 12:42:27 +04:00
master96 2d135f952b fix(react-native): typescript lib schema (#27955)
<!-- 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
Currently when react native generators are used. They won't exclude
`.test` extension files.

## Expected Behavior
React native generators should exclude `.test` files in tsconfig lib

## Related Issue(s)

Fixes #

Co-authored-by: vivek ajage <vajage@signifyhealth.com>
2024-12-10 01:15:39 -05:00
Maciej Stosio aaa9cced76 fix(react-native): default template fails when envs are not set (#28931)
## Current Behavior
When envs are not set metro fails in `.babelrc.js` on
`process.env.NX_TASK_TARGET_TARGET.includes('storybook')`

## Expected Behavior
When envs are not set don't fail on the if and just precede.
2024-12-10 00:24:07 -05:00
Juri Strumpflohner ecba861be3 fix(nx-dev): update Nx Cloud proj created (#29272) 2024-12-09 21:46:13 +01:00
James Henry 2c07bf0f73 fix(release): make commits separator in git log command more unique (#29261) 2024-12-09 14:43:20 -05:00
Steven Nance 5114f97912 docs(core): remove nx-cloud agent count (#29271) 2024-12-09 20:40:30 +01:00
Nicholas Cunningham 89ab8874b0 fix(core): Update bundlers to not typecheck if using new TS solution setup (#29227)
If we are using the new TS setup we should opt out of doing type
checking during build since we already have a typecheck target and it
may lead to doing type checking twice.
2024-12-09 10:40:43 -07:00
Isaac Mann 04151ca5dc docs(core): remove nx-cloud agent count (#29265)
Remove references to `NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT`
2024-12-09 11:48:24 -05:00
Isaac Mann fdc09fbf68 docs(core): remove quoted terms in content (#29266)
Remove quoted terms in the form \`"term"\` from the docs
2024-12-09 11:14:41 -05:00
Jason Jean 192bfe72d9 fix(core): hashing fixes (#29247)
<!-- 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 -->

Hashing files via the workspace context sometimes resulted in a falsely
identical hashes when files are renamed.. but remain in the same order
alphabetically. This should be somewhat rare and most likely other
changes would accompany the rename which would change the overall hash.
This hashing was not used in task hashing though so it would not affect
that.

Debugging hashing inconsistencies is currently difficult as there is an
overload of logging:

<details>

```sh
~/p/nx-test (master↓24|✔) [1]$ NX_NATIVE_LOGGING='nx::native::tasks::hashers::hash_workspace_files=trace' NX_DAEMON=false nx lint nx
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/nx.json
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/.gitignore
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/.nxignore
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/nx.json
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/.gitignore
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/.nxignore
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/babel.config.json
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/.nx/workflows/agents.yaml
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/.circleci/config.yml
TRACE nx::native::tasks::hashers::hash_workspace_files: ".circleci/config.yml" was found with glob ["babel.config.json", ".nx/workflows/agents.yaml", ".circleci/config.yml"]
TRACE nx::native::tasks::hashers::hash_workspace_files: "babel.config.json" was found with glob ["babel.config.json", ".nx/workflows/agents.yaml", ".circleci/config.yml"]
TRACE nx::native::tasks::hashers::hash_workspace_files: ".gitignore" was found with glob ["nx.json", ".gitignore", ".nxignore"]
TRACE nx::native::tasks::hashers::hash_workspace_files: ".nxignore" was found with glob ["nx.json", ".gitignore", ".nxignore"]
TRACE nx::native::tasks::hashers::hash_workspace_files: ".gitignore" was found with glob ["nx.json", ".gitignore", ".nxignore"]
TRACE nx::native::tasks::hashers::hash_workspace_files: ".nxignore" was found with glob ["nx.json", ".gitignore", ".nxignore"]
TRACE nx::native::tasks::hashers::hash_workspace_files: "nx.json" was found with glob ["nx.json", ".gitignore", ".nxignore"]
TRACE nx::native::tasks::hashers::hash_workspace_files: "nx.json" was found with glob ["nx.json", ".gitignore", ".nxignore"]
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/babel.config.json
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/.nx/workflows/agents.yaml
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/.circleci/config.yml
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/.eslintrc.json
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/tools/eslint-rules/**/*
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/babel.config.json
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/.nx/workflows/agents.yaml
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/.circleci/config.yml
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/nx.json
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/.gitignore
TRACE nx::native::tasks::hashers::hash_workspace_files: Workspace file set: {workspaceRoot}/.nxignore
TRACE nx::native::tasks::hashers::hash_workspace_files: ".circleci/config.yml" was found with glob ["babel.config.json", ".nx/workflows/agents.yaml", ".circleci/config.yml", ".eslintrc.json", "tools/eslint-rules/**/*"]
TRACE nx::native::tasks::hashers::hash_workspace_files: ".eslintrc.json" was found with glob ["babel.config.json", ".nx/workflows/agents.yaml", ".circleci/config.yml", ".eslintrc.json", "tools/eslint-rules/**/*"]
TRACE nx::native::tasks::hashers::hash_workspace_files: "babel.config.json" was found with glob ["babel.config.json", ".nx/workflows/agents.yaml", ".circleci/config.yml", ".eslintrc.json", "tools/eslint-rules/**/*"]
TRACE nx::native::tasks::hashers::hash_workspace_files: "tools/eslint-rules/index.ts" was found with glob ["babel.config.json", ".nx/workflows/agents.yaml", ".circleci/config.yml", ".eslintrc.json", "tools/eslint-rules/**/*"]
TRACE nx::native::tasks::hashers::hash_workspace_files: "tools/eslint-rules/jest.config.ts" was found with glob ["babel.config.json", ".nx/workflows/agents.yaml", ".circleci/config.yml", ".eslintrc.json", "tools/eslint-rules/**/*"]
TRACE nx::native::tasks::hashers::hash_workspace_files: "tools/eslint-rules/project.json" was found with glob ["babel.config.json", ".nx/workflows/agents.yaml", ".circleci/config.yml", ".eslintrc.json", "tools/eslint-rules/**/*"]
TRACE nx::native::tasks::hashers::hash_workspace_files: "tools/eslint-rules/raw-file-parser.js" was found with glob ["babel.config.json", ".nx/workflows/agents.yaml", ".circleci/config.yml", ".eslintrc.json", "tools/eslint-rules/**/*"]
TRACE nx::native::tasks::hashers::hash_workspace_files: "tools/eslint-rules/rules/ensure-pnpm-lock-version.ts" was found with glob ["babel.config.json", ".nx/workflows/agents.yaml", ".circleci/config.yml", ".eslintrc.json", "tools/eslint-rules/**/*"]
TRACE nx::native::tasks::hashers::hash_workspace_files: "tools/eslint-rules/rules/valid-command-object.spec.ts" was found with glob ["babel.config.json", ".nx/workflows/agents.yaml", ".circleci/config.yml", ".eslintrc.json", "tools/eslint-rules/**/*"]
TRACE nx::native::tasks::hashers::hash_workspace_files: "tools/eslint-rules/rules/valid-command-object.ts" was found with glob ["babel.config.json", ".nx/workflows/agents.yaml", ".circleci/config.yml", ".eslintrc.json", "tools/eslint-rules/**/*"]
TRACE nx::native::tasks::hashers::hash_workspace_files: "tools/eslint-rules/rules/valid-schema-description.spec.ts" was found with glob ["babel.config.json", ".nx/workflows/agents.yaml", ".circleci/config.yml", ".eslintrc.json", "tools/eslint-rules/**/*"]
TRACE nx::native::tasks::hashers::hash_workspace_files: "tools/eslint-rules/rules/valid-schema-description.ts" was found with glob ["babel.config.json", ".nx/workflows/agents.yaml", ".circleci/config.yml", ".eslintrc.json", "tools/eslint-rules/**/*"]
TRACE nx::native::tasks::hashers::hash_workspace_files: "tools/eslint-rules/tsconfig.json" was found with glob ["babel.config.json", ".nx/workflows/agents.yaml", ".circleci/config.yml", ".eslintrc.json", "tools/eslint-rules/**/*"]
TRACE nx::native::tasks::hashers::hash_workspace_files: "tools/eslint-rules/tsconfig.lint.json" was found with glob ["babel.config.json", ".nx/workflows/agents.yaml", ".circleci/config.yml", ".eslintrc.json", "tools/eslint-rules/**/*"]
TRACE nx::native::tasks::hashers::hash_workspace_files: "tools/eslint-rules/tsconfig.spec.json" was found with glob ["babel.config.json", ".nx/workflows/agents.yaml", ".circleci/config.yml", ".eslintrc.json", "tools/eslint-rules/**/*"]

```
</details>

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

Hashing files via the workspace context no longer produces falsely
identical hashes when files are named.

Debugging hashing inconsistencies is better now. It produces the hash
and the file it is adding to the workspace file hashset in the order
which it is added. Different filesets are still handled in parallel with
one another so the logging is best filtered through `grep` for a
particular fileset:
<details>

```sh
~/p/nx (hash-logging|✔) $ NX_NATIVE_LOGGING='nx::native::tasks::hashers::hash_workspace_files=debug' NX_DAEMON=false nx lint nx | grep "nx.json"
DEBUG nx::native::tasks::hashers::hash_workspace_files: Hashing workspace fileset{cache_key="nx.json,.gitignore,.nxignore"}: Adding "5069375034190792089" (".gitignore") to hash
DEBUG nx::native::tasks::hashers::hash_workspace_files: Hashing workspace fileset{cache_key="nx.json,.gitignore,.nxignore"}: Adding "10752854809791558346" (".nxignore") to hash
DEBUG nx::native::tasks::hashers::hash_workspace_files: Hashing workspace fileset{cache_key="nx.json,.gitignore,.nxignore"}: Adding "9876981562233255395" ("nx.json") to hash
DEBUG nx::native::tasks::hashers::hash_workspace_files: Hashing workspace fileset{cache_key="nx.json,.gitignore,.nxignore"}: Hash Value: "12458994942476116599"
```

</details>

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

Fixes #
2024-12-09 11:01:07 -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
Fábio Correia 3474d7c607 fix(release): use prepatch version for pre-release dependent package updates (#29123) 2024-12-09 17:25:15 +04:00
Jacob Ley 5d61191999 fix(core): defer loading package manager until necessary (#29248) 2024-12-07 13:02:58 +04:00
Jason Jean de8b18980c fix(core): fix process being prevented from exiting (#29240)
<!-- 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 -->

The db cleanup handler does not exit the process and thus does not
handle `SIGINT` properly.

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

Nx processes handle SIGINT properly.

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

Fixes #
2024-12-06 16:26:39 -05:00
Benjamin Cabanes d8d74da9fb docs(nx-dev): simplify Hero component by removing ShaderGradient (#29241)
This commit removes the ShaderGradientElement and its associated
functionality from the Hero component, reducing complexity and
dependencies. The return type of the Hero component is also updated for
consistency. These changes lead to a more streamlined codebase with
potentially fewer runtime considerations and increase client
compatibility.
2024-12-06 14:09:46 -05:00
Jason Jean d23350fbc0 chore(repo): fix docs release (#29233)
<!-- 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 -->

Docs fail to release with the new typescript version

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

Docs can be released and release flow can be tested via `--dryRun`

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

Fixes #
2024-12-06 14:09:18 -05:00
Benjamin Cabanes c3b4bf6c43 docs(nx-dev): update contact form sales (#29238)
Corrected a typo in a job title and removed redundant GDPR information
across multiple components. Enhanced the sales team section with new
imports and testimonials to improve visual appeal and clarity.

---------

Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-12-06 13:13:19 -05:00
Mike Hartington 9769c2986c docs(misc): update console blog post release date (#29239)
<!-- 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-12-06 11:56:19 -05:00
Colum Ferry 288193b761 fix(storybook): ensure 'storybook' dep is installed for non-crystal workspaces (#29235)
## Current Behavior
The `storybook` package is required to be installed to correctly find
paths correctly.
It acts almost like a shim.
It was not being installed for non-crystal workspaces

## Expected Behavior
Ensure `storybook` is installed
2024-12-06 16:39:37 +00:00
Emily Xiong 902eef5320 fix(core): add workspaces path if package path is not included (#28824)
<!-- 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 import to a path where is not in the workspaces, it currently
just shows a warning. however, it will cause an error like "module not
found" because there are packages not installed.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
- automatically add to the workspaces
![Screenshot 2024-11-08 at 12 58
42 AM](https://github.com/user-attachments/assets/d36dd093-a0ce-45c3-a783-97244741971f)



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

Fixes #
2024-12-06 11:25:31 -05:00
Colum Ferry 51cf34fc81 fix(storybook): only install react deps for storybook 7 #29213 (#29231)
## Current Behavior
Storybook 7 requires `react` and `react-dom` to be installed as they are
peer deps of the storybook package.
Storybook 8 does not require these deps to be installed as they are now
bundled correctly into storybook

## Expected Behavior
When user's version of storybook < 8, install `react` and `react-dom`,
otherwise, do not.

## Related Issue(s)

Fixes #29213
2024-12-06 16:11:49 +00:00
Zachary DeRose e3df75b1e5 docs(misc): Nx Console CIPE Panel blogpost (#29064)
<!-- 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-12-06 10:46:42 -05:00
Colum Ferry 50d83e2178 feat(rsbuild): add intial package (#29147)
## Current Behavior
We do not currently have a package or plugin to officially support
Rsbuild (http://rsbuild.dev)

## Expected Behavior
We should have a package to manage Rsbuild support
2024-12-06 10:04:10 -05:00
Benjamin Cabanes cc1441170a docs(nx-dev): revamp the Nx Enterprise page on nx.dev (#29209)
This update introduces a revamp to the Nx Enterprise page. The code
changes involved the addition of new image files, amending several
components for improved UI/UX. This refactor also includes an alteration
to the Call-to-Action section and an introduction of a new Carousel
component for better navigation. These adjustments aim to provide an
improved user experience and enhanced readability.

---------

Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-12-05 17:20:45 -05:00
Emily Xiong 2e98918a3f fix(gradle): fix gradle unit test (#29224)
<!-- 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-12-05 16:29:54 -05:00
Emily Xiong 59a3db8685 fix(core): skip nx cloud prompt when interactive is false (#28949)
<!-- 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-12-05 13:55:50 -05:00
Emily Xiong 37adb48db8 fix(gradle): read tasks from properties report (#29124)
<!-- 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 -->

Some gradle tasks are not real tasks. They exist in `tasks.txt` because it is derived from subprojects should not be a real target for that project.

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

Gradle projects only have real gradle tasks which are not derived from their subproject tasks. 

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

Fixes #
2024-12-05 13:53:29 -05:00
Emily Xiong 7328a8dae4 fix(gradle): change gradle glob to include root gradlew (#29206)
<!-- 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 https://github.com/nrwl/nx/issues/28865
2024-12-05 13:46:42 -05:00
Leosvel Pérez Espinosa e9a07da4ac fix(misc): use the ts sync generator with other bundler tasks (#29170)
<!-- 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 -->

Only targets using `tsc` trigger the `@nx/js:typescript-sync` generator
to run.

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

Generating projects with other bundlers should also infer the
`@nx/js:typescript-sync` generator in their relevant targets.

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

Fixes #
2024-12-05 17:42:16 +01:00
Jack Hsu 7c25cf150d fix(remix): update lib generator to generate valid names in package.json (#29219)
<!-- 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
`nx g @nx/remix:lib packages/foo` generates invalid package names in new
TS setup. e.g. `@acme/packages/foo`.

## Expected Behavior
The name should be valid in `package.json`.

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

Fixes #
2024-12-05 11:04:47 -05:00
Jack Hsu f89fca98f3 fix(remix): update app generator with valid package.json without Prettier (#29218)
<!-- 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 -->
If you don't have Prettier installed, then `nx g @nx/remix:app
apps/myapp` will generate a `package.json` with trailing comma, and `npm
install` fails.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
`package.json` should be valid without Prettier.

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

Fixes #
2024-12-05 10:27:53 -05:00
Leosvel Pérez Espinosa 625d8f3095 feat(angular): add migration to remove the tailwindConfig option from ng-packager executors (#29220)
Add migration to remove the `tailwindConfig` option from the ng-packagr
executors, which have been unused since Angular v17. Tailwind CSS
configurations located at the project or workspace root will be picked
up automatically.

<!-- 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 #29217
2024-12-05 16:18:50 +01:00
Thomas Dekiere b848bb3dba fix(release): skip changelog generation for projects without available version data (#29212) 2024-12-05 16:38:04 +04:00
Leosvel Pérez Espinosa 2fa3ce21d4 feat(angular): add migration to remove angular eslint rules removed in v19 (#29214)
Add migration to remove Angular ESLint rules that were removed in v19:

- `@angular-eslint/no-host-metadata-property`
- `@angular-eslint/sort-ngmodule-metadata-arrays`
- `@angular-eslint/prefer-standalone-component`

See Angular ESLint v19 changelog for reference:
https://github.com/angular-eslint/angular-eslint/blob/main/CHANGELOG.md#1900-2024-11-29

<!-- 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-12-05 11:12:52 +01:00
Jason Jean 15060e3a4f fix(core): recreate db when unable to connect (#29207)
<!-- 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 Nx is unable to connect to the DB, nothing works and the user needs
to run `nx reset` to remove the db file.

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

When Nx is unable to connect to the DB, the db is destroyed and
recreated automatically within the same command.

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

Fixes #
2024-12-04 17:27:35 -05:00
Jason Jean 4773e35d01 chore(repo): update nx to 20.2.0-beta.7 (#29198)
<!-- 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 -->

This repo uses Nx `20.2.0-beta.3`

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

This repo uses Nx `20.2.0-beta.7`

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

Fixes #
2024-12-04 15:42:15 -05:00
Colum Ferry 7157e7a07c fix(rspack): align @rspack/core versions (#29199)
Align rspack versions amongst packages and update useLegacyNxPlugin
helper to match new API changes
2024-12-04 18:05:49 +00:00
Jack Hsu 6c5916a79f feat(rollup): use .cjs file extension for config files (#29196)
The `rollup.config.js` file will be resolved as ESM if the closest
`package.json` has `type: 'module`. This causes an error when computing
the project graph and when reading the file for builds.

```
  Original error: require is not defined in ES module scope, you can use import instead
```

<!-- 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. -->

This PR also updates the output directory to `{projectRoot}/dist` for
the new TS setup.

## Current Behavior
`nx g @nx/react:lib --bundler=rollup` has an error due to Node
resolution

## Expected Behavior
`nx g @nx/react:lib --bundler=rollup` works out of the box

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

Fixes #29193, #[29195](https://github.com/nrwl/nx/issues/29195)

---------

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2024-12-04 12:53:42 -05:00
Jack Hsu 972c01bd25 feat(storybook): add support for TS solutions file (#29194)
This PR adds support for the [new TS
setup](https://github.com/nrwl/nx/discussions/29099) with Storybook.
2024-12-04 17:44:07 +00:00
Leosvel Pérez Espinosa 59e3704fb3 fix(testing): force compatible module resolution when running the jest executor (#29189)
<!-- 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 #29139
2024-12-04 12:04:45 -05:00
Colum Ferry aefafc55ba feat(module-federation): alias host and remote generators to consumer and producer (#29190)
## Current Behavior
Our Module Federation support across Angular and React contains Host and
Remote generators.
The module-federation.io docs have started to shift towards Consumer and
Producer terminology for better translation of meanings across
languages.


## Expected Behavior
To stay consistent with official terminology, add aliases for the host
and remote generators to allow for the new terminology. i.e. host ->
consumer, remote -> producer.

Therefore the following are all valid

```shell
nx g host shell --remotes=remote1
nx g host shell --producers=producer1
nx g consumer shell --remotes=remote1
nx g consumer shell --producers=remote1

nx g remote remote1 --host=shell
nx g remote remote1 --consumer=shell
nx g producer producer1 --host=shell
nx g producer producer1 --consumer=shell
```
2024-12-04 16:45:27 +00:00
James Henry 67d03937b5 fix(release): set make_latest legacy during github release creation (#29197) 2024-12-04 11:32:52 -05:00
Leosvel Pérez Espinosa db5e2f63bf docs(core): update nx sync messaging in npm workspaces tutorial (#29188)
Update the npm workspaces tutorial to reflect the changes made in
https://github.com/nrwl/nx/pull/29149.

Updated doc:
https://nx-dev-git-docs-nx-sync-terminal-output-nrwl.vercel.app/getting-started/tutorials/npm-workspaces-tutorial

<!-- 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-12-04 17:28:49 +01:00
Jason Jean bba941ab4d fix(core): move resolving plugins back to main thread (#29176)
<!-- 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 -->

Resolving custom plugins to their paths to be loaded involves loading
our default plugins. When plugin isolation, this loads the default
plugins for each and every plugin worker.

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

Resolution of the plugins is the same and easily serializable to send to
the worker. Resolving plugins on the main thread allows Nx to reuse the
default plugins and decrease the memory usage greatly.

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

Fixes #
2024-12-04 10:05:43 -05:00
Leosvel Pérez Espinosa 1dbddb11ba feat(angular): update analog packages (#29187)
<!-- 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-12-04 11:46:52 +01:00
Jason Jean 75b2080521 chore(core): fix test mocking (#29183)
<!-- 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 -->

The mock for this test is not actually mocking the function being used.

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

The function being used is getting mocked.

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

Fixes #
2024-12-03 19:59:59 -05:00
Nicholas Cunningham dd14f3943c fix(react): None buildable libs should not have a build target (#29175) 2024-12-03 16:30:51 -07:00
Leosvel Pérez Espinosa 3cc321d4ce fix(js): generate multiline project references in the sync generator (#29148)
Update the `@nx/js:typescript-sync` sync generator to produce the
updated project references in multiple lines. This improves the
formatting of the generated project references when not using Prettier.

<!-- 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-12-03 15:58:10 -05:00
Nicholas Cunningham c1469b68ca fix(core): Update preset test snapshots and test names (#29172)
- Creates uniq names for each preset test case
- Updates the test names so you can run each `it` via IDE
2024-12-03 15:57:32 -05:00
Leosvel Pérez Espinosa 38e29b9e90 feat(angular): use new test environment function from jest-preset-angular (#29169)
<!-- 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 #29165
2024-12-03 15:24:14 -05:00
Colum Ferry 54dbbfded5 fix(core): use fork to execute nx generate workspace:preset (#29122)
## Current Behavior
On Windows, when packageManager=pnpm, `create-nx-workspace` fails due to
an issue with `child_process.spawn`.
Using `spawn`, the `@nx/workspace:preset` generator is executed twice
when `packageManager=pnpm`, causing the overall create-nx-workspace flow
to fail, even though most things have been set up correctly to that
point.

Using `fork` has shown success.

## Expected Behavior
Running `create-nx-workspace --packageManager=pnpm` should work on
Windows

## Fixes
Fixes #20222 
Fixes #27270 
Fixes #22917 
Fixes #22312 
Fixes #28710 
Fixes #28289 
Fixes #28235 
Fixes #22383 
Fixes #21742 
Fixes #20270
2024-12-03 15:17:08 -05:00
Philip Fulcher 9bd08851f0 docs(nx-dev): add monorepo relationships blog post (#29152) 2024-12-03 12:27:13 -07:00
Craigory Coppola 6bd86158d1 fix(core): provide a way to reuse cached graph in CI (#29156)
<!-- 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-12-03 13:23:06 -05:00
Jason Jean 9ad6b8c208 fix(core): fix misc issues (#29114)
<!-- 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 -->

This PR fixes several issues:

1. Affected loaded plugins again.
2. `package-json` plugin takes a while and is loaded often.
3. Performance logging was not showing up properly.

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

1. Affected does not load plugins again.
2. `package-json` plugin utilizes a cache so that it is fast even when
it is loaded often.
3. Performance logging shows up properly

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

Fixes #

---------

Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>
2024-12-03 10:24:28 -05:00
Colum Ferry d32ca3788e docs(module-federation): add link to module-federation.io (#29166)
Add a link to https://module-federation.io from the `@nx/module-federation` README
2024-12-03 14:45:20 +00:00
Leosvel Pérez Espinosa 201cd89f5a fix(js): normalize paths correctly when creating temporary tsconfig file for incremental builds (#29121)
<!-- 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 #28316
2024-12-03 15:38:53 +01:00
Leosvel Pérez Espinosa c62d78dd7e feat(angular): add migration to disable @angular-eslint/prefer-standalone when not set (#29164)
- Add migration to disable the `@angular-eslint/prefer-standalone` rule
when it's not already set. This prevents a breaking change due to the
[rule being promoted to the recommended rules in
v19](https://github.com/angular-eslint/angular-eslint/commit/8dfdc4f4d4b2a0b23f91aeb7ef14fa384bec3cec).
- Update the `@nx/angular` package peer dependencies range to drop
Angular v16 and include Angular v20.

<!-- 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 #29163
2024-12-03 15:30:09 +01:00
Leosvel Pérez Espinosa e9be7d92cf feat(core): improve sync messages (#29149)
## `nx sync:check` (out of sync)

**Before**:

![image](https://github.com/user-attachments/assets/3fd737be-9c08-4cb4-b4e2-956bfd325ec7)

**After**:

![image](https://github.com/user-attachments/assets/c96c8f6c-b5e9-4566-88e4-cbe66037e411)

> The `Custom out of sync message` in these examples is a message
returned from the sync generator, while the other one is the fallback
message displayed if the sync generator doesn't return one.

## `nx sync:check` (up to date)

**Before**:

![image](https://github.com/user-attachments/assets/88f46c72-7222-4407-8b4a-90b4b6a7c9de)

**After**:

![image](https://github.com/user-attachments/assets/f4b9e181-67cd-4042-b1ac-be61fb400711)

## Running tasks

**Before**:

![image](https://github.com/user-attachments/assets/0bdc160c-c893-421a-8407-4de05e4d31b4)

**After**:

![image](https://github.com/user-attachments/assets/a7f2d471-1ad8-450f-8438-d1c3d4f8a3f9)

## Sync generator failures

**Before**:

![image](https://github.com/user-attachments/assets/805941cb-cef8-4346-9572-4eea142e6b40)

**After**:

![image](https://github.com/user-attachments/assets/621a3217-efe1-4f92-932f-80509d205dbc)

## Sync generator failures (`--verbose`)

**Before**:

![image](https://github.com/user-attachments/assets/070c22a6-39d0-4c6d-9f9f-38d77903eb6b)

**After**:

![image](https://github.com/user-attachments/assets/b007ecf7-100e-4e04-a7b1-d8bb713dbb37)

<!-- 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-12-03 15:28:12 +01:00
Colum Ferry 5448046f06 feat(module-federation): move common executor logic to module-federation package (#29151)
## Current Behavior
The logic for the `module-federation-dev-server` and
`module-federation-ssr-dev-server` is duplicated across Angular, React
and Rspack.

The majority of this logic is the same, and the duplication causes an
increased maintenance tax.

## Expected Behavior
Move the logic into a utility that is exposed from
`@nx/module-federation`.
2024-12-03 08:15:20 -05:00
Benjamin Cabanes da901dec08 docs(nx-dev): update team (#29160) 2024-12-03 07:59:08 -05:00
Juri Strumpflohner 922c0469b1 docs(testing): fix playwright API docs about task splitting (#29162)
Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-12-03 04:57:34 -08:00
Juri a54bbcc8ac docs(nx-cloud): remove note on --with-env-vars=auto as it is breaking users badly 90% of the time 2024-12-03 11:12:03 +01:00
Benjamin Cabanes 6b870050b6 docs(nx-dev): add Pro plan details to FAQ (#29155)
Included a new FAQ entry to clarify the existence and conditions of the
Pro plan for existing users, which is no longer available to new users.
Added a link to this FAQ section from the pricing display page to help
users easily find information about the Pro plan. Updated HTML in the
FAQ section with an additional class for better scrolling behavior.

---------

Co-authored-by: Juri Strumpflohner <juri.strumpflohner@gmail.com>
2024-12-02 16:31:42 -05:00
Benjamin Cabanes 8c25c02112 docs(nx-dev): add rb2b script to _app.tsx (#29154)
This commit integrates the rb2b tracking script into the application by injecting it into the page with the `afterInteractive` strategy.
2024-12-02 15:54:19 -05:00
Caleb Ukle 6a46030995 docs(core): update e2e-ci glob example (#29150)
<!-- 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 -->
the glob pattern in the e2e-ci example is incorrect for nested
directories example mentioned.
## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
when using nested directories the **/** pattern is needed, so the
example was incorrect
it's also confusing why something wouldn't work, so added more info as
to the different common glob patterns (`**/*`, `**/**`) to be more clear

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

Fixes #

---------

Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-12-02 14:56:12 -05:00
Leosvel Pérez Espinosa 3ec539065d feat(angular): add support for angular v19 (#28847)
## Third-party deps support for Angular v19

- [x] `jest-preset-angular`
  - [x] PRs:
    - [x] https://github.com/thymikee/jest-preset-angular/pull/2835
  - [x] Released:
- [x] RC:
https://github.com/thymikee/jest-preset-angular/releases/tag/v14.4.0-rc.0
- [x] Stable:
https://github.com/thymikee/jest-preset-angular/releases/tag/v14.4.0
- [x] Angular ESLint
  - [x] PRs:
    - [x] https://github.com/angular-eslint/angular-eslint/pull/2109
  - [x] Released:
- [x]
https://github.com/angular-eslint/angular-eslint/releases/tag/v19.0.0
- [x] Storybook
  - [x] PRs:
    - [x] https://github.com/storybookjs/storybook/pull/29659
    - [x] https://github.com/storybookjs/storybook/pull/29677
  - [x] Released:
    - [x] https://github.com/storybookjs/storybook/pull/29679
- [ ] NgRx
  - [x] PRs:
    - [x] https://github.com/ngrx/platform/pull/4602
  - [ ] Released:
- [x] Beta:
https://github.com/ngrx/platform/blob/main/CHANGELOG.md#1900-beta0-2024-11-20
    - [ ] Stable:
- [ ] Analog
  - [x] PRs:
    - [x] https://github.com/analogjs/analog/pull/1447
    - [x] https://github.com/analogjs/analog/pull/1451
  - [ ] Released:
- [x] Beta:
https://github.com/analogjs/analog/releases/tag/v1.10.0-beta.6
    - [ ] Stable:

<!-- 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 -->

Angular v19 is not supported.

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

Angular v19 should be supported.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
 
Fixes #29028
2024-12-02 11:43:24 -05:00
Zachary DeRose 06d549b043 docs(misc): advent of code 2024 starter repo blog (#29132)
<!-- 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-30 19:17:19 -05:00
Jack Hsu ec5a5e6360 feat(react): update app and lib generators to support new TS solution setup (#28808)
This PR updates app and lib generators in the following packages such
that they will generate files with the TS solution setup if it is
detected.

- `@nx/react`
- `@nx/next`
- `@nx/remix`
- `@nx/expo`
- `@nx/react-native`

React apps and libs will be linked using npm/pnpm/yarn/bun workspaces
feature rather than through tsconfig paths. This means that local
aliases like `@/` will work with Next.js and Remix apps.

Note: This will be behind `--workspaces` flag when using `npx
create-nx-workspace` and choosing React stack. If you use the None/TS
stack then adding plugins like `nx add @nx/react` then generating apps,
it will automatically pick up the new TS solution setup.


<!-- 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
React generators are not compatible with TS solution setup (i.e.
workspaces + TS project references).

## Expected Behavior
React generators work with new TS solution setup (Plain, Next.js, Remix,
Expo, React Native).

## Related Issue(s)
#28322

---------

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
2024-11-28 22:18:45 -05:00
Nicholas Cunningham 2cb58b937d fix(webpack): Webpack and Rspack ignore warnings should concat all rules instead of overwrite them. (#29112)
<!-- 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 #18243
2024-11-28 15:36:40 -07:00
Nicholas Cunningham 08a33075a7 fix(nest): update project config to enable artifacts to be built as dev (#29110)
<!-- 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 generate a Nest application and run the serve target
with development configuration the `node-env` is set to `production`.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Running the serve target in `development` should build the artifacts as
`development` so they can be served correctly.

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

Fixes #26761
2024-11-28 10:23:09 -07: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
Colum Ferry c66b99c499 docs(testing): add example of using Playwright's --project argument with Nx (#29107)
## Current Behavior
Missing documentation on how to use Playwright's `--project` argument
with Nx.
Because Nx also has a `--project` argument, passing it to the command
like `nx e2e app --project=firefox` will result in the `--project` being
stripped from the command that is sent to Playwright.


## Expected Behavior
The fix is simple enough, change the command to be `nx e2e app --
--project=firefox` to ensure the argument is forwarded correctly to
Playwright.
Add some information to the Playwright plugin's overview documentation
to explain this.


## Related Issue(s)

Fixes #26965
2024-11-28 05:37:08 -08:00
Colum Ferry 182b46ca66 fix(module-federation): use 'hoisted' runtime for node to prevent issues with eager sharing (#29104)
## Current Behavior
SSR with Module Federation frequently encounters issues related to the
eager resolution of shared packages.
This has resulted in numerous erroneous behaviours including but not
limited to:
- Failure to start server
- Failure to resolve remotes
- Failure to server render remotes

## Expected Behavior
Using the `'hoisted'` runtime provided by MF 2.0, we can ensure that SSR
for Module Federation runs in an async environment, removing the issues
surrounding eager consumption and resolution of shared modules.
In testing, this has fixed the issues outlined above

## Related Issue(s)

Fixes #27000
Fixes #27964
2024-11-28 11:38:17 +00:00
Nicholas Cunningham 8eb6159696 fix(nextjs): Add support for next.config.ts for executors (#29071)
<!-- 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 #28960
2024-11-27 13:50:48 -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
Rares Matei 0bf7565664 docs(nx-cloud): add breaking change mention for terminal outputs (#29097)
<!-- 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-27 16:46:09 +00:00
Jason Jean b018b94096 fix(core): update to the async version of getting powerpack information (#29088)
<!-- 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 -->

The deprecated sync API for getting powerpack license information is
used.

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

The new async API for getting powerpack license information is used if
it is available. If not, it uses the sync API.

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

Fixes #
2024-11-26 20:10:00 -05:00
Benjamin Cabanes 1ea7bb43e1 docs(nx-dev): update webinar signup link (#29090)
Replaced the URL in the webinar signup link with a shortened version to simplify the href. Removed the onClick event handler for tracking the webinar sign-up click event.
2024-11-26 18:58:21 -05:00
Benjamin Cabanes 47663727c1 docs(nx-dev): add WebinarNotifier component (#29087)
Introduce the `WebinarNotifier` component and integrate it within the app. This helps in promoting the upcoming webinars to users by displaying a notification banner with details and a signup link.
2024-11-26 18:55:09 -05:00
Jason Jean 0d0d6c7c11 feat(misc): replace tutorials with social links in create-nx-workspace (#29085)
<!-- 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, `create-nx-workspace` links to tutorials which in most cases,
users are in the middle of doing or have already done in the past.

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

Rather than tutorials, `create-nx-workspace` will welcome users to the
Nx community and give them ways to show their appreciation, stay up to
date, and chat about Nx.

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

Fixes #
2024-11-26 17:49:32 -05:00
Benjamin Cabanes 4030494cd5 docs(nx-dev): update case study link (#29086) 2024-11-26 16:26:02 -05:00
Juri 6089b28916 docs(release): update how the publish results are handled 2024-11-26 21:47:13 +01:00
James Henry 9ab1068d1d docs(repo): update some conformance docs (#29073) 2024-11-27 00:33:28 +04:00
Benjamin Cabanes a435e263cd docs(nx-dev): udpate links for Banking Case Study downloads (#29082)
Corrected URLs in both `enterprise-customers.tsx` and
`metrics-and-customers.tsx` to ensure users can access the Banking Case
Study.
2024-11-26 14:37:17 -05:00
Juri Strumpflohner bcaef27046 docs(core): adjust nx course video titles for better SEO (#29079)
Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-11-26 08:32:05 -08:00
Benjamin Cabanes c75aa8f661 docs(nx-dev): update ebook download link (#29081)
Changed the href in `download-ebook.tsx` to point to the new CI ebook URL.
2024-11-26 11:07:47 -05:00
Andy 55143297be server-next-executor-examples: minor typo documentation (#28830)
## Current Behavior

Typo


![image](https://github.com/user-attachments/assets/39b5ebe8-5518-4afb-8c32-1c736489bf6c)
2024-11-26 08:06:55 -07:00
Colum Ferry a5c5cbf326 fix(module-federation): migration does not handle external nodes and errors (#29075)
## Current Behavior
The React + Angular migrations intended to update the path for the
`ModuleFederationConfig` imports in webpack and rspack config files will
fail on externalNodes in the project graph that have `@nx/webpack` or
`@nx/rspack` listed as a dependency.

## Expected Behavior
If the dependency is discovered in an `externalNode` we should skip that
node, instead of continuing with the migration.
2024-11-26 14:55:02 +00:00
Craigory Coppola 30d722bd98 chore(core): warn when db cache is disabled (#28929)
<!-- 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-26 09:52:37 -05:00
Nicholas Cunningham beded4ef6d fix(angular): ngrx-root-store generator check ngModule path (#29068)
<!-- 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 ngrx-root-store generator on a MFe host app it assumes
`app.module.ts` is created.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
We should check if `app.module.ts` exists first, then fall back if not.

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

Fixes #28970
2024-11-25 16:52:28 -07:00
James Henry 8b3f9d883a chore(repo): use nx-cloud conformance (#29062) 2024-11-25 18:00:57 -05:00
Nicholas Cunningham cbc19c54ae fix(nextjs): ensure next apps config is correctly checked when using jest (#29066)
<!-- 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 create a new Next.js app it checks if `tsconfig.app.json` exists
else it throws an error.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
It should check for `tsconfig.json` instead of `tsconfig.app.json`

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

Fixes #29035
2024-11-25 13:36:19 -07:00
Juri 9921496d64 feat(nx-dev): update top-level navbar 2024-11-25 21:33:22 +01:00
MaxKless 6904789b10 fix(core): don't generate nxCloudId if running nx connect through nx console (#29060) 2024-11-25 09:02:12 -07:00
Colum Ferry 5f92f1729b fix(rspack): outputHashing should default to 'all' #29011 (#29058)
## Current Behavior
Current default for outputHashing is set to 'none'.
This means that both executor and plugin usage will output file names
that will not bust browser cache.

## Expected Behavior
Set default for `outputHashing` to 'all' to ensure all outputted files
are hashed allowing for cache busting.

## Related Issue(s)

Fixes #29011
2024-11-25 09:26:23 -05:00
Isaac Mann fc7ee36a96 chore(nx-dev): wrap breadcrumbs (#29059) 2024-11-25 16:37:19 +04:00
Jason Jean 128778e7d1 chore(repo): update nx to 20.2.0-beta.3 and other dependencies (#29049)
<!-- 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 -->

This repo uses Nx `20.2.0-beta.2`.

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

This repo uses Nx `20.2.0-beta.3`.

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

Fixes #
2024-11-22 18:49:51 -05:00
Isaac Mann c7894d7579 docs(core): enterprise conformance rules docs (#29046)
Co-authored-by: JamesHenry <james@henry.sc>
2024-11-22 17:20:48 -05:00
1234 changed files with 32210 additions and 18777 deletions
+7 -1
View File
@@ -82,7 +82,7 @@ jobs:
NX_E2E_CI_CACHE_KEY: e2e-circleci-linux
NX_DAEMON: 'true'
NX_PERF_LOGGING: 'false'
NX_VERBOSE_LOGGING: 'false'
NX_VERBOSE_LOGGING: 'true'
NX_NATIVE_LOGGING: 'false'
NX_E2E_RUN_E2E: 'true'
NX_CI_EXECUTION_ENV: 'linux'
@@ -114,6 +114,12 @@ jobs:
pnpm nx-cloud record -- nx format:check --base=$NX_BASE --head=$NX_HEAD &
pids+=($!)
pnpm nx-cloud record -- nx sync:check
pids+=($!)
pnpm nx-cloud record -- nx-cloud conformance:check
pids+=($!)
pnpm nx run-many -t check-imports check-commit check-lock-files check-codeowners documentation --parallel=1 --no-dte &
pids+=($!)
+9 -1
View File
@@ -71,9 +71,17 @@
"rules": {
"@nx/workspace/ensure-pnpm-lock-version": [
"error",
{ "version": "9.0" }
{
"version": "9.0"
}
]
}
},
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
}
]
}
+2 -2
View File
@@ -22,10 +22,10 @@ jobs:
node-version: 18
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 8
version: 9.8.0
run_install: false
- name: Get pnpm store directory
+3 -3
View File
@@ -18,9 +18,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 8
version: 9.8.0
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v3
@@ -54,7 +54,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: cached-issue-data
path: ./scripts/issues-scraper/cached/data.json
+1 -1
View File
@@ -419,7 +419,7 @@ jobs:
- name: (Stable Release Only) Trigger Docs Release
# Publish docs only on a full release
if: ${{ !github.event.release.prerelease && github.event_name == 'release' }}
run: npx ts-node ./scripts/release-docs.ts
run: npx ts-node -P ./scripts/tsconfig.scripts.json ./scripts/release-docs.ts
- name: (PR Release Only) Create comment for successful PR release
if: success() && github.event.inputs.pr
+3 -4
View File
@@ -40,14 +40,13 @@ out
# Local dev files
.env.local
.bashrc
.nx
*.node
# Fix for issue when working on the repo in a dev container
.pnpm-store
.nx/cache
.nx/workspace-data
.nx
!.nx/workflows
.cargo/.package-cache
.cargo/bin/
@@ -61,4 +60,4 @@ target
*.wasm
/wasi-sdk*
vite.config.*.timestamp*
vite.config.*.timestamp*
+2 -2
View File
@@ -56,8 +56,8 @@ launch-templates:
- name: Install zip and unzip
script: sudo apt-get -yqq install zip unzip
linux-large:
resource-class: 'docker_linux_amd64/large'
linux-extra-large:
resource-class: 'docker_linux_amd64/extra_large'
image: 'ubuntu22.04-node20.11-v10'
env:
GIT_AUTHOR_EMAIL: test@test.com
+2 -2
View File
@@ -1,10 +1,10 @@
distribute-on:
default: auto linux-medium, 1 linux-large
default: auto linux-medium, 1 linux-extra-large
assignment-rules:
- project: nx-dev
target: build-base
runs-on:
- linux-large
- linux-extra-large
- target: test
runs-on:
- linux-medium
+1 -1
View File
@@ -96,8 +96,8 @@ rust-toolchain @nrwl/nx-native-reviewers
/packages/webpack/** @nrwl/nx-js-reviewers
/e2e/webpack/** @nrwl/nx-js-reviewers
/packages/rspack/** @nrwl/nx-js-reviewers
/packages/rspack/src/utils/module-federation @nrwl/nx-js-reviewers
/e2e/rspack/** @nrwl/nx-js-reviewers
/packages/rsbuild/** @nrwl/nx-js-reviewers
/packages/esbuild/** @nrwl/nx-js-reviewers
/e2e/esbuild/** @nrwl/nx-js-reviewers
/packages/rollup/** @nrwl/nx-js-reviewers
@@ -2,7 +2,7 @@
title: Improve your architecture and CI pipeline times with Nx projects
slug: improve-architecture-and-ci-times-with-projects
authors: [Philip Fulcher]
tags: [nx, enterprise]
tags: [nx, 'customer story']
cover_image: '/blog/images/2024-10-25/header.avif'
pinned: true
---
@@ -0,0 +1,120 @@
---
title: Advent of Code Gets The Crystal Treatment!
slug: advent-of-code-crystal-edition
authors: ['Zack DeRose']
tags: [nx]
cover_image: /blog/images/2024-11-30/thumbnail.png
youtubeUrl: https://youtu.be/st6Yq-19bW8
---
Talking with developers, we've found that one of the main reasons folks like using Nx is: Nx allows their team to focus on shipping a great product, while Nx handles all the rest:
- setting up tools for testing, linting, and etc.
- dynamic CI/CD pipelines with Nx Cloud
- a code generation framework to manage expanding their projects
For the past couple years, we've been releasing an `Advent of Code Starter Repo` with this in mind!
If you're not familiar, [Advent of Code](https://adventofcode.com/) is a special event that runs every December that works like a Advent Calendar of programming problems. Every day at midnight, we all get access to 2 new puzzles that will award us a gold star if you can complete it successfully.
Specifically, our goal is to give developers an easy to use starting point that allows them to focus on solving the puzzles, and handing the rest over to Nx instead of wrestling with setting up tools, file i/o, and the like.
This year, we were able to further reduce the nx-specific config needed, using the new [Nx Project Crystal](/concepts/inferred-tasks) enhancements that landed earlier this year!
## Packages Landed!
We're excited to announce version `2.0.0` of the [`create-ts-aoc-starter`](https://www.npmjs.com/package/create-ts-aoc-starter) and [`ts-aoc-starter`](https://www.npmjs.com/package/ts-aoc-starter) packages are released, just in time for Advent of Code 2024!
### [`create-ts-aoc-starter`](https://www.npmjs.com/package/create-ts-aoc-starter)
This is the code generation command to setup your Advent of Code workspace! Simply run the command:
```terminal
> npx create-ts-aoc-starter@latest
```
And we'll spin up your workspace for you, all tools configured and ready to go!
### [`ts-aoc-starter`](https://www.npmjs.com/package/ts-aoc-starter)
This is the Nx Plugin we're shipping this year that comes pre-installed whenever you run the `create-ts-aoc-starter` command. By installing this package, and adding the `dynamic-tasks` to your `plugins` array of your `nx.json` file, Nx can setup all the commands we'll need for Advent of Code this year, with no manual setup or config required!
## How It Works
After generating your workspace, you'll find a directory for each of the 25 days of the game, and inside each directory, you'll find the following files:
- `a.data.sample.txt`
- `a.data.txt`
- `a.ts`
- `b.data.sample.txt`
- `b.data.txt`
- `b.ts`
Provide your solution to the first part of the day in the `a.ts`, and you can copy and paste your code into `a.data.txt`.
For _most_ days, the puzzle also comes with a sample set of data to demonstrate what the correct answer would be. On these days, you can enter that data into the `a.data.sample.txt` file provided!
To run your solution against the sample data for day 1 then, run one of the commands:
```terminal
> nx day-1-a-sample
> nx day-1-sample
> nx 1-a-sample
> nx 1-sample
```
And to run against the actual data, you can run one of the following:
```terminal
> nx day-1-a
> nx day-1
> nx 1-a
> nx 1
```
Sometimes the second part of the problem simply builds on top of the first. On those days, you can just continue to code in the `a.ts` file, but a `b.ts` and `data.txt` files are also provided if you want to start over. To run these, use the commands:
```terminal
> nx day-1-b
> nx 1-b
> nx day-1-b-sample
> nx 1-b-sample
```
### New Feature for 2.0.0: File Watching!
We've also added file watching (using [`nx watch`](/nx-api/nx/documents/watch) behind the scenes!)
Simply add `watch-` to the start of any of the commands and aliases listed above to start any of them in watch mode, so they automatically re-run as soon as any changes to the file system are detected! Example:
```terminal
> nx watch-1
```
### New Feature for 2.0.0: Additional Data Sets!
This year, we're also including the ability to drop in additional data sets. This can be particularly helpful in later days (as the problems get harder) and you want to test your solution on a data set that isn't the specific sample or the actual dataset provided. For this, simply create a `data.txt` file matching the naming pattern.
For example, if I wanted to create a data set called `foo`, I'd create in the filesystem a file called `a.data.foo.txt`. Then to run against this data set, run one of the commands:
```terminal
> nx day-1-a-foo
> nx day-1-foo
> nx 1-a-foo
> nx 1-foo
> nx watch-day-1-a-foo
> nx watch-day-1-foo
> nx watch-1-a-foo
> nx watch-1-foo
```
## Learn more
- [Tutorial: Creating Your Own Plugin With Inferred Tasks](/extending-nx/tutorials/tooling-plugin#create-an-inferred-task)
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools)
- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](/nx-cloud)
@@ -0,0 +1,86 @@
---
title: Define the relationship with monorepos
slug: define-the-relationship-with-monorepos
authors: ['Philip Fulcher']
tags: [nx]
cover_image: /blog/images/2024-12-03/header.avif
---
A monorepo might sound like a big, intimidating thing, but we're going to break it down to just the bare essentials. **A monorepo helps you better manage the relationships that already exist between your projects.** Once we understand those relationships, we can use tools to very quickly define them and pull them together into a more cohesive whole.
## So, what is a monorepo?
Let's start with the big question: what even is a monorepo?
> That's like when Google only has one repo for the entire company, right?
Not quite. That scale of monorepo doesn't work for most organizations, and we can still use a monorepo approach for smaller systems.
> So it's when you throw all your code in one repo and figure out how to manage it later?
This is also a pretty bad idea. We need tools and processes to manage this volume of code in a single repo.
The best definition I've seen comes from [monorepo.tools](https://monorepo.tools):
> A monorepo is a single repository containing multiple distinct projects with well-defined relationships.
Let's dig into that last part. What do we mean by **well-defined relationships?** It's useful to stat thinking about relationships between code in terms of distance.
## The shortest distance: importing from another file
We'll start with the smallest possible distance between two pieces of code: importing something from another file.
![Diagram showing a form component depending on a button component](/blog/images/2024-12-03/another-file.avif)
Say you have a button component. You create a form and import that button to use. This is a relationship we take for granted because we do it all the time, but there are some distinct benefits to this.
First, we see the impact of our change immediately. We make a change in the button, and we either see the result rendered in the browser, or we get a failed compilation. Or we have a test suite running that will fail or pass a test. Or lint rule warnings appear in our IDE. We immediately see the result of the change we've made, and the impact on the relationship.
This makes iteration fast: we see the impact of the change and can either refine that change or move on to the next one.
## One step away in distance: importing from a package
Let's take a step further away and think about the relationship when you have imported something from a package.
![Diagram showing a form component depending on a design system package that bundles a button component](/blog/images/2024-12-03/package.avif)
Say you have a design system published for your organization. You import the button from that package to use in your form. This looks very similar to what we did before, but we've introduced a big change in this relationship: seeing change is no longer immediate.
If we make a change in the button, there will be some sort of compilation, bundling, and publishing that will need to happen. And we'll need to consume the latest version of the package to actually see the change.
This is a slow process when you're working alone, but it can be managed with some tools. However, what happens if this change crosses team boundaries? Your design system team makes a change to the button and has to go through a PR review and merge process. Eventually that change is released as a new version and published. At some point later, you upgrade your version of the dependency just to find out the button has changed. But there's a bug! You report back to the design system team, and now they're going through this entire process again to get the fix in and published. This iteration cycle is very slow because understanding the impact of the change in the design system is no longer immediately apparent to consumers.
## Even further away: APIs
Let's step one step further: using APIs. Your frontend (in most cases) requires a backend, and it will be broken without it.
![Diagram showing a frontend sending requests to a backend, and the backends responds to the frontend](/blog/images/2024-12-03/api.avif)
There is an **implicit dependency** between the frontend and backend. You don't import code directly, but you do depend on the backend to function.
Let's say that there's a new API endpoint needed, and you agreed with the team that it would be called `api/v1/contact/create` and would accept a payload with `contactName`.
But, the backend team had a conversation about naming standards during their sprint and made the decision that it could really be `contact/init` with a payload of `fullName`.
Understanding the impact of this change is now far-removed from making the change. Not only is there the PR merge, packaging, and releasing, but also deployment. It may not be until the end of the sprint before the impact of this change is actually understood. This iteration is practically glacial.
## How do monorepos help?
How do monorepos help with these relationships? **They shorten the distance of relationships between code.** Code is **colocated** so that the impact of your change can be understood immediately.
In the example with the design system, the button will be imported directly instead of going through a build and package process. The design system team can immediately see the impact of the change they're making and either adjust their approach or fix the issue directly in the consuming app.
For the API team, we can define that implicit relationship between backend and frontend so that we trigger e2e tests to confirm a change works. Or we can generate models from the backend to be consumed by the frontend. When the models are changed, the frontend code that imported those models will immediately reveal the impact of the change.
You might think that moving projects into a single repository changes the relationship between the projects. But the relationships we've talked about here already exist; the monorepo makes those relationships explicit and well-defined. With good monorepo tooling, we can understand the impact of change along any of these relationships faster in a monorepo.
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools)
- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Bluesky](https://bsky.app/profile/nx.dev)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](/nx-cloud)
@@ -0,0 +1,41 @@
---
title: Nx Cloud Pipelines Come To Nx Console
slug: nx-cloud-pipelines-come-to-nx-console
authors: [Zack DeRose]
tags: [nx, nx-cloud, nx-console, enterprise]
cover_image: '/blog/images/2024-11-25/thumbnail.png'
---
## Your CI Pipelines, Now At-A-Glance In Your IDE
We're in the process of adding a new integration between [Nx Cloud](/nx-cloud), our CI product, and [Nx Console](/getting-started/editor-setup) our official plugin for the VSCode and JetBrains IDEs!
Now, once you've [connected your Nx Console to Nx Cloud](https://blog.nrwl.io/nx-console-meets-nx-cloud-d45dc099dc5d), you will have access to a new panel in the console that shows all of your recent CI Pipelines, including those in progress now.
![Nx Cloud Pipeline Panel](/blog/images/2024-11-25/pipeline-panel.png)
This way, you can keep an eye on the status of the pipeline of your latest PR, and always just 1 click away from seeing detailed your results on Nx Cloud.
## Notifications On What You Care About Most
In addition to a panel where you can see all of your recent pipelines, you can also receive pop-up notifications when a pipeline completes
![Pipeline Result Notification](/blog/images/2024-11-25/result-notification.png)
Head to the Nx Console settings to adjust controls on these notifications. This will allow you to adjust notifications to only show for failed runs if you prefer, or to turn off the notifications altogether.
![Notification Settings](/blog/images/2024-11-25/notification-settings.png)
## Coming Soon!
We're in the process of landing this on Nx Console for VSCode now - and we're already dog-fooding it on the `nx` and `nx-console` repos. It will be landing in the next few week for all Nx Cloud projects, with the feature landing on Nx Console for JetBrains IDEs to follow soon!
For more on Nx Cloud, check out the Solutions tab above! Nx Cloud is free to get started, so you can [create your free account today](https://cloud.nx.app)!
[![Learn More about Nx Cloud](/blog/images/2024-11-25/learn-more-about-nx-cloud.gif)](/nx-cloud)
And if you're not using Nx Console yet, you can get started now with Nx Console available for VSCode and JetBrains IDEs:
{% install-nx-console /%}
![Nx Console screenshot](/shared/images/nx-console/nx-console-screenshot.webp)
@@ -0,0 +1,196 @@
---
title: Tailoring Nx for Your Organization
slug: tailoring-nx-for-your-organization
authors: ['Philip Fulcher']
tags: [nx]
cover_image: /blog/images/2024-12-10/header.avif
---
Maintaining a scalable and maintainable monorepo is one of the biggest challenges for growing teams. Standards are essential for keeping code consistent, but relying on documentation and human diligence often falls short. The real challenge is _how_ to enforce those standards effectively and sustainably.
This is where Nx comes in. Nx provides ["drop-in" plugins](/plugin-registry) that enhance the developer experience in monorepos, offering solutions for everything from code generation to automating caching and task execution. One of the biggest benefits is how easily you can **create [custom plugins](/extending-nx/intro/getting-started)** which allow you to **automate your standards based on your organization's needs**.
In this article, well explore how Nx plugins, including custom ones, can help you maintain scalable monorepos while simplifying workflows for your team.
## What are Nx Plugins and why do you need them?
Nx plugins reduce the overhead of using specific tools or frameworks in a monorepo by automating common workflows. They are essentially NPM packages with a structure and metadata that Nx can interpret. A plugin may include:
- **Generators**: For scaffolding code.
- **Executors**: For automating tasks like building, testing, or deploying.
- **Migrations**: For updating codebases, similar to codemods.
Youre not required to use Nx plugins, but they can significantly simplify your workflows. For example, they automate repetitive tasks and enforce consistency across your projects. You can explore the [Nx Plugin Registry](/plugin-registry) to see the available plugins, including those built by the Nx core team and contributions from the community.
Installing a plugin is straightforward. Use the `nx add` command to integrate a plugin into your workspace. For example:
```shell
nx add @nx/playwright
```
The plugins provided by the Nx team are usually designed to cover general use cases, like setting up popular frameworks or tools. However, the real power of lies in **creating your own plugins—or extending existing ones—to** automate your organizations specific workflows.
Creating a custom plugin might sound intimidating, but its simpler than you think. The `@nx/devkit` package provides utilities to help you build functionality just like the Nx core team. Youre not starting from scratch; youre leveraging an established API designed to make the process accessible and efficient.
## Getting started with custom plugins
First, install the `@nx/plugin` package which provides useful code scaffolding features for creating a new custom plugin.
```shell
nx add @nx/plugin
```
Once installed, run the following generator that ships with the `@nx/plugin` package:
```shell
nx g plugin packages/nx-plugin --importPath=@org/nx-plugin
```
Also, make sure to check out our [extensive instructions in our docs for building plugins](/extending-nx/intro/getting-started), or you can jump right to the API for [@nx/plugin](/nx-api/plugin).
## Setting up custom generators
Creating custom generators is the biggest bang-for-your-buck change you can make using custom plugins. The generators distributed with Nx plugins have a wide set of options that allow you to fine-tune their output to meet your needs. But if you have decided on certain rules for your organization, such as a directory structure or project tag schema, it can be easy to forget some of your options when running a generator.
Custom generators are an easy way to enforce how generators from Nx plugins are used. For example:
```shell
nx generate @nx/react:library --name shared-util --directory libs/shared/util --importPath="@org/shared/util" --tags=type:util,scope:shared
```
To understand the right options for this generator, the engineer needs to remember:
- the project naming convention based on the type of library and its scope
- the directory structure based on nested folders for scope
- the import naming convention
- tag name convention based on type and scope
This is a lot to remember! Even the most diligent engineer will forget one of these or miss a typo. **A custom generator** can solve this problem.
Consider a custom generator for your organization that accepts options like this:
```shell
nx generate @org/plugin:library --name util --scope shared --type util
```
This command runs our hypothetical custom generator and provides it with a scope and type for the library. This custom generator takes well-defined options for your org and translates them into the options needed for the underlying generator. A snippet of that would look something like this:
```typescript
import { Tree } from '@nx/devkit';
import { Linter } from '@nx/eslint';
import { libraryGenerator as reactLibraryGenerator } from '@nx/react';
import { LibraryGeneratorSchema } from './schema';
export async function libraryGenerator(
tree: Tree,
options: LibraryGeneratorSchema // schema with strong types for scope and type
) {
// create project name based on submitted name and type
const projectName = `${options.type}-${options.name}`;
// determine directory based on scope and project name
const directory = joinPathFragments('libs', options.scope, projectName);
// determine import path based on scope and project name
const importPath = `@org/${scope}/${projectName}`;
// run the @nx/react library generator with options set
const callbackAfterFilesUpdated = await reactLibraryGenerator(tree, {
name: projectName,
directory,
importPath,
tags: [`type:${options.type}`, `scope:${shared}`],
linter: Linter.EsLint,
style: 'css',
unitTestRunner: 'vitest',
});
return callbackAfterFilesUpdated;
}
export default libraryGenerator;
```
This example of a generator doesnt do much on its own, but it pre-populates options for the underlying generator. This can already be a huge gain in terms of ensuring consistency as it:
- Names the project appropriately
- Creates the correct import path
- Places new projects in the correct directory
- Adds the proper tags to the project
- Selects the correct set of tools
All of that without having to refer to your documentation on how to run the generator the right way. And most of the functionality is provided by Nx! You only need to provide some logic specific to your organization.
These generators will also show up in [Nx Console](/getting-started/editor-setup) alongside the other generators from Nx plugins, so engineers will have quick access.
{% youtube src="https://www.youtube.com/watch?v=myqfGDWC2go" /%}
## Publish to your org with `nx release`
Nx plugins that are located within an existing Nx workspace can be run directly, without the need to build, bundle, or package. They just work and respond to changes just as quickly as any other project in your workspace.
Since were the monorepo people, it might seem wild to suggest that you would have multiple monorepos in your organization; but this is a common scenario, and we whole-heartedly support it.
To support consistency across your org, you can publish this plugin so that all of your Nx workspaces share the same generators and inferred tasks you just created. This makes onboarding any new Nx workspace easier and more consistent. The generator for your plugin will include configuration for [`nx release`](/features/manage-releases) so that youre ready to publish immediately:
```bash
nx release --first-release
```
If you want to test your package by publishing locally, your project will also be set up with a [Verdaccio configuration](/nx-api/js/executors/verdaccio) that allows you to run a local registry for testing your new plugin locally:
```bash
nx local-registry
```
## Presets to create your workspace the way you want it, every time
If youre publishing a plugin for multiple workspaces in your organization, youll want those new workspaces to be created as consistently as your projects. When you create an Nx workspace, you might use a preset like this:
```shell
npx create-nx-workspace@latest react-monorepo --preset=react-monorepo
```
You can [create this same type of preset for your org](/extending-nx/recipes/create-preset), so that new workspaces are set up the same way each time:
```shell
npx create-nx-workspace@latest react-monorepo --preset=org-react
```
Better yet, you can [create your own install package](/extending-nx/recipes/create-install-package), so calling `create-org-workspace` becomes your new standard instead of calling `create-nx-workspace:`
```shell
npx create-org-workspace@latest react-monorepo --framework=react
```
{% youtube src="https://www.youtube.com/watch?v=ocllb5KEXZk" /%}
## What else can a custom plugin provide?
Your plugin can provide _anything an existing Nx plugin provides._ This includes, but is not limited to:
- [Generators](/extending-nx/recipes/local-generators)
- [Task inference](/extending-nx/tutorials/tooling-plugin)
- [Custom eslint rules](/nx-api/eslint/generators/workspace-rule#nxeslintworkspacerule)
- [Migrations](/extending-nx/recipes/migration-generators)
- Shared tool configs
- CI pipeline starters
## Start consistent, stay consistent
Small changes to how Nx is used in your organization can make a big difference. All of these options to tailor Nx to your organization make the right thing to do, the easy thing to do. When your tooling is easier to use than doing it wrong, your engineers are more likely to adopt conventions and maintain them.
## Learn More
- [Enforce Organizational Best Practices with a Local Plugin](/extending-nx/tutorials/organization-specific-plugin)
- [Create a Tooling Plugin](/extending-nx/tutorials/tooling-plugin)
Also, make sure to check out:
- [Nx Docs](https://www.notion.so/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools)
- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Bluesky](https://bsky.app/profile/nx.dev)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](/nx-cloud)
@@ -0,0 +1,154 @@
---
title: Angular State Management for 2025
slug: angular-state-management-2025
authors: ['Mike Hartington']
tags: [angular]
cover_image: /blog/images/2024-12-16/thumbnail.png
---
## Revisiting State Management
The topic of state management in apps is something developers can spend countless hours discussing and never agree on what the "right" solution is. Truth is, there are so many solutions out there these days and they all share similar concepts that you can't really pick wrong. This is true in most frontend frameworks, but especially true in Angular, where the framework has introduced several new features in the past year that make managing state simpler than ever. Let's take a look at some approaches to state management in Angular that take advantage of modern features of the framework and can set us up for success in 2025.
## Signals Only, No Library
In recent versions of Angular, the framework has introduced a new primitive called Signals. Signals provide a way to store a value, update that value, and react to when that value changes. This sounds like features that you would get from a full featured state management library. The benefit of using Signals without any additional libraries is that you can make things work for you how ever you want. If you have opinions on how you want to construct your state and manage updates, raw Signals can accommodate this.
```ts
@Component({
template: `
<p>Hello, {{ name() }}</p>
<button (click)="updateName()">Update</button>
`,
})
export class MessageComponent {
name = signal('World');
constructor() {
effect(() => {
console.log('Name has changed: ', this.name());
});
}
updateName() {
this.name.set('Mike');
}
}
```
The built-in methods on the `signal` make creating a simple local store very easy to do. If you take Signals and utilize a service, you create your own mini-store.
```ts
export class AppStore {
readonly state = signal([]);
add(item) {
this.state.update((oldState) => [...oldState, item]);
}
delete(item) {
this.state.update((oldState) => oldState.filter((e) => e.id !== item.id));
}
update(item) {
this.state.update((oldState) =>
oldState.map((e) => (e.id === item.id ? item : e))
);
}
}
```
Now this is just a very basic approach to managing state, but if you do not want to reach for an additional libray, you could get pretty far with this basic solution. Throw a few `effect`s in there if you need to perform some side effects, and you're golden.
## Signal State
If you've been around Angular long enough, you've probably reached for NgRx before, and with good reason. NgRx provides a standard way of managing state in your app that is scalable and testable. In the past, NgRx has provided a store solution based on RxJS, but in more recent releases, NgRx provides two new API based on Signals, Signal State and Signal Store.
Signal State is a lightweight API meant to be used in smaller, more isolated scenarios, where a full redux-like API isn't needed. This could be in small to medium sized apps, and in the component itself or extracted to a service.
Reworking our previous example, we can take our signal-based store and update it to use Signal State:
```ts
import { patchState, signalState } from '@ngrx/signals';
export class AppStore {
readonly state = signalState<Store>({ items: [] });
addToStore(item: StoreItem) {
patchState(this.state, (oldState) => ({
...oldState,
items: [...oldState.items, item],
}));
}
removeFromStore(item: StoreItem) {
patchState(this.state, (oldState) => ({
...oldState,
items: oldState.items.filter((e) => e.id !== item.id),
}));
}
updateStore(item: StoreItem) {
patchState(this.state, (oldState) => ({
...oldState,
items: oldState.items.map((e) =>
e.id === item.id ? { ...item, name: 'bar' } : e
),
}));
}
}
```
Instantly, some things should stand out to you. First, we use the new `signalState` function, instead of the raw `signal` API. Now we can have a more type safe mechanism for interacting with our state. Second, we're no long passing an array. `signalState` only accepts an object/record like value. If you need an array, you put that on a property of the state.
Finally, the way we interact with our state is different. Instead of manipulating the state directly, we use the `patchState` function instead. `patchState` takes the state we want to manipulate, and uses a function to return a new version of that state. To add a new item to our `items` object, we can simply use the spread operator. Removing an item means we use `filter`, and updating an item means we use `map`. What's great about this is not only are we doing things in an immutable way, we're also getting all the types from our state. If we pass along a type that our state doesn't recognize, we'll get a type error before we even save.
## Signal Store
So Signal State is a more prescriptive way of handling smaller state, be it in a component or service. What is Signal Store all about? Signal Store is the more robust solution that you would expect for NgRx. It still is based on Signals, keeping the structure that most larger teams would want for this state solutions. Again, let's rework our previous example and update it for Signal Store.
```ts
const AppStore = signalStore(
withState<Store>({
items: [],
}),
withMethods((state) => ({
addToStore(item: StoreItem) {
patchState(state, (oldState) => ({
...oldState,
items: [...oldState.items, item],
}));
},
removeFromStore(item: StoreItem) {
patchState(state, (oldState) => ({
...oldState,
items: oldState.items.filter((e) => e.id !== item.id),
}));
},
updateStore(item: StoreItem) {
patchState(state, (oldState) => ({
...oldState,
items: oldState.items.map((e) =>
e.id === item.id ? { ...item, name: 'bar' } : e
),
}));
},
}))
);
```
Here, we're starting to see a more structured approach to managing state that isolates our state interactions from the rest of our app. Instead of creating a service, we use the `signalStore` function instead. `signalStore` will return an injectable service instead that we provide to a component, or our root app instance. From here, we pass a `withState` function to provide any actual state value to the store. Like `signalState`, this is an object/record only.
For modifying our store, we can use the `withMethods` function and pass any methods we want to expose to our app. What stands out here is that our store's value is accessible without having to inject it. Similar to `signalState`, we use the `patchState` to make any changes we need. Since the mechanism to modify the store in `signalStore` is very close to what we had in `signalState`, it's very approachable when migrating from your simple local store to something more full featured. So if your app and team grow significantly, this is a great path forward.
## Parting Thoughts
If you've tried managing state using something like NgRx or other redux-inspired APIs, signal-based solutions are a breath of fresh air. Whether you are just building a small app and just want to use the raw signal API, or if you are in a large enterprise and want a structured approach to managing things, Signal State or Signal Store are both excellent solutions. Check out the Angular docs on the Signals or NgRx's docs on Signal State or Signal Store
- [Signals](https://angular.dev/essentials/signals)
- [Signal State](https://ngrx.io/guide/signals/signal-state)
- [Signal Store](https://ngrx.io/guide/signals/signal-store)
Also, make sure to check out:
- [Nx Docs](https://www.notion.so/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools)
- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Bluesky](https://bsky.app/profile/nx.dev)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](/nx-cloud)
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 KiB

@@ -1,5 +1,5 @@
---
title: 'Automate Task Pipelines to Build Before next start'
title: 'Create a Task Pipeline to Build Your Next app Before Serving it'
videoUrl: 'https://youtu.be/_U4hu6SuBaY'
duration: '3:07'
---
@@ -1,5 +1,5 @@
---
title: 'Configure CI to Access Remote Caching'
title: 'Enable Read/Write Access to your Nx Remote Cache from CI'
videoUrl: 'https://youtu.be/vBokLJ_F8qs'
duration: '1:45'
---
@@ -1,5 +1,5 @@
---
title: 'Run Tasks in Parallel on Different Machines on CI'
title: 'Speed Up CI by Running Tasks in Parallel on Different Machines'
videoUrl: 'https://youtu.be/lO_p4tA6IZI'
duration: '2:08'
---
@@ -1,5 +1,5 @@
---
title: 'Split Playwright e2e Tests for a Faster CI'
title: 'Run Playwright E2E Tests Faster by Parallelizing Them on CI'
videoUrl: 'https://youtu.be/42XnmzxEXM8'
duration: '5:47'
---
@@ -39,12 +39,12 @@
],
"executors": [
{
"description": "Compile and bundle an Nx Conformance Rule",
"file": "external-generated/packages/powerpack-conformance/executors/bundle-rule.json",
"description": "Compile and bundle one or more Nx Conformance Rules",
"file": "external-generated/packages/powerpack-conformance/executors/bundle-rules.json",
"hidden": false,
"name": "bundle-rule",
"originalFilePath": "/libs/nx-packages/powerpack-conformance/src/executors/bundle-rule/schema.json",
"path": "powerpack-conformance/executors/bundle-rule",
"name": "bundle-rules",
"originalFilePath": "/libs/nx-packages/powerpack-conformance/src/executors/bundle-rules/schema.json",
"path": "powerpack-conformance/executors/bundle-rules",
"type": "executor"
}
],
@@ -0,0 +1,24 @@
{
"name": "bundle-rules",
"implementation": "/libs/nx-packages/powerpack-conformance/src/executors/bundle-rules/executor.ts",
"schema": {
"$schema": "https://json-schema.org/schema",
"version": 2,
"title": "BundleNxConformanceRules",
"description": "Compile and bundle one or more Nx Conformance Rules",
"type": "object",
"properties": {
"outputPath": {
"type": "string",
"description": "The output path for the bundled rules to be written to"
}
},
"required": ["outputPath"],
"presets": []
},
"description": "Compile and bundle one or more Nx Conformance Rules",
"aliases": [],
"hidden": false,
"path": "/libs/nx-packages/powerpack-conformance/src/executors/bundle-rules/schema.json",
"type": "executor"
}
@@ -28,6 +28,7 @@ Install `create-nx-workspace` globally to invoke the command directly, or use `n
| `--defaultBase` | string | Default base to use for new projects. (Default: `main`) |
| `--docker` | boolean | Generate a Dockerfile for the Node API. |
| `--e2eTestRunner` | `playwright`, `cypress`, `none` | Test runner to use for end to end (E2E) tests. |
| `--formatter` | string | Code formatter to use. |
| `--framework` | string | Framework option to be used with certain stacks. |
| `--help` | boolean | Show help. |
| `--interactive` | boolean | Enable interactive mode with presets. (Default: `true`) |
@@ -45,6 +46,7 @@ Install `create-nx-workspace` globally to invoke the command directly, or use `n
| `--style` | string | Stylesheet type to be used with certain stacks. |
| `--useGitHub` | boolean | Will you be using GitHub as your git hosting provider? (Default: `false`) |
| `--version` | boolean | Show version number. |
| `--workspaces` | boolean | Use package manager workspaces. (Default: `false`) |
| `--workspaceType` | `integrated`, `package-based`, `standalone` | The type of workspace to create. |
## Presets
@@ -8,7 +8,7 @@ A node describing a project in a workspace
- [data](../../devkit/documents/ProjectGraphProjectNode#data): ProjectConfiguration & Object
- [name](../../devkit/documents/ProjectGraphProjectNode#name): string
- [type](../../devkit/documents/ProjectGraphProjectNode#type): "app" | "e2e" | "lib"
- [type](../../devkit/documents/ProjectGraphProjectNode#type): "lib" | "app" | "e2e"
## Properties
@@ -28,4 +28,4 @@ Additional metadata about a project
### type
**type**: `"app"` \| `"e2e"` \| `"lib"`
**type**: `"lib"` \| `"app"` \| `"e2e"`
+124
View File
@@ -847,6 +847,40 @@
"isExternal": false,
"path": "/ci/recipes/enterprise/dte",
"tags": []
},
{
"id": "conformance",
"name": "Conformance",
"description": "Conformance features that are available to Nx Cloud Enterprise customers",
"mediaImage": "",
"file": "",
"itemList": [
{
"id": "configure-conformance-rules-in-nx-cloud",
"name": "Configure Conformance Rules in Nx Cloud",
"description": "",
"mediaImage": "",
"file": "nx-cloud/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
"tags": ["conformance"]
},
{
"id": "publish-conformance-rules-to-nx-cloud",
"name": "Publish Conformance Rules to Nx Cloud",
"description": "",
"mediaImage": "",
"file": "nx-cloud/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
"tags": ["conformance"]
}
],
"isExternal": false,
"path": "/ci/recipes/enterprise/conformance",
"tags": []
}
],
"isExternal": false,
@@ -1420,6 +1454,40 @@
"isExternal": false,
"path": "/ci/recipes/enterprise/dte",
"tags": []
},
{
"id": "conformance",
"name": "Conformance",
"description": "Conformance features that are available to Nx Cloud Enterprise customers",
"mediaImage": "",
"file": "",
"itemList": [
{
"id": "configure-conformance-rules-in-nx-cloud",
"name": "Configure Conformance Rules in Nx Cloud",
"description": "",
"mediaImage": "",
"file": "nx-cloud/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
"tags": ["conformance"]
},
{
"id": "publish-conformance-rules-to-nx-cloud",
"name": "Publish Conformance Rules to Nx Cloud",
"description": "",
"mediaImage": "",
"file": "nx-cloud/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
"tags": ["conformance"]
}
],
"isExternal": false,
"path": "/ci/recipes/enterprise/conformance",
"tags": []
}
],
"isExternal": false,
@@ -1736,6 +1804,62 @@
"path": "/ci/recipes/enterprise/dte/jenkins-dte",
"tags": []
},
"/ci/recipes/enterprise/conformance": {
"id": "conformance",
"name": "Conformance",
"description": "Conformance features that are available to Nx Cloud Enterprise customers",
"mediaImage": "",
"file": "",
"itemList": [
{
"id": "configure-conformance-rules-in-nx-cloud",
"name": "Configure Conformance Rules in Nx Cloud",
"description": "",
"mediaImage": "",
"file": "nx-cloud/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
"tags": ["conformance"]
},
{
"id": "publish-conformance-rules-to-nx-cloud",
"name": "Publish Conformance Rules to Nx Cloud",
"description": "",
"mediaImage": "",
"file": "nx-cloud/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
"tags": ["conformance"]
}
],
"isExternal": false,
"path": "/ci/recipes/enterprise/conformance",
"tags": []
},
"/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud": {
"id": "configure-conformance-rules-in-nx-cloud",
"name": "Configure Conformance Rules in Nx Cloud",
"description": "",
"mediaImage": "",
"file": "nx-cloud/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
"tags": ["conformance"]
},
"/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud": {
"id": "publish-conformance-rules-to-nx-cloud",
"name": "Publish Conformance Rules to Nx Cloud",
"description": "",
"mediaImage": "",
"file": "nx-cloud/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
"tags": ["conformance"]
},
"/ci/recipes/other": {
"id": "other",
"name": "Other",
+152 -27
View File
@@ -1268,6 +1268,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Updating Version References in Manifest Files (e.g. package.json)",
"path": "/recipes/nx-release/updating-version-references",
"id": "updating-version-references",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Automatically Version with Conventional Commits",
"path": "/recipes/nx-release/automatically-version-with-conventional-commits",
@@ -1340,14 +1348,6 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Publish a Custom Dist Directory",
"path": "/recipes/nx-release/publish-custom-dist-directory",
"id": "publish-custom-dist-directory",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Build Before Versioning",
"path": "/recipes/nx-release/build-before-versioning",
@@ -2417,6 +2417,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Updating Version References in Manifest Files (e.g. package.json)",
"path": "/recipes/nx-release/updating-version-references",
"id": "updating-version-references",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Automatically Version with Conventional Commits",
"path": "/recipes/nx-release/automatically-version-with-conventional-commits",
@@ -2489,14 +2497,6 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Publish a Custom Dist Directory",
"path": "/recipes/nx-release/publish-custom-dist-directory",
"id": "publish-custom-dist-directory",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Build Before Versioning",
"path": "/recipes/nx-release/build-before-versioning",
@@ -2532,6 +2532,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Updating Version References in Manifest Files (e.g. package.json)",
"path": "/recipes/nx-release/updating-version-references",
"id": "updating-version-references",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Automatically Version with Conventional Commits",
"path": "/recipes/nx-release/automatically-version-with-conventional-commits",
@@ -2604,14 +2612,6 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Publish a Custom Dist Directory",
"path": "/recipes/nx-release/publish-custom-dist-directory",
"id": "publish-custom-dist-directory",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Build Before Versioning",
"path": "/recipes/nx-release/build-before-versioning",
@@ -6041,6 +6041,31 @@
}
],
"disableCollapsible": false
},
{
"name": "Conformance",
"path": "/ci/recipes/enterprise/conformance",
"id": "conformance",
"isExternal": false,
"children": [
{
"name": "Configure Conformance Rules in Nx Cloud",
"path": "/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
"id": "configure-conformance-rules-in-nx-cloud",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Publish Conformance Rules to Nx Cloud",
"path": "/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
"id": "publish-conformance-rules-to-nx-cloud",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"disableCollapsible": false
}
],
"disableCollapsible": false
@@ -6459,6 +6484,31 @@
}
],
"disableCollapsible": false
},
{
"name": "Conformance",
"path": "/ci/recipes/enterprise/conformance",
"id": "conformance",
"isExternal": false,
"children": [
{
"name": "Configure Conformance Rules in Nx Cloud",
"path": "/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
"id": "configure-conformance-rules-in-nx-cloud",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Publish Conformance Rules to Nx Cloud",
"path": "/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
"id": "publish-conformance-rules-to-nx-cloud",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"disableCollapsible": false
}
],
"disableCollapsible": false
@@ -6689,6 +6739,47 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Conformance",
"path": "/ci/recipes/enterprise/conformance",
"id": "conformance",
"isExternal": false,
"children": [
{
"name": "Configure Conformance Rules in Nx Cloud",
"path": "/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
"id": "configure-conformance-rules-in-nx-cloud",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Publish Conformance Rules to Nx Cloud",
"path": "/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
"id": "publish-conformance-rules-to-nx-cloud",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"disableCollapsible": false
},
{
"name": "Configure Conformance Rules in Nx Cloud",
"path": "/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
"id": "configure-conformance-rules-in-nx-cloud",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Publish Conformance Rules to Nx Cloud",
"path": "/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
"id": "publish-conformance-rules-to-nx-cloud",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Other",
"path": "/ci/recipes/other",
@@ -9794,6 +9885,40 @@
"isExternal": false,
"disableCollapsible": false
},
{
"id": "rsbuild",
"path": "/nx-api/rsbuild",
"name": "rsbuild",
"children": [
{
"id": "generators",
"path": "/nx-api/rsbuild/generators",
"name": "generators",
"children": [
{
"id": "init",
"path": "/nx-api/rsbuild/generators/init",
"name": "init",
"children": [],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "configuration",
"path": "/nx-api/rsbuild/generators/configuration",
"name": "configuration",
"children": [],
"isExternal": false,
"disableCollapsible": false
}
],
"isExternal": false,
"disableCollapsible": false
}
],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "rspack",
"path": "/nx-api/rspack",
@@ -10643,9 +10768,9 @@
"name": "executors",
"children": [
{
"id": "bundle-rule",
"path": "/nx-api/powerpack-conformance/executors/bundle-rule",
"name": "bundle-rule",
"id": "bundle-rules",
"path": "/nx-api/powerpack-conformance/executors/bundle-rules",
"name": "bundle-rules",
"children": [],
"isExternal": false,
"disableCollapsible": false
+39 -8
View File
@@ -108,7 +108,7 @@
"type": "executor"
},
"/nx-api/angular/executors/application": {
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities. _Note: this is only supported in Angular versions >= 17.0.0_.",
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities.",
"file": "generated/packages/angular/executors/application.json",
"hidden": false,
"name": "application",
@@ -200,7 +200,7 @@
"type": "generator"
},
"/nx-api/angular/generators/convert-to-application-executor": {
"description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder. _Note: this is only supported in Angular versions >= 17.0.0_.",
"description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder.",
"file": "generated/packages/angular/generators/convert-to-application-executor.json",
"hidden": false,
"name": "convert-to-application-executor",
@@ -2891,6 +2891,37 @@
},
"path": "/nx-api/rollup"
},
"rsbuild": {
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "rsbuild",
"packageName": "@nx/rsbuild",
"description": "The Nx Plugin for Rsbuild contains an Nx plugin, executors and utilities that support building applications using Rsbuild.",
"documents": {},
"root": "/packages/rsbuild",
"source": "/packages/rsbuild/src",
"executors": {},
"generators": {
"/nx-api/rsbuild/generators/init": {
"description": "Initialize the `@nx/rsbuild` plugin.",
"file": "generated/packages/rsbuild/generators/init.json",
"hidden": true,
"name": "init",
"originalFilePath": "/packages/rsbuild/src/generators/init/schema.json",
"path": "/nx-api/rsbuild/generators/init",
"type": "generator"
},
"/nx-api/rsbuild/generators/configuration": {
"description": "Add an Rsbuild configuration for the provided project.",
"file": "generated/packages/rsbuild/generators/configuration.json",
"hidden": false,
"name": "configuration",
"originalFilePath": "/packages/rsbuild/src/generators/configuration/schema.json",
"path": "/nx-api/rsbuild/generators/configuration",
"type": "generator"
}
},
"path": "/nx-api/rsbuild"
},
"rspack": {
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "rspack",
@@ -3681,13 +3712,13 @@
"root": "/libs/nx-packages/powerpack-conformance",
"source": "/libs/nx-packages/powerpack-conformance/src",
"executors": {
"/nx-api/powerpack-conformance/executors/bundle-rule": {
"description": "Compile and bundle an Nx Conformance Rule",
"file": "external-generated/packages/powerpack-conformance/executors/bundle-rule.json",
"/nx-api/powerpack-conformance/executors/bundle-rules": {
"description": "Compile and bundle one or more Nx Conformance Rules",
"file": "external-generated/packages/powerpack-conformance/executors/bundle-rules.json",
"hidden": false,
"name": "bundle-rule",
"originalFilePath": "/libs/nx-packages/powerpack-conformance/src/executors/bundle-rule/schema.json",
"path": "/nx-api/powerpack-conformance/executors/bundle-rule",
"name": "bundle-rules",
"originalFilePath": "/libs/nx-packages/powerpack-conformance/src/executors/bundle-rules/schema.json",
"path": "/nx-api/powerpack-conformance/executors/bundle-rules",
"type": "executor"
}
},
+33 -33
View File
@@ -1737,6 +1737,17 @@
"path": "/recipes/nx-release/release-projects-independently",
"tags": ["nx-release"]
},
{
"id": "updating-version-references",
"name": "Updating Version References in Manifest Files (e.g. package.json)",
"description": "",
"mediaImage": "",
"file": "shared/recipes/nx-release/updating-version-references",
"itemList": [],
"isExternal": false,
"path": "/recipes/nx-release/updating-version-references",
"tags": ["nx-release"]
},
{
"id": "automatically-version-with-conventional-commits",
"name": "Automatically Version with Conventional Commits",
@@ -1836,17 +1847,6 @@
"path": "/recipes/nx-release/configure-changelog-format",
"tags": ["nx-release"]
},
{
"id": "publish-custom-dist-directory",
"name": "Publish a Custom Dist Directory",
"description": "",
"mediaImage": "",
"file": "shared/recipes/nx-release/publish-custom-dist-directory",
"itemList": [],
"isExternal": false,
"path": "/recipes/nx-release/publish-custom-dist-directory",
"tags": ["nx-release"]
},
{
"id": "build-before-versioning",
"name": "Build Before Versioning",
@@ -3311,6 +3311,17 @@
"path": "/recipes/nx-release/release-projects-independently",
"tags": ["nx-release"]
},
{
"id": "updating-version-references",
"name": "Updating Version References in Manifest Files (e.g. package.json)",
"description": "",
"mediaImage": "",
"file": "shared/recipes/nx-release/updating-version-references",
"itemList": [],
"isExternal": false,
"path": "/recipes/nx-release/updating-version-references",
"tags": ["nx-release"]
},
{
"id": "automatically-version-with-conventional-commits",
"name": "Automatically Version with Conventional Commits",
@@ -3410,17 +3421,6 @@
"path": "/recipes/nx-release/configure-changelog-format",
"tags": ["nx-release"]
},
{
"id": "publish-custom-dist-directory",
"name": "Publish a Custom Dist Directory",
"description": "",
"mediaImage": "",
"file": "shared/recipes/nx-release/publish-custom-dist-directory",
"itemList": [],
"isExternal": false,
"path": "/recipes/nx-release/publish-custom-dist-directory",
"tags": ["nx-release"]
},
{
"id": "build-before-versioning",
"name": "Build Before Versioning",
@@ -3470,6 +3470,17 @@
"path": "/recipes/nx-release/release-projects-independently",
"tags": ["nx-release"]
},
"/recipes/nx-release/updating-version-references": {
"id": "updating-version-references",
"name": "Updating Version References in Manifest Files (e.g. package.json)",
"description": "",
"mediaImage": "",
"file": "shared/recipes/nx-release/updating-version-references",
"itemList": [],
"isExternal": false,
"path": "/recipes/nx-release/updating-version-references",
"tags": ["nx-release"]
},
"/recipes/nx-release/automatically-version-with-conventional-commits": {
"id": "automatically-version-with-conventional-commits",
"name": "Automatically Version with Conventional Commits",
@@ -3569,17 +3580,6 @@
"path": "/recipes/nx-release/configure-changelog-format",
"tags": ["nx-release"]
},
"/recipes/nx-release/publish-custom-dist-directory": {
"id": "publish-custom-dist-directory",
"name": "Publish a Custom Dist Directory",
"description": "",
"mediaImage": "",
"file": "shared/recipes/nx-release/publish-custom-dist-directory",
"itemList": [],
"isExternal": false,
"path": "/recipes/nx-release/publish-custom-dist-directory",
"tags": ["nx-release"]
},
"/recipes/nx-release/build-before-versioning": {
"id": "build-before-versioning",
"name": "Build Before Versioning",
+21 -7
View File
@@ -497,6 +497,13 @@
"name": "Release Projects Independently",
"path": "/recipes/nx-release/release-projects-independently"
},
{
"description": "",
"file": "shared/recipes/nx-release/updating-version-references",
"id": "updating-version-references",
"name": "Updating Version References in Manifest Files (e.g. package.json)",
"path": "/recipes/nx-release/updating-version-references"
},
{
"description": "",
"file": "shared/recipes/nx-release/automatically-version-with-conventional-commits",
@@ -560,13 +567,6 @@
"name": "Configure Changelog Format",
"path": "/recipes/nx-release/configure-changelog-format"
},
{
"description": "",
"file": "shared/recipes/nx-release/publish-custom-dist-directory",
"id": "publish-custom-dist-directory",
"name": "Publish a Custom Dist Directory",
"path": "/recipes/nx-release/publish-custom-dist-directory"
},
{
"description": "",
"file": "shared/recipes/nx-release/build-before-versioning",
@@ -1235,6 +1235,20 @@
"id": "conformance",
"name": "Run Language-Agnostic Conformance Rules",
"path": "/nx-enterprise/powerpack/conformance"
},
{
"description": "",
"file": "nx-cloud/enterprise/conformance/configure-conformance-rules-in-nx-cloud",
"id": "configure-conformance-rules-in-nx-cloud",
"name": "Configure Conformance Rules in Nx Cloud",
"path": "/ci/recipes/enterprise/conformance/configure-conformance-rules-in-nx-cloud"
},
{
"description": "",
"file": "nx-cloud/enterprise/conformance/publish-conformance-rules-to-nx-cloud",
"id": "publish-conformance-rules-to-nx-cloud",
"name": "Publish Conformance Rules to Nx Cloud",
"path": "/ci/recipes/enterprise/conformance/publish-conformance-rules-to-nx-cloud"
}
],
"owners": [
+32 -2
View File
@@ -103,7 +103,7 @@
"type": "executor"
},
{
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities. _Note: this is only supported in Angular versions >= 17.0.0_.",
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities.",
"file": "generated/packages/angular/executors/application.json",
"hidden": false,
"name": "application",
@@ -195,7 +195,7 @@
"type": "generator"
},
{
"description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder. _Note: this is only supported in Angular versions >= 17.0.0_.",
"description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder.",
"file": "generated/packages/angular/generators/convert-to-application-executor.json",
"hidden": false,
"name": "convert-to-application-executor",
@@ -2865,6 +2865,36 @@
"root": "/packages/rollup",
"source": "/packages/rollup/src"
},
{
"description": "The Nx Plugin for Rsbuild contains an Nx plugin, executors and utilities that support building applications using Rsbuild.",
"documents": [],
"executors": [],
"generators": [
{
"description": "Initialize the `@nx/rsbuild` plugin.",
"file": "generated/packages/rsbuild/generators/init.json",
"hidden": true,
"name": "init",
"originalFilePath": "/packages/rsbuild/src/generators/init/schema.json",
"path": "rsbuild/generators/init",
"type": "generator"
},
{
"description": "Add an Rsbuild configuration for the provided project.",
"file": "generated/packages/rsbuild/generators/configuration.json",
"hidden": false,
"name": "configuration",
"originalFilePath": "/packages/rsbuild/src/generators/configuration/schema.json",
"path": "rsbuild/generators/configuration",
"type": "generator"
}
],
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "rsbuild",
"packageName": "@nx/rsbuild",
"root": "/packages/rsbuild",
"source": "/packages/rsbuild/src"
},
{
"description": "The Nx Plugin for Rspack contains executors and generators that support building applications using Rspack.",
"documents": [
@@ -14,6 +14,7 @@ We provide a recommended version, and it is usually the latest minor version of
| Angular Version | **Nx Version _(recommended)_** | Nx Version _(range)_ |
| --------------- | ------------------------------ | ---------------------------------------- |
| ~19.0.0 | **latest** | >=20.2.0 <=latest |
| ~18.2.0 | **latest** | >=19.6.0 <=latest |
| ~18.1.0 | **latest** | >=19.5.0 <=latest |
| ~18.0.0 | **latest** | >=19.1.0 <=latest |
@@ -21,9 +22,9 @@ We provide a recommended version, and it is usually the latest minor version of
| ~17.2.0 | **latest** | >=18.1.1 <=latest |
| ~17.1.0 | **latest** | >=17.3.0 <=latest |
| ~17.0.0 | **latest** | >=17.1.0 <=latest |
| ~16.2.0 | **latest** | >=16.7.0 <=latest |
| ~16.1.0 | **latest** | >=16.4.0 <=latest |
| ~16.0.0 | **latest** | >=16.1.0 <=latest |
| ~16.2.0 | **~20.1.0** | >=16.7.0 <20.2.0 |
| ~16.1.0 | **~20.1.0** | >=16.4.0 <20.2.0 |
| ~16.0.0 | **~20.1.0** | >=16.1.0 <20.2.0 |
| ~15.2.0 | **~19.0.0** | >=15.8.0 <19.1.0 |
| ~15.1.0 | **~19.0.0** | >=15.5.0 <19.1.0 |
| ~15.0.0 | **~19.0.0** | >=15.2.0 <=15.4.8 \|\| >=15.7.0 <19.1.0 |
@@ -4,7 +4,7 @@
"schema": {
"$schema": "http://json-schema.org/draft-07/schema",
"title": "Schema for Nx Application Executor",
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities. _Note: this is only supported in Angular versions >= 17.0.0_.",
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities.",
"examplesFile": "This executor is a drop-in replacement for the `@angular-devkit/build-angular:application` builder provided by the Angular CLI. It builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities.\n\nIn addition to the features provided by the Angular CLI builder, the `@nx/angular:application` executor also supports the following:\n\n- Providing esbuild plugins\n- Providing a function to transform the application's `index.html` file\n- Incremental builds\n\n{% callout type=\"check\" title=\"Dev Server\" %}\nThe [`@nx/angular:dev-server` executor](/nx-api/angular/executors/dev-server) is required to serve your application when using the `@nx/angular:application` to build it. It is a drop-in replacement for the Angular CLI's `@angular-devkit/build-angular:dev-server` builder and ensures the application is correctly served with Vite when using the `@nx/angular:application` executor.\n{% /callout %}\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Providing esbuild plugins\" %}\n\nThe executor accepts a `plugins` option that allows you to provide esbuild plugins that will be used when building your application. It allows providing a path to a plugin file or an object with a `path` and `options` property to provide options to the plugin.\n\n```json {% fileName=\"apps/my-app/project.json\" highlightLines=[\"8-16\"] %}\n{\n ...\n \"targets\": {\n \"build\": {\n \"executor\": \"@nx/angular:application\",\n \"options\": {\n ...\n \"plugins\": [\n \"apps/my-app/plugins/plugin1.js\",\n {\n \"path\": \"apps/my-app/plugins/plugin2.js\",\n \"options\": {\n \"someOption\": \"some value\"\n }\n }\n ]\n }\n }\n ...\n }\n}\n```\n\n```ts {% fileName=\"apps/my-app/plugins/plugin1.js\" %}\nconst plugin1 = {\n name: 'plugin1',\n setup(build) {\n const options = build.initialOptions;\n options.define.PLUGIN1_TEXT = '\"Value was provided at build time\"';\n },\n};\n\nmodule.exports = plugin1;\n```\n\n```ts {% fileName=\"apps/my-app/plugins/plugin2.js\" %}\nfunction plugin2({ someOption }) {\n return {\n name: 'plugin2',\n setup(build) {\n const options = build.initialOptions;\n options.define.PLUGIN2_TEXT = JSON.stringify(someOption);\n },\n };\n}\n\nmodule.exports = plugin2;\n```\n\nAdditionally, we need to inform TypeScript of the defined variables to prevent type-checking errors during the build. We can achieve this by creating or updating a type definition file included in the TypeScript build process (e.g. `src/types.d.ts`) with the following content:\n\n```ts {% fileName=\"apps/my-app/src/types.d.ts\" %}\ndeclare const PLUGIN1_TEXT: number;\ndeclare const PLUGIN2_TEXT: string;\n```\n\n{% /tab %}\n\n{% tab label=\"Transforming the 'index.html' file\" %}\n\nThe executor accepts an `indexHtmlTransformer` option to provide a path to a file with a default export for a function that receives the application's `index.html` file contents and outputs the updated contents.\n\n```json {% fileName=\"apps/my-app/project.json\" highlightLines=[8] %}\n{\n ...\n \"targets\": {\n \"build\": {\n \"executor\": \"@nx/angular:application\",\n \"options\": {\n ...\n \"indexHtmlTransformer\": \"apps/my-app/index-html.transformer.ts\"\n }\n }\n ...\n }\n}\n```\n\n```ts {% fileName=\"apps/my-app/index-html.transformer.ts\" %}\nexport default function (indexContent: string) {\n return indexContent.replace(\n '<title>my-app</title>',\n '<title>my-app (transformed)</title>'\n );\n}\n```\n\n{% /tab %}\n{% /tabs %}\n",
"outputCapture": "direct-nodejs",
"type": "object",
@@ -55,7 +55,18 @@
},
"server": {
"type": "string",
"description": "The full path for the server entry point to the application, relative to the current workspace."
"description": "The full path for the server entry point to the application, relative to the current workspace.",
"oneOf": [
{
"type": "string",
"description": "The full path for the server entry point to the application, relative to the current workspace."
},
{
"const": false,
"type": "boolean",
"description": "Indicates that a server entry point is not provided. _Note: this is only supported in Angular versions >= 19.0.0_."
}
]
},
"polyfills": {
"description": "A list of polyfills to include in the build. Can be a full path for a file, relative to the current workspace or module specifier. Example: 'zone.js'.",
@@ -71,6 +82,29 @@
"type": "string",
"description": "Customize the base path for the URLs of resources in 'index.html' and component stylesheets. This option is only necessary for specific deployment scenarios, such as with Angular Elements or when utilizing different CDN locations. _Note: this is only supported in Angular versions >= 17.3.0_."
},
"security": {
"description": "Security features to protect against XSS and other common attacks. _Note: this is only supported in Angular versions >= 19.0.0_.",
"type": "object",
"additionalProperties": false,
"properties": {
"autoCsp": {
"description": "Enables automatic generation of a hash-based Strict Content Security Policy (https://web.dev/articles/strict-csp#choose-hash) based on scripts in index.html. Will default to true once we are out of experimental/preview phases. It defaults to `false`.",
"oneOf": [
{
"type": "object",
"properties": {
"unsafeEval": {
"type": "boolean",
"description": "Include the `unsafe-eval` directive (https://web.dev/articles/strict-csp#remove-eval) in the auto-CSP. Please only enable this if you are absolutely sure that you need to, as allowing calls to eval will weaken the XSS defenses provided by the auto-CSP. It default to `false`."
}
},
"additionalProperties": false
},
{ "type": "boolean" }
]
}
}
},
"scripts": {
"description": "Global scripts to be included in the build.",
"type": "array",
@@ -157,6 +191,28 @@
"type": "array",
"items": { "type": "string" },
"default": []
},
"sass": {
"description": "Options to pass to the sass preprocessor. _Note: this is only supported in Angular versions >= 19.0.0_.",
"type": "object",
"properties": {
"fatalDeprecations": {
"description": "A set of deprecations to treat as fatal. If a deprecation warning of any provided type is encountered during compilation, the compiler will error instead. If a Version is provided, then all deprecations that were active in that compiler version will be treated as fatal.",
"type": "array",
"items": { "type": "string" }
},
"silenceDeprecations": {
"description": " A set of active deprecations to ignore. If a deprecation warning of any provided type is encountered during compilation, the compiler will ignore it instead.",
"type": "array",
"items": { "type": "string" }
},
"futureDeprecations": {
"description": "A set of future deprecations to opt into early. Future deprecations passed here will be treated as active by the compiler, emitting warnings as necessary.",
"type": "array",
"items": { "type": "string" }
}
},
"additionalProperties": false
}
},
"additionalProperties": false
@@ -546,8 +602,7 @@
"default": []
},
"prerender": {
"description": "Prerender (SSG) pages of your application during build time.",
"default": false,
"description": "Prerender (SSG) pages of your application during build time. It defaults to `false` in Angular versions < 19.0.0. Otherwise, the value will be `undefined`.",
"oneOf": [
{
"type": "boolean",
@@ -584,6 +639,11 @@
"entry": {
"type": "string",
"description": "The server entry-point that when executed will spawn the web server."
},
"experimentalPlatform": {
"description": "Specifies the platform for which the server bundle is generated. This affects the APIs and modules available in the server-side code. \n\n- `node`: (Default) Generates a bundle optimized for Node.js environments. \n- `neutral`: Generates a platform-neutral bundle suitable for environments like edge workers, and other serverless platforms. This option avoids using Node.js-specific APIs, making the bundle more portable. \n\nPlease note that this feature does not provide polyfills for Node.js modules. Additionally, it is experimental, and the feature may undergo changes in future versions. _Note: this is only supported in Angular versions >= 19.0.0_.",
"default": "node",
"enum": ["node", "neutral"]
}
},
"additionalProperties": false
@@ -592,8 +652,12 @@
},
"appShell": {
"type": "boolean",
"description": "Generates an application shell during build time.",
"default": false
"description": "Generates an application shell during build time. It defaults to `false` in Angular versions < 19.0.0. Otherwise, the value will be `undefined`."
},
"outputMode": {
"type": "string",
"description": "Defines the build output target. 'static': Generates a static site for deployment on any static hosting service. 'server': Produces an application designed for deployment on a server that supports server-side rendering (SSR). _Note: this is only supported in Angular versions >= 19.0.0_.",
"enum": ["static", "server"]
},
"buildLibsFromSource": {
"type": "boolean",
@@ -739,7 +803,7 @@
},
"presets": []
},
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities. _Note: this is only supported in Angular versions >= 17.0.0_.",
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities.",
"aliases": [],
"hidden": false,
"path": "/packages/angular/src/executors/application/schema.json",
@@ -514,7 +514,7 @@
"default": true
},
"plugins": {
"description": "A list of ESBuild plugins. _Note: this is only supported in Angular versions >= 17.0.0_.",
"description": "A list of ESBuild plugins.",
"type": "array",
"items": {
"oneOf": [
@@ -93,8 +93,7 @@
},
"hmr": {
"type": "boolean",
"description": "Enable hot module replacement.",
"default": false
"description": "Enable hot module replacement. It defaults to `false` in Angular versions < 19.0.0. Otherwise, the value will be `undefined`."
},
"watch": {
"type": "boolean",
@@ -107,7 +106,7 @@
},
"forceEsbuild": {
"type": "boolean",
"description": "Force the development server to use the 'browser-esbuild' builder when building. This is a developer preview option for the esbuild-based build system. _Note: this is only supported in Angular versions >= 16.1.0_.",
"description": "Force the development server to use the 'browser-esbuild' builder when building. This is a developer preview option for the esbuild-based build system.",
"default": false
},
"inspect": {
@@ -145,7 +144,7 @@
"x-priority": "important"
},
"esbuildMiddleware": {
"description": "A list of HTTP request middleware functions. _Note: this is only supported in Angular versions >= 17.0.0_.",
"description": "A list of HTTP request middleware functions.",
"type": "array",
"items": {
"type": "string",
@@ -10,10 +10,6 @@
"cli": "nx",
"type": "object",
"presets": [
{
"name": "Buildable Library with Tailwind",
"keys": ["project", "tailwindConfig"]
},
{
"name": "Updating Project Dependencies for Buildable Library",
"keys": ["project"]
@@ -39,10 +35,6 @@
"poll": {
"type": "number",
"description": "Enable and define the file watching poll time period in milliseconds. _Note: this is only supported in Angular versions >= 18.0.0_."
},
"tailwindConfig": {
"type": "string",
"description": "The full path for the Tailwind configuration file, relative to the workspace root. If not provided and a `tailwind.config.js` file exists in the project or workspace root, it will be used. Otherwise, Tailwind will not be configured."
}
},
"additionalProperties": false,
@@ -10,13 +10,6 @@
"cli": "nx",
"type": "object",
"presets": [
{
"name": "Publishable Library with Tailwind",
"keys": [
"project",
"tailwindConfig"
]
},
{
"name": "Updating Project Dependencies for Publishable Library",
"keys": [
@@ -44,12 +37,6 @@
"poll": {
"type": "number",
"description": "Enable and define the file watching poll time period in milliseconds. _Note: this is only supported in Angular versions >= 18.0.0_."
},
"tailwindConfig": {
"type": "string",
"description": "The full path for the Tailwind configuration file, relative to the workspace root. If not provided and a `tailwind.config.js` file exists in the project or workspace root, it will be used. Otherwise, Tailwind will not be configured. _Note: starting with Angular v17, this option is no longer used and the configuration will be picked up if exists at the project or workspace root_.",
"x-completion-type": "file",
"x-completion-glob": "tailwind.config@(.js|.cjs|.mjs|.ts)"
}
},
"additionalProperties": false,
@@ -166,9 +166,10 @@
"default": false
},
"bundler": {
"description": "Bundler to use to build the application. It defaults to `esbuild` for Angular versions >= 17.0.0. Otherwise, it defaults to `webpack`. _Note: The `esbuild` bundler is only considered stable from Angular v17._",
"description": "Bundler to use to build the application.",
"type": "string",
"enum": ["webpack", "esbuild"],
"enum": ["esbuild", "webpack"],
"default": "esbuild",
"x-prompt": "Which bundler do you want to use to build the application?",
"x-priority": "important"
},
@@ -177,11 +178,15 @@
"type": "boolean",
"x-prompt": "Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)?",
"default": false
},
"serverRouting": {
"description": "Creates a server application using the Server Routing and App Engine APIs (Developer Preview). _Note: this is only supported in Angular versions >= 19.0.0_.",
"type": "boolean"
}
},
"additionalProperties": false,
"required": ["directory"],
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Application\" %}\n\nCreate an application named `my-app`:\n\n```bash\nnx g @nx/angular:application apps/my-app\n```\n\n{% /tab %}\n\n{% tab label=\"Specify directory and style extension\" %}\n\nCreate an application named `my-app` in the `my-dir` directory and use `scss` for styles:\n\n{% callout type=\"note\" title=\"Directory Flag Behavior Changes\" %}\nThe command below uses the `as-provided` directory flag behavior, which is the default in Nx 16.8.0. If you're on an earlier version of Nx or using the `derived` option, use `--directory=my-dir`. See the [as-provided vs. derived documentation](/deprecated/as-provided-vs-derived) for more details.\n{% /callout %}\n\n```bash\nnx g @nx/angular:app my-dir/my-app --style=scss\n```\n\n{% /tab %}\n\n{% tab label=\"Single File Components application\" %}\n\nCreate an application with Single File Components (inline styles and inline templates):\n\n```bash\nnx g @nx/angular:app apps/my-app --inlineStyle --inlineTemplate\n```\n\n{% /tab %}\n\n{% tab label=\"Set custom prefix and tags\" %}\n\nSet the prefix to apply to generated selectors and add tags to the application (used for linting).\n\n```bash\nnx g @nx/angular:app apps/my-app --prefix=admin --tags=scope:admin,type:ui\n```\n\n{% /tab %}\n{% /tabs %}\n",
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Application\" %}\n\nCreate an application named `my-app`:\n\n```bash\nnx g @nx/angular:application apps/my-app\n```\n\n{% /tab %}\n\n{% tab label=\"Specify style extension\" %}\n\nCreate an application named `my-app` in the `my-dir` directory and use `scss` for styles:\n\n```bash\nnx g @nx/angular:app my-dir/my-app --style=scss\n```\n\n{% /tab %}\n\n{% tab label=\"Single File Components application\" %}\n\nCreate an application with Single File Components (inline styles and inline templates):\n\n```bash\nnx g @nx/angular:app apps/my-app --inlineStyle --inlineTemplate\n```\n\n{% /tab %}\n\n{% tab label=\"Set custom prefix and tags\" %}\n\nSet the prefix to apply to generated selectors and add tags to the application (used for linting).\n\n```bash\nnx g @nx/angular:app apps/my-app --prefix=admin --tags=scope:admin,type:ui\n```\n\n{% /tab %}\n{% /tabs %}\n",
"presets": []
},
"aliases": ["app"],
@@ -12,14 +12,13 @@
"properties": {
"path": {
"type": "string",
"description": "The path at which to create the component file, relative to the workspace root. By default, it is set to the root of the project.",
"description": "The file path to the component. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where to create the component?"
"x-prompt": "What is the component file path?"
},
"name": {
"type": "string",
"description": "The name of the component.",
"x-prompt": "What name would you like to use for the component?"
"description": "The component symbol name. Defaults to the last segment of the file path."
},
"prefix": {
"type": "string",
@@ -105,6 +104,11 @@
"default": false,
"x-priority": "important"
},
"exportDefault": {
"type": "boolean",
"default": false,
"description": "Use default export for the component instead of a named export."
},
"skipFormat": {
"description": "Skip formatting files.",
"type": "boolean",
@@ -113,7 +117,7 @@
}
},
"required": ["path"],
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Component\" %}\n\nCreate a component named `my-component`:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component\n```\n\n{% /tab %}\n\n{% tab label=\"Single File Component\" %}\n\nCreate a component named `my-component` with inline styles and inline template:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component --inlineStyle --inlineTemplate\n```\n\n{% /tab %}\n\n{% tab label=\"Component with OnPush Change Detection Strategy\" %}\n\nCreate a component named `my-component` with OnPush Change Detection Strategy:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component --changeDetection=OnPush\n```\n\n{% /tab %}\n",
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Component\" %}\n\nGenerate a component named `MyComponent` at `apps/my-app/src/lib/my-component/my-component.component.ts`:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component.ts\n```\n\n{% /tab %}\n\n{% tab label=\"Without Providing the File Extension\" %}\n\nGenerate a component named `MyComponent` at `apps/my-app/src/lib/my-component/my-component.component.ts`:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component\n```\n\n{% /tab %}\n\n{% tab label=\"With Different Symbol Name\" %}\n\nGenerate a component named `CustomComponent` at `apps/my-app/src/lib/my-component/my-component.component.ts`:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component --name=custom\n```\n\n{% /tab %}\n\n{% tab label=\"Single File Component\" %}\n\nCreate a component named `my-component` with inline styles and inline template:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component --inlineStyle --inlineTemplate\n```\n\n{% /tab %}\n\n{% tab label=\"Component with OnPush Change Detection Strategy\" %}\n\nCreate a component named `my-component` with OnPush Change Detection Strategy:\n\n```bash\nnx g @nx/angular:component apps/my-app/src/lib/my-component/my-component --changeDetection=OnPush\n```\n\n{% /tab %}\n",
"presets": []
},
"aliases": ["c"],
@@ -5,7 +5,7 @@
"$schema": "http://json-schema.org/schema",
"$id": "NxAngularConvertToApplicationExecutorGenerator",
"cli": "nx",
"title": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder. _Note: this is only supported in Angular versions >= 17.0.0_.",
"title": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder.",
"description": "Converts a project or all projects using one of the `@angular-devkit/build-angular:browser`, `@angular-devkit/build-angular:browser-esbuild`, `@nx/angular:browser` and `@nx/angular:browser-esbuild` executors to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder. If the converted target is using one of the `@nx/angular` executors, the `@nx/angular:application` executor will be used. Otherwise, the `@angular-devkit/build-angular:application` builder will be used.",
"type": "object",
"properties": {
@@ -25,7 +25,7 @@
"additionalProperties": false,
"presets": []
},
"description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder. _Note: this is only supported in Angular versions >= 17.0.0_.",
"description": "Converts projects to use the `@nx/angular:application` executor or the `@angular-devkit/build-angular:application` builder.",
"implementation": "/packages/angular/src/generators/convert-to-application-executor/convert-to-application-executor.ts",
"aliases": [],
"hidden": false,
@@ -9,17 +9,30 @@
"type": "object",
"description": "Creates a new Angular directive.",
"additionalProperties": false,
"examples": [
{
"description": "Generate a directive with the exported symbol matching the file name. It results in the directive `FooDirective` at `mylib/src/lib/foo.directive.ts`",
"command": "nx g @nx/angular:directive mylib/src/lib/foo.directive.ts"
},
{
"description": "Generate a directive without providing the file extension. It results in the directive `FooDirective` at `mylib/src/lib/foo.directive.ts`",
"command": "nx g @nx/angular:directive mylib/src/lib/foo"
},
{
"description": "Generate a directive with the exported symbol different from the file name. It results in the directive `CustomDirective` at `mylib/src/lib/foo.directive.ts`",
"command": "nx g @nx/angular:directive mylib/src/lib/foo --name=custom"
}
],
"properties": {
"path": {
"type": "string",
"description": "The path at which to create the directive file.",
"x-prompt": "Where to put the directive?",
"$default": { "$source": "argv", "index": 0 }
"description": "The file path to the directive. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the directive file path?"
},
"name": {
"type": "string",
"description": "The name of the new directive.",
"x-prompt": "What name would you like to use for the directive?"
"description": "The directive symbol name. Defaults to the last segment of the file path."
},
"prefix": {
"type": "string",
@@ -6,11 +6,15 @@
"cli": "nx",
"$id": "NxReactFederateModule",
"title": "Federate Module",
"description": "Create a federated module, which is exposed by a remote and can be subsequently loaded by a host.",
"description": "Create a federated module, which is exposed by a Producer (remote) and can be subsequently loaded by a Consumer (host).",
"examples": [
{
"command": "nx g federate-module MyModule --path=./src/component/my-cmp.ts --remote=my-remote-app --remoteDirectory=apps/my-remote-app",
"command": "nx g federate-module MyModule --path=./src/component/my-cmp.ts --remote=myRemoteApp --remoteDirectory=apps/myRemoteApp",
"description": "Create a federated module from my-remote-app, that exposes my-cmp from ./src/component/my-cmp.ts as MyModule."
},
{
"command": "nx g federate-module MyModule --path=./src/component/my-cmp.ts --producer=myProducer --producerDirectory=apps/myProducer",
"description": "Create a federated module from myProducer, that exposes my-cmp from ./src/component/my-cmp.ts as MyModule."
}
],
"type": "object",
@@ -30,15 +34,17 @@
},
"remote": {
"type": "string",
"description": "The name of the remote.",
"x-prompt": "What is/should the remote be named?"
"description": "The name of the Producer (remote).",
"x-prompt": "What is/should the Producer (remote) be named?",
"alias": "producer"
},
"remoteDirectory": {
"description": "The directory of the new remote application if one needs to be created.",
"type": "string"
"description": "The directory of the new Producer (remote) application if one needs to be created.",
"type": "string",
"alias": "producerDirectory"
},
"style": {
"description": "The file extension to be used for style files for the remote if one needs to be created.",
"description": "The file extension to be used for style files for the Producer (remote) if one needs to be created.",
"type": "string",
"default": "css",
"enum": ["css", "scss", "sass", "less"]
@@ -52,24 +58,25 @@
"unitTestRunner": {
"type": "string",
"enum": ["jest", "vitest", "none"],
"description": "Test runner to use for unit tests of the remote if it needs to be created.",
"description": "Test runner to use for unit tests of the Producer (remote) if it needs to be created.",
"x-prompt": "Which unit test runner would you like to use?",
"default": "jest"
},
"e2eTestRunner": {
"type": "string",
"enum": ["cypress", "none"],
"description": "Test runner to use for end to end (e2e) tests of the remote if it needs to be created.",
"description": "Test runner to use for end to end (e2e) tests of the Producer (remote) if it needs to be created.",
"default": "cypress"
},
"standalone": {
"description": "Whether to generate the remote application with standalone components if it needs to be created.",
"description": "Whether to generate the Producer (remote) application with standalone components if it needs to be created.",
"type": "boolean",
"default": true
},
"host": {
"type": "string",
"description": "The host / shell application for this remote."
"description": "The Consumer (host) application for this Producer (remote).",
"alias": "consumer"
}
},
"required": ["name", "path", "remote"],
@@ -5,13 +5,17 @@
"$schema": "https://json-schema.org/schema",
"$id": "NxMFHost",
"cli": "nx",
"title": "Nx Module Federation Host Application",
"description": "Create an Angular Host Module Federation Application.",
"title": "Nx Module Federation Consumer (Host) Application",
"description": "Create an Angular Consumer (Host) Module Federation Application.",
"type": "object",
"examples": [
{
"command": "nx g @nx/angular:host appName --remotes=remote1",
"description": "Create an Angular application with configuration in place for Module Federation. If the `remotes` option is provided, attach the remote application to this application's configuration"
"description": "Create an Angular application with configuration in place for Module Federation. If the `remotes` option is provided, attach the Producer (remote) application to this application's configuration"
},
{
"command": "nx g @nx/angular:consumer appName --producers=remote1",
"description": "Create an Angular application with configuration in place for Module Federation. If the `producers` option is provided, attach the Producer (remote) application to this application's configuration"
}
],
"properties": {
@@ -23,14 +27,15 @@
},
"name": {
"type": "string",
"description": "The name to give to the host Angular application.",
"description": "The name to give to the Consumer (host) Angular application.",
"pattern": "^[a-zA-Z][^:]*$",
"x-priority": "important"
},
"remotes": {
"type": "array",
"description": "The names of the remote applications to add to the host.",
"x-priority": "important"
"description": "The names of the Producers (remote) applications to add to the Consumer (host).",
"x-priority": "important",
"alias": "producers"
},
"dynamic": {
"type": "boolean",
@@ -160,15 +165,19 @@
},
"standalone": {
"type": "boolean",
"description": "Whether to generate a host application that uses standalone components.",
"description": "Whether to generate a Consumer (host) application that uses standalone components.",
"default": true
},
"ssr": {
"description": "Whether to configure SSR for the host application",
"description": "Whether to configure SSR for the Consumer (host) application",
"type": "boolean",
"default": false,
"x-priority": "important"
},
"serverRouting": {
"description": "Creates a server application using the Server Routing and App Engine APIs (Developer Preview). _Note: this is only supported in Angular versions >= 19.0.0_.",
"type": "boolean"
},
"typescriptConfiguration": {
"type": "boolean",
"description": "Whether the module federation configuration and webpack configuration files should use TS.",
@@ -181,8 +190,8 @@
},
"x-type": "application",
"description": "Generate a Host Angular Module Federation Application.",
"aliases": ["consumer"],
"implementation": "/packages/angular/src/generators/host/host.ts",
"aliases": [],
"hidden": false,
"path": "/packages/angular/src/generators/host/schema.json",
"type": "generator"
@@ -199,7 +199,7 @@
},
"additionalProperties": false,
"required": ["directory"],
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Library\" %}\n\nCreates the `my-ui-lib` library with an `ui` tag:\n\n```bash\nnx g @nx/angular:library libs/my-ui-lib --tags=ui\n```\n\n{% /tab %}\n\n{% tab label=\"Publishable Library\" %}\n\nCreates the `my-lib` library that can be built producing an output following the Angular Package Format (APF) to be distributed as an NPM package:\n\n```bash\nnx g @nx/angular:library libs/my-lib --publishable --import-path=@my-org/my-lib\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable Library\" %}\n\nCreates the `my-lib` library with support for incremental builds:\n\n```bash\nnx g @nx/angular:library libs/my-lib --buildable\n```\n\n{% /tab %}\n\n{% tab label=\"Nested Folder & Import\"%}\nCreates the `my-lib` library in the `nested` directory and sets the import path to `@myorg/nested/my-lib`:\n\n{% callout type=\"note\" title=\"Directory Flag Behavior Changes\" %}\nThe command below uses the `as-provided` directory flag behavior, which is the default in Nx 16.8.0. If you're on an earlier version of Nx or using the `derived` option, use `--directory=nested`. See the [as-provided vs. derived documentation](/deprecated/as-provided-vs-derived) for more details.\n{% /callout %}\n\n```bash\nnx g @nx/angular:library libs/nested/my-lib --importPath=@myorg/nested/my-lib\n```\n\n{% /tab %}\n",
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Library\" %}\n\nCreates the `my-ui-lib` library with an `ui` tag:\n\n```bash\nnx g @nx/angular:library libs/my-ui-lib --tags=ui\n```\n\n{% /tab %}\n\n{% tab label=\"Publishable Library\" %}\n\nCreates the `my-lib` library that can be built producing an output following the Angular Package Format (APF) to be distributed as an NPM package:\n\n```bash\nnx g @nx/angular:library libs/my-lib --publishable --import-path=@my-org/my-lib\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable Library\" %}\n\nCreates the `my-lib` library with support for incremental builds:\n\n```bash\nnx g @nx/angular:library libs/my-lib --buildable\n```\n\n{% /tab %}\n\n{% tab label=\"Nested Folder & Import\"%}\nCreates the `my-lib` library in the `nested` directory and sets the import path to `@myorg/nested/my-lib`:\n\n```bash\nnx g @nx/angular:library libs/nested/my-lib --importPath=@myorg/nested/my-lib\n```\n\n{% /tab %}\n",
"presets": []
},
"aliases": ["lib"],
@@ -9,17 +9,30 @@
"cli": "nx",
"additionalProperties": false,
"description": "Creates an Angular pipe.",
"examples": [
{
"description": "Generate a pipe with the exported symbol matching the file name. It results in the pipe `FooPipe` at `mylib/src/lib/foo.pipe.ts`",
"command": "nx g @nx/angular:pipe mylib/src/lib/foo.pipe.ts"
},
{
"description": "Generate a pipe without providing the file extension. It results in the pipe `FooPipe` at `mylib/src/lib/foo.pipe.ts`",
"command": "nx g @nx/angular:pipe mylib/src/lib/foo"
},
{
"description": "Generate a pipe with the exported symbol different from the file name. It results in the pipe `CustomPipe` at `mylib/src/lib/foo.pipe.ts`",
"command": "nx g @nx/angular:pipe mylib/src/lib/foo --name=custom"
}
],
"properties": {
"path": {
"type": "string",
"description": "The path at which to create the pipe file, relative to the workspace root.",
"description": "The file path to the pipe. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the path of the new pipe?"
"x-prompt": "What is the pipe file path?"
},
"name": {
"type": "string",
"description": "The name of the pipe.",
"x-prompt": "What name would you like to use for the pipe?"
"description": "The pipe symbol name. Defaults to the last segment of the file path."
},
"skipTests": {
"type": "boolean",
@@ -5,13 +5,17 @@
"$schema": "https://json-schema.org/schema",
"$id": "NxMFRemote",
"cli": "nx",
"title": "Nx Module Federation Remote App",
"description": "Create an Angular Remote Module Federation Application.",
"title": "Nx Module Federation Producer (Remote) App",
"description": "Create an Angular Producer (Remote) Module Federation Application.",
"type": "object",
"examples": [
{
"command": "nx g @nx/angular:remote appName --host=host --port=4201",
"description": "Create an Angular app with configuration in place for Module Federation. If host is provided, attach this remote app to host app's configuration."
"description": "Create an Angular app with configuration in place for Module Federation. If Consumer (host) is provided, attach this Producer (remote) app to Consumer (host) app's configuration."
},
{
"command": "nx g @nx/angular:producer appName --consumer=host --port=4201",
"description": "Create an Angular app with configuration in place for Module Federation. If Consumer (host) is provided, attach this Producer (remote) app to Consumer (host) app's configuration."
}
],
"properties": {
@@ -23,15 +27,16 @@
},
"name": {
"type": "string",
"description": "The name to give to the remote Angular app.",
"description": "The name to give to the Producer (remote) Angular app.",
"pattern": "^[a-zA-Z_$][a-zA-Z_$0-9]*$",
"x-priority": "important"
},
"host": {
"type": "string",
"description": "The name of the host app to attach this remote app to.",
"description": "The name of the Consumer (host) app to attach this Producer (remote) app to.",
"x-dropdown": "projects",
"x-priority": "important"
"x-priority": "important",
"alias": "consumer"
},
"port": {
"type": "number",
@@ -153,15 +158,19 @@
"x-priority": "internal"
},
"standalone": {
"description": "Whether to generate a remote application with standalone components.",
"description": "Whether to generate a Producer (remote) application with standalone components.",
"type": "boolean",
"default": true
},
"ssr": {
"description": "Whether to configure SSR for the remote application to be consumed by a host application using SSR.",
"description": "Whether to configure SSR for the Producer (remote) application to be consumed by a Consumer (host) application using SSR.",
"type": "boolean",
"default": false
},
"serverRouting": {
"description": "Creates a server application using the Server Routing and App Engine APIs (Developer Preview). _Note: this is only supported in Angular versions >= 19.0.0_.",
"type": "boolean"
},
"typescriptConfiguration": {
"type": "boolean",
"description": "Whether the module federation configuration and webpack configuration files should use TS.",
@@ -174,8 +183,8 @@
},
"x-type": "application",
"description": "Generate a Remote Angular Module Federation Application.",
"aliases": ["producer"],
"implementation": "/packages/angular/src/generators/remote/remote.ts",
"aliases": [],
"hidden": false,
"path": "/packages/angular/src/generators/remote/schema.json",
"type": "generator"
@@ -9,8 +9,16 @@
"type": "object",
"examples": [
{
"command": "nx g @nx/angular:scam-directive my-sample --directory=my-lib/src/lib/my-sample",
"description": "Generate a `MySampleDirective` directive in a `my-sample` folder in the `my-lib` library"
"description": "Generate a directive with the exported symbol matching the file name. It results in the directive `FooDirective` at `mylib/src/lib/foo.directive.ts`",
"command": "nx g @nx/angular:scam-directive mylib/src/lib/foo.directive.ts"
},
{
"description": "Generate a directive without providing the file extension. It results in the directive `FooDirective` at `mylib/src/lib/foo.directive.ts`",
"command": "nx g @nx/angular:scam-directive mylib/src/lib/foo"
},
{
"description": "Generate a directive with the exported symbol different from the file name. It results in the directive `CustomDirective` at `mylib/src/lib/foo.directive.ts`",
"command": "nx g @nx/angular:scam-directive mylib/src/lib/foo --name=custom"
}
],
"description": "Creates a new, generic Angular directive definition in the given or default project.",
@@ -18,33 +26,13 @@
"properties": {
"path": {
"type": "string",
"description": "The path at which to create the SCAM Directive files, relative to the workspace root.",
"description": "The file path to the SCAM directive. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the path of the new directive?"
"x-prompt": "What is the SCAM directive file path?"
},
"name": {
"type": "string",
"description": "The name of the directive.",
"x-prompt": "What name would you like to use for the directive?",
"x-priority": "important"
},
"directory": {
"type": "string",
"description": "The directory at which to create the SCAM Directive files. When `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. Otherwise, it will be relative to the workspace root.",
"aliases": ["dir", "path"],
"x-priority": "important"
},
"nameAndDirectoryFormat": {
"description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
"type": "string",
"enum": ["as-provided", "derived"]
},
"project": {
"type": "string",
"description": "The name of the project.",
"$default": { "$source": "projectName" },
"x-dropdown": "projects",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
"description": "The directive symbol name. Defaults to the last segment of the file path."
},
"skipTests": {
"type": "boolean",
@@ -57,12 +45,6 @@
"default": true,
"x-priority": "important"
},
"flat": {
"type": "boolean",
"description": "Create the new files at the top level of the current project.",
"default": true,
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
},
"selector": {
"type": "string",
"format": "html-selector",
@@ -9,8 +9,16 @@
"type": "object",
"examples": [
{
"command": "nx g @nx/angular:scam-pipe mylib/src/lib/my-transformation/my-transformation",
"description": "Generates a `MyTransformationPipe` in a `my-transformation` folder in the `my-lib` project"
"description": "Generate a pipe with the exported symbol matching the file name. It results in the pipe `FooPipe` at `mylib/src/lib/foo.pipe.ts`",
"command": "nx g @nx/angular:scam-pipe mylib/src/lib/foo.pipe.ts"
},
{
"description": "Generate a pipe without providing the file extension. It results in the pipe `FooPipe` at `mylib/src/lib/foo.pipe.ts`",
"command": "nx g @nx/angular:scam-pipe mylib/src/lib/foo"
},
{
"description": "Generate a pipe with the exported symbol different from the file name. It results in the pipe `CustomPipe` at `mylib/src/lib/foo.pipe.ts`",
"command": "nx g @nx/angular:scam-pipe mylib/src/lib/foo --name=custom"
}
],
"description": "Creates a new, generic Angular pipe definition in the given or default project.",
@@ -18,15 +26,13 @@
"properties": {
"path": {
"type": "string",
"description": "The path at which to create the pipe file, relative to the workspace root.",
"description": "The file path to the SCAM pipe. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the path of the new pipe?"
"x-prompt": "What is the SCAM pipe file path?"
},
"name": {
"type": "string",
"description": "The name of the pipe.",
"x-prompt": "What name would you like to use for the pipe?",
"x-priority": "important"
"description": "The pipe symbol name. Defaults to the last segment of the file path."
},
"skipTests": {
"type": "boolean",
@@ -39,12 +45,6 @@
"default": true,
"x-priority": "important"
},
"flat": {
"type": "boolean",
"description": "Create the new files at the top level of the current project.",
"default": true,
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
},
"export": {
"type": "boolean",
"description": "Specifies if the SCAM should be exported from the project's entry point (normally `index.ts`). It only applies to libraries.",
@@ -9,8 +9,16 @@
"type": "object",
"examples": [
{
"command": "nx g @nx/angular:scam my-lib/src/lib/my-sample/my-sample",
"description": "Generate a `MySampleComponent` component in the `my-lib` library."
"description": "Generate a component with the exported symbol matching the file name. It results in the component `FooComponent` at `mylib/src/lib/foo.component.ts`",
"command": "nx g @nx/angular:scam mylib/src/lib/foo.component.ts"
},
{
"description": "Generate a component without providing the file extension. It results in the component `FooComponent` at `mylib/src/lib/foo.component.ts`",
"command": "nx g @nx/angular:scam mylib/src/lib/foo"
},
{
"description": "Generate a component with the exported symbol different from the file name. It results in the component `CustomComponent` at `mylib/src/lib/foo.component.ts`",
"command": "nx g @nx/angular:scam mylib/src/lib/foo --name=custom"
}
],
"description": "Creates a new Angular SCAM.",
@@ -18,14 +26,13 @@
"properties": {
"path": {
"type": "string",
"description": "The path at which to create the SCAM file, relative to the workspace root.",
"description": "The file path to the SCAM. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What is the path of the new SCAM?"
"x-prompt": "What is the SCAM file path?"
},
"name": {
"type": "string",
"description": "The name of the component.",
"x-prompt": "What name would you like to use for the component?"
"description": "The component symbol name. Defaults to the last segment of the file path."
},
"displayBlock": {
"description": "Specifies if the style will contain `:host { display: block; }`.",
@@ -34,15 +34,17 @@
},
"remotes": {
"type": "array",
"description": "A list of remote application names that the host application should consume."
"description": "A list of remote application names that the Consumer (host) application should consume.",
"alias": "producers"
},
"host": {
"type": "string",
"description": "The name of the host application that the remote application will be consumed by."
"description": "The name of the host application that the remote application will be consumed by.",
"alias": "consumer"
},
"routing": {
"type": "boolean",
"description": "Generate a routing setup to allow a host application to route to the remote application.",
"description": "Generate a routing setup to allow a Consumer (host) application to route to the Producer (remote) application.",
"x-priority": "important"
},
"skipFormat": {
@@ -16,13 +16,6 @@
"x-prompt": "What app would you like to generate an Angular Universal configuration for?",
"x-dropdown": "projects"
},
"appId": {
"type": "string",
"format": "html-selector",
"description": "The `appId` to use with `withServerTransition`.",
"default": "serverApp",
"x-deprecated": "This is deprecated and ignored since Angular 16 and not supported since Angular 17."
},
"main": {
"type": "string",
"format": "path",
@@ -56,7 +49,12 @@
},
"hydration": {
"type": "boolean",
"description": "Set up Hydration for the SSR application. It defaults to `true` for Angular versions >= 17.0.0. Otherwise, it defaults to `false`."
"description": "Set up Hydration for the SSR application.",
"default": true
},
"serverRouting": {
"description": "Creates a server application using the Server Routing and App Engine APIs (Developer Preview). _Note: this is only supported in Angular versions >= 19.0.0_.",
"type": "boolean"
},
"skipFormat": {
"type": "boolean",
@@ -47,10 +47,6 @@ npm add -D @nx/esbuild
### Creating a new JS library
{% callout type="note" title="Directory Flag Behavior Changes" %}
The command below uses the `as-provided` directory flag behavior, which is the default in Nx 16.8.0. If you're on an earlier version of Nx or using the `derived` option, omit the `--directory` flag. See the [as-provided vs. derived documentation](/deprecated/as-provided-vs-derived) for more details.
{% /callout %}
You can add a new library that builds using esbuild with:
```shell
@@ -208,7 +208,7 @@
}
},
"additionalProperties": true,
"examplesFile": "`<app-root>/project.json`:\n\n```jsonc\n{\n //...\n \"targets\": {\n //...\n \"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\"\n }\n }\n }\n}\n```\n\n```bash\nnx build <app-name>\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"CommonJS output\" %}\n\nThe CommonJS format is required in some environments, such as Electron applications. By default, `esbuild` will use the ESM format, which is recommended for Web and Node applications. You may also output to multiple formats.\n\n```bash\nnx build <app-name> --format=cjs\nnx build <app-name> --format=esm,cjs\nnx build <app-name> # defaults to es# defaults to esm\n```\n\n```json\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\",\n \"format\": [\"esm\", \"cjs\"]\n}\n```\n\n{% /tab %}\n{% tab label=\"External packages\" %}\n\nYou can avoid packages from being bundled by providing the `external` option with a list of packages to skip.\n\nYou can also use `*` wildcard to match assets.\n\n```json\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\",\n \"external\": [\"lodash\", \"*.png\"]\n}\n```\n\n{% /tab %}\n{% tab label=\"Skip type checking\" %}\n\nType checking is the slowest part of the build. You may want to skip type checking during build and run it as another job in CI.\n\n```json\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\",\n \"skipTypeCheck\": true\n}\n```\n\n{% /tab %}\n{% tab label=\"Additional esbuild options\" %}\n\nAdditional [esbuild options](https://esbuild.github.io/api/) can be passed using `esbuildOptions` in your project configuration.\n\n```json\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\",\n \"esbuildOptions\": {\n \"legalComments\": \"inline\"\n \"banner\": {\n \".js\": \"// banner\"\n },\n \"footer\": {\n \".js\": \"// footer\"\n }\n }\n}\n```\n\n{% /tab %}\n{% tabs %}\n",
"examplesFile": "`<app-root>/project.json`:\n\n```jsonc\n{\n //...\n \"targets\": {\n //...\n \"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\"\n }\n }\n }\n}\n```\n\n```bash\nnx build <app-name>\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"CommonJS output\" %}\n\nThe CommonJS format is required in some environments, such as Electron applications. By default, `esbuild` will use the ESM format, which is recommended for Web and Node applications. You may also output to multiple formats.\n\n```bash\nnx build <app-name> --format=cjs\nnx build <app-name> --format=esm,cjs\nnx build <app-name> # defaults to es# defaults to esm\n```\n\n```json\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\",\n \"format\": [\"esm\", \"cjs\"]\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"External packages\" %}\n\nYou can avoid packages from being bundled by providing the `external` option with a list of packages to skip.\n\nYou can also use `*` wildcard to match assets.\n\n```json\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\",\n \"external\": [\"lodash\", \"*.png\"]\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Skip type checking\" %}\n\nType checking is the slowest part of the build. You may want to skip type checking during build and run it as another job in CI.\n\n```json\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\",\n \"skipTypeCheck\": true\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Additional esbuild options\" %}\n\nAdditional [esbuild options](https://esbuild.github.io/api/) can be passed using `esbuildOptions` in your project configuration.\n\n```json\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n \"main\": \"<app-root>\",\n \"tsConfig\": \"<app-root>/tsconfig.app.json\",\n \"outputPath\": \"dist/<app-root>\",\n \"esbuildOptions\": {\n \"legalComments\": \"inline\"\n \"banner\": {\n \".js\": \"// banner\"\n },\n \"footer\": {\n \".js\": \"// footer\"\n }\n }\n }\n}\n```\n\n{% /tab %}\n{% tabs %}\n",
"presets": []
},
"description": "Bundle a package using EsBuild.",
@@ -8,11 +8,11 @@
"description": "Create an Expo Application for Nx.",
"examples": [
{
"command": "g @nx/expo:app myapp --directory=nested",
"command": "nx g @nx/expo:app myapp --directory=nested",
"description": "Generate apps/nested/myapp"
},
{
"command": "g @nx/expo:app myapp --classComponent",
"command": "nx g @nx/expo:app myapp --classComponent",
"description": "Use class components instead of functional components"
}
],
@@ -44,13 +44,15 @@
"description": "The tool to use for running lint checks.",
"type": "string",
"enum": ["eslint", "none"],
"default": "eslint"
"default": "none",
"x-priority": "important"
},
"unitTestRunner": {
"type": "string",
"enum": ["jest", "none"],
"description": "Test runner to use for unit tests",
"default": "jest"
"default": "none",
"x-priority": "important"
},
"tags": {
"type": "string",
@@ -71,7 +73,8 @@
"description": "Adds the specified e2e test runner",
"type": "string",
"enum": ["playwright", "cypress", "detox", "none"],
"default": "none"
"default": "none",
"x-priority": "important"
},
"standaloneConfig": {
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
@@ -9,31 +9,37 @@
"type": "object",
"examples": [
{
"command": "g @nx/expo:component mylib/my-component --name my-component",
"description": "Generate a component in the mylib library"
"description": "Generate a component with the exported symbol matching the file name. It results in the component `Foo` at `mylib/src/foo.tsx`",
"command": "nx g @nx/expo:component mylib/src/foo.tsx"
},
{
"command": "g @nx/expo:component mylib/my-component --name my-component --classComponent",
"description": "Generate a class component in the mylib library"
"description": "Generate a component with the exported symbol different from the file name. It results in the component `Custom` at `mylib/src/foo.tsx`",
"command": "nx g @nx/expo:component mylib/src/foo.tsx --name=custom"
},
{
"description": "Generate a component without the providing the file extension. It results in the component `Foo` at `mylib/src/foo.tsx`",
"command": "nx g @nx/expo:component mylib/src/foo"
},
{
"description": "Generate a class component at `mylib/src/foo.tsx`",
"command": "nx g @nx/expo:component mylib/src/foo --classComponent"
}
],
"properties": {
"path": {
"type": "string",
"description": "Path where the component will be generated.",
"description": "The file path to the component. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the component be generated?",
"x-priority": "important"
"x-prompt": "What is the component file path?"
},
"name": {
"type": "string",
"description": "The name of the component.",
"x-prompt": "What name would you like to use for the component?"
"description": "The component symbol name. Defaults to the last segment of the file path."
},
"js": {
"type": "boolean",
"description": "Generate JavaScript files rather than TypeScript files.",
"default": false
"x-deprecated": "Provide the full file path including the file extension in the `path` option. This option will be removed in Nx v21."
},
"skipFormat": {
"description": "Skip formatting files.",
@@ -9,7 +9,7 @@
"type": "object",
"examples": [
{
"command": "g @nx/expo:lib mylib --directory=myapp",
"command": "nx g @nx/expo:lib mylib --directory=myapp",
"description": "Generate libs/myapp/mylib"
}
],
@@ -29,13 +29,16 @@
"description": "The tool to use for running lint checks.",
"type": "string",
"enum": ["eslint", "none"],
"default": "eslint"
"default": "none",
"x-prompt": "Which linter would you like to use?",
"x-priority": "important"
},
"unitTestRunner": {
"type": "string",
"enum": ["jest", "none"],
"description": "Test runner to use for unit tests.",
"default": "jest"
"default": "none",
"x-priority": "important"
},
"tags": {
"type": "string",
@@ -33,14 +33,17 @@
"linter": {
"description": "The tool to use for running lint checks.",
"type": "string",
"enum": ["eslint"],
"default": "eslint"
"enum": ["eslint", "none"],
"default": "none",
"x-prompt": "Which linter would you like to use?",
"x-priority": "important"
},
"unitTestRunner": {
"type": "string",
"enum": ["jest", "none"],
"description": "Test runner to use for unit tests.",
"default": "jest"
"default": "none",
"x-prompt": "Which unit test runner would you like to use?"
},
"tags": {
"type": "string",
@@ -138,7 +138,7 @@
}
},
"required": ["directory"],
"examplesFile": "---\ntitle: JS library generator examples\ndescription: This page contains examples for the @nx/js:lib generator.\n---\n\nThe `@nx/js:lib` generator will generate a library for you, and it will configure it according to the options you provide.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib\n```\n\nBy default, the library that is generated when you use this executor without passing any options, like the example above, will be a buildable library, using the `@nx/js:tsc` executor as a builder.\n\nYou may configure the tools you want to use to build your library, or bundle it too, by passing the `--bundler` flag. The `--bundler` flag controls the compiler and/or the bundler that will be used to build your library. If you choose `tsc` or `swc`, the result will be a buildable library using either `tsc` or `swc` as the compiler. If you choose `rollup` or `vite`, the result will be a buildable library using `rollup` or `vite` as the bundler. In the case of `rollup`, it will default to the `tsc` compiler. If you choose `esbuild`, you may use the [`esbuildOptions` property](https://esbuild.github.io/api/) in your `project.json` under the `build` target options to specify whether you wish to bundle your library or not.\n\n## Examples\n\n{% tabs %}\n\n{% tab label=\"Buildable with default compiler (tsc)\" %}\n\nGenerate a buildable library using the `@nx/js:tsc` executor. This uses `tsc` as the compiler.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable with SWC compiler\" %}\n\nGenerate a buildable library using [SWC](https://swc.rs) as the compiler. This will use the `@nx/js:swc` executor.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=swc\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable with tsc\" %}\n\nGenerate a buildable library using tsc as the compiler. This will use the `@nx/js:tsc` executor.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=tsc\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable, with Rollup as a bundler\" %}\n\nGenerate a buildable library using [Rollup](https://rollupjs.org) as the bundler. This will use the `@nx/rollup:rollup` executor. It will also use [SWC](https://swc.rs) as the compiler.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=rollup\n```\n\nIf you do not want to use `swc` as the compiler, and want to use the default `babel` compiler, you can do so in your `project.json` under the `build` target options, using the [`compiler` property](/nx-api/rollup/executors/rollup#compiler):\n\n```jsonc {% fileName=\"libs/mylib/project.json\" %}\n\"build\": {\n \"executor\": \"@nx/rollup:rollup\",\n \"options\": {\n //...\n \"compiler\": \"babel\"\n }\n}\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable, with Vite as a bundler\" %}\n\nGenerate a buildable library using [Vite](https://vitejs.dev/) as the bundler. This will use the `@nx/vite:build` executor.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=vite\n```\n\n{% /tab %}\n\n{% tab label=\"Using ESBuild\" %}\n\nGenerate a buildable library using [ESBuild](https://esbuild.github.io/) as the bundler. This will use the `@nx/esbuild:esbuild` executor.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=esbuild\n```\n\nIf you want to specify whether you want to bundle your library or not, you can do so in your `project.json` under the `build` target options, using the [`esbuildOptions` property](https://esbuild.github.io/api/):\n\n```jsonc {% fileName=\"libs/mylib/project.json\" %}\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n //...\n \"esbuildOptions\": {\n \"bundle\": true\n }\n }\n}\n```\n\n{% /tab %}\n\n{% tab label=\"Minimal publishing target\" %}\n\nGenerate a **publishable** library with a minimal publishing target. The result will be a buildable library using the `@nx/js:tsc` executor, using `tsc` as the compiler. You can change the compiler or the bundler by passing the `--bundler` flag.\n\n```bash\nnpx nx g lib libs/mylib --publishable\n```\n\n{% /tab %}\n\n{% tab label=\"Using directory flag\" %}\n\nGenerate a library named `mylib` and put it under a directory named `myapp` (`libs/myapp/mylib`)\n\n{% callout type=\"note\" title=\"Directory Flag Behavior Changes\" %}\nThe command below uses the `as-provided` directory flag behavior, which is the default in Nx 16.8.0. If you're on an earlier version of Nx or using the `derived` option, use `--directory=myapp`. See the [as-provided vs. derived documentation](/deprecated/as-provided-vs-derived) for more details.\n{% /callout %}\n\n```shell\nnpx nx g lib libs/nested/mylib\n```\n\n{% /tab %}\n\n{% tab label=\"Non-buildable library\" %}\n\nGenerate a non-buildable library.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=none\n```\n\n{% /tab %}\n\n{% /tabs %}\n",
"examplesFile": "---\ntitle: JS library generator examples\ndescription: This page contains examples for the @nx/js:lib generator.\n---\n\nThe `@nx/js:lib` generator will generate a library for you, and it will configure it according to the options you provide.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib\n```\n\nBy default, the library that is generated when you use this executor without passing any options, like the example above, will be a buildable library, using the `@nx/js:tsc` executor as a builder.\n\nYou may configure the tools you want to use to build your library, or bundle it too, by passing the `--bundler` flag. The `--bundler` flag controls the compiler and/or the bundler that will be used to build your library. If you choose `tsc` or `swc`, the result will be a buildable library using either `tsc` or `swc` as the compiler. If you choose `rollup` or `vite`, the result will be a buildable library using `rollup` or `vite` as the bundler. In the case of `rollup`, it will default to the `tsc` compiler. If you choose `esbuild`, you may use the [`esbuildOptions` property](https://esbuild.github.io/api/) in your `project.json` under the `build` target options to specify whether you wish to bundle your library or not.\n\n## Examples\n\n{% tabs %}\n\n{% tab label=\"Buildable with default compiler (tsc)\" %}\n\nGenerate a buildable library using the `@nx/js:tsc` executor. This uses `tsc` as the compiler.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable with SWC compiler\" %}\n\nGenerate a buildable library using [SWC](https://swc.rs) as the compiler. This will use the `@nx/js:swc` executor.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=swc\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable with tsc\" %}\n\nGenerate a buildable library using tsc as the compiler. This will use the `@nx/js:tsc` executor.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=tsc\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable, with Rollup as a bundler\" %}\n\nGenerate a buildable library using [Rollup](https://rollupjs.org) as the bundler. This will use the `@nx/rollup:rollup` executor. It will also use [SWC](https://swc.rs) as the compiler.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=rollup\n```\n\nIf you do not want to use `swc` as the compiler, and want to use the default `babel` compiler, you can do so in your `project.json` under the `build` target options, using the [`compiler` property](/nx-api/rollup/executors/rollup#compiler):\n\n```jsonc {% fileName=\"libs/mylib/project.json\" %}\n\"build\": {\n \"executor\": \"@nx/rollup:rollup\",\n \"options\": {\n //...\n \"compiler\": \"babel\"\n }\n}\n```\n\n{% /tab %}\n\n{% tab label=\"Buildable, with Vite as a bundler\" %}\n\nGenerate a buildable library using [Vite](https://vitejs.dev/) as the bundler. This will use the `@nx/vite:build` executor.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=vite\n```\n\n{% /tab %}\n\n{% tab label=\"Using ESBuild\" %}\n\nGenerate a buildable library using [ESBuild](https://esbuild.github.io/) as the bundler. This will use the `@nx/esbuild:esbuild` executor.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=esbuild\n```\n\nIf you want to specify whether you want to bundle your library or not, you can do so in your `project.json` under the `build` target options, using the [`esbuildOptions` property](https://esbuild.github.io/api/):\n\n```jsonc {% fileName=\"libs/mylib/project.json\" %}\n\"build\": {\n \"executor\": \"@nx/esbuild:esbuild\",\n \"options\": {\n //...\n \"esbuildOptions\": {\n \"bundle\": true\n }\n }\n}\n```\n\n{% /tab %}\n\n{% tab label=\"Minimal publishing target\" %}\n\nGenerate a **publishable** library with a minimal publishing target. The result will be a buildable library using the `@nx/js:tsc` executor, using `tsc` as the compiler. You can change the compiler or the bundler by passing the `--bundler` flag.\n\n```bash\nnpx nx g lib libs/mylib --publishable\n```\n\n{% /tab %}\n\n{% tab label=\"In a nested directory\" %}\n\nGenerate a library named `mylib` and put it under a directory named `nested` (`libs/nested/mylib`).\n\n```shell\nnpx nx g lib libs/nested/mylib\n```\n\n{% /tab %}\n\n{% tab label=\"Non-buildable library\" %}\n\nGenerate a non-buildable library.\n\n```bash\nnpx nx g @nx/js:lib libs/mylib --bundler=none\n```\n\n{% /tab %}\n\n{% /tabs %}\n",
"presets": []
},
"aliases": ["lib"],
@@ -37,13 +37,16 @@
"description": "The tool to use for running lint checks.",
"type": "string",
"enum": ["eslint", "none"],
"default": "eslint"
"default": "none",
"x-prompt": "Which linter would you like to use?",
"x-priority": "important"
},
"unitTestRunner": {
"description": "Test runner to use for unit tests.",
"type": "string",
"enum": ["jest", "none"],
"default": "jest"
"default": "none",
"x-prompt": "Which unit test runner would you like to use?"
},
"e2eTestRunner": {
"type": "string",
@@ -8,17 +8,22 @@
"description": "Nest Class Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the class `Foo` at `myapp/src/app/foo.ts`",
"command": "nx g @nx/nest:class myapp/src/app/foo.ts"
},
{
"description": "Generate the class without providing the file extension. It results in the class `Foo` at `myapp/src/app/foo.ts`",
"command": "nx g @nx/nest:class myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "Path where the class will be generated.",
"description": "The file path to the class. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the class be generated?"
},
"name": {
"description": "The name of the class.",
"type": "string",
"x-prompt": "What name would you like to use?"
"x-prompt": "What is the class file path?"
},
"skipFormat": {
"description": "Skip formatting files.",
@@ -32,12 +37,6 @@
"enum": ["jest", "none"],
"default": "jest"
},
"flat": {
"description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean",
"default": true
},
"language": {
"description": "Nest class language.",
"type": "string",
@@ -8,17 +8,22 @@
"description": "Nest Controller Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the controller `FooController` at `myapp/src/app/foo.controller.ts`",
"command": "nx g @nx/nest:controller myapp/src/app/foo.controller.ts"
},
{
"description": "Generate the controller without providing the file extension. It results in the controller `FooController` at `myapp/src/app/foo.controller.ts`",
"command": "nx g @nx/nest:controller myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "Path where the controller will be generated.",
"description": "The file path to the controller. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the controller be generated?"
},
"name": {
"description": "The name of the controller.",
"type": "string",
"x-prompt": "What name would you like to use?"
"x-prompt": "What is the controller file path?"
},
"skipFormat": {
"description": "Skip formatting files.",
@@ -8,17 +8,22 @@
"description": "Nest Decorator Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the decorator `Foo` at `myapp/src/app/foo.decorator.ts`",
"command": "nx g @nx/nest:decorator myapp/src/app/foo.decorator.ts"
},
{
"description": "Generate the decorator without providing the file extension. It results in the decorator `Foo` at `myapp/src/app/foo.decorator.ts`",
"command": "nx g @nx/nest:decorator myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "Path where the decorator will be generated.",
"description": "The file path to the decorator. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the decorator be generated?"
},
"name": {
"description": "The name of the decorator.",
"type": "string",
"x-prompt": "What name would you like to use?"
"x-prompt": "What is the decorator file path?"
},
"skipFormat": {
"description": "Skip formatting files.",
@@ -8,17 +8,22 @@
"description": "Nest Filter Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the filter `FooFilter` at `myapp/src/app/foo.filter.ts`",
"command": "nx g @nx/nest:filter myapp/src/app/foo.filter.ts"
},
{
"description": "Generate the filter without providing the file extension. It results in the filter `FooFilter` at `myapp/src/app/foo.filter.ts`",
"command": "nx g @nx/nest:filter myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "Path where the filter will be generated.",
"description": "The file path to the filter. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the filter be generated?"
},
"name": {
"description": "The name of the filter.",
"type": "string",
"x-prompt": "What name would you like to use?"
"x-prompt": "What is the filter file path?"
},
"skipFormat": {
"type": "boolean",
@@ -8,17 +8,22 @@
"description": "Nest Gateway Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the gateway `FooGateway` at `myapp/src/app/foo.gateway.ts`",
"command": "nx g @nx/nest:gateway myapp/src/app/foo.gateway.ts"
},
{
"description": "Generate the gateway without providing the file extension. It results in the gateway `FooGateway` at `myapp/src/app/foo.gateway.ts`",
"command": "nx g @nx/nest:gateway myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "Path where the gateway will be generated.",
"description": "The file path to the gateway. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the gateway be generated?"
},
"name": {
"description": "The name of the gateway.",
"type": "string",
"x-prompt": "What name would you like to use?"
"x-prompt": "What is the gateway file path?"
},
"skipFormat": {
"description": "Skip formatting files.",
@@ -8,17 +8,22 @@
"description": "Nest Guard Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the guard `FooGuard` at `myapp/src/app/foo.guard.ts`",
"command": "nx g @nx/nest:guard myapp/src/app/foo.guard.ts"
},
{
"description": "Generate the guard without providing the file extension. It results in the guard `FooGuard` at `myapp/src/app/foo.guard.ts`",
"command": "nx g @nx/nest:guard myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "Path where the guard will be generated.",
"description": "The file path to the guard. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the guard be generated?"
},
"name": {
"description": "The name of the guard.",
"type": "string",
"x-prompt": "What name would you like to use?"
"x-prompt": "What is the guard file path?"
},
"skipFormat": {
"description": "Skip formatting files.",
@@ -39,7 +44,7 @@
}
},
"additionalProperties": false,
"required": ["name"],
"required": ["path"],
"presets": []
},
"description": "Run the `guard` NestJS generator with Nx project support.",
@@ -8,17 +8,22 @@
"description": "Nest Interceptor Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the interceptor `FooInterceptor` at `myapp/src/app/foo.interceptor.ts`",
"command": "nx g @nx/nest:interceptor myapp/src/app/foo.interceptor.ts"
},
{
"description": "Generate the interceptor without providing the file extension. It results in the interceptor `FooInterceptor` at `myapp/src/app/foo.interceptor.ts`",
"command": "nx g @nx/nest:interceptor myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "Path where the interceptor will be generated.",
"description": "The file path to the interceptor. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the interceptor be generated?"
},
"name": {
"description": "The name of the interceptor.",
"type": "string",
"x-prompt": "What name would you like to use?"
"x-prompt": "What is the interceptor file path?"
},
"skipFormat": {
"description": "Skip formatting files.",
@@ -39,7 +44,7 @@
}
},
"additionalProperties": false,
"required": ["name"],
"required": ["path"],
"presets": []
},
"description": "Run the `interceptor` NestJS generator with Nx project support.",
@@ -8,29 +8,28 @@
"description": "Nest Interface Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the interface `Foo` at `myapp/src/app/foo.interface.ts`",
"command": "nx g @nx/nest:interface myapp/src/app/foo.interface.ts"
},
{
"description": "Generate the interface without providing the file extension. It results in the interface `Foo` at `myapp/src/app/foo.interface.ts`",
"command": "nx g @nx/nest:interface myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "Path where the interface will be generated.",
"description": "The file path to the interface. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the interface be generated?"
},
"name": {
"description": "The name of the interface.",
"type": "string",
"x-prompt": "What name would you like to use?"
"x-prompt": "What is the interface file path?"
},
"skipFormat": {
"description": "Skip formatting files.",
"type": "boolean",
"default": false,
"x-priority": "internal"
},
"flat": {
"description": "Flag to indicate if a directory is created.",
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20.",
"type": "boolean",
"default": true
}
},
"additionalProperties": false,
@@ -31,13 +31,17 @@
"description": "The tool to use for running lint checks.",
"type": "string",
"enum": ["eslint", "none"],
"default": "eslint"
"default": "none",
"x-prompt": "Which linter would you like to use?",
"x-priority": "important"
},
"unitTestRunner": {
"description": "Test runner to use for unit tests.",
"type": "string",
"enum": ["jest", "none"],
"default": "jest"
"default": "none",
"x-prompt": "Which unit test runner would you like to use?",
"x-priority": "important"
},
"tags": {
"description": "Add tags to the library (used for linting).",
@@ -8,17 +8,22 @@
"description": "Nest Middleware Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the middleware `FooMiddleware` at `myapp/src/app/foo.middleware.ts`",
"command": "nx g @nx/nest:middleware myapp/src/app/foo.middleware.ts"
},
{
"description": "Generate the middleware without providing the file extension. It results in the middleware `FooMiddleware` at `myapp/src/app/foo.middleware.ts`",
"command": "nx g @nx/nest:middleware myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "Path where the middleware will be generated.",
"description": "The file path to the middleware. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the middleware be generated?"
},
"name": {
"description": "The name of the middleware.",
"type": "string",
"x-prompt": "What name would you like to use?"
"x-prompt": "What is the middleware file path?"
},
"skipFormat": {
"description": "Skip formatting files.",
@@ -8,17 +8,22 @@
"description": "Nest Module Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the module `FooModule` at `myapp/src/app/foo.module.ts`",
"command": "nx g @nx/nest:module myapp/src/app/foo.module.ts"
},
{
"description": "Generate the module without providing the file extension. It results in the module `FooModule` at `myapp/src/app/foo.module.ts`",
"command": "nx g @nx/nest:module myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "Path where the module will be generated.",
"description": "The file path to the module. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the module be generated?"
},
"name": {
"description": "The name of the module.",
"type": "string",
"x-prompt": "What name would you like to use?"
"x-prompt": "What is the module file path?"
},
"skipFormat": {
"description": "Skip formatting files.",
@@ -8,17 +8,22 @@
"description": "Nest Pipe Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the pipe `FooPipe` at `myapp/src/app/foo.pipe.ts`",
"command": "nx g @nx/nest:pipe myapp/src/app/foo.pipe.ts"
},
{
"description": "Generate the pipe without providing the file extension. It results in the pipe `FooPipe` at `myapp/src/app/foo.pipe.ts`",
"command": "nx g @nx/nest:pipe myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "Path where the pipe will be generated.",
"description": "The file path to the pipe. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the pipe be generated?"
},
"name": {
"description": "The name of the pipe.",
"type": "string",
"x-prompt": "What name would you like to use?"
"x-prompt": "What is the pipe file path?"
},
"skipFormat": {
"description": "Skip formatting files.",
@@ -8,17 +8,22 @@
"description": "Nest Provider Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the provider `Foo` at `myapp/src/app/foo.ts`",
"command": "nx g @nx/nest:provider myapp/src/app/foo.ts"
},
{
"description": "Generate the provider without providing the file extension. It results in the provider `Foo` at `myapp/src/app/foo.ts`",
"command": "nx g @nx/nest:provider myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "Path where the provider will be generated.",
"description": "The file path to the provider. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the provider be generated?"
},
"name": {
"description": "The name of the provider.",
"type": "string",
"x-prompt": "What name would you like to use?"
"x-prompt": "What is the provider file path?"
},
"skipFormat": {
"description": "Skip formatting files.",
@@ -8,17 +8,22 @@
"description": "Nest Resolver Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the resolver `FooResolver` at `myapp/src/app/foo.resolver.ts`",
"command": "nx g @nx/nest:resolver myapp/src/app/foo.resolver.ts"
},
{
"description": "Generate the resolver without providing the file extension. It results in the resolver `FooResolver` at `myapp/src/app/foo.resolver.ts`",
"command": "nx g @nx/nest:resolver myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "Path where the resolver will be generated.",
"description": "The file path to the resolver. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the resolver be generated?"
},
"name": {
"description": "The name of the resolver.",
"type": "string",
"x-prompt": "What name would you like to use?"
"x-prompt": "What is the resolver file path?"
},
"skipFormat": {
"description": "Skip formatting files.",
@@ -8,17 +8,18 @@
"description": "Nest Resource Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate `myapp/src/app/entities/foo.entity.ts`, `myapp/src/app/dto/create-foo.dto.ts`, `myapp/src/app/dto/update-foo.dto.ts`, `myapp/src/app/foo.service.ts`, `myapp/src/app/foo.controller.ts`, and `myapp/src/app/foo.module.ts`",
"command": "nx g @nx/nest:resource myapp/src/app/foo"
}
],
"properties": {
"path": {
"type": "string",
"description": "Path where the resource will be generated.",
"description": "The file path to the resource. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the resource be generated?"
},
"name": {
"type": "string",
"description": "The name of the resource.",
"x-prompt": "What name would you like to use for this resource (plural, e.g., `users`)?"
"x-prompt": "What is the resource file path?"
},
"skipFormat": {
"description": "Skip formatting files.",
@@ -32,11 +33,6 @@
"enum": ["jest", "none"],
"default": "jest"
},
"language": {
"description": "Nest class language.",
"type": "string",
"enum": ["js", "ts"]
},
"type": {
"type": "string",
"description": "The transport layer.",
@@ -8,17 +8,22 @@
"description": "Nest Service Options Schema.",
"cli": "nx",
"type": "object",
"examples": [
{
"description": "Generate the service `FooService` at `myapp/src/app/foo.service.ts`",
"command": "nx g @nx/nest:service myapp/src/app/foo.service.ts"
},
{
"description": "Generate the service without providing the file extension. It results in the service `FooService` at `myapp/src/app/foo.service.ts`",
"command": "nx g @nx/nest:service myapp/src/app/foo"
}
],
"properties": {
"path": {
"description": "Path where the service will be generated.",
"description": "The file path to the service. Relative to the current working directory.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the service be generated?"
},
"name": {
"description": "The name of the service.",
"type": "string",
"x-prompt": "What name would you like to use?"
"x-prompt": "What is the service file path?"
},
"skipFormat": {
"description": "Skip formatting files.",
@@ -78,7 +78,7 @@
}
},
"required": ["buildTarget"],
"examplesFile": "---\ntitle: Next.js server executor examples\ndescription: This page contains examples for the @nx/next:serve executor.\n---\n\n`project.json`:\n\n```json\n//...\n{\n \"name\": \"acme\",\n \"$schema\": \"node_modules/nx/schemas/project-schema.json\",\n \"sourceRoot\": \".\",\n \"projectType\": \"application\",\n \"targets\": {\n //...\n \"serve\": {\n \"executor\": \"@nx/next:server\",\n \"defaultConfiguration\": \"production\",\n \"options\": {\n \"buildTarget\": \"acme:build\",\n \"dev\": true\n }\n }\n //...\n }\n}\n```\n\n```bash\nnx run acme:serve\n```\n\n## Examples\n\n### For Next.js Standalone projects\n\n{% tabs %}\n{% tab label=\"Default configuration\" %}\n\nThis is the default configuration for Next.js standalone projects. Our `@nx/next:server` executor is integrated to use Next.js' CLI. You can read more about the serve options at [Next.js CLI Options](https://nextjs.org/docs/app/api-reference/next-cli)\n\n```json\n \"serve\": {\n \"executor\": \"@nx/next:server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"acme:build\",\n \"dev\": true\n },\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"acme:build:development\",\n \"dev\": true\n },\n \"production\": {\n \"buildTarget\": \"acme:build:production\",\n \"dev\": false\n }\n }\n },\n```\n\n{% /tab %}\n{% tab label=\"Enable turbo\" %}\n\nTurbopack (beta) is a cutting-edge bundler designed for JavaScript and TypeScript. To read more about support features see [Next.js Turbopack Doucmentation](https://turbo.build/pack/docs/features)\n\nIn the context of Nx, you can utilize Turbopack within both the `pages` and `app` directories of Next.js to enhance local development speed. To activate Turbopack, simply:\n\nAppend the `--turbo` flag while executing the Nx development server.\n\n```shell\nnx run acme:serve --turbo\n```\n\nUpdating the build options to include `turbo`.\n\n```json\n \"serve\": {\n \"executor\": \"@nx/next:server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"acme:build\",\n \"dev\": true\n },\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"acme:build:development\",\n \"dev\": true,\n \"turbo\": true\n },\n //\n }\n }\n```\n\n```bash\nnx run acme:serve\n```\n\n{% /tab %}\n\n{% tab label=\"Adding keep alive timeout\" %}\n\nWhen using Nx with Next.js behind a downstream proxy, it's important to make sure that the `keep-alive timeouts` of Next.js' HTTP server are set to longer durations than the timeouts of the proxy. If you don't do this, Node.js will unexpectedly end TCP connections without notifying the proxy when the `keep-alive timeout` is reached. This can lead to a proxy error when the proxy tries to reuse a connection that Node.js has already terminated.\n\nTo configure timeout values (in milliseconds) you can:\n\nPass `--keepAliveTimeout`\n\n```shell\nnx run acme:serve --keepAliveTimeout 60000\n```\n\nUpdating the serve options to include `keepAliveTimeout`.\n\n```json\n \"serve\": {\n \"executor\": \"@nx/next:server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"acme:build\",\n \"dev\": true\n },\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"acme:build:development\",\n \"dev\": true,\n \"keepAliveTimeout\": 60000\n },\n //\n }\n }\n```\n\n```shell\nnx run acme:serve\n```\n\n{% /tab %}\n\n{% /tabs %}\n",
"examplesFile": "---\ntitle: Next.js server executor examples\ndescription: This page contains examples for the @nx/next:serve executor.\n---\n\n`project.json`:\n\n```json\n//...\n{\n \"name\": \"acme\",\n \"$schema\": \"node_modules/nx/schemas/project-schema.json\",\n \"sourceRoot\": \".\",\n \"projectType\": \"application\",\n \"targets\": {\n //...\n \"serve\": {\n \"executor\": \"@nx/next:server\",\n \"defaultConfiguration\": \"production\",\n \"options\": {\n \"buildTarget\": \"acme:build\",\n \"dev\": true\n }\n }\n //...\n }\n}\n```\n\n```bash\nnx run acme:serve\n```\n\n## Examples\n\n### For Next.js Standalone projects\n\n{% tabs %}\n{% tab label=\"Default configuration\" %}\n\nThis is the default configuration for Next.js standalone projects. Our `@nx/next:server` executor is integrated to use Next.js' CLI. You can read more about the serve options at [Next.js CLI Options](https://nextjs.org/docs/app/api-reference/next-cli)\n\n```json\n \"serve\": {\n \"executor\": \"@nx/next:server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"acme:build\",\n \"dev\": true\n },\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"acme:build:development\",\n \"dev\": true\n },\n \"production\": {\n \"buildTarget\": \"acme:build:production\",\n \"dev\": false\n }\n }\n },\n```\n\n{% /tab %}\n{% tab label=\"Enable turbo\" %}\n\nTurbopack (beta) is a cutting-edge bundler designed for JavaScript and TypeScript. To read more about support features see [Next.js Turbopack Documentation](https://turbo.build/pack/docs/features)\n\nIn the context of Nx, you can utilize Turbopack within both the `pages` and `app` directories of Next.js to enhance local development speed. To activate Turbopack, simply:\n\nAppend the `--turbo` flag while executing the Nx development server.\n\n```shell\nnx run acme:serve --turbo\n```\n\nUpdating the build options to include `turbo`.\n\n```json\n \"serve\": {\n \"executor\": \"@nx/next:server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"acme:build\",\n \"dev\": true\n },\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"acme:build:development\",\n \"dev\": true,\n \"turbo\": true\n },\n //\n }\n }\n```\n\n```bash\nnx run acme:serve\n```\n\n{% /tab %}\n\n{% tab label=\"Adding keep alive timeout\" %}\n\nWhen using Nx with Next.js behind a downstream proxy, it's important to make sure that the `keep-alive timeouts` of Next.js' HTTP server are set to longer durations than the timeouts of the proxy. If you don't do this, Node.js will unexpectedly end TCP connections without notifying the proxy when the `keep-alive timeout` is reached. This can lead to a proxy error when the proxy tries to reuse a connection that Node.js has already terminated.\n\nTo configure timeout values (in milliseconds) you can:\n\nPass `--keepAliveTimeout`\n\n```shell\nnx run acme:serve --keepAliveTimeout 60000\n```\n\nUpdating the serve options to include `keepAliveTimeout`.\n\n```json\n \"serve\": {\n \"executor\": \"@nx/next:server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"acme:build\",\n \"dev\": true\n },\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"acme:build:development\",\n \"dev\": true,\n \"keepAliveTimeout\": 60000\n },\n //\n }\n }\n```\n\n```shell\nnx run acme:serve\n```\n\n{% /tab %}\n\n{% /tabs %}\n",
"presets": []
},
"description": "Serve a Next.js application.",
@@ -63,8 +63,10 @@
"linter": {
"description": "The tool to use for running lint checks.",
"type": "string",
"enum": ["eslint"],
"default": "eslint"
"enum": ["eslint", "none"],
"default": "none",
"x-prompt": "Which linter would you like to use?",
"x-priority": "important"
},
"skipFormat": {
"description": "Skip formatting files.",
@@ -76,7 +78,9 @@
"type": "string",
"enum": ["jest", "none"],
"description": "Test runner to use for unit tests.",
"default": "jest"
"default": "none",
"x-prompt": "What unit test runner should be used?",
"x-priority": "important"
},
"e2eTestRunner": {
"type": "string",
@@ -137,7 +141,7 @@
}
},
"required": ["directory"],
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create app in a directory\" %}\n\n{% callout type=\"note\" title=\"Directory Flag Behavior Changes\" %}\nThe command below uses the `as-provided` directory flag behavior, which is the default in Nx 16.8.0. If you're on an earlier version of Nx or using the `derived` option, use `--directory=nested`. See the [as-provided vs. derived documentation](/deprecated/as-provided-vs-derived) for more details.\n{% /callout %}\n\n```shell\nnx g app apps/nested/myapp\n```\n\n{% /tab %}\n{% tab label=\"Use a custom Express server\" %}\n\n```shell\nnx g app apps/myapp --custom-server\n```\n\n{% /tab %}\n{% tab label=\"Use plain JavaScript (not TypeScript)\" %}\n\n```shell\nnx g app apps/myapp --js\n```\n\n{% /tab %}\n{% /tabs %}\n",
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create app in a nested directory\" %}\n\n```shell\nnx g app apps/nested/myapp\n```\n\n{% /tab %}\n{% tab label=\"Use a custom Express server\" %}\n\n```shell\nnx g app apps/myapp --custom-server\n```\n\n{% /tab %}\n{% tab label=\"Use plain JavaScript (not TypeScript)\" %}\n\n```shell\nnx g app apps/myapp --js\n```\n\n{% /tab %}\n{% /tabs %}\n",
"presets": []
},
"aliases": ["app"],
@@ -11,16 +11,14 @@
"properties": {
"path": {
"type": "string",
"description": "Path where the component will be generated.",
"description": "The file path to the component. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the component be generated?",
"x-prompt": "What is the component file path?",
"x-priority": "important"
},
"name": {
"type": "string",
"description": "The name of the component.",
"x-prompt": "What name would you like to use for the component?",
"x-priority": "important"
"description": "The component symbol name. Defaults to the last segment of the file path."
},
"style": {
"description": "The file extension to be used for style files.",
@@ -40,6 +38,10 @@
"value": "less",
"label": "LESS [ https://lesscss.org ]"
},
{
"value": "tailwind",
"label": "tailwind [ https://tailwindcss.com/ ]"
},
{
"value": "styled-components",
"label": "styled-components [ https://styled-components.com ]"
@@ -71,7 +73,7 @@
"js": {
"type": "boolean",
"description": "Generate JavaScript files rather than TypeScript files.",
"default": false
"x-deprecated": "Provide the full file path including the file extension in the `path` option. This option will be removed in Nx v21."
},
"skipFormat": {
"description": "Skip formatting files.",
@@ -81,7 +83,7 @@
}
},
"required": ["path"],
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create an app component\" %}\n\n```shell\nnx g component apps/my-app/src/lib/my-cmp/my-cmp\n```\n\n{% /tab %}\n{% tab label=\"Create a component without its own folder\" %}\n\nRunning the following will create a component under `apps/my-app/components/my-cmp.tsx` rather than `apps/my-app/components/my-cmp/my-cmp.tsx`.\n\n```shell\nnx g component apps/my-app/src/lib/my-cmp\n```\n\n{% /tab %}\n{% tab label=\"Create component in a custom directory\" %}\n\nRunning the following will create a component under `apps/my-app/foo/my-cmp.tsx` rather than `apps/my-app/my-cmp/my-cmp.tsx`.\n\n```shell\nnx g component apps/my-app/foo/my-cmp\n```\n\n{% /tab %}\n{% /tabs %}\n",
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create a Component\" %}\n\nGenerate a component named `MyComponent` at `apps/my-app/src/app/my-component/my-component.tsx`:\n\n```shell\nnx g component apps/my-app/src/app/my-component/my-component.tsx\n```\n\n{% /tab %}\n{% tab label=\"Create a Component with a Different Symbol Name\" %}\n\nGenerate a component named `Custom` at `apps/my-app/src/app/my-component/my-component.tsx`:\n\n```shell\nnx g component apps/my-app/src/app/my-component/my-component.tsx --name=custom\n```\n\n{% /tab %}\n{% tab label=\"Create a Component Omitting the File Extension\" %}\n\nGenerate a component named `MyComponent` at `apps/my-app/src/app/my-component/my-component.tsx` without specifying the file extension:\n\n```shell\nnx g component apps/my-app/src/app/my-component/my-component\n```\n\n{% /tab %}\n{% /tabs %}\n",
"presets": []
},
"description": "Create a component.",
@@ -40,6 +40,10 @@
"value": "less",
"label": "LESS [ https://lesscss.org ]"
},
{
"value": "tailwind",
"label": "tailwind [ https://tailwindcss.com/ ]"
},
{
"value": "styled-components",
"label": "styled-components [ https://styled-components.com ]"
@@ -56,17 +60,29 @@
]
}
},
"bundler": {
"type": "string",
"description": "The bundler to use. Choosing 'none' means this library is not buildable.",
"enum": ["none", "vite", "rollup"],
"default": "none",
"x-prompt": "Which bundler would you like to use to build the library? Choose 'none' to skip build setup.",
"x-priority": "important"
},
"linter": {
"description": "The tool to use for running lint checks.",
"type": "string",
"enum": ["eslint"],
"default": "eslint"
"enum": ["eslint", "none"],
"default": "none",
"x-prompt": "Which linter would you like to use?",
"x-priority": "important"
},
"unitTestRunner": {
"type": "string",
"enum": ["vitest", "jest", "none"],
"description": "Test runner to use for unit tests.",
"default": "vitest"
"default": "none",
"x-prompt": "What unit test runner should be used?",
"x-priority": "important"
},
"tags": {
"type": "string",
@@ -99,7 +115,8 @@
"buildable": {
"type": "boolean",
"default": false,
"description": "Generate a buildable library."
"description": "Generate a buildable library that uses rollup to bundle.",
"x-deprecated": "Use the `bundler` option for greater control (none, vite, rollup)."
},
"importPath": {
"type": "string",
@@ -11,16 +11,14 @@
"properties": {
"path": {
"type": "string",
"description": "Path where the page will be generated.",
"description": "The path to the directory where the page will be generated. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the page be generated?",
"x-prompt": "Which directory do you want to create the page in?",
"x-priority": "important"
},
"name": {
"type": "string",
"description": "The name of the page.",
"x-prompt": "What name would you like to use for the page?",
"x-priority": "important"
"description": "The page symbol name. Defaults to the page directory name."
},
"style": {
"description": "The file extension to be used for style files.",
@@ -73,12 +71,6 @@
"description": "Generate JavaScript files rather than TypeScript files.",
"default": false
},
"flat": {
"type": "boolean",
"description": "Create component at the source root rather than its own directory.",
"default": false,
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v20."
},
"skipFormat": {
"description": "Skip formatting files.",
"type": "boolean",
@@ -87,7 +79,7 @@
}
},
"required": ["path"],
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create static page in an app\" %}\n\n```shell\nnx g page apps/my-app/pages/my-page\n```\n\n{% /tab %}\n{% tab label=\"Create dynamic page in an app\" %}\n\nThe following creates a page under `apps/my-app/pages/products/[id].tsx`.\n\n```shell\nnx g page \"apps/my-app/pages/products/[id]\"\n```\n\n{% /tab %}\n\n{% /tabs %}\n",
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Create a Static Page\" %}\n\nGenerate a static page named `MyPage` at `apps/my-app/pages/my-page/page.tsx`:\n\n```shell\nnx g page apps/my-app/pages/my-page\n```\n\n{% /tab %}\n{% tab label=\"Create a Dynamic Page\" %}\n\nGenerate a dynamic page at `apps/my-app/pages/products/[id]/page.tsx`:\n\n```shell\nnx g page \"apps/my-app/pages/products/[id]\"\n```\n\n{% /tab %}\n\n{% /tabs %}\n",
"presets": []
},
"description": "Create a page.",
@@ -36,14 +36,26 @@
"linter": {
"description": "The tool to use for running lint checks.",
"type": "string",
"enum": ["eslint"],
"default": "eslint"
"enum": ["eslint", "none"],
"default": "none",
"x-prompt": "Which linter would you like to use?",
"x-priority": "important"
},
"unitTestRunner": {
"type": "string",
"enum": ["jest", "none"],
"description": "Test runner to use for unit tests.",
"default": "jest"
"default": "none",
"x-priority": "important",
"x-prompt": "Which unit test runner would you like to use?"
},
"e2eTestRunner": {
"type": "string",
"enum": ["jest", "none"],
"description": "Test runner to use for end-to-end tests",
"default": "none",
"x-priority": "important",
"x-prompt": "Which end-to-end test runner would you like to use?"
},
"tags": {
"type": "string",
@@ -109,12 +121,6 @@
"hidden": true,
"x-priority": "internal"
},
"e2eTestRunner": {
"type": "string",
"enum": ["jest", "none"],
"description": "Test runner to use for end to end (e2e) tests",
"default": "jest"
},
"docker": {
"type": "boolean",
"description": "Add a docker build target"
@@ -36,14 +36,18 @@
"linter": {
"description": "The tool to use for running lint checks.",
"type": "string",
"enum": ["eslint"],
"default": "eslint"
"enum": ["eslint", "none"],
"default": "none",
"x-prompt": "Which linter would you like to use?",
"x-priority": "important"
},
"unitTestRunner": {
"type": "string",
"enum": ["jest", "none"],
"description": "Test runner to use for unit tests.",
"default": "jest"
"default": "none",
"x-prompt": "Which unit test runner would you like to use?",
"x-priority": "important"
},
"tags": {
"type": "string",
@@ -69,7 +73,7 @@
},
"buildable": {
"type": "boolean",
"default": false,
"default": true,
"description": "Generate a buildable library.",
"x-priority": "important"
},
@@ -22,24 +22,27 @@
"pattern": "^[a-zA-Z][^:]*$",
"x-priority": "important"
},
"linter": {
"description": "The tool to use for running lint checks.",
"type": "string",
"enum": ["eslint"],
"default": "eslint"
},
"skipFormat": {
"description": "Skip formatting files.",
"type": "boolean",
"default": false,
"x-priority": "internal"
},
"linter": {
"description": "The tool to use for running lint checks.",
"type": "string",
"enum": ["eslint", "none"],
"default": "none",
"x-prompt": "Which linter would you like to use?",
"x-priority": "important"
},
"unitTestRunner": {
"type": "string",
"enum": ["vitest", "none"],
"description": "Test runner to use for unit tests.",
"x-prompt": "Which unit test runner would you like to use?",
"default": "none"
"default": "none",
"x-priority": "important"
},
"e2eTestRunner": {
"type": "string",
@@ -100,7 +103,7 @@
}
},
"required": ["directory"],
"examplesFile": "---\ntitle: Nuxt application generator examples\ndescription: This page contains examples for the @nx/nuxt:app generator.\n---\n\nYour new Nuxt application will be generated with the following directory structure, following the suggested [directory structure](https://nuxt.com/docs/guide/directory-structure) for Nuxt applications:\n\n```text\nmy-nuxt-app\n├── nuxt.config.ts\n├── project.json\n├── src\n│   ├── app.vue\n│   ├── assets\n│   │   └── css\n│   │   └── styles.css\n│   ├── components\n│   │   └── NxWelcome.vue\n│   ├── pages\n│   │   ├── about.vue\n│   │   └── index.vue\n│   ├── public\n│   │   └── favicon.ico\n│   └── server\n│   ├── api\n│   │   └── greet.ts\n│   └── tsconfig.json\n├── tsconfig.app.json\n├── tsconfig.json\n├── tsconfig.spec.json\n└── vitest.config.ts\n```\n\nYour new app will contain the following:\n\n- Two pages (home and about) under `pages`\n- A component (`NxWelcome`) under `components`\n- A `greet` API endpoint that returns a JSON response under `/api/greet`\n- Configuration for `vitest`\n- Your app's entrypoint (`app.vue`) will contain the navigation links to the home and about pages, and the `nuxt-page` component to display the contents of your pages.\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Create app in a directory\" %}\n\n{% callout type=\"note\" title=\"Directory Flag Behavior Changes\" %}\nThe command below uses the `as-provided` directory flag behavior, which is the default in Nx 16.8.0. If you're on an earlier version of Nx or using the `derived` option, use `--directory=nested`. See the [as-provided vs. derived documentation](/deprecated/as-provided-vs-derived) for more details.\n{% /callout %}\n\n```shell\nnx g @nx/nuxt:app =apps/nested/myapp\n```\n\n{% /tab %}\n\n{% tab label=\"Create app with vitest configured\" %}\n\n```shell\nnx g @nx/nuxt:app apps/nested/myapp --unitTestRunner=vitest\n```\n\n{% /tab %}\n\n{% tab label=\"Use plain JavaScript (not TypeScript)\" %}\n\n```shell\nnx g @nx/nuxt:app apps/myapp --js\n```\n\n{% /tab %}\n{% /tabs %}\n\n## Generate pages and components\n\nYou can use the the [`@nx/vue:component` generator](/nx-api/vue/generators/component) to generate new pages and components for your application. You can read more on the [`@nx/vue:component` generator documentation page](/nx-api/vue/generators/component), but here are some examples:\n\n{% tabs %}\n{% tab label=\"New page\" %}\n\n```shell\nnx g @nx/nuxt:component my-app/src/pages/my-page\n```\n\n{% /tab %}\n\n{% tab label=\"New component\" %}\n\n```shell\nnx g @nx/nuxt:component my-app/src/components/my-cmp\n```\n\n{% /tab %}\n{% /tabs %}\n",
"examplesFile": "---\ntitle: Nuxt application generator examples\ndescription: This page contains examples for the @nx/nuxt:app generator.\n---\n\nYour new Nuxt application will be generated with the following directory structure, following the suggested [directory structure](https://nuxt.com/docs/guide/directory-structure) for Nuxt applications:\n\n```text\nmy-nuxt-app\n├── nuxt.config.ts\n├── project.json\n├── src\n│   ├── app.vue\n│   ├── assets\n│   │   └── css\n│   │   └── styles.css\n│   ├── components\n│   │   └── NxWelcome.vue\n│   ├── pages\n│   │   ├── about.vue\n│   │   └── index.vue\n│   ├── public\n│   │   └── favicon.ico\n│   └── server\n│   ├── api\n│   │   └── greet.ts\n│   └── tsconfig.json\n├── tsconfig.app.json\n├── tsconfig.json\n├── tsconfig.spec.json\n└── vitest.config.ts\n```\n\nYour new app will contain the following:\n\n- Two pages (home and about) under `pages`\n- A component (`NxWelcome`) under `components`\n- A `greet` API endpoint that returns a JSON response under `/api/greet`\n- Configuration for `vitest`\n- Your app's entrypoint (`app.vue`) will contain the navigation links to the home and about pages, and the `nuxt-page` component to display the contents of your pages.\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Create app in a nested directory\" %}\n\n```shell\nnx g @nx/nuxt:app apps/nested/myapp\n```\n\n{% /tab %}\n\n{% tab label=\"Create app with vitest configured\" %}\n\n```shell\nnx g @nx/nuxt:app apps/nested/myapp --unitTestRunner=vitest\n```\n\n{% /tab %}\n\n{% tab label=\"Use plain JavaScript (not TypeScript)\" %}\n\n```shell\nnx g @nx/nuxt:app apps/myapp --js\n```\n\n{% /tab %}\n{% /tabs %}\n\n## Generate pages and components\n\nYou can use the the [`@nx/vue:component` generator](/nx-api/vue/generators/component) to generate new pages and components for your application. You can read more on the [`@nx/vue:component` generator documentation page](/nx-api/vue/generators/component), but here are some examples:\n\n{% tabs %}\n{% tab label=\"New page\" %}\n\n```shell\nnx g @nx/nuxt:component my-app/src/pages/my-page\n```\n\n{% /tab %}\n\n{% tab label=\"New component\" %}\n\n```shell\nnx g @nx/nuxt:component my-app/src/components/my-cmp\n```\n\n{% /tab %}\n{% /tabs %}\n",
"presets": []
},
"aliases": ["app"],
@@ -28,6 +28,7 @@ Install `create-nx-workspace` globally to invoke the command directly, or use `n
| `--defaultBase` | string | Default base to use for new projects. (Default: `main`) |
| `--docker` | boolean | Generate a Dockerfile for the Node API. |
| `--e2eTestRunner` | `playwright`, `cypress`, `none` | Test runner to use for end to end (E2E) tests. |
| `--formatter` | string | Code formatter to use. |
| `--framework` | string | Framework option to be used with certain stacks. |
| `--help` | boolean | Show help. |
| `--interactive` | boolean | Enable interactive mode with presets. (Default: `true`) |
@@ -45,6 +46,7 @@ Install `create-nx-workspace` globally to invoke the command directly, or use `n
| `--style` | string | Stylesheet type to be used with certain stacks. |
| `--useGitHub` | boolean | Will you be using GitHub as your git hosting provider? (Default: `false`) |
| `--version` | boolean | Show version number. |
| `--workspaces` | boolean | Use package manager workspaces. (Default: `false`) |
| `--workspaceType` | `integrated`, `package-based`, `standalone` | The type of workspace to create. |
## Presets
@@ -67,25 +67,9 @@ The `targetName` and `ciTargetName` options control the name of the inferred Pla
### Splitting E2E Tests
The `@nx/playwright/plugin` will automatically split your e2e tasks by file if you provide a `ciTargetName`. You can read more about the Atomizer feature [here](/ci/features/split-e2e-tasks). This will create a target with that name which can be used in CI to run the tests for each file in a distributed fashion.
`@nx/playwright/plugin` leverages Nx Atomizer to split your e2e tests into smaller tasks in a fully automated way. This allows for a much more efficient distribution of tasks in CI. You can read more about the Atomizer feature [here](/ci/features/split-e2e-tasks).
```json {% fileName="nx.json" %}
{
"plugins": [
{
"plugin": "@nx/playwright/plugin",
"options": {
"targetName": "e2e",
"ciTargetName": "e2e-ci"
}
}
]
}
```
### Splitting E2E tasks by file
The `@nx/playwright/plugin` will automatically split your e2e tasks by file. You can read more about this feature [here](/ci/features/split-e2e-tasks).
If you would like to disable Atomizer for Playwright tasks, set `ciTargetName` to `false`.
{% /tab %}
{% tab label="Nx < 18" %}
@@ -159,6 +143,46 @@ nx e2e <your-app-name> --ui
You can also use `--headed` flag to run Playwright where the browser can be seen without using the [Playwright UI](https://playwright.dev/docs/test-ui-mode)
### Specifying a Project/Target Browser
The default generated Playwright configuration will contain a `projects` property that contains a list of browsers to run the tests against.
It should look similar to this:
```ts
export default defineConfig({
...,
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
{
name: "firefox",
use: { ...devices["Desktop Firefox"] },
},
{
name: "webkit",
use: { ...devices["Desktop Safari"] },
}
]
});
```
By default, Playwright will run tests against all browsers in the `projects` list.
You can specify a specific browser to run the tests against by passing the `--project` flag to the `nx e2e` command.
```shell
nx e2e frontend-e2e -- --project=firefox
```
{% callout type="note" title="Argument Forwarding" %}
As Nx also has a `--project` argument, you need to use `--` to forward the argument to the Playwright configuration.
{% /callout %}
### Specifying a Base Url
The `baseURL` property within the Playwright configuration can control where the tests visit by default.
@@ -7,27 +7,19 @@
"$id": "NxPluginExecutor",
"title": "Create an Executor for an Nx Plugin",
"description": "Create an Executor for an Nx Plugin.",
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Basic executor\" %}\n\nCreate a new executor called `build` inside the plugin `my-plugin`:\n\n```bash\nnx g @nx/plugin:executor tools/my-plugin/src/executors/build\n```\n\n{% /tab %}\n{% tab label=\"With custom hashing\" %}\n\nCreate a new executor called `build` inside the plugin `my-plugin`, that uses a custom hashing function:\n\n```bash\nnx g @nx/plugin:executor tools/my-plugin/src/executors/build --includeHasher\n```\n\n{% /tab %}\n{% /tabs %}\n",
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Basic executor\" %}\n\nCreate a new executor called `build` at `tools/my-plugin/src/executors/build.ts`:\n\n```bash\nnx g @nx/plugin:executor tools/my-plugin/src/executors/build.ts\n```\n\n{% /tab %}\n{% tab label=\"Without providing the file extension\" %}\n\nCreate a new executor called `build` at `tools/my-plugin/src/executors/build.ts`:\n\n```bash\nnx g @nx/plugin:executor tools/my-plugin/src/executors/build\n```\n\n{% /tab %}\n{% tab label=\"With different exported name\" %}\n\nCreate a new executor called `custom` at `tools/my-plugin/src/executors/build.ts`:\n\n```bash\nnx g @nx/plugin:executor tools/my-plugin/src/executors/build.ts --name=custom\n```\n\n{% /tab %}\n{% tab label=\"With custom hashing\" %}\n\nCreate a new executor called `build` at `tools/my-plugin/src/executors/build.ts`, that uses a custom hashing function:\n\n```bash\nnx g @nx/plugin:executor tools/my-plugin/src/executors/build --includeHasher\n```\n\n{% /tab %}\n{% /tabs %}\n",
"type": "object",
"examples": [
{
"command": "nx g executor my-executor --project=my-plugin",
"description": "Generate `libs/my-plugin/src/executors/my-executor`"
}
],
"properties": {
"path": {
"type": "string",
"description": "Path at which to generate the executor file.",
"x-prompt": "What path would you like to use for the executor?",
"description": "The file path to the executor. Relative to the current working directory.",
"x-prompt": "What is the executor file path?",
"$default": { "$source": "argv", "index": 0 },
"x-priority": "important"
},
"name": {
"type": "string",
"description": "Executor name.",
"x-prompt": "What name would you like to use for the executor?",
"x-priority": "important"
"description": "The executor name to export in the plugin executors collection."
},
"description": {
"type": "string",
@@ -10,23 +10,29 @@
"type": "object",
"examples": [
{
"command": "nx g generator libs/my-plugin/src/generators//my-generator",
"description": "Generate `libs/my-plugin/src/generators/my-generator`"
"description": "Generate a generator exported with the name matching the file name. It results in the generator `foo` at `mylib/src/generators/foo.ts`",
"command": "nx g @nx/plugin:generator mylib/src/generators/foo.ts"
},
{
"description": "Generate a generator without providing the file extension. It results in the generator `foo` at `mylib/src/generators/foo.ts`",
"command": "nx g @nx/plugin:generator mylib/src/generators/foo"
},
{
"description": "Generate a generator exported with a different name from the file name. It results in the generator `custom` at `mylib/src/generators/foo.ts`",
"command": "nx g @nx/plugin:generator mylib/src/generators/foo --name=custom"
}
],
"properties": {
"path": {
"type": "string",
"description": "Path where the generator will be generated.",
"description": "The file path to the generator. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the generator be generated?",
"x-prompt": "What is the generator file path?",
"x-priority": "important"
},
"name": {
"type": "string",
"description": "Generator name.",
"x-prompt": "What name would you like to use for the generator?",
"x-priority": "important"
"description": "The generator name to export in the plugin generators collection."
},
"description": {
"type": "string",
@@ -10,22 +10,29 @@
"type": "object",
"examples": [
{
"command": "nx g migration my-plugin/my-migration --version=1.0.0",
"description": "Adds a new migration inside `my-plugin`, which will be triggered when migrating to version 1.0.0 or above from a previous version."
"description": "Generate a migration exported with the name matching the file name, which will be triggered when migrating to version 1.0.0 or above from a previous version. It results in the migration `foo` at `mylib/src/migrations/foo.ts`",
"command": "nx g @nx/plugin:migration mylib/src/migrations/foo.ts -v=1.0.0"
},
{
"description": "Generate a migration without providing the file extension, which will be triggered when migrating to version 1.0.0 or above from a previous version. It results in the migration `foo` at `mylib/src/migrations/foo.ts`",
"command": "nx g @nx/plugin:migration mylib/src/migrations/foo -v=1.0.0"
},
{
"description": "Generate a migration exported with a different name from the file name, which will be triggered when migrating to version 1.0.0 or above from a previous version. It results in the migration `custom` at `mylib/src/migrations/foo.ts`",
"command": "nx g @nx/plugin:migration mylib/src/migrations/foo --name=custom -v=1.0.0"
}
],
"properties": {
"path": {
"type": "string",
"description": "Path where the migration will be generated.",
"description": "The file path to the migration without the file extension. Relative to the current working directory.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the migration be generated?",
"x-prompt": "What is the migration file path?",
"x-priority": "important"
},
"name": {
"type": "string",
"description": "Migration name.",
"x-priority": "important"
"description": "The migration name to export in the plugin migrations collection."
},
"description": {
"type": "string",

Some files were not shown because too many files have changed in this diff Show More