Compare commits

..

425 Commits

Author SHA1 Message Date
Isaac Mann 9646c49e89 chore(nx-dev): tutorials in subdirectory 2025-02-11 15:07:34 -05:00
Isaac Mann efc7f9f85b docs(core): update tutorial 2025-02-11 12:34:22 -05:00
Isaac Mann 8b8828458a feat(nx-dev): tutorialkit project 2025-02-11 12:32:17 -05:00
Jack Hsu 0415c9e898 feat(testing): disable jest runtime by default when inferring targets (#29917)
This PR updates `@nx/jest/plugin` such that `disableJestRuntime` option
is true by default. Users will need to set it to false to bring in
`jest-config` and `jest-runtime` to compute atomized targets. We're
leaving it as an option if anyone runs into discrepancies between our
calculation and what jest-runtime calculates for test files within a
project.



## Current Behavior
Jest runtime is used by default and is potentially slow if you use many
transforms, presets, etc. in the jest config.

## Expected Behavior
Jest runtime is not used by default, and users have to option of
enabling it.

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

Fixes #
2025-02-11 12:27:52 -05:00
Colum Ferry 34cebecaba feat(testing): support vitest 3 (#29908)
We currently still generate Vitest configuration using Vitest v1.

Vitest v3 has released so Nx is pretty far behind now.

Update vitest version to v3 and use it to configure new projects.
Existing workspaces using v1 will continue to use v1.
2025-02-11 12:27:52 -05:00
Jack Hsu d02d5033cc feat(core): update CNW defaults so they generate a useful workspace by default (#29915)
This PR fixes some inconsistencies when generating a TS solution
workspace (e.g. `npx create-nx-workspace --workspace`).

If the user chooses `None` stack (or `--preset=ts`), then we continue to
default to no Prettier (and ESLint, etc.). However, for React, Vue, and
Node, we want the defaults to be useful for users to run lint, test,
etc. Thus, they are now updated the default does not opt out of any
tooling, but users can still choose no to any of them.

<!-- 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
The defaults for React, Vue, Node are inconsistent (e2e runner is there
by default, but not unit test runner, etc.)

## Expected Behavior
Defaults are consistent and useful, especially for tutorials.

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

Fixes #
2025-02-11 12:27:36 -05:00
Juri 2049c2b485 fix(nx-dev): error on course detail page on mobile 2025-02-11 12:27:36 -05:00
Nicholas Cunningham c3afbae1fe fix(nx-dev): Update customers carousel subtitle (#29920) 2025-02-11 12:27:36 -05:00
Benjamin Cabanes 1681e0f9db docs(nx-dev): update Nx Powerpack messaging & links (#29918)
Revised FAQ and hero section to clarify that Nx Powerpack is included in
Nx Enterprise, replacing references to OSS licenses with trial-related
messaging.
2025-02-11 12:27:36 -05:00
Isaac Mann 1e1d692da6 chore(nx-dev): old tutorial url redirect (#29916)
Add a redirect for /tutorial/*
2025-02-11 12:27:36 -05:00
Nicholas Cunningham 305cd6a01e fix(nextjs): enhance support for custom server with SWC configuration (#29895)
This pull request contains a few changes to enhance our swc support for
Next.js with a custom server.

### Issues
Currently, we have a few issues with our configuration when using
executors for Next.js with a custom server:

1. The custom server does not have an independent build configuration.
2. The custom server does not have an independent output directory.
3. Serving via `@nx/next-server` or via `@nx/js:node` with
configurations `production` and `development` does not always work.
(These are contained inside `project.json`).

### Changes
All the above issues have been addressed

1. We now have an independent swc build configuration
called`.server.swrc` (_follows the same format as `.eslintrc`,
`.babelrc`_) etc...
2. Now each custom server output will be named `{app}-server` such that
if you have multiple custom servers for multiple apps the names will not
clash.
3. Serving now works out of the box but can be adjusted to suit your
needs via updating the custom server entry file `main.ts`
2025-02-11 12:27:36 -05:00
Jack Hsu 37fce4befc fix(js): generate pacakge.json for non-buildable nest and expo libs (#29891)
This PR fixes a couple of issues for TS solution setup:
1. Expo library should generate with correct `package.json` file (e.g.
`exports` maps either to source or dist). See [spec
file](https://github.com/nrwl/nx/pull/29891/files#diff-ae2eb3d10d58786c17aa21f5603043b68043faaebafaec77912f3d69ac0c5295).
2. Nest library should generate `package.json` when non-buildable. See
[spec
file](https://github.com/nrwl/nx/pull/29891/files#diff-368467bcd2215def98ef14aaff9dcb056a915b0a724d0eb857f3a0badef8b40a).

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

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

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

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

Fixes #
2025-02-11 12:27:36 -05:00
Philip Fulcher b9478fc3f5 docs(core): remove references to dumb components (#29897)
## Current Behavior
Docs refer to smart and dumb components

## Expected Behavior
Docs refer to presentational and container components
2025-02-11 12:27:36 -05:00
Jason Jean 8040ee8a8f chore(core): handle project graph errors which do not have a message (#29893)
<!-- 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 weird errors which do not have a message get thrown, a weird error
gets thrown by Nx saying cannot read `split` of `undefined`.

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

When weird errors which do not have a message get thrown, the weird
error is `console.error`ed

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

Fixes #
2025-02-11 12:27:36 -05:00
Jason Jean b9d8be6f00 fix(core): do not use revokable proxy (#29878)
<!-- 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 -->

`preTaskExecution` hooks used a revocable proxy to monitor updates to
`process.env` then revoking them. Apparently, this also prevents them
from being accessed afterwards which is definitely not intentional.

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

`preTaskExecution` hooks use a normal (non-revocable) proxy and restores
`process.env.` to the un-proxied version.

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

Fixes #
2025-02-11 12:27:36 -05:00
Jason Jean 44e4cea6b3 fix(core): do not write filemap cache when there are errors (#29892)
<!-- 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 -->

Errors when processing the project graph still result in the project
file map being cached causing invalid information to be used when
recalculating the project graph.

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

The project file map will not be cached if there are errors calculating
the project graph. The dependencies of the graph will be recalculated
from scratch the next time Nx runs.

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

Fixes #
2025-02-11 12:27:36 -05:00
Jack Hsu a25442af86 fix(js): set --ws=false when running npm config for jest e2e (#29887)
When we run inferred Jest tasks with workspaces enabled, it'll result in
an error like this:

```
npm ERR! A complete log of this run can be found in: /Users/jack/.npm/_logs/2025-02-05T13_41_51_079Z-debug-0.log
Error: Command failed: npm config set //localhost:4873/:_authToken "secretVerdaccioToken"
npm ERR! code ENOWORKSPACES
npm ERR! This command does not support workspaces.
```

This is because the cwd is the project root (e.g. `packages/mypkg-e2e`),
and `npm config set` cannot be run on packages inside the workspaces. By
passing `--ws=false`, it'll only be run in the workspace root and won't
error.

## Current Behavior
Jest e2e tests inferred from `@nx/jest/plugin` fail when starting a
local registry.

## Expected Behavior
Jest e2e tests should work even if they are inferred (or have cwd other
than workspace root).

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

Fixes #
2025-02-11 12:27:35 -05:00
Juri dba669f5c8 docs(release): link epic web nx release course 2025-02-11 12:27:35 -05:00
Juri e4c72c5ae0 feat(nx-dev): allow link-card components to take an image URL 2025-02-11 12:27:35 -05:00
MaxKless 74a1f43144 feat(core): show link to migrate detail page in --interactive mode (#29874) 2025-02-11 12:27:35 -05:00
Benjamin Cabanes 949d74816e docs(nx-dev): ipdate Hetzner Cloud testimonial content
Revised the heading to highlight trust by OSS and Fortune 500 companies and added a new description paragraph. Simplified the button text and removed the video-related click handler for streamlined functionality.
2025-02-11 12:27:35 -05:00
Jason Jean d816542863 chore(misc): fix failing snapshot (#29879)
<!-- 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 -->

Test Snapshot is failing

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

Test Snapshot is updated

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

Fixes #
2025-02-11 12:27:35 -05:00
Colum Ferry f10ff89f20 feat(rspack): improve plugin createNodes performance (#29876)
## Current Behavior
Currently, calculating nodes via the `@nx/rspack/plugin` takes a long
time because the hash generation attempts to hash every source file.
This is problematic because the targets that are inferred do not rely on
the source files themselves and rather just the config file.

It also means the time taken to infer the targets grows as the project
grows.

## Expected Behavior
Calculate the hash based off the config file and the installed
dependencies, allowing it to scale as the project grows and allowing it
to be invalidated if dependencies change.

## Tested Results
Application with 90k files
Previous:  2mins
New: 1.18s
2025-02-11 12:27:35 -05:00
Benjamin Cabanes 59b8b40e71 docs(nx-dev): update nx powerpack links with UTM parameters (#29877)
Updated all Nx Powerpack-related links across documentation and UI components to include UTM parameters. This enhances referral tracking and improves analytics for link performance across different sources.
2025-02-11 12:27:35 -05:00
Emily Xiong d8f7060ea0 fix(gradle): fix max buffer for gradle stdout (#29864)
<!-- 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 #
2025-02-11 12:27:35 -05:00
Juri e60bbbb422 fix(nx-dev): update blog metadata to include the post descriptions 2025-02-11 12:27:35 -05:00
Juri c73b65c7f6 docs(nx-dev): add missing blog description fields 2025-02-11 12:27:35 -05:00
Juri aff071cda2 feat(nx-dev): conformance rule for blog post description 2025-02-11 12:27:35 -05:00
Juri bf168778c4 docs(core): link TS related videos 2025-02-11 12:27:16 -05:00
Rares Matei f9b639b27a docs(nx-cloud): add release notes (#29872)
<!-- 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 #
2025-02-11 12:27:16 -05:00
Leosvel Pérez Espinosa f2f980428f fix(misc): generate config with output contained within project root (#29850)
Updates some generators to ensure the build tool produces the output
contained within the project root for the TS solution setup.

## Current Behavior

## Expected Behavior

## Related Issue(s)

Fixes #
2025-02-11 12:27:16 -05:00
Leosvel Pérez Espinosa ba8cdfd16e fix(linter): produce type information for the eslint-plugin main entry point (#29855)
## Current Behavior

The `@nx/eslint-plugin` main entry point is untyped.

## Expected Behavior

The `@nx/eslint-plugin` main entry point should provide types.

## Related Issue(s)

Fixes #28448 
Fixes #29816
2025-02-11 12:27:16 -05:00
Philip Fulcher f3e208dc6d docs(nx-dev): fix typos in workspace structure article (#29859) 2025-02-11 12:27:16 -05:00
Benjamin Cabanes b9d62660a8 docs(nx-dev): add Hetzner cloud testimonial section to homepage (#29858)
Introduced a new "Hetzner Cloud Testimonial" component showcasing a featured client story with video support. The `video-modal.tsx` component was moved to `ui-common` for reuse, and the homepage was updated to display it while commenting out the previous "Trusted By" section.
2025-02-11 12:27:16 -05:00
Philip Fulcher ee13314908 docs(nx-dev): add workspace structure article (#29847) 2025-02-11 12:27:16 -05:00
Amr Salama 65edd13612 feat(core): add sync generators option to target defaults in nx-schema (#29441) 2025-02-11 12:27:16 -05:00
Jack Hsu 6afa6a1727 fix(misc): set hidden: true for all init generators (#29833)
This PR ensures that our init generators are hidden, such that they
don't appear in Nx Console when running generators, for example.

The init generator is meant to be used when running other generators,
like app or lib, and should not be run directly.

## Current Behavior
Init is not hidden

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Init is hidden
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2025-02-11 12:27:15 -05:00
Isaac Mann 76184f256f chore(nx-dev): move version picker to header (#29823)
Move the version picker to the header next to the docs logo
2025-02-11 12:27:15 -05:00
Craigory Coppola 26f942c988 fix(testing): move webpack and vite to optional peer dep (#29800)
@nx/webpack and @nx/vite are used for a single migration but pollute the
overall dep size of someone using @nx/playwright without both vite and
webpack. This change allows users to only install the one stack they are
using.
2025-02-11 12:27:15 -05:00
Leosvel Pérez Espinosa 0e963841ec fix(core): improve resolution of packages in package manager workspaces when constructing the project graph (#29795)
Main fixes:

- Identify dependencies from packages that only expose named exports (no
`.` export)
- Identify dependencies from exports containing wildcards (e.g.
`"./utils/*": "./src/utils/*.js`)
- Disallow identifying dependencies from restricted exports (e.g.
`"./foo": null`)
- Handle conditional exports (e.g. `"exports": { "import":
"./dist/index.js", "default": "./dist/index.js" }`
- Handle invalid `"exports": {}` (by not falling back to `main`)
- Handle projects included or not in package manager workspaces

## Current Behavior

## Expected Behavior

## Related Issue(s)

Fixes #29486
2025-02-11 12:27:15 -05:00
robertIsaac f86e4f3d69 fix(angular): fix path issues on windows for storybook generators and unit tests (#27489)
## Current Behavior
`nx test angular` fail on windows

## Expected Behavior
`nx test angular` to pass on windows

## notes
in
`packages/angular/src/generators/utils/storybook-ast/component-info.ts`
file I used `join(moduleFolderPath)` to convert it from always being `/`
to be OS separator
there are two other options I can do, but I don't have enough knowledge
to take the decision
1. to generate `moduleFolderPath` with OS separator instead of always
`/`
2. to make `candidateFile` to always be `/`

## Related Issue(s)
it might Fixes #22248
because now I see that when a new file is added, it's added to the end
of the tree, but when you reset it's then added to its place
also it explain why same code sometimes hit cache in windows, but miss
cache on linux, as the returned result different between the OSs
this should make sure that the returned result is always the same

---------

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2025-02-11 12:27:15 -05:00
Philip Fulcher 7ee4220d90 docs(nx-dev): migrating more blog posts (#29807) 2025-02-11 12:27:15 -05:00
Colum Ferry 4f05f1fcc7 docs(nx-dev): add blog post on OTA updates with super apps and zephyr cloud (#29803)
Co-authored-by: Mike Hartington <mhartington@users.noreply.github.com>
2025-02-11 12:27:15 -05:00
Stefan Haas 2d36ea5655 fix(core): allow postTaskExecution hook without preTaskExecution hook (#29820)
<!-- 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 -->

`postTaskExecution` hook is only called if `preTaskExecution` hook is
exported in the plugin.

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

`postTaskExecution` hook should be independent from `preTaskExecution`
hook. I.e., if `preTaskExecution` hook is not exported,
`postTaskExecution` hook should still be called after a task execution.

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

Fixes #

Fixed `postTaskExecution` hook

Co-authored-by: Jonathan Cammisuli <4332460+Cammisuli@users.noreply.github.com>
2025-02-11 12:27:15 -05:00
Isaac Mann 1187af8303 docs(core): update ts migration recipe (#29815)
Updates migration to TS project references recipe
2025-02-11 12:27:15 -05:00
Craigory Coppola 01d22a7de1 chore(repo): fix macos push event (#29832)
<!-- 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 #
2025-02-11 12:27:15 -05:00
Craigory Coppola 8d6dd908fe fix(repo): don't try to fetch master if already on master (#29831)
<!-- 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 #
2025-02-11 12:27:15 -05:00
Craigory Coppola 5b9d43f58f chore(repo): migrate ci from circle to gha (#29801) 2025-02-11 12:27:15 -05:00
Juri 16e68a53c4 docs(nx-dev): update TS bencharks 2025-02-11 12:27:15 -05:00
Mike Pham 626091118e fix(core): exponential retry on cache put fail (#29017)
Co-authored-by: Mike <mike.pham@autogeneral.com.au>
2025-02-11 12:27:15 -05:00
Juri 31f01bc023 fix(nx-dev): revert show alt text as label below markdown images
This reverts commit a4f07dbb64.
2025-02-11 12:27:15 -05:00
Colum Ferry 12e00c3eba fix(rspack): handle configs with default exports (#29825)
## Current Behavior
When we resolve the config file for rspack, it can be provided in a few
different formats:

```
config

config.default

config.default.default
```

We do not handle if the config is provided in any of the named default
methods.

## Expected Behavior

Handle named defaults for the resolved user config for Rspack.
2025-02-11 12:27:15 -05:00
Isaac Mann 93d2d11d68 chore(nx-dev): fix tablet width (#29826)
Make the mobile and tablet width breakpoints work correctly again
2025-02-11 12:27:15 -05:00
Juri ebad2c4f4b feat(nx-dev): show alt text as label below markdown images 2025-02-11 12:27:15 -05:00
Juri Strumpflohner 35947a5777 feat(nx-dev): add epic nx release course (#29777) 2025-02-11 12:27:15 -05:00
Miroslav Jonaš 756cbbb1e2 fix(bundling): rspack should allow ES config module imports (#29095)
Reproduction repo: https://github.com/olaf-cichocki/sample

## Current Behavior
When using mjs config file we end up with following error:
```
⚠️ Unable to construct project graph.
Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
      An error occurred while processing files for the @nx/rspack/plugin plugin.
    - apps/appA/rspack.config.mjs: require() of ES Module /Users/miro/Dev/Testbox/sample/apps/appA/rspack.config.mjs not supported.
  Instead change the require of /Users/miro/Dev/Testbox/sample/apps/appA/rspack.config.mjs to a dynamic import() which is available in all CommonJS modules.
      Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/miro/Dev/Testbox/sample/apps/appA/rspack.config.mjs not supported.
      Instead change the require of /Users/miro/Dev/Testbox/sample/apps/appA/rspack.config.mjs to a dynamic import() which is available in all CommonJS modules.
          at resolveUserDefinedRspackConfig (/Users/miro/Dev/Testbox/sample/node_modules/.pnpm/@nx+rspack@20.2.0-beta.3_@babel+traverse@7.25.9_@module-federation+enhanced@0.7.6_react-dom@1_7iwdcl66l7me4m7pewq22wegge/node_modules/@nx/rspack/src/utils/resolve-user-defined-rspack-config.js:19:16)
          at createRspackTargets (/Users/miro/Dev/Testbox/sample/node_modules/.pnpm/@nx+rspack@20.2.0-beta.3_@babel+traverse@7.25.9_@module-federation+enhanced@0.7.6_react-dom@1_7iwdcl66l7me4m7pewq22wegge/node_modules/@nx/rspack/src/plugins/plugin.js:65:98)
          at createNodesInternal (/Users/miro/Dev/Testbox/sample/node_modules/.pnpm/@nx+rspack@20.2.0-beta.3_@babel+traverse@7.25.9_@module-federation+enhanced@0.7.6_react-dom@1_7iwdcl66l7me4m7pewq22wegge/node_modules/@nx/rspack/src/plugins/plugin.js:51:34)
          at async /Users/miro/Dev/Testbox/sample/node_modules/.pnpm/nx@20.2.0-beta.3/node_modules/nx/src/project-graph/plugins/utils.js:10:27
          at async Promise.all (index 0)
```

## Expected Behavior
Using EU module config files is supported

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

Fixes #

Thank you @olaf-cichocki for reporting the issue.
2025-02-11 12:27:15 -05:00
Leosvel Pérez Espinosa 4345553767 fix(js): do not infer tsc tasks with verbose output by default (#29804)
## Current Behavior

The `@nx/js/typescript` plugin infers tasks with `--verbose`. This can
prevent users from running the same task with `--clean.` It can also
produce a lot of logs that might not be too relevant.

## Expected Behavior

The `@nx/js/typescript` plugin should not infer tasks with `--verbose`.
This is more aligned with other tools.

A new plugin option `verboseOutput` is added to allow inferring all
tasks with `--verbose` if desired.

Note: This revealed that some things were working (e.g., `dependsOn`)
because all the `typecheck` commands inferred by the different plugins
matched. As soon as the command is different, the different inferred
tasks are not merged, which is expected. We shouldn't rely on that, and
each plugin inferring the task should set the right options/metadata.
The different plugins were updated in this PR accordingly (they don't
have the verbose option).

We'll follow up on this later, so only the `@nx/js/typescript` plugin
infers the `typecheck` task. This is a breaking change so it will be for
Nx v21.

## Related Issue(s)

Fixes #28677
2025-02-11 12:27:15 -05:00
Colum Ferry c83ff6e0bb fix(module-federation): tuple remotes should have global identifier added if missing (#29811)
## Current Behavior
Our Module Federation Config allows passing tuple remotes:

```js
remotes: [
  ["remote1", "http://localhost:4201/remoteEntry.js"]
]
```

However, if the Module Federation system is expecting the remotes to be
loaded as Global variables in the browser, then we erroneously pass just
the url to webpack/rspack's `extractUrlAndGlobal` method.

This expects a string of format `name@url`. For non-tuple remote
configurations, we create this correctly.
However, when a tuple is passed, we simply return the url.


## Expected Behavior
We should ensure that the string is massaged to `name@url` even when a
tuple is provided.
2025-02-11 12:27:15 -05:00
Juri Strumpflohner 5e2b3c51f1 docs(nx-dev): just keep 2 pinned posts (#29809)
<!-- 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 #
2025-02-11 12:27:15 -05:00
Juri Strumpflohner b9771e6f47 feat(nx-dev): allow callout component to be expanded by default (#29806) 2025-02-11 12:27:14 -05:00
Juri 244abf2b2d docs(nx-dev): fix typos and UTM links in ts experience blog post 2025-02-11 12:27:14 -05:00
Philip Fulcher ea49a839d6 docs(nx-dev): removed un-used pages (#29789)
Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2025-02-11 12:27:14 -05:00
Emily Xiong 083e12dff1 fix(gradle): fix dependencies.txt not found (#29787)
<!-- 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 cache project report, it caches buildFileToDepsMap,
which is a map of build file to path of dependencies.txt
- however, when we try to read dependencies.txt in create dependencies,
it might not exist

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
- read the dependencies.txt file when process project report to cache
- cache dependencies as processed project report result
- no need to read dependencies.txt in create dependencies

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

Fixes #
2025-02-11 12:27:14 -05:00
Juri Strumpflohner cab03814e5 docs(nx-dev): adjust typescript series links (#29799) 2025-02-11 12:27:14 -05:00
Mararok 62c38fc9ee fix(testing): fix passing extra args to Jest cli (#27704)
Small fix for using
jest-runner-groups(https://www.npmjs.com/package/jest-runner-groups)
with Nx.

## Current Behavior
When running jest executor with extra group argument like:
```
nx run app-nebula-explorer-api:test --group=unit
```
`jest-runner-groups` runs all tests, not only from selected group.

From my investigation, `jest-runner-groups` using process.argv to
extract `--group` args

https://github.com/eugene-manuilov/jest-runner-groups/blob/3c9d3cf4cb3e595bdea733100f2bdc8d64f871d7/index.js#L57
and  `process.argv` passed to runner contains:

```javascript
[
 'M:\\programs\\nodejs\\22\\node.exe',
 'M:\\projects\\someproject\\node_modules\\.pnpm\\nx@19.3.2_@swc+core@1.6.6_@swc+helpers@0.5.11_\\node_modules\\nx\\bin\\run-executor.js'   
]
```

## Expected Behavior
Running jest executor with jest-runner-groups runner and `--group` args
should run only tests from group.

## PR changes summary
I implemented fix as generic and any extra arg will be added to
`process.argv` .

---------

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2025-02-11 12:27:14 -05:00
Ethan Koenig b3cff786d8 fix(core): reduce number of processed files when creating in-memory transpiler (#29774)
## Current Behavior

All of the TS source trees are unnecessarily traversed when a local
plugin is being registered.

## Expected Behavior

TS source trees are not unnecessarily traversed.

## Related Issue(s)

Fixes #29102 (see issue for more context)
2025-02-11 12:27:14 -05:00
Anthony Shew 677c2ddf5b fix(nx-dev): typo in ts pkg management article (#29791)
Just a typo! Good article!
2025-02-11 12:27:14 -05:00
Juri 140c1db7e4 feat(nx-dev): add ability to add labels to video-player 2025-02-11 12:27:14 -05:00
Juri 1e3f0dd242 docs(nx-dev): add blog article about new Nx TS experience 2025-02-11 12:27:14 -05:00
Rares Matei 14fbbed8d2 docs(nx-cloud): update release notes (#29788)
<!-- 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 #
2025-02-11 12:27:13 -05:00
Colum Ferry 499b6ae18e fix(module-federation): depend on a range of versions of webpack to prevent peer dep issues (#29797)
## Current Behavior
`@nx/module-federation` is currently pinned to depend on
`webpack@5.88.0`. However, other Nx packages such as `@nx/webpack`
depend on a range of versions `^5.80.0`.

This leads to peerDep issues when package managers attempt to resolve
the packages.

## Expected Behavior
Change `@nx/module-federation` to depend on a range of versions.
`wepback@^5.88.0`.

## Related Issue(s)

Fixes #29682
2025-02-11 12:27:13 -05:00
Nicolas Beaussart ffe682464b fix(linter): add cjs, cts, mjs, and mts to the default extensions for the inference plugin (#29534)
## Current Behavior

On the default generated eslint on a ts reference workspace, the config
allows for linting of cjs and mjs files

```js
const nx = require('@nx/eslint-plugin');

module.exports = [
  ...nx.configs['flat/base'],
  ...nx.configs['flat/typescript'],
  ...nx.configs['flat/javascript'],
  {
    ignores: ['**/dist'],
  },
  {
    files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
    rules: {
      '@nx/enforce-module-boundaries': [
        'error',
        {
          enforceBuildableLibDependency: true,
          allow: ['^.*/eslint(\\.base)?\\.config\\.[cm]?js$'],
          depConstraints: [
            {
              sourceTag: '*',
              onlyDependOnLibsWithTags: ['*'],
            },
          ],
        },
      ],
    },
  },
  {
    files: [
      '**/*.ts',
      '**/*.tsx',
      '**/*.js',
      '**/*.jsx',
      '**/*.cjs',
      '**/*.mjs',
    ],
    // Override or add rules here
    rules: {},
  },
];

```


However, the default glob is not matching them

## Expected Behavior
All cjs and mjs files are included in the lint target detection

---------

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2025-02-11 12:27:13 -05:00
Esteban f61f6ed187 fix(vite): fall back to file matching when resolved file does not exist in nx-vite-ts-paths plugin (#29472)
The fallback path resolution was only happening if the resolvedFile was
a falsy value, so it was returning inexistent filepaths.

This pull request includes a small but important change to the
`packages/vite/plugins/nx-tsconfig-paths.plugin.ts` file. The change
improves the reliability of resolving file paths by checking if the
resolved path exists before proceeding with fallback file matching.

*
[`packages/vite/plugins/nx-tsconfig-paths.plugin.ts`](diffhunk://#diff-ad026b24ed45d9df484cabc7e277fc9b4d7759560af36bf357cbc4186725ae0bL174-R176):
Added a check to verify if the resolved file path exists before using
fallback file matching.
* 
<!-- 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 resolver doesn't resolve the full file path, it ignores the file
extension. For example, for a path like this:
`import mergeClassNames from '@projects/global/utils/mergeClassNames'`

It resolves to 
`absolutePath.../projects/libs/global/src/utils/mergeClassNames`

When vite is building a project, it doesn't find the file and it errors.

This happens because the resolved file path is not a falsy value, thus,
it doesn't run the fallback file path matching.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
What is expected is that it resolves to (notice the file extension)
`absolutePath.../projects/libs/global/src/utils/mergeClassNames.ts`

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

---------

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2025-02-11 12:27:13 -05:00
Leosvel Pérez Espinosa 058006860f chore(repo): format readme (#29796) 2025-02-11 12:27:13 -05:00
Jason Jean abfa61897b chore(repo): update circle docker image (#29790)
<!-- 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 current docker image being used cannot fetch chrome.

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

The new docker image can fetch chrome and pipelines can run.

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

Fixes #
2025-02-11 12:27:13 -05:00
Benjamin Cabanes 9099146450 docs(nx-dev): update Powerpack button link and add title (#29792)
Updated the Powerpack button link to use a relative path and added a descriptive `title` attribute for improved accessibility and clarity.
2025-02-11 12:27:13 -05:00
Benjamin Cabanes abe9e1bd06 docs(core): update readme (#29793)
Updated team section in readme.
2025-02-11 12:27:13 -05:00
Philip Fulcher 91b37e8882 docs(nx-dev): point blog links to internal blog (#29786) 2025-02-11 12:27:13 -05:00
Isaac Mann c62a517df9 fix(nx-dev): make toc sticky (#29784)
Makes sidebar table of contents not overlap the footer

Fixes #29719
2025-02-11 12:27:13 -05:00
Neil ab6e08d7fd feat(core): add prefixColor property to @nx:run-commands (#29348)
<!-- 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 -->
Running tasks in parallel, we can set prefixes. However, there is no way
to label our prefixes with colors. Currently the only way is to set the
entire line to the color we want. This is not ideal as users may want to
keep the default colors for the logs and only want to use the prefix
colors as identifiers.

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

## Screenshots (Examples)

Tested with example screenshots below

### Before (v20.2.2 latest release)
<img
src="https://github.com/user-attachments/assets/dcc9b3fa-1977-4096-9dd2-3b111570c8cd"
alt="description" width="300" />


![image](https://github.com/user-attachments/assets/f25569a9-98e2-48f7-b61f-9f2a867b9882)

### This PR (local release)
<img
src="https://github.com/user-attachments/assets/6dc9eb3a-bc83-49cd-aad1-778b4f2eb354"
alt="description" width="300" />


![image](https://github.com/user-attachments/assets/f9594dec-4836-4cfd-9184-08edc0eae6a2)




## 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>
2025-02-11 12:27:13 -05:00
Isaac Mann 1bd9e3cf38 docs(core): fixes for custom tasks runner docs (#29785)
Tweaks to the new custom tasks runner docs
2025-02-11 12:27:13 -05:00
Victor Savkin 7d9cebb24a docs(misc): add custom runners migration doc 2025-02-11 12:27:13 -05:00
Ashley Hunter b63170528a fix(js): ensure js library creation respects skipFormat (#28831)
<!-- 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 I set `skipFormat` to `true` when creating a JS library with the
rollup bundler, formatting is still run during the rollup configuration
creation step.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
`skipFormat` flag should be respected.

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

Fixes #
2025-02-11 12:27:13 -05:00
Kerick Howlett a2c00f06fd fix(core): allow for non-js libs to be moved without errors or the creation of any unneeded tsconfig files (#28350)
## Current Behavior

I have a project that is utilizing the `@nx-go/nx-go` extension that's
used for supporting Go applications.

When I attempt to use the `@nx/workspace:move` generator to move a Go
library, it'll produce an error. (Please refer to the _Failure Logs_
section for said error.)

Sadly, there isn't a consistent means to get the bun to start showing
up, but once it does, the issue will persist throughout the workspace's
life cycle.

I was able to trace this to the compiled Javascript files within Nx's
installed project files under the `node_modules` directory, which is
where I found a workaround. That being to have the
`secondaryEntryPointImportPaths` variable (located within the
`updateImports` function) set with an empty array on the same line it's
declared.

However, this will produce a `tsconfig.base.json` file at the root of
the workspace with the text `undefined` contained within it and with no
actual JSON to speak of.

## Expected Behavior

I have a project that is utilizing the `@nx-go/nx-go` extension that's
used for supporting Go applications.

The `@nx/workspace:move` schematic generator should be able to move
libraries based in Go and other programming languages without any errors
popping up.

It should also do it without generating an empty `tsconfig.base.json`
file if one didn't exist previously. This tends to be the case when
there is no Typescript to speak of within the Nx workspace. For example,
an Nx workspace initiated with the `@nx-go/nx-go` preset.

## Related Issue(s)

- [#28349](https://github.com/nrwl/nx/issues/28349)

Co-authored-by: Kerick Howlett <88661181+KerickHowlett@users.noreply.github.com>
2025-02-11 12:27:13 -05:00
Craigory Coppola ce568ad443 feat(core): lock graph creation when running in another process (#29408)
## Current Behavior
Running Nx in multiple processes at the same time with the daemon
disabled can cripple a system due to excess memory usage when creating
the graph. This is due to plugin workers being started per-parent
process when there is no daemon. This change enables a file lock to
prevent the simultaneous processing, and read from the cache when the
first run completes.

Currently, running `nx show projects` 30 times in parallel looks
something like this:

30 processes exited within 37535ms

## Expected Behavior
30 processes exited within 6435ms

## Test Script
```js
//@ts-check

const { spawn } = require('child_process');

let alive = new Set();

let start = Date.now();
let iterations = 30;

for (let i = 0; i < iterations; i++) {
  const cp = spawn('npx nx show projects', [], {
    shell: true,
    env: {
      ...process.env,
      NX_DAEMON: 'false',
      NX_VERBOSE_LOGGING: 'true',
    },
  });
  alive.add(i);
  //   cp.stdout.on('data', (data) => {
  //     console.log(`stdout [${i}]: ${data}`);
  //   });
  cp.stderr.on('data', (data) => {
    console.error(`stderr [${i}]: ${data}`);
  });
  cp.on('exit', (code) => {
    console.log(`child process ${i} exited with code ${code}`);
    alive.delete(i);
  });
}

const i = setInterval(() => {
  if (alive.size > 0) {
  } else {
    clearInterval(i);
    console.log(
      `${iterations} processes exited within ${Date.now() - start}ms`
    );
  }
}, 1);

```
2025-02-11 12:27:13 -05:00
Anthony Boyd 751a0f96ee fix(linter): add files entry to react flat configs to avoid applying TS rules to JSON files (#29457)
This PR fixes an issue with React libs, where TS rules are being applied
to JSON 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 #28245

---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2025-02-11 12:27:13 -05:00
Juri bd9f6d0d11 docs(nx-dev): article about TypeScript monorepo package linking strategies 2025-02-11 12:27:13 -05:00
Phillip Barta ef01758651 cleanup(react-native): use native fetch for isPackagerRunning check and remove node-fetch dependency (#29568)
Removes the `node-fetch` dependency and uses the native fetch global for
the `isPackagerRunning()` check

- Dependency `node-fetch` is used.

- Removed the `node-fetch` dependency.
- Used the native `fetch` global.

---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2025-02-11 12:27:13 -05:00
Leosvel Pérez Espinosa c52650d67c feat(misc): replace ts-jest transformer with @swc/jest for ts solution setup (#29763)
## Current Behavior

## Expected Behavior

## Related Issue(s)

Fixes #
2025-02-11 12:26:53 -05:00
Juri Strumpflohner f88b5e256d feat(nx-dev): refactor and improve style of video-player (#29749) 2025-02-11 12:26:53 -05:00
Jack Hsu 1a4052d074 fix(testing): infer correct file output paths for atomized targets (#29766)
There is a bug when `outputFile` is specified in `playright.config.ts`,
and atomizer is enabled via `ciTargetName`, then the path of the output
file is wrong.

For example, if you have this reporters entry:

```
reporter: [
  [
    'junit',
    {
      outputFile: 'dist/report.xml',
    },
  ],
],

```

Then the atomized output file would be something like
`dist/report.xml/example-spec-ts`, where `report.xml` is a directory.
The correct output file should be `dist/example-spec-ts/report.xml` to
avoid conflict with the non-atomized output of `dist/report.xml`.

## Current Behavior
If you run `nx e2e proj` then `nx e2e-ci proj` then you can run into an
issue where `report.xml` (or whatever the file name is) is a directory
in the cache, but it is a file currently -- or vice versa. This happens
due to the bug described above.

## Expected Behavior

The `outputFile` should never cause a conflict where a path should be a
directory but is currently a file, or vice versa.

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

Fixes #
2025-02-11 12:26:53 -05:00
Jason Jean 4e015e822e chore(repo): remove leftover debugging logs and update migrations docs (#29765)
<!-- 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 -->

Left a log by accident.
`master` is broken because of migrations misalignment..

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

Log is removed
migrations docs are aligned.

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

Fixes #
2025-02-11 12:26:53 -05:00
Isaac Mann 98e32e814b feat(nx-dev): generate migration detail pages (#29580)
Generates list of migrations on the plugin overview page and a
standalone `/migrations` page.

To add sample code changes for a migration that has an implementation
file, create a `.md` file with the same name as the implementation file
in the same folder as the implementation file. i.e.
`move-cache-directory.md` for `move-cache-directory.ts`.

Migrations that have `packages` defined will have a table generated with
the package updates listed.

Separate PRs will be created to add sample code changes for each
migration with an implementation.

The migration list on the plugin overview page: [Angular
migrations](https://nx-dev-git-docs-migration-details-nrwl.vercel.app/nx-api/angular#migrations)
Standalone migration list page: [Angular
migrations](https://nx-dev-git-docs-migration-details-nrwl.vercel.app/nx-api/angular/migrations)
Sample migration with added markdown file details:
[17.0.0-move-cache-directory](https://nx-dev-git-docs-migration-details-nrwl.vercel.app/nx-api/nx#1700movecachedirectory)
Sample migration with only package updates: [Angular
20.4.0](https://nx-dev-git-docs-migration-details-nrwl.vercel.app/nx-api/angular#2040packageupdates)
Sample migration without any markdown file details:
[update-angular-cli-version-19-1-0](https://nx-dev-git-docs-migration-details-nrwl.vercel.app/nx-api/angular#updateangularcliversion1910)
- This last sample is very bare-bones and the reason why we need these
pages in the first place. People don't know what migrations are actually
doing. Follow up PRs will address pages like this.
2025-02-11 12:26:53 -05:00
Jason Jean 0e4441f6e3 feat(core): add pre and post run apis (#29636)
<!-- 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 -->

There is no specific API for running things before and after tasks run.

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

This PR adds an API akin to npm's `preinstall` and `postinstall`.

Plugins can now specify `preTasksExecution` and `postTasksExecution`
functions which run before and after Nx runs tasks respectively.

```ts
import type { PreTasksExecutionContext, PostTasksExecutionContext } from '@nx/devkit';

interface PluginOptions {
  field: any;
}

export function preTasksExecution(options: PluginOptions, context: PreTasksExecutionContext) {
  console.log('prerun')
}

export function postTasksExecution(options: PluginOptions, context: PostTasksExecutionContext) {
  console.log('postrun', context.taskResults)
}
```

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

Fixes #
2025-02-11 12:26:53 -05:00
Jack Hsu 94751e151a Revert "fix(core): support subpath exports when constructing the project graph" (#29762)
Reverts nrwl/nx#29577

There is an issue with workspaces using tsconfig path alias, and when an
invalid import is found, it'll match on the wrong package due to the
name matching the prefix.
2025-02-11 12:26:53 -05:00
Phillip Barta 7820f0082b feat(node): upgrade express to v4.21.2 to address security vulnerabilities (#29419)
<!-- 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. -->

<!-- This is the behavior we have today -->

<!-- This is the behavior we should expect with the changes in this PR
-->
Nx should install and depend on a version of express without security
vulnerabilities.

<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

Co-authored-by: Igor Loskutov <igor.loskutoff@gmail.com>
Co-authored-by: Colum Ferry <cferry09@gmail.com>
2025-02-11 12:26:53 -05:00
Leosvel Pérez Espinosa 6bc83008de fix(misc): generate remix libs correctly and install correct @types/react version for react libs (#29760)
- Fix server file location for the `@nx/remix:library` generator
- Do not error when generating a buildable Remix library in the TS
solution setup
- Install the correct versions of react-related packages when generating
a React library

## Current Behavior

## Expected Behavior

## Related Issue(s)

Fixes #
2025-02-11 12:26:17 -05:00
Zachary DeRose 6330197ead Typescript project references article (#29698)
Co-authored-by: Juri <juri.strumpflohner@gmail.com>
2025-02-11 12:26:17 -05:00
Maksym Polupan 1af786aa92 fix(nuxt): correct webServerAddress and webServerCommand options in add-e2e.ts generator. (#29713)
## Current Behavior
Currently, the add-e2e.ts generator has redundant lines for the
webServerAddress and webServerCommand configuration when generating
Playwright configuration.
Produces `TypeError: Invalid URL` when running playwright tests on a
clean create-nx-workspace project.

## Expected Behavior
The generator should configure webServerAddress and webServerCommand
correctly. The changes fix the configuration generation for Playwright
tests.
2025-02-11 12:26:17 -05:00
Igor Loskutov 5bb73f1640 feat(node): update app generator for fastify to the next major v5 (#29589)
## Current Behavior
`npx create-nx-workspace`, when fastify is chosen, generates fastify 4
boilerplate

## Expected Behavior
fastify bumped their major version, and many latest plugins require v5
(e.g. [cors](https://github.com/fastify/fastify-cors))

## Related Issue(s)
no

- the combination of versions works on my setup
- the combinations of versions is the latest at the moment

---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2025-02-11 12:26:17 -05:00
AdrianDuan 51cb853729 fix(rspack): fix error with 'TypeError: userDefinedConfig is not a function' (#29514) (#29515)
<!-- 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. -->

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

Fixes #29514

---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2025-02-11 12:26:17 -05:00
Hassan Khan 3d8ead5b77 fix(detox): use a version of Detox that works with React Native 0.76/Expo v52 (#29679)
## Current Behavior

After adding `@nx/detox` to a newly-generated project, Detox E2E apps
will either fail to build or run with intermittent crashes on Android.

## Expected Behavior

Detox E2E apps should run as they normally did with React Native
0.74/Expo v51.
2025-02-11 12:26:17 -05:00
ilovemoon d81b496420 chore(js): update dep babel-plugin-macros to ^3.1.0 (#28649)
<!-- 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 -->

```bash
@coreproject-moe/monorepo@ /home/moonlitgrace/Projects/coreproject-monorepo
├─┬ @coreproject-moe/icons@0.0.65 -> ./packages/icons
│ └─┬ jest-config@29.7.0
│   └─┬ jest-circus@29.7.0
│     └─┬ dedent@1.5.3
│       └── babel-plugin-macros@2.8.0 deduped invalid: "^3.1.0" from node_modules/dedent
└─┬ @nx/js@20.0.5
  └── babel-plugin-macros@2.8.0
```

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

No conflicts, without overriding `package.json`

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

Fixes #28620
2025-02-11 12:26:16 -05:00
Jason Jean fbbced5f8d chore(repo): update nx to 20.4.0-beta.2 (#29752)
<!-- 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. -->

<!-- This is the behavior we have today -->

This repo uses Nx 20.3.0-rc.0

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

This repo uses Nx 20.4.0-beta.2

<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2025-02-11 12:26:16 -05:00
saintfirewater 2857084efe docs(core): run run to run (#29516) 2025-02-11 12:25:53 -05:00
Juri Strumpflohner 0679e5493f docs(nx-dev): fix broken links to Nx Cloud runs (#29747) 2025-02-11 12:25:53 -05:00
Leosvel Pérez Espinosa 6b9a2b93c7 feat(misc): prompt for unit test runner when creating a workspace using --workspaces flag (#29743)
## Current Behavior

Creating a new workspace does not prompt for the unit test runner.

## Expected Behavior

Creating a new workspace should prompt for the unit test runner.

For now, this new behavior will be behind the `--workspaces` flag.

## Related Issue(s)

Fixes #
2025-02-11 12:25:53 -05:00
Leosvel Pérez Espinosa 1d15e51330 fix(testing): finish dev server async generator in cypress executor (#29689)
<!-- 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 -->

Running an e2e task using the `@nx/cypress:cypress` executor that starts
a dev server by running another task that uses the `@nx/js:node`
executor result in the process to hang after the e2e tests have finished
running.

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

The async generator returned by starting the dev server and consumed by
the `@nx/cypress:cypress` executor should be finished, and the
`@nx/js:node` executor should properly clean up its child process once
the generator is finished.

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

Fixes #29571
2025-02-11 12:25:53 -05:00
Leosvel Pérez Espinosa 411430dd0b Revert "fix(core): collect all logs from forked processes (#27778)" (#29740)
This reverts commit c3709b2b84.

The change can result in tasks hanging when underlying processes are not
properly managed (can be processes created from third-party plugins or
user's code). A hanging task is a more serious issue than what this was
originally solving. We'll revisit this soon.

<!-- 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 #
2025-02-11 12:25:53 -05:00
James Henry cf27b7a611 chore(repo): update to powerpack 1.2.3 (#29744) 2025-02-11 12:25:53 -05:00
Ihor aa8e953442 fix(devkit): add .riv to binary extension (#29309) 2025-02-11 12:25:53 -05:00
Oliver Yasuna 3125edab5d fix(linter): export Options types for enforce-module-boundaries and nx-plugin-checks (#29072) 2025-02-11 12:25:53 -05:00
Phillip Barta 6d90600712 cleanup(rspack): migrate rspack to picocolors (#29562) 2025-02-11 12:25:53 -05:00
Phillip Barta 42e575a020 cleanup(react-native): migrate react-native to picocolors (#29566) 2025-02-11 12:25:52 -05:00
Mads Mætzke Tandrup b1e20dd9f2 feat(release): allow invalid conventional commits to be considered via custom config (#29658) 2025-02-11 12:25:52 -05:00
Jack Hsu dc859bbd55 feat(js): remove nx property from generated package.json files (#29705)
This PR updates our generators to no longer generate with `nx` in
`package.json` by default. The only times it is needed is if you pass
add `tags` or `implicitDependencies` to the project config.

This PR replaces our `projectType` checks to use the `getProjectType`
util from `@nx/js` to prefer the project config, but otherwise will
check for our conventions (e.g. using `exports` for libs,
`tsconfig.lib.json` vs `tsconfig.app.json`).

## Impact
- There shouldn't be any behavioral changes to existing projects that
have explicit `projectType`, `name`, etc. in with `project.json` or
`package.json` (via `nx` property).
- For new projects created under the new TS setup, the `nx` property
will no longer be there. Generators with logic that depend on
`projectType` will now check for `tsconfig.lib.json` and
`tsconfig.app.json` (so all of our generators are covered). If none of
those tsconfig files are found, then we check `package.json`, since
libraries are required to have `exports` to be consumed.
2025-02-11 12:25:52 -05:00
Benjamin Cabanes ffe15c32ad docs(nx-dev): remove webinar notifier & event link (#29737)
Commented out the `WebinarNotifier` in `_app.tsx` and the live event link section in `hero.tsx`.
2025-02-11 12:25:52 -05:00
Nicholas Cunningham 9e679619a6 feat(rspack): non-inferred targets should work OOTB (#29733) 2025-02-11 12:25:52 -05:00
Leosvel Pérez Espinosa d729f6655e feat(misc): use @swc/jest instead of ts-jest for the ts solution setup (#29718)
## Current Behavior

When using the TS solution setup and `jest` is used, `ts-jest` is used
as the transformer in most cases (except when the build compiler is
`swc`). The `ts-jest` transformer doesn't support modern module
resolutions like `nodenext` and it doesn't support TS project references
either.

## Expected Behavior

When using the TS solution setup and `jest` is used, `@swc/jest` should
be used as the transformer in cases where previously `ts-jest` was being
used and regardless of using `swc` as the build compiler.

## Related Issue(s)

Fixes #
2025-02-11 12:25:52 -05:00
Leosvel Pérez Espinosa 8d4a9df2fc fix(react): ensure project name is escaped in spec matcher when generating an application (#29732)
<!-- 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 #
2025-02-11 12:25:52 -05:00
Leosvel Pérez Espinosa 19ba6ef23c fix(nx-plugin): fix plugin generation in ts solution setup (#29730)
<!-- 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 #
2025-02-11 12:25:52 -05:00
Jiří Prokop 6aa81cc662 fix(vite): do not stop the test process of failure in watch mode (#29260)
<!-- 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

When you run `nx run <lib>:test --watch` it only works correctly if
there are no failing tests. In case you have some failing test, the
process finishes immediately after all tests are finished.

## Expected Behavior

Watch mode should work the same as with Jest or when you use `vitest` on
its own.

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

The logic seems to be broken with introduction of
https://github.com/nrwl/nx/pull/27722

Fixes #28050
2025-02-11 12:25:52 -05:00
Jack Hsu ba1b839502 fix(node): set correct compilerOptions for Nest applications (#29725)
This PR fixes and issue where generating Nest app in the new TS setup
results in a build error due to missing `experimentalDecorators` option
in tsconfig. Decorators are required for Nest to work, but we do not set
it anymore in `tsconfig.base.json` by default.


## Current Behavior
Nest apps are broken

## Expected Behavior
Nest apps work

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

Fixes #
2025-02-11 12:25:52 -05:00
Isaac Mann cc964a1596 docs(core): project linking concept and recipe (#29652)
Adds two pages:
- Concept page describing two options for [TypeScript project
linking](https://nx-dev-git-docs-workspaces-project-linking-nrwl.vercel.app/concepts/typescript-project-linking)
(workspaces and path aliases).
- Also describes performance benefits of TS Project References that are
possible with workspaces
- Recipe describing how to manually [switch from path aliases to
workspaces project
linking](https://nx-dev-git-docs-workspaces-project-linking-nrwl.vercel.app/recipes/tips-n-tricks/switch-to-workspaces-project-references)
2025-02-11 12:25:52 -05:00
Nicholas Cunningham da39a9379e feat(webpack, rspack): support multiple configurations (#29691)
This pull request includes changes to support multi-configuration mode
for both Rspack and Webpack.

## Currently
Currently our plugin only supports single configurations
```js
module.exports =  { 
  ...config
}
```
Which works in most cases but some applications can have mutliple
configs that serve different platforms.

## Changes
With these changes, the Webpack and Rspack plugins will also support
multi-configuration.
```js
module.exports = [ 
   { ...clientConfig },
   { ...serverConfig }
 ]
2025-02-11 12:25:52 -05:00
James Henry a421ebba66 chore(repo): latest powerpack 1.2.0 (#29724) 2025-02-11 12:25:52 -05:00
Jonathan Cammisuli 1d769e6f80 docs(core): add local cache information for powerpack (#29630)
<!-- 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
-->
Also includes update ENV variables

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

Fixes #
2025-02-11 12:25:34 -05:00
Isaac Mann a7c5f5c2cc docs(core): typescript packages tutorial (#29721)
Renames the NPM workspaces tutorial to TypeScript Packages tutorial and
updates the intro text a bit. The content is all still valid for ts
project references
2025-02-11 12:25:34 -05:00
Jonathan Cammisuli 2fd5873796 fix(core): ensure that nx is backwards compatible with older versions of Nx Cloud (#29703) 2025-02-11 12:25:34 -05:00
Juri Strumpflohner bf27c5eb4f fix(nx-dev): update request a trial link on pricing page (#29711) 2025-02-11 12:25:34 -05:00
Zach Tindall 350bb8e9e6 fix(core): update yarn-parser to handle yarn v4 syntax for root workspace package (#29452)
<!-- 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
The root workspace package is not generated correctly when using Yarn v4

## Expected Behavior
yarn.lock should be created correctly

## Related Issue(s)

Fixes #29451
2025-02-11 12:25:34 -05:00
Jack Hsu 31b337c42a feat(core): support reading projects under new pnpm workspaces entry + skip writing empty nx property to pacakge.json for non-root projects (#29707)
This PR is a prerequisite to removing `nx` property from `package.json`
files in the new TS setup. It fixes two issues:

1. We always write `nx` property in `package.json` even if it is empty.
This should be done for root projects.
2. Adding an entry to `pnpm-workspace.yaml` is not picked up because
`readProjectConfiguration` only reads the file from disk, not from
virtual `Tree`

This is the next PR to remove the property:
https://github.com/nrwl/nx/pull/29705
2025-02-11 12:25:34 -05:00
Nicholas Cunningham 6083c91196 docs(nx-dev): remove unnecessary directory flag from host & remote generation commands (#29704)
### Changes
Remove `--directory` flag if the arg is provided as a positional. If
provided it will throw errors.
2025-02-11 12:25:34 -05:00
Craigory Coppola bc4c580c5d fix(core): do not warn about custom tasks runners when explicitly usi… (#29669)
…ng default<!-- 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 #
2025-02-11 12:25:34 -05:00
Emily Xiong 69d0e07998 feat(core): handle existing plugins failed with imported project (#28893)
<!-- 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
-->
<img width="1025" alt="Screenshot 2024-12-21 at 9 51 18 PM"
src="https://github.com/user-attachments/assets/32815566-c532-4186-bc94-4b017b0a84c2"
/>


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

Fixes #
2025-02-11 12:25:34 -05:00
Nicholas Cunningham a679283398 feat(core): Add ESM support for Eslint config file (#29613)
This pull request includes changes to migrate ESLint configuration files
from CommonJS (`.cjs`) to ECMAScript modules (`.mjs`) as the default.

### ESLint Configuration Generation Changes

The changes also ensure consistent generated eslint configs based on the
base eslint config.
- If the workspace root has an `eslint.config.cjs` or `eslint.config.js`
with `module.exports`. When you create a library or application it will
generate an accompanying config at path
`{projectRoot}/eslint.config.cjs` of the same format.
- If the workspace root has an `eslint.config.mjs` or
`eslint.config.mjs` with `export default`. When you create a library or
application it will generate an accompanying config at path
`{projectRoot}/eslint.config.mjs`.
- If no eslint config is found at the workspace root one will be created
`eslint.config.mjs`
2025-02-11 12:25:34 -05:00
Colum Ferry 3a52fe466c feat(react): add support for React 19 for new Workspaces (#29286)
## Current Behavior
We currently have no support for React 19, generating only React 18
applications.

## Expected Behavior
Add utils to determine what version of React is installed in the
workspace.
If React 18 is the main version of react installed, continue to generate
React 18 projects.
If React 19 is the main version of react installed, generate React 19
projects.
If no React version is installed or can be determined, generate React 19
projects.
2025-02-11 12:25:34 -05:00
Colum Ferry 00ac479e00 fix(testing): e2e config generators should prompt for missing serve data (#29660)
## Current Behavior
When running the `configuration` generator from `@nx/playwright` and
`@nx/cypress` for existing appliactions - they currently generate a
config that is likely to be invalid becaue there is not enough
information to correctly assume the port, target and baseUrl for the
application.
This data is provided by the application generators that call the
`configuration` generator - but that means that users running it
manually must remember to pass the information via flags.


## Expected Behavior
If the serve data is missing, prompt the user to input the correct
information to ensure the config generation is as accurate as possible.
2025-02-11 12:25:34 -05:00
MaxKless e10bc9a1c1 fix(graph): copy command text directly from PDV (#29645) 2025-02-11 12:25:34 -05:00
Louie Weng be7f87ad5e docs(nx-cloud): use assignment rules with self provisioned agents (#29490)
<!-- 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 initial version of the docs only allow the use of assignment rules
with Nx Agents.

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

The updated docs include an overview and example of how to configure
assignment rules to work with self provisioned agents (and DTE in
'manual' mode).

## 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>
2025-02-11 12:25:34 -05:00
Isaac Mann 81baefcbad docs(core): update turborepo docs (#29656)
Update the turborepo concept page and migration guide
2025-02-11 12:25:34 -05:00
Isaac Mann 7ee9491f9f feat(nx-dev): show arg aliases (#29653)
List aliases of command arguments
2025-02-11 12:25:34 -05:00
Leosvel Pérez Espinosa d9532e7902 feat(angular): support angular v19.1 (#29523)
Add support for Angular v19.1.x.
2025-02-11 12:25:34 -05:00
Benjamin Cabanes eb40c25faa docs(nx-dev): update "ebook" references to "guide" in button texts (#29655)
Revised all button texts and titles to consistently use "guide" instead of "ebook" across multiple components.
2025-02-11 12:24:30 -05:00
Thimo Sietsma a8d3ceacb8 docs(migration): update turborepo migration guide (#29522)
I came across the TurboRepo migration guide and noticed some outdated
TurboRepo configurations.

I’ve updated the migration guide for TurboRepo. However, the
documentation still lacks some global configurations:

- [ui](https://turbo.build/repo/docs/reference/configuration#ui)
- cacheDir
- [deamon](https://turbo.build/repo/docs/reference/configuration#daemon)
-
[envMode](https://turbo.build/repo/docs/reference/configuration#envmode)
-
[remoteCaching](https://turbo.build/repo/docs/core-concepts/remote-caching)

I'm not entirely sure if these should be included in the migration guide
or what their equivalent would be in nx, as I'm not yet very familiar
with nx.
2025-02-11 12:24:30 -05:00
Jack Hsu 099d454fb7 fix(misc): update e2e config generators to align with new TS solution setup (#29638)
This PR updates the `@nx/detox:app` generator to match the new TS
solution setup. The `@nx/cypress:configuration` and
`@nx/cypress:configuration` generators are also updated so that they can
be run on existing projects and generator the correct tsconfig files.

The Playwright/Cypress example can be seen as follows:

```shell
# Skip e2e
nx g @nx/react:app apps/demo --bundler vite --e2eTestRunner none

# now configure e2e
nx g @nx/playwright --project demo
```

Now if you add this line to `apps/demo/e2e/example.spec.ts`:
```
const x: number = 'a';
```

And run `nx typecheck demo`, it will pass. This happens because the
`e2e/**/*.ts` pattern is missing. Thus, we need to ensure that a
`tsconfig.e2e.json` project is added for the Playwright spec files. Same
thing with Cypress.

The Detox generator does not support adding configuration to existing
project, so we don't quite get the same problem. The fix for Detox is
just to make sure the tsconfig content is not following the old
(integrated) version, but the updated TS solution version.

## Current Behavior
Detox TS setup is incorrect. Running Cypress and Playwright
configuration generator on existing projects generate invalid setup,
such that spec files are not typechecked.

## Expected Behavior
E2E generators should all generate correct TS setup.

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

Fixes #
2025-02-11 12:24:30 -05:00
Leosvel Pérez Espinosa 01764e2f40 fix(js): ignore bundler config files correctly in eslint config when using vitest in js library generator (#29649)
## Current Behavior

Generating a js library with esbuild or rollup as bundlers and vitest as
the unit test runner, results in an eslint configuration where the
bundler config file is not ignored from the `@nx/dependency-checks`
rule.

## Expected Behavior

Generating a js library with esbuild or rollup as bundlers and vitest as
the unit test runner, should result in an eslint configuration where the
bundler config file is ignored from the `@nx/dependency-checks` rule.

## Related Issue(s)

Fixes #
2025-02-11 12:24:30 -05:00
Leosvel Pérez Espinosa c33fc21ee1 fix(js): do not generate package.json file for non-buildable js libraries in non-ts solution setup (#29646)
## Current Behavior

When generating a non-buildable js library in a workspace using the
integrated setup, a `package.json` file is generated.

## Expected Behavior

When generating a non-buildable js library in a workspace using the
integrated setup, a `package.json` file should not be generated.

## Related Issue(s)

Fixes #
2025-02-11 12:24:30 -05:00
Leosvel Pérez Espinosa 19484ce2a6 docs(expo): fix typo in plugin overview (#29634)
## Current Behavior

## Expected Behavior

## Related Issue(s)

Fixes #
2025-02-11 12:24:30 -05:00
Leosvel Pérez Espinosa d1bf2fec41 fix(js): fix typo so exports field in package.json is properly sorted (#29643)
## Current Behavior

It tries to sort `exported` which is an invalid field.

## Expected Behavior

It should sort `exports`.

## Related Issue(s)

Fixes #
2025-02-11 12:24:30 -05:00
Laney b0824b691d docs(release): fix typo in version.generatorOptions.updateDependen… (#29640)
…ts option

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

The version generator option `updateDependents` is misspelled as
`updatedDependents` in one of the Nx release docs pages.

## 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. -->
n/a

Fixes #
2025-02-11 12:24:30 -05:00
Leosvel Pérez Espinosa e1134150d4 fix(misc): generate module and moduleResolution in base tsconfig based on cnw preset (#29633)
## Current Behavior
<!-- This is the behavior we have today -->

Creating a new workspace using the TS solution setup always generates a
`tsconfig.base.json` with `module: nodenext` and `moduleResolution:
nodenext`.

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

Creating a new workspace using the TS solution setup should generate a
`tsconfig.base.json` with `module: nodenext`/`moduleResolution:
nodenext` for Node stacks and `module: esnext`/`moduleResolution:
bundler` for Web stacks (React, Vue).

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

Fixes #
2025-02-11 12:24:30 -05:00
Jack Hsu b127240e33 fix(js): sort package.json fields by idiomatic order (#29635)
This PR updates our app/lib generators such that `package.json` files
generated have fields in idiomatic order.

e.g.

```json
{
  "name": "...",
  "version": "...",
  "private": true,
  "type": "module",
  "main": "...",
  ...
  "dependencies": { ... }
}
```

The import fields such as name, version, private, and type are at the
top. Dep fields that could be noisy are at the bottom.

## 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 #
2025-02-11 12:24:30 -05:00
Emily Xiong f6be74285e fix(gradle): check if java is installed (#29572)
<!-- 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
-->
throw an error when `./gradlew wrapper` or `java -version` failed to
run:
<img width="949" alt="Screenshot 2025-01-09 at 5 33 38 PM"
src="https://github.com/user-attachments/assets/f0b99adc-ff80-4962-8dfe-c1ad11944cac"
/>
<img width="933" alt="Screenshot 2025-01-09 at 5 32 20 PM"
src="https://github.com/user-attachments/assets/11d2286a-cc04-48a0-9839-b67cc93d5cfc"
/>



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

Fixes #
2025-02-11 12:24:30 -05:00
Colum Ferry 30846b775b fix(vite): plugin should infer 'vite' for dev/serve command (#29585)
## Current Behavior
We currently have a `serveTargetName` that defaults to `serve` in the
`@nx/vite/plugin`.
This infers a `vite serve` command for the `serve` task to vite
projects.

While not incorrect, it could be abrasive for users coming from the
`vite` ecosystem to Nx.
The command to start the Vite Dev Server is `vite`, so we should infer
this.

`create-vite` also creates a package.json script with `"dev": "vite"`
meaning users are likely running `npm run dev`.

This creates two points of differences for vite ecosystem users.

## Expected Behavior
Deprecate `serveTargetName` in favour of `devTargetName` to more closely
align with lanugage from the Vite ecosystem.

Infer the command `vite` instead of `vite serve` for the `serve` and
`dev` tasks.
2025-02-11 12:24:30 -05:00
Jason Jean d6a386dc1e fix(core): check only for watcher connections during inactivity shutdown (#29621)
<!-- 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 -->

We currently second guess our inactivity timer by checking if there are
any open connections. However, there's also a strong chance that plugin
workers will remain open as long as the daemon is open. This means the
daemon stays alive forever and the daemon never shuts down even though
it is inactive.

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

Instead of checking for open connections in general, the daemon server
will only check for open file watchers. Most Daemon client requests will
restart the server when sending messages so we can safely shut the
server down in most cases. The only case where shutting down the daemon
would cause a disruption is if a file watcher is registered. In those
cases, the daemon will not shutdown due to inactivity.

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

Fixes #
2025-02-11 12:24:30 -05:00
Jonathan Cammisuli d4760669f6 feat(core): add support for skipping remote cache (#29574)
<!-- 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 #
2025-02-11 12:24:30 -05:00
Colum Ferry dd918236bc fix(rspack): make subresourceIntegrity usage configurable (#29629)
## Current Behavior
We currently set Subresource Integrity (SRI) on all scripts injected via
`HtmlRspackPlugin`.
This should be configurable.

## Expected Behavior
Expose an option to set SRI - mark false by default to match Rspack's
`HtmlRspackPlugin` behaviour
2025-02-11 12:24:30 -05:00
Leosvel Pérez Espinosa bf432e0172 fix(angular): restore esm2022 bundle and drop fesm2022 in ng-packagr-lite executor (#29615)
## Current Behavior

In Nx 20.2.0, the `ng-packagr-lite` executor stopped producing the
ESM2022 outputs and started producing the FESM2022 outputs. This was due
to the Angular Package Format (APF) dropping the ESM2022 outputs, which
was reflected in the upstream `ng-packagr` implementation. Due to this
change, the libraries' build time and memory increased compared to the
previous versions.

## Expected Behavior

The `ng-packagr-lite` executor should only produce ESM2022 outputs and
avoid running an extra step to bundle the outputs to produce the
FESM2022.

Given the `ng-packagr-lite` executor is not meant to produce publishable
artifacts, its output doesn't need to strictly comply with the APF and
can focus more on build performance.

## Related Issue(s)

Fixes #29519
2025-02-11 12:24:30 -05:00
Jack Hsu f62cc67124 feat(js): infer build-deps and watch-deps targets for incremental builds (#29609)
This PR adds `build-deps` and `watch-deps` targets to buildable JS
projects to help with incremental builds.

A use-case for this is if an app (e.g. Vite React app) has buildable
dependencies that need to be rebuilt when they change.

Say, you create a React app and lib as follows:

```
nx g @nx/react:app apps/react-app --bundler vite 
nx g @nx/react:lib packages/react-lib --bundler vite
```

And import `react-lib` inside the app.

```jsx
import { ReactLib } from '@acme/react-lib';
//...
return <ReactLib />
```

The user can then run:

```
nx watch-deps react-app
```

And then serve the app in another terminal:
```
nx serve react-app
```

Then whenever code is updated for a buildable dependency, it'll be
rebuilt and then reloaded in the app.
2025-02-11 12:24:29 -05:00
Jack Hsu 80a11d139f fix(js): non-buildable js libs specify type=module (#29620)
In the new TS solution setup, non-buildable libraries should still`type:
module`. This can lead to problem since ESM is used but the type will
default to CJS.

This PR also updates `nx sync` for TS references such that transitive
deps are not sycned by default, unless
`NX_ENABLE_TS_SYNC_TRANSITIVE_DEPENDENCIES=true` env var is setup.
Previously, the transitive deps are synced unless the env var disables
it. There isn't a good reason to enable it by default, and it is much
cleaner to not sync by default. This means that if we have libs `a`,
`b`, and `c`, where `a -> b` and `b -> c` dependency edges are formed,
then running:

```
nx sync
```

Will update `a/tsconfig.json` to contain refs to `b` but not `c`.
Whereas:

```
NX_ENABLE_TS_SYNC_TRANSITIVE_DEPENDENCIES=true nx sync
```

Will update `a/tsconfig.json` to contain refs to both `b` and `c`.

<!-- 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
`type` is missing

## Expected Behavior
`type: module` is set in `package.json`

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

Fixes #
2025-02-11 12:24:29 -05:00
Craigory Coppola ea2b9e4ba0 fix(core): show better project graph errors (#29525)
## Current Behavior
Sub-errors are hidden when any project graph error is encountered. This
is detrimental, as things like "missing comma in JSON" get hidden and
make people think that Nx is broken, when in fact their config files are
invalid.

## Expected Behavior
Sub errors are shown regardless of verbose logging (but including their
stack trace if verbose logging is enabled)

### Without Verbose

![image](https://github.com/user-attachments/assets/3a96d07e-3f0a-4eb7-8629-0c02c6912746)

### With Verbose

![image](https://github.com/user-attachments/assets/41b83e19-e6b1-471c-80ca-004b8f56d8f2)


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

Fixes #
2025-02-11 12:24:29 -05:00
Colum Ferry 4b88073640 fix(core): update package script logic to handle cli tool name as command (#29617)
## Current Behavior
When we have an inferred target command that matches the entry point of
the cli tool, there is a chance we do not replace package scripts
correctly

e.g.

```
{
  "dev": "vite",
  "build": "tsc -b && vite build",
  "preview": "vite preview"
}
```

this could result in package scripts being updated to

```
{
  "dev": "nx dev",
  "build": "tsc -b && nx vite:build",
  "preview": "nx dev preview"
}
```

## Expected Behavior
We should update the package scripts correctly to match the desired
inferred target

```
{
  "preview": "nx preview"
}
```
2025-02-11 12:24:29 -05:00
James Garbutt 6044f222e2 cleanup(core): move esbuild to use tinyglobby (#29453) 2025-02-11 12:24:29 -05:00
Alex H 6a5665432c chore(core): nx plugin submission @klerick/nx-angular-mf (#29548)
<!-- 
_[Please make sure you have read the submission guidelines before
posting an
PR](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#submit-pr)_

# Community Plugin Submission

Thanks for submitting your Nx Plugin to our community plugins list. Make
sure to follow these steps to ensure that your PR is approved in a
timely manner.

## Plugin Requirements

Before you submit your plugin to be listed in our registry, it needs to
meet the following requirements:
- Run some kind of automated e2e tests in your repository
- Include `@nx/devkit` as a `dependency` in the plugin's `package.json`
- List a `repository.url` in the plugin's `package.json`

i.e.

```
{
  "repository": {
    "type": "git",
    "url": "https://github.com/nrwl/nx.git",
    "directory": "packages/web"
  }
}
```

Note: We reserve the right to remove unmaintained plugins from the
registry. If the plugins become maintained again, they can be
resubmitted to the registry.

## Steps to Submit Your Plugin
- Use the following commit message template: `chore(core): nx plugin
submission [PLUGIN_NAME]`
- Update the `community/approved-plugins.json` file with a new entry for
your plugin that includes `name`, `url`, `description`:

Example:

```json
// community/approved-plugins.json

[{
    "name": "@community/plugin",
    "url": "https://github.com/community/plugin",
    "description": "This plugin provides the following capabilities."
}]
```

Once merged, your plugin will be available when running the `nx list`
command, and will also be available in the Plugin Registry on
[nx.dev](https://nx.dev/plugin-registry)
-->

# Community Plugin Submission

## @klerick/nx-angular-mf

Custom builder for Angular projects designed to simplify the development
and production of microfrontend applications using native esm module.
The builder integrates with NX to provide seamless support for
development, testing, and deployment of Angular microfrontends.

## Features

- **Microfrontend Support**: Built-in support of native esm module with
dynamic imports them.
- **Server-Side Rendering (SSR)**: Improved SSR compatibility, including
custom module loaders and import maps.
- **Customizable Build Process**: Flexible options for managing
dependencies and extending build configurations.
- **Dev Server Enhancements**:
  - Incremental hydration support.
  - Dynamic `importmap` generation.
  - Automatic dependency resolution and rebuilds.
- **Seamless NX Integration**: Fully compatible with NX workspace for
streamlined project management.
2025-02-11 12:24:07 -05:00
Craigory Coppola 54eb28c4d8 chore(core): bump fs4 (#29611)
The version we relied on was yanked from cargo for some reason 🤷
2025-02-11 12:24:07 -05:00
Thomas Dekiere 7e0bfd9d52 fix(release): ensure git push option is always applied (#29596) 2025-02-11 12:24:07 -05:00
Nicholas Cunningham 85e116a90b fix(js): improve error handling during SWC compilation (#29605)
Improves our error handling for swc when using `@nx/js:swc` executor

<!-- 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 executor fails to build if the workspace has a newer versions of
`@swc/cli` e.g.(`0.6.0`) is installed since it now uses stderr instead
of message to log errors.
RE: https://github.com/swc-project/pkgs/pull/53

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The executor should pass in this scenario.


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

Fixes #29599
2025-02-11 12:24:07 -05:00
Chau Tran 9c89dddb48 feat(graph): update headlessui v2 (#29586)
This PR updates `headlessui/react` to v2 so that it is compatible with
the new graph library. This also bumps `preact` to `10.25` for `useId`
compat.
2025-02-11 12:24:07 -05:00
Leosvel Pérez Espinosa 44038823eb fix(js): do not generate explicit vitest task config for a js library unless adding plugin is disabled (#29606)
<!-- 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 -->

Generating a js library with any bundler other than `vite` and with the
`vitest` test runner results in an explicit `test` task in the project
configuration.

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

Generating a js library with any bundler other than `vite` and with the
`vitest` test runner should not generate an explicit `test` task in the
project configuration. The `test` task should be inferred.

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

Fixes #
2025-02-11 12:23:51 -05:00
Benjamin Cabanes 9cfe7ba623 docs(nx-dev): fix inconsistent styling in SectionHeading components (#29597)
Removed the redundant "text-white" class from SectionHeading components to standardize styles.
2025-02-11 12:23:51 -05:00
Benjamin Cabanes 160e2b0bbc docs(nx-dev): Add analytics events & improve CTAs across components (#29592)
Introduced custom event tracking for ebook downloads and sales contact buttons using `sendCustomEvent`. Enhanced call-to-action designs by replacing links with `ButtonLink` components and adjusted styling and text for clarity. Updated webinar links and refined headings for consistency.
2025-02-11 12:23:51 -05:00
Benjamin Cabanes 2ed91cd710 docs(nx-dev): enable WebinarNotifier and update webinar details (#29591)
Re-enabled the `WebinarNotifier` component in the app layout and updated the webinar date and localStorage key to reflect the new event on January 22, 2025.
2025-02-11 12:23:51 -05:00
Leosvel Pérez Espinosa 1545854306 fix(misc): ensure exports are generated for several lib generators in ts solution setup (#29588)
- Update React Native, React, Remix and Vue library generators to
produce `exports` in the `package.json` for the TS solution setup
- Fix an issue in `@nx/rollup/with-nx` where an unhandled `undefined`
plugin was causing an error to be thrown
- Fix output path of the build task for React Native libraries in the TS
solution setup

<!-- 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 #
2025-02-11 12:23:51 -05:00
Nicholas Cunningham ed57b54954 fix(nx-dev): Update Webinar link (#29590) 2025-02-11 12:23:51 -05:00
Jack Hsu 4be4aa38a6 feat(web): add support for TS solution setup for @nx/web (#29583)
This PR adds the new TS setup support to `@nx/web:app` generator.
Previously it errored out since it was not handled.

## Current Behavior
Cannot generate webapp in new setup/

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Can generate webapp in new setup

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

Fixes #
2025-02-11 12:23:51 -05:00
Robb Traister 4c020cfd24 fix(core): support subpath exports when constructing the project graph (#29577)
Sibling dependencies that rely exclusively on subpath exports are
excluded from the dependency graph because there is no exact match.

This adds a fallback to look for subpath exports if the exact match is
not found.

This also adds logic to respect conditional exports independent from
subpath exports.

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

Importing a workspace dependency via subpath export fails to match the
package name, and so is not included in the dependency graph.

### Example

```apps/api/package.json```
```json
  "name": "@my-org/api",
  "dependencies": {
    "@my-org/services": "workspace:*"
  }
```

```libs/services/package.json```
```json
  "name": "@my-org/services",
  "exports": {
    "./email": "./dist/email.js"
  }
```

The `@my-org/api` app should be able to import the email service with
`import { EmailService } from "@my-org/services/email"`.

However, the `getPackageEntryPointsToProjectMap` implementation results
in an object with a key of `@my-org/services/email`, but not
`@my-org/services`. This is not specifically a problem, except that
`findDependencyInWorkspaceProjects` only considers exact matches within
those object keys.

## Expected Behavior

Importing a workspace dependency via subpath export should be included
in the dependency graph.

I also addressed a related issue where the following resulted in keys of
`@my-org/services/default` and `@my-org/services/types`, which is
incorrect according to the subpath/conditional export rules.
```json
  "exports": {
    "default": "./dist/index.js",
    "types": "./dist/index.d.ts"
  }
```

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

Fixes #29486

---------

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2025-02-11 12:23:51 -05:00
Leosvel Pérez Espinosa 8a22065d5b fix(misc): ensure all project generators add project to workspaces config (#29582)
- Update project generators to add the project to the workspaces setup
in the new TS solution setup
- Update some library generators that were not running package
installation

<!-- 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 #
2025-02-11 12:23:51 -05:00
Nicholas Cunningham 6c1d44a690 feat(nx-dev): add trial pages for Powerpack and Enterprise, update contact sales team page (#29554) 2025-02-11 12:23:51 -05:00
Colum Ferry 229e67a3b2 fix(react): setup mf env var as input for rspack (#29584)
## Current Behavior
The Module Federation `NxRuntimeLibraryControlPlugin` relies on an
environment variable that is set during the build/serve process.
This could potentially lead to issues with cache restoration.

The impact should be minimal as the runtime control plugin should only
be added to the module federation config when the env var is set.
It should only be set by the `module-federation-dev-server` executor
which is invoked during serve - a non-cacheable task already.

## Expected Behavior
Ensure the env var is set as an input to ensure maximum accuracy with
module federation builds via rspack executor
2025-02-11 12:23:50 -05:00
Rares Matei 0795f37562 chore(repo): use new recommended agents cache folders (#29435)
<!-- 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 #
2025-02-11 12:23:50 -05:00
Leosvel Pérez Espinosa f5ce87c5cb fix(js): generate js libs with exports in package.json and ensure esm output when using rollup bundler (#29565)
- Ensure libs are generated with `exports` in `package.json`
- Generate `types` instead of `typings` in package.json
- Update js lib with rollup to only output esm
- Update `tsconfig.spec.json` for js libraries with rollup to set
`module: esnext` and `moduleResolution: bundler` (they use `@swc/jest`)
- Fix `@nx/js/typescript` issue with absolute paths when normalizing
inputs/outputs
- Fix `@nx/js/typescript` issue identifying buildable libs
- Fix express app generator not installing `@types/express`

<!-- 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: Jack Hsu <jack.hsu@gmail.com>
2025-02-11 12:23:50 -05:00
Jack Hsu 95d00237ca fix(js): update detection of ts solution setup (#29576)
Since we simplified `tsconfig.base.json`'s `compilerOptions` to not
include values that match defaults (as per Jake's feedback), the logic
to detect TS solution setup should check that `declaration` is
explicitly set to `false`, rather than that it is falsy.


Clean up PR: https://github.com/nrwl/nx/pull/29550

<!-- 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 -->
We're not detecting TS solution setup correctly

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

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

Fixes #
2025-02-11 12:23:50 -05:00
Juri Strumpflohner 33f0c9c905 feat(nx-dev): customer videos on customer page (#29380)
Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
2025-02-11 12:23:50 -05:00
Zachary DeRose abe9719618 docs(misc): bundler blogpost (#29569)
<!-- 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 #
2025-02-11 12:23:50 -05:00
Rares Matei 4f9cf931a3 docs(nx-cloud): use new cache recommendations on custom launch template docs (#29434)
Now that we home folder level caching has been unblocked, we can update
the package manager cache recommendations.
2025-02-11 12:23:50 -05:00
Jack Hsu b806c04d97 feat(core): allow tasks to run with a substring of project name (#29552)
When projects use only `package.json` and not `project.json`, we need to
set the simple name in the `nx` property of `package.json`. This isn't
ideal because it's yet another Nx-specific thing that needs to be
configured when our goal is to reduce boilerplate.

This PR allows users to pass a substring that matches exactly one
project when running a task.

For example, if `@acme/foo` is the name in `package.json`, then running
`nx build foo` will match it.

If more than one projects match, then an error is thrown showing all the
matched projects, and the user has to be more specific or type in the
fully qualified name.

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

## Current Behavior
Users need to pass exact matches for project names when running tasks.

## Expected Behavior
User can pass a substring matching the project name.

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

Fixes #
2025-02-11 12:23:50 -05:00
Nicholas Cunningham c0b07e4eff fix(js): Update typescript plugin check for buildable projects (#29431)
<!-- 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, we use `rootDir` to check if the project is buildable. This
might not be correct in the case where the transpiled files are inside
source.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
It should work the for projects as long as the main / exports files are
not source files.

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

Fixes #
2025-02-11 12:23:50 -05:00
Rares Matei 257db9e288 docs(nx-cloud): update release notes (#29351)
<!-- 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 #
2025-02-11 12:23:50 -05:00
Phillip Barta 0a283294d0 cleanup(testing): migrate jest to picocolors (#29561)
migrates `@nx/jest` from `chalk` to `picocolors`

Part of https://github.com/es-tooling/ecosystem-cleanup/issues/117

<!-- 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 #
2025-02-11 12:23:50 -05:00
Aidan Temple 27ee417cb9 feat(web): support custom cors headers (#29382)
## Current Behavior

It is not possible to pass custom cors headers to the
`@nx/web:file-server` executor despite `http-server` supporting it.

## Expected Behavior

`@nx/web:file-server` should pass-through a string of custom cors
headers to `http-server`.

## Related Issue(s)
2025-02-11 12:23:50 -05:00
Phillip Barta c09c39463c cleanup(angular): migrate angular to picocolors (#29444)
migrates `@nx/angular` from `chalk` to `picocolors`

Part of https://github.com/es-tooling/ecosystem-cleanup/issues/117

<!-- 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 #
2025-02-11 12:23:50 -05:00
Tine Kondo e706d4cf5a feat(testing): add option ciGroupName to @nx/jest/plugin (#29365)
Add option `ciGroupName` to the `@nx/jest/plugin` to allow customizing
the `Jest` atomized taks group on CI.

<!-- 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 Atomizer on Jest for **unit tests** (via the `"ciTargetName":
"test-ci"`), the atomized tasks will be grouped under the misleading
name **"E2E (CI)"**.

Worst, if Atomizer is enabled for both **unit** and **e2e** tests, it
will result on E2E atomized tasks being overwritten by the one from unit
tests... when run on Nx Cloud.


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

Allow customizing the name of the atomized tasks group. The group name
can be derived from the `ciTargetName` , when not explicitly provided.


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

Fixes #28066

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2025-02-11 12:23:50 -05:00
Craigory Coppola 78c9009701 fix(core): avoid launching default plugins twice (#29539)
<!-- 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
Default plugins are launched twice when loading plugins in a workspace
that has local plugins:
- Once to resolve the local plugin
- Once to be used as an actual plugin

## Expected Behavior
Default plugins are launched once and reused

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

Fixes #

---------

Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2025-02-11 12:23:50 -05:00
Jack Hsu 760d96df2d fix(js): avoid nested paths in workspaces because they can lead to future issues (#29553)
For the new TS setup, we currently use nested glob patterns: `apps/**`,
`libs/**`, and `packages/**`.

Nested paths can result into too many projects being matched. For
example, if `libs/mylib/src/__fixtures__/package.json` is there for
testing, it will be matched as a project and likely result in an error.

Other tools like turborepo also caution against this:
https://turbo.build/repo/docs/crafting-your-repository/structuring-a-repository#declaring-directories-for-packages

If users want to, they could change to nested `**` paths, but we should
not use it by default.

Note: For CNW, we only use `apps/*` by default since that is where the
project lives. When users do `nx g lib packages/foo` then `packages/*`
will be added automatically.

<!-- 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 -->
Use nested `**` paths.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Don't use nested `**` paths.

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

Fixes #
2025-02-11 12:23:50 -05:00
Jonathan Cammisuli b7726fa67b fix(core): update nx cloud bundle install directory logic (#29555) 2025-02-11 12:23:50 -05:00
Leosvel Pérez Espinosa 81402ebed1 feat(js): simplify generated tsconfig.base.json compiler options in ts solution setup (#29550)
Simplify generated `tsconfig.base.json` file in the TS solution setup by
removing compiler options set to their default values.

<!-- 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 #
2025-02-11 12:23:50 -05:00
Leosvel Pérez Espinosa d94d18fc97 fix(js): ensure js libraries' build produce esm output in ts solution setup (#29546)
- Update js libraries for bundlers `esbuild`, `swc`, and `tsc` to
produce ESM output when using the TS solution setup.
- Fix `esbuild` and `swc` executors so they generate declaration files
even when skipping type-checking.
- Add `cjs` and `cts` to the `ignoredFiles` pattern for the rollup
config file in the eslint config.
- Ensure running an install after a js library is generated when using
the TS solution setup.

<!-- 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 #
2025-02-11 12:23:50 -05:00
Leosvel Pérez Espinosa 33883cee6a fix(testing): infer correct outputs when absolute paths are provided in playwright config (#29549)
Update `@nx/playwright/plugin` to properly handle absolute paths set in
the playwright config to infer outputs correctly.

<!-- 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 #
2025-02-11 12:23:50 -05:00
Leosvel Pérez Espinosa 6cf75f83af fix(js): do not set project references to non-existing tsconfig files in sync generator (#29536)
<!-- 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 #
2025-02-11 12:23:50 -05:00
Mike Hartington 1abccce8d7 fix(nx-dev): fix heroicons for safari (#29544) 2025-02-11 12:23:50 -05:00
Colum Ferry 4017a1af88 feat(module-federation): upgrade to latest version of @module-federation/enhanced (#29535)
We currently use version `0.7.6` of `@module-federation/enhanced`.
This version does not contain the `externalRuntime` experiment to reduce
the remoteEntry bundle size.

Upgrade Nx dependency of `@module-federation/enhanced` to version
`0.8.8`.
2025-02-11 12:23:50 -05:00
Benjamin Cabanes 397c5413b9 docs(nx-dev): set year to 2025 in LICENSE and footer (#29524)
The copyright year was updated from 2024 to 2025 in both the LICENSE file and the footer component.
2025-02-11 12:23:24 -05:00
Jack Hsu 3480a17c96 fix(react): transpile SVGR into React 19 compatible component (#29543)
This PR fixes an issue with React 19 and our `@nx/react/plugins/jest`
transform. The current transform uses an unsupported `$$typeof` symbol,
and also uses the deprecated `forwardRef` API.

The updated transform will use new API for React 19 and older, while
maintaining the previous API for React 18 and earlier. The backwards
compatibility may be needed if the test is using `ref`, which requires
`forwardRef` older versions.

<!-- 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
SVGR fails in Jest tests with React 19

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

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

Fixes #
2025-02-11 12:23:24 -05:00
Mike Hartington 8cbb6759d3 docs(misc): update nx 20.3 blog (#29542) 2025-02-11 12:23:24 -05:00
Zachary DeRose b05f0a1e07 docs(misc): nx 20.3 blogpost (#29512)
<!-- 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 #
2025-02-11 12:23:24 -05:00
Jack Hsu a7cb0bd2ea fix(js): infer outputs correctly when both rootDir and outDir are set for tsconfig (#29531)
When the tsconfig has `rootDir` and `outDir` both defined, then the
`*.tsbuildinfo` file is not cached. This makes incremental tsc not work
through distribution (e.g. agents).

For example, given this `tsconfig.lib.json` file:

```json
{
  "compilerOptions": {
    "outDir": "out-tsc/lib-1",
    "rootDir": "src"
  }
}
```

The outputs (e.g. `*.d.ts` files) are under
`{projectRoot}/out-tsc/lib-1`, but the tsbuild info file is under
`{projectRoot}/out-tsc/tsconfig.lib.tsbuildinfo`.

## Current Behavior
tsbuildinfo file is not cached

## Expected Behavior
tsbuildinfo file is cached

## 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>
2025-02-11 12:23:24 -05:00
Isaac Mann 437e1ceb03 docs(core): create conformance rule recipe (#29406)
- [Create a Conformance
Rule](https://nx-dev-git-docs-conformance-rule-recipe-nrwl.vercel.app/nx-api/powerpack-conformance/documents/create-conformance-rule)
recipe

Blocked until the `create-rule` generator is merged and released
2025-02-11 12:23:24 -05:00
Matt Lewis 4d6e22ba03 fix(vite): tsconfig paths plugin should not partially match paths (#29501)
<!-- 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 there is a path mapping like:
```
"match-lib-deep/": ["libs/lib1/src/*"],
"match-lib-top-level": ["libs/lib2/src/*"],
"match-lib/*": ["libs/lib3/src/*"],
```

Imports to `match-lib-deep` or `match-lib-top-level` will try and use
the last `match-lib` path mapping as the trailing `/` is not accounted
for in the `startsWith` check.

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

The correct path mapping is matched.

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

N/A
2025-02-11 12:23:24 -05:00
Daniel Karski 01db1a80b2 docs(storybook): update path in library generator command (#29483)
library path corrected for storybook-host 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 #
2025-02-11 12:23:24 -05:00
Jack Stevenson 1a2509936a fix(js): only add typescript project references for explicit dependencies in sync generator (#28998)
This change omits references to implicit dependency tsconfigs for
typescript projects in the sync generator, since given that they are not
referenced directly in code there is no need for project references.

## Current Behavior
TypeScript sync generator adds references to any dependency project
which has a tsconfig (where composite is true), including implicit
dependencies where these references are unnecessary and can potentially
cause build failures.

See [example
repo](https://github.com/cogwirrel/nx-sync-generator-implicit-deps-example).

## Expected Behavior
Only explicit dependencies should be referenced in tsconfigs.

## Related Issue(s)
Fixes #28997

---------

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2025-02-11 12:23:24 -05:00
Juri b767852eba docs(nx-dev): update weird dashes in article 2025-02-11 12:23:24 -05:00
Philip Fulcher 6661e50edf fix(nx-dev): add playsInline to video loop component 2025-02-11 12:23:24 -05:00
Nicholas Cunningham 7fd02e98e0 fix(nx-dev): Quote typo (#29513) 2025-02-11 12:23:24 -05:00
Slava ed502b1c8f docs(react): add spaces in 2023-08-10-create-your-own-create-react-app-cli.md (#29510)
Spaces in some places between word and backquote has been missed.

## Current Behavior
No spaces between formatted strings in some places.

## Expected Behavior
Spaces should appear between formatted string.

## Related Issue(s)
Not found any related issues. I have decided just create PR.
2025-02-11 12:23:23 -05:00
Benjamin Cabanes 0cbe88b8af docs(nx-dev): update Nx Cloud CTA links to include UTM parameters (#29489)
Replaced internal Nx Cloud links with full URLs containing UTM parameters for better tracking of user interactions across various components. Additionally, minor improvements were made to React type definitions for clarity and consistency.
2025-02-11 12:23:23 -05:00
Juri 944aa0b1a5 docs(nx-dev): update Nx Console blog post to include animations 2025-02-11 12:23:23 -05:00
Juri 36186fe77a docs(nx-dev): remove duplicated paragraph in blog post 2025-02-11 12:23:23 -05:00
Benjamin Cabanes b36c081cfe docs(nx-dev): replace graph image with light/dark neuron variants (#29461)
Replaced the old `graphs.jpg` image with two new `.avif` images to support light and dark mode. Updated the component to switch between the light and dark neuron visuals based on theme.
2025-02-11 12:23:23 -05:00
Juri e97d585ece docs(nx-dev): updates to EOY blog post 2025-02-11 12:23:23 -05:00
Juri 90dcf0b852 docs(nx-dev): year 2025 review post 2025-02-11 12:23:23 -05:00
Juri cb5b336666 feat(nx-dev): add TOC markdoc component for blog posts 2025-02-11 12:23:23 -05:00
Bartosz Adamczyk 9929b7c965 fix(release): invalid config path in hint for using skipLockFileUpdate (#29425) 2025-02-11 12:22:34 -05:00
Isaac Mann c524aeb774 docs(nx-dev): render keywords meta tag (#29450)
Renders `keywords` property from frontmatter as a `<meta>` tag.
2025-02-11 12:22:34 -05:00
Craigory Coppola 4fcb696c5d fix(core): daemon spinner should show text (#29448)
<!-- 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
Daemon spinner doesn't show up

## Expected Behavior
Daemon spinner shows properly

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

Fixes #
2025-02-11 12:22:34 -05:00
Emily Xiong 58df55e993 fix(js): not generate tsconfig if already exists (#29317)
<!-- 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 -->
- in serve target, it uses executor `@nx/webpack:dev-server`
- in `packages/webpack/src/executors/dev-server/dev-server.impl.ts`,
when buildLibsFromSource is false, it calls createTmpTsConfig to create
a temp config
- in webpack.config.js, it has `module.exports =
composePlugins(withNx()`. in withNx, it calls
NxTsconfigPathsWebpackPlugin.
- when buildLibsFromSource is false, it called createTmpTsConfig again
based on the temp config. it created an infinite loop because it creates
a tsconfig that extends itself.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
- do not create a temp config if it is a generated ts config

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

Fixes https://github.com/nrwl/nx/issues/28006
2025-02-11 12:22:34 -05:00
Juri 69f26bacef feat(nx-dev): link more customer videos on enterprise page 2025-02-11 12:22:34 -05:00
James Webster bfddc5e1a9 docs(nx): Version error in documentation page (#29440)
Original text was:

e.g. `nx@19.2.0` and `@nx/js@20.2.0` should be used together.

Surely it should be...

e.g. `nx@19.2.0` and `@nx/js@19.2.0` should be used together.
2025-02-11 12:22:34 -05:00
Yohann Valentin a086425228 fix(nuxt): change tsconfig path on server part (#28864)
## Current Behavior
On a new workspace with nuxt preset (`npx create-nx-workspace@latest
--preset=nuxt`), a `tsconfig.json` file is create on the nuxt server
side directory (path: `apps/nuxt-test/src/server/tsconfig.json`). The
file extends the building nuxt server tsconfig file (path:
`apps/nuxt-test/.nuxt/tsconfig.server.json`) with the following value :
```json
{
  "extends": "../.nuxt/tsconfig.server.json"
}
```

## Expected Behavior
This `tconfig.json` file generate need to extends the
`tsconfig.server.json` with the good path

Fixes #

The correct value is 
```json
{
  "extends": "../../.nuxt/tsconfig.server.json"
}
```
2025-02-11 12:22:33 -05:00
Craigory Coppola 70782e2834 chore(repo): bump nx to 20.3.0-rc.0 (#29437)
Bumps Nx
2025-02-11 12:22:33 -05:00
Gustavo Perdomo 9837a10579 feat(nx-plugin): added support for vitest test runner (#29140)
<!-- 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 -->
Nx Plugin do not have the option to use Vitest as test runner

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
This PR allow us to use Vitest as test runner in plugins projects.

Vitest for e2e targets is still missing and a new PR will be raised
after https://github.com/nrwl/nx/issues/29139 is fixed

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

Fixes #22882
2025-02-11 12:22:13 -05:00
Colum Ferry a1610b84f0 fix(angular): set up host and remote ssr apps correctly #29442 (#29447)
## Current Behavior
During the update to support Angular 19, the host and remote generators'
`updateSsrSetup` function was missed.

This led to the creation of a second `server.ts` file, which would
result in the node server trying to instantiate twice.

## Expected Behavior
Fix the path normalization dependent on angular major version to ensure
only one server will be instantiated.

## Related Issue(s)

Fixes #29442
2025-02-11 12:22:13 -05:00
Zach Tindall 8eb01adaf2 fix(core): update yarn-parser to handle yarn v4 syntax (#29067)
Update the yarn-parser so that yarn.lock file generation works with yarn
v4

## Current Behavior
yarn.lock is not correctly created when using yarn v4

```
"":
  version: 1.22.8
  resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin<compat/resolve>::version=1.22.8&hash=c3c19d"
  dependencies:
    is-core-module: "npm:^2.13.0"
    path-parse: "npm:^1.0.7"
    supports-preserve-symlinks-flag: "npm:^1.0.0"
  bin:
    resolve: bin/resolve
  checksum: 0446f024439cd2e50c6c8fa8ba77eaa8370b4180f401a96abf3d1ebc770ac51c1955e12764cde449fde3fff480a61f84388e3505ecdbab778f4bef5f8212c729
  languageName: node
  linkType: hard
```


## Expected Behavior
yarn.lock should be created correctly with no missing keys


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

Fixes #19881
2025-02-11 12:22:13 -05:00
Craigory Coppola ca15fb6f71 fix(core): graph spinners should update properly (#29433)
## Current Behavior
Spinners are not updated properly

## Expected Behavior
Spinners are updated properly

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

Fixes #
2025-02-11 12:22:13 -05:00
Colum Ferry 6f8e1e0b1e fix(module-federation): dynamic federation helpers should normalize remote names (#29427)
## Current Behavior
After migration of existing remotes beyond Nx 19.8, dynamic manifest
federation files may be updated to match the normalized names of JS
variables (`_` instead of `-`).
Project names will not have been migrated, and therefore the logic to
find the projects based on the remote names is broken.

## Expected Behavior
Check the project graph for remote names as-is and by transforming `_`
to `-` to see if the project exists
2025-02-11 12:22:13 -05:00
Craigory Coppola f0f2009282 feat(core): show progress on ci if graph construction takes longer than expected (#29392)
Progress spinners currently only show up when the terminal is a tty.
This updates it to show static text on CI, but at a longer duration
2025-02-11 12:22:13 -05:00
Colum Ferry 0d26ab8ed2 fix(bundling): ensure vitest timestamp files are ignored (#29418)
## Current Behavior
Vitest TS config files produce timestamp temp files during project graph
creation which are cleaned up.
However, the creation and deletion of these files triggers the daemon to
recalculate graph.
It ends up in a loop.
The vite timestamp files were already added to the gitignore to prevent
this.

## Expected Behavior
Add vitest timestamp files to gitignore
2025-02-11 12:22:13 -05:00
Leosvel Pérez Espinosa 8bbcb0413b fix(testing): force node10 module resolution for jest atomized tasks (#29421)
<!-- 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 #
2025-02-11 12:22:13 -05:00
Colum Ferry a660405acf fix(angular): normalize name when forced to build selector (#29417)
## Current Behavior
When passing a project name with a `/` in it to the library generator,
this name passes through to the `component` generator.
The `component` generator may then attempt to build a selector from this
name, however, it does not normalize the `/`.

## Expected Behavior
Ensure the `/` is normalized from the name when building the selector

## Related Issue(s)

Fixes #29229
2025-02-11 12:22:13 -05:00
Phillip Barta ac010ee22c cleanup(repo): remove unused dependencies (#27676) 2025-02-11 12:22:13 -05:00
Nicolas Beaussart a6ea358072 fix(js): handle resolution from within node_module in the sync generator (#29412)
closed #29411

<!-- 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 resolve function from ts.System returning the full path, and so
including the workspaceRoot that is also append by the FsTree

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Resolution within node_modules are correctly followed

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

Fixes #29411
2025-02-11 12:21:44 -05:00
Colum Ferry 704ca1147e feat(rsbuild): move plugin export to root of package (#29415)
## Current Behavior
The Rsbuild plugin is exported at `@nx/rsbuild/plugin`


## Expected Behavior
Export the plugin from `@nx/rsbuild` i.e. the root of the package.
2025-02-11 12:21:44 -05:00
Colum Ferry 0b4471c440 fix(module-federation): ensure @nx/module-federation package is installed for users (#29416)
## Current Behavior
The `@nx/module-federation` package is a direct dependency of some of
the other packages in the Nx Plugin ecosystem.
It should be resolved correctly by package managers such that it can be
used when setting up MF projects.

However, some users are facing issues with module resolutions where the
package is not found as expected.

## Expected Behavior
Install the package directly for the user to ensure module resolution
works as expected.

## Related Issue(s)

Fixes #29269
2025-02-11 12:21:44 -05:00
James Henry 8c9225b8b5 chore(repo): add conformance rule for our package.json files (#29078) 2025-02-11 12:21:44 -05:00
Chau Tran 9b7de62ee2 fix(core): make packageExports metadata optional field (#29407) 2025-02-11 12:20:35 -05:00
Philip Fulcher afe9fa161e chore(nx-dev): add bluesky to footer and community page (#29379)
## Current Behavior
Bluesky is not linked in the footer or community page.

## Expected Behavior
Bluesky is linked on the footer and community page.
2025-02-11 12:20:35 -05:00
Jack Hsu df1ee93326 feat(eslint): rename eslint.config.js to eslint.config.cjs to resolve them as CommonJS (#29334)
This PR updates our generators to use `eslint.config.cjs` instead of
`eslint.config.js` so that Node resolution will treat it as CommonJS.
This solves an issue where having `"type": "module"` in `package.json`
will result in an error when Node tries to resolve the config file as
ESM.

Also allows us to clean up out Remix generators to not have to rename to
`eslint.config.cjs` to solve the same issue.

<!-- 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 #
2025-02-11 12:20:35 -05:00
Nicholas Cunningham 65ef69dbf2 fix(js): Configure typescript plugin to handle non-buildable libs (#29393)
<!-- 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, we are excluding non-buildable libs from the
`@nx/js/typescript` plugin. Although that allows non-buildable projects
from have the build target being inferred it also as a side-effect
removes the `typecheck` target which is unintended. Additionally, to
breaks the pattern of being self containment that TS project solutions
brings as we were modifying the root `nx.json`

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
1. Non-buildable libs should not have a build target.
2. Non-buildable libs should have the typecheck target.
3. Buildable libs remain unchanged and should have both a build and
typecheck target.
4. Remove the `exclude` from `nx.json` for non-buildable libs.

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

Fixes #
2025-02-11 12:20:34 -05:00
Juri Strumpflohner 41915d62d3 fix(nx-dev): update hero image on blog post (#29405)
<!-- 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 #
2025-02-11 12:20:34 -05:00
Jason Jean afac982e5e chore(repo): use default cache directory (#29390)
<!-- 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 -->

Multiple workspaces using the cache directory is causing mismatches with
the db in the workspace data directory.

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

We don't need the separate cache directory so we'll go back to using the
default in the workspace.

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

Fixes #
2025-02-11 12:20:34 -05:00
Nicholas Cunningham 67edbc7a79 fix(core): Adding react apps/libs to workspaces so they can be referenced. (#29202)
<!-- 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 address a few things:

1. When we generate an app or a library using the new TS Solution they
are not added to the workspaces/packages option.
2. Currently, when we use `pnpm` to generate a workspace the
`pnpm-workspace.yaml` looks like below which is not correct
```
packages: 
  - packages/**
```

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

1. Libraries and apps should be referenced correctly out of the box so
that they can be symlinked after installation.
2. The intended `pnpm-workspace.yaml` should look similar to:
```
packages: 
  - 'packages/**'
  - 'demo'
```

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

---------

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2025-02-11 12:20:34 -05:00
Colum Ferry 56f11ce6f9 feat(rsbuild): add react and vue support for app generation (#29349)
## Current Behavior
We do not have a generator that can scaffold a react or vue app using
rsbuild.


## Expected Behavior
Update the react application generator to support a bundler option of
rsbuild
Update the vue application generator to support a bundler option of
rsbuild
2025-02-11 12:20:34 -05:00
Jack Hsu e0d414cf5a feat(core): add lib/** glob to workspaces so we support it out of the box (#29403)
We use `libs` a lot in our content, and use it ourselves in our own
monorepo. Some teams prefer it to `packages` so we should include it by
default.
<!-- 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 #
2025-02-11 12:20:34 -05:00
Juri Strumpflohner 169ac88617 docs(nx-dev): article on task inference (#29330) 2025-02-11 12:20:34 -05:00
Jack Hsu 76535dcd59 feat(core): nx-plugin-checks accounts for outDir and rootDir of projects when checking file existence (#29391)
For Nx plugins that use the the new TS solution setup, we need to
account for `generators.json`, `executors.json`, and `migrations.json`
pointing to `dist` rather than source.

This PR adds two options, `rootDir` and `outDir`, that allows the lint
rule to check the source files rather than depend on build artifacts.
The defaults are what we generate our plugins with.


<!-- 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 #
2025-02-11 12:20:34 -05:00
Leosvel Pérez Espinosa f529145a6b feat(angular): support ngrx v19 (#29398)
<!-- 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. -->

<!-- This is the behavior we have today -->

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

<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2025-02-11 12:20:34 -05:00
MaxKless 6e7cdf267f docs(misc): add docs for Nx Console & Nx Cloud integration (#29401)
<!-- 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: Isaac Mann <isaacplmann@users.noreply.github.com>
2025-02-11 12:20:11 -05:00
Isaac Mann 4c6cd215ac docs(core): fix references to createNodes v1 (#29400) 2025-02-11 12:20:11 -05:00
James Henry bbe6ca9b93 chore(release): fix e2e (#29399) 2025-02-11 12:20:11 -05:00
James Henry c8c5df25d5 feat(release): allow automated git push from version or changelog step (#29280) 2025-02-11 12:20:11 -05:00
Mike Haas 8799bb2f80 chore(core): nx plugin modification @nx-tools/nx-container (#29394)
<!-- 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. -->

This is just a simple url update, you can observe the old url is no
longer valid because the structure of the git repo has changed

Co-authored-by: Michael Haas <michael.haas@futurewiseinsurance.com>
2025-02-11 12:20:11 -05:00
Nicholas Cunningham c6287f02fb fix(core): Update move/remove workspace generators to work with ts project references (#29331)
<!-- 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 a workspace is setup to use ts project references the move/remove
generators from `@nx/workspace` do not work correctly or result in an
incorrect state for the workspace.

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

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

Fixes #
2025-02-11 12:20:11 -05:00
Emily Xiong 52369023ba fix(gradle): cache gradle report (#29381)
<!-- 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 -->

`./gradlew projectReport` is run everytime Nx calculates the graph.

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

Results of `./gradlew projectReport` are cached until gradle files have
been changed. This improves the performance of the gradle graph plugin.

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

Fixes #
2025-02-11 12:20:11 -05:00
Isaac Mann a7ff87a2a9 docs(core): common tasks page (#29376)
Create a common task names concept page.

The main purpose of this page is to have a good search result for people
searching for "build", "test" or "lint" in our docs search. These terms
are regularly in the top 10 most searched terms.
2025-02-11 12:20:11 -05:00
Benjamin Cabanes b9e03df693 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.
2025-02-11 12:20:11 -05:00
Emily Xiong 36f6bd1c22 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 #
2025-02-11 12:20:11 -05:00
Craigory Coppola dda081f91f 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.
2025-02-11 12:20:11 -05:00
Leosvel Pérez Espinosa 8eabe2cec1 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 #
2025-02-11 12:20:11 -05:00
Mike Hartington 45250518e4 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 #
2025-02-11 12:20:11 -05:00
Benjamin Cabanes 21d9d90a75 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`.
2025-02-11 12:20:11 -05:00
Dusty Greif cd41aa7d58 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.
2025-02-11 12:20:11 -05:00
Leosvel Pérez Espinosa 0eb828a959 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 #
2025-02-11 12:20:11 -05:00
Leosvel Pérez Espinosa f1a8a91d71 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 #
2025-02-11 12:20:11 -05:00
Benjamin Cabanes e06f496728 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.
2025-02-11 12:20:11 -05:00
Leosvel Pérez Espinosa 0d891e916d 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 #
2025-02-11 12:20:11 -05:00
Thomas Dekiere bbd34daf27 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>
2025-02-11 12:20:11 -05:00
Benjamin Cabanes 45945e7f69 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.
2025-02-11 12:20:11 -05:00
Isaac Mann 3bcfdf9399 docs(core): createNodesV2 in plugin docs (#29346)
Update the project graph plugin recipe to use createNodesV2
2025-02-11 12:20:11 -05:00
Leosvel Pérez Espinosa bf3710cdc9 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. -->

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

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

<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2025-02-11 12:20:11 -05:00
Leosvel Pérez Espinosa 3fefc44245 docs(misc): fix plugin generation command in blog post (#29340) 2025-02-11 12:19:55 -05:00
Stian Morsund ff7cfae3f6 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. -->
2025-02-11 12:19:55 -05:00
Craigory Coppola 3b3c688225 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 #
2025-02-11 12:19:55 -05:00
Craigory Coppola ab2db7f072 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 #
2025-02-11 12:19:55 -05:00
Jack Hsu 1ae3a88437 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>
2025-02-11 12:19:55 -05:00
Konstantin Kai d7bb3d0398 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>
2025-02-11 12:19:55 -05:00
Philip Fulcher 92b820ce7c docs(nx-dev): add tailoring nx for your org post (#29293)
Co-authored-by: Juri <juri.strumpflohner@gmail.com>
2025-02-11 12:19:55 -05:00
Emily Xiong e92d5b14e4 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>
2025-02-11 12:19:55 -05:00
Emily Xiong 60c9ce8649 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
2025-02-11 12:19:55 -05:00
Colum Ferry 668a9437d8 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
2025-02-11 12:19:54 -05:00
Vojtech Mašek bddee77fe8 docs(bundling): correct esbuild options nesting (#28748)
Fixes:

- [x] correct nesting of options in ESBuild docs

---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2025-02-11 12:19:54 -05:00
Sam Tsai f639fb67c5 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.
2025-02-11 12:19:54 -05:00
Samar Panda 5df977e6f5 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 #
2025-02-11 12:19:54 -05:00
Benjamin Cabanes 996f97aaff docs(nx-dev): remove webinar event on enterprise screen (#29325)
The webinar is a thing of the past.
2025-02-11 12:19:54 -05:00
Sebastian Podgajny 370aec3569 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 #
2025-02-11 12:19:54 -05:00
Petr Plenkov 53634a917d 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>
2025-02-11 12:19:54 -05:00
Jason Jean cf1824ff70 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. -->

<!-- This is the behavior we have today -->

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

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

<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2025-02-11 12:19:54 -05:00
Benjamin Cabanes e90a7f7b96 docs(nx-dev): remove webinar banner (#29315)
The webinar has happened, no need of the banner anymore.
2025-02-11 12:19:33 -05:00
Emily Xiong 123e2700b4 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
2025-02-11 12:19:33 -05:00
Jack Hsu 8e083a74ff 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.
2025-02-11 12:19:33 -05:00
Nicholas Cunningham 291e74e8de 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 #
2025-02-11 12:19:33 -05:00
Colum Ferry d99c18788f 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
2025-02-11 12:19:33 -05:00
Isaac Mann 81df6a568d 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
2025-02-11 12:19:33 -05:00
Isaac Mann 238ce6cd81 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
2025-02-11 12:19:33 -05:00
Younes Jaaidi f214cc91e4 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.
2025-02-11 12:19:33 -05:00
Edouard Bozon db75fa0283 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>
2025-02-11 12:19:33 -05:00
Nigel Sirisomphone 3bf468f104 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>
2025-02-11 12:19:33 -05:00
Jason Jean fe4d0f8101 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 #
2025-02-11 12:19:33 -05:00
James Henry 67bfeb2617 chore(repo): update reference to upload-artifact from v3 to v4 (#29296) 2025-02-11 12:19:32 -05:00
Colum Ferry 2c1a624bca 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`
2025-02-11 12:19:32 -05:00
Phillip Barta 814c758393 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
2025-02-11 12:19:32 -05:00
Tine Kondo 489250a912 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
2025-02-11 12:19:32 -05:00
Colum Ferry 6e44267ce0 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.
2025-02-11 12:19:32 -05:00
Leosvel Pérez Espinosa a9b313bb0c 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
2025-02-11 12:19:32 -05:00
Leosvel Pérez Espinosa 1c9878bba4 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. -->

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

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

<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2025-02-11 12:19:32 -05:00
Jack Hsu 2ad53bee74 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 #
2025-02-11 12:18:54 -05:00
James Henry 30fa88d45b chore(repo): use extra-large resource class for memory intensive nx-dev build (#29285) 2025-02-11 12:18:54 -05:00
James Henry ad069eae30 docs(release): cover version reference updates in greater detail (#29259) 2025-02-11 12:18:54 -05:00
Leosvel Pérez Espinosa 7ed7bba6fe 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 #
2025-02-11 12:18:54 -05:00
Colum Ferry 0087a0a56c fix(rsbuild): set publish config correctly (#29282) 2025-02-11 12:18:54 -05:00
Ben McCann 578cd38e40 fix(js): switch from fast-glob to tinyglobby (#29141) 2025-02-11 12:18:53 -05:00
master96 49cae62640 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>
2025-02-11 12:18:00 -05:00
Maciej Stosio ae03b50f27 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.
2025-02-11 12:18:00 -05:00
Juri Strumpflohner 43d271b360 fix(nx-dev): update Nx Cloud proj created (#29272) 2025-02-11 12:18:00 -05:00
James Henry d0ea66fc1c fix(release): make commits separator in git log command more unique (#29261) 2025-02-11 12:18:00 -05:00
Steven Nance 46b8faa232 docs(core): remove nx-cloud agent count (#29271) 2025-02-11 12:18:00 -05:00
Nicholas Cunningham 47cca2d4db 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.
2025-02-11 12:18:00 -05:00
Isaac Mann d0c7cb5c19 docs(core): remove nx-cloud agent count (#29265)
Remove references to `NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT`
2025-02-11 12:18:00 -05:00
Isaac Mann 29dc29ea04 docs(core): remove quoted terms in content (#29266)
Remove quoted terms in the form \`"term"\` from the docs
2025-02-11 12:18:00 -05:00
Jason Jean b56a9a7530 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 #
2025-02-11 12:18:00 -05:00
Leosvel Pérez Espinosa 60e78bc972 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 #
2025-02-11 12:18:00 -05:00
Fábio Correia 2e429badb2 fix(release): use prepatch version for pre-release dependent package updates (#29123) 2025-02-11 12:18:00 -05:00
Jacob Ley 9029bc7ee0 fix(core): defer loading package manager until necessary (#29248) 2025-02-11 12:17:59 -05:00
Jason Jean fbabae8361 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 #
2025-02-11 12:17:59 -05:00
Benjamin Cabanes 6e8ca402eb 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.
2025-02-11 12:17:59 -05:00
Jason Jean b50435d8e6 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 #
2025-02-11 12:17:59 -05:00
Benjamin Cabanes 47985bd478 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>
2025-02-11 12:17:59 -05:00
Mike Hartington 75aed082a5 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 #
2025-02-11 12:17:59 -05:00
Colum Ferry 31c9051ae1 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
2025-02-11 12:17:59 -05:00
Emily Xiong 00f76347b9 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. -->

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

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

<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2025-02-11 12:17:59 -05:00
Colum Ferry 9a50c0e098 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
2025-02-11 12:17:44 -05:00
Zachary DeRose 1e707a70ac 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 #
2025-02-11 12:17:44 -05:00
Colum Ferry 370e04dff0 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
2025-02-11 12:17:44 -05:00
Benjamin Cabanes 3f9f8e3f9c 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>
2025-02-11 12:17:44 -05:00
Emily Xiong 58772f7677 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 #
2025-02-11 12:17:44 -05:00
Emily Xiong a60a426122 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 #
2025-02-11 12:17:44 -05:00
Emily Xiong 55dd5977b7 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 #
2025-02-11 12:17:44 -05:00
Emily Xiong cc4990814b 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
2025-02-11 12:17:43 -05:00
Leosvel Pérez Espinosa d7cdea10c2 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 #
2025-02-11 12:17:43 -05:00
Jack Hsu 1d3d3ac54a 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 #
2025-02-11 12:17:43 -05:00
Jack Hsu c84722e5a2 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 #
2025-02-11 12:17:43 -05:00
Leosvel Pérez Espinosa 01105d2de2 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
2025-02-11 12:17:43 -05:00
Thomas Dekiere 1829674009 fix(release): skip changelog generation for projects without available version data (#29212) 2025-02-11 12:17:43 -05:00
Leosvel Pérez Espinosa 8913b0046d 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 #
2025-02-11 12:17:43 -05:00
Jason Jean 58b7ad3ec9 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 #
2025-02-11 12:17:43 -05:00
Jason Jean c168063085 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. -->

<!-- This is the behavior we have today -->

This repo uses Nx `20.2.0-beta.3`

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

This repo uses Nx `20.2.0-beta.7`

<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2025-02-11 12:17:43 -05:00
Colum Ferry ebe4cd132c fix(rspack): align @rspack/core versions (#29199)
Align rspack versions amongst packages and update useLegacyNxPlugin
helper to match new API changes
2025-02-11 12:17:02 -05:00
Jack Hsu 2bafba503d 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>
2025-02-11 12:16:36 -05:00
Jack Hsu 72b651f957 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.
2025-02-11 12:16:36 -05:00
Leosvel Pérez Espinosa 196e2a4729 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
2025-02-11 12:16:36 -05:00
Colum Ferry 5557979be1 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
```
2025-02-11 12:16:36 -05:00
James Henry 74872746cb fix(release): set make_latest legacy during github release creation (#29197) 2025-02-11 12:16:36 -05:00
Leosvel Pérez Espinosa 771d0d9b51 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 #
2025-02-11 12:16:36 -05:00
Jason Jean e8734919ae 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 #
2025-02-11 12:16:36 -05:00
Leosvel Pérez Espinosa 8f5e0ffcb1 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 #
2025-02-11 12:16:36 -05:00
Jason Jean 0a514cef3f 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 #
2025-02-11 12:16:36 -05:00
Nicholas Cunningham d2bc0d8852 fix(react): None buildable libs should not have a build target (#29175) 2025-02-11 12:16:36 -05:00
Leosvel Pérez Espinosa 9db31949aa 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 #
2025-02-11 12:16:36 -05:00
Nicholas Cunningham 6e6d82f519 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
2025-02-11 12:16:36 -05:00
Leosvel Pérez Espinosa d82d7f8cd7 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
2025-02-11 12:16:36 -05:00
Colum Ferry 90c74646d2 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
2025-02-11 12:16:36 -05:00
Philip Fulcher 93c31c813e docs(nx-dev): add monorepo relationships blog post (#29152) 2025-02-11 12:16:36 -05:00
Craigory Coppola 1939e7eab3 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 #
2025-02-11 12:16:36 -05:00
Jason Jean aa68ad5886 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>
2025-02-11 12:16:36 -05:00
Colum Ferry af2075ecd4 docs(module-federation): add link to module-federation.io (#29166)
Add a link to https://module-federation.io from the `@nx/module-federation` README
2025-02-11 12:16:36 -05:00
Leosvel Pérez Espinosa a4e5870f75 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
2025-02-11 12:16:36 -05:00
Leosvel Pérez Espinosa a4333c8ff9 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
2025-02-11 12:16:36 -05:00
Leosvel Pérez Espinosa 1c6ed1f18f 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 #
2025-02-11 12:16:35 -05:00
Colum Ferry 6429b745d3 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`.
2025-02-11 12:16:35 -05:00
Benjamin Cabanes fab1daaba6 docs(nx-dev): update team (#29160) 2025-02-11 12:16:35 -05:00
Juri Strumpflohner 7ee8b1e038 docs(testing): fix playwright API docs about task splitting (#29162)
Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2025-02-11 12:16:35 -05:00
Juri 82ebeb7e00 docs(nx-cloud): remove note on --with-env-vars=auto as it is breaking users badly 90% of the time 2025-02-11 12:16:35 -05:00
Benjamin Cabanes d2377567e6 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>
2025-02-11 12:16:35 -05:00
Benjamin Cabanes 0caa98a89f 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.
2025-02-11 12:16:35 -05:00
Caleb Ukle dd331e65bb 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>
2025-02-11 12:16:35 -05:00
Leosvel Pérez Espinosa ddabc2b759 feat(angular): add support for angular v19 (#28847)
- [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. -->

<!-- This is the behavior we have today -->

Angular v19 is not supported.

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

Angular v19 should be supported.

<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #29028
2025-02-11 12:16:35 -05:00
Zachary DeRose 718638951d 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 #
2025-02-11 12:15:02 -05:00
Jack Hsu ee16498955 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>
2025-02-11 12:15:02 -05:00
Nicholas Cunningham 2e77f714fb 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
2025-02-11 12:15:02 -05:00
Nicholas Cunningham d78db45e85 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
2025-02-11 12:15:02 -05:00
Leosvel Pérez Espinosa f8ca6660b0 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 #
2025-02-11 12:15:02 -05:00
Colum Ferry fa90cf4b10 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
2025-02-11 12:15:02 -05:00
Colum Ferry e56daf5d3b 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
2025-02-11 12:15:02 -05:00
Nicholas Cunningham 333664273e 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
2025-02-11 12:15:02 -05:00
Nicholas Cunningham 2163a207b2 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
2025-02-11 12:15:02 -05:00
Rares Matei 2207852220 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 #
2025-02-11 12:15:02 -05:00
Jason Jean 4356ce7acb 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. -->

<!-- This is the behavior we have today -->

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

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

<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2025-02-11 12:15:01 -05:00
Benjamin Cabanes a925291746 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.
2025-02-11 12:14:45 -05:00
Benjamin Cabanes e647cbb414 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.
2025-02-11 12:14:45 -05:00
Jason Jean d47a754a89 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 #
2025-02-11 12:14:45 -05:00
Benjamin Cabanes fa2431caad docs(nx-dev): update case study link (#29086) 2025-02-11 12:14:45 -05:00
Juri 2d719572df docs(release): update how the publish results are handled 2025-02-11 12:14:45 -05:00
James Henry 5c357881e1 docs(repo): update some conformance docs (#29073) 2025-02-11 12:14:45 -05:00
Benjamin Cabanes 96990af1b7 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.
2025-02-11 12:14:45 -05:00
Juri Strumpflohner a4553f626e docs(core): adjust nx course video titles for better SEO (#29079)
Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2025-02-11 12:14:45 -05:00
Benjamin Cabanes 8504550705 docs(nx-dev): update ebook download link (#29081)
Changed the href in `download-ebook.tsx` to point to the new CI ebook URL.
2025-02-11 12:14:45 -05:00
Andy ea10643cbf server-next-executor-examples: minor typo documentation (#28830)
## Current Behavior

Typo


![image](https://github.com/user-attachments/assets/39b5ebe8-5518-4afb-8c32-1c736489bf6c)
2025-02-11 12:14:45 -05:00
Colum Ferry 55f4cc7cdb 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.
2025-02-11 12:14:45 -05:00
Craigory Coppola eacb3d229c 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 #
2025-02-11 12:14:45 -05:00
Nicholas Cunningham 2fd0b9d519 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
2025-02-11 12:14:45 -05:00
James Henry 74fbb1e1df chore(repo): use nx-cloud conformance (#29062) 2025-02-11 12:14:45 -05:00
Nicholas Cunningham 7d19669e83 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
2025-02-11 12:14:22 -05:00
Juri 995552e686 feat(nx-dev): update top-level navbar 2025-02-11 12:14:22 -05:00
MaxKless 6b7f3a6b72 fix(core): don't generate nxCloudId if running nx connect through nx console (#29060) 2025-02-11 12:14:22 -05:00
Colum Ferry a09e480253 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
2025-02-11 12:14:22 -05:00
Isaac Mann 14d90736c8 chore(nx-dev): wrap breadcrumbs (#29059) 2025-02-11 12:14:22 -05:00
Jason Jean 8b569e1a89 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. -->

<!-- This is the behavior we have today -->

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

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

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

<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2025-02-11 12:14:22 -05:00
Isaac Mann 7b2700ba93 docs(core): enterprise conformance rules docs (#29046)
Co-authored-by: JamesHenry <james@henry.sc>
2025-02-11 12:13:24 -05:00
Isaac Mann c3565b5e44 chore(nx-dev): fix build 2024-11-25 19:10:22 -05:00
Isaac Mann 45d4f042a0 docs(core): update tutorial 2024-11-25 16:13:59 -05:00
Isaac Mann a2c25d1a17 docs(core): tutorial 2024-11-25 06:48:31 -05:00
Isaac Mann 0956829ba9 Merge branch 'master' into docs/tutorial 2024-11-22 17:04:54 -05:00
Isaac Mann d669f237bf chore(nx-dev): fix CI 2024-11-22 06:40:59 -05:00
Isaac Mann e82b3fadcc chore(nx-dev): fix CI 2024-11-21 22:37:53 -05:00
Isaac Mann 7558ef1a57 chore(nx-dev): fix formatting 2024-11-21 13:38:56 -05:00
Isaac Mann cd4895b8fb feat(nx-dev): tutorialkit project 2024-11-21 13:38:56 -05:00
3260 changed files with 48932 additions and 362965 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ body:
label: Package Manager Version
description: |
If `nx report` doesn't work, please provide the name and the version of your package manager.
You can get version information by running `PACKAGE_MANAGER --version`, where PACKAGE_MANAGER is any of `yarn`, `pnpm`, `bun` or `npm`, depending on the package manager used.
You can get version information by running `yarn --version`, `pnpm --version` or `npm --version`, depending on the package manager used.
- type: checkboxes
id: os
attributes:
+14 -39
View File
@@ -22,27 +22,24 @@ jobs:
NX_NATIVE_LOGGING: 'false'
NX_E2E_RUN_E2E: 'true'
NX_CI_EXECUTION_ENV: 'linux'
NX_CLOUD_DTE_V2: 'true'
NX_CLOUD_DTE_SUMMARY: 'true'
NX_CLOUD_NO_TIMEOUTS: 'true'
NX_ALLOW_NON_CACHEABLE_DTE: 'true'
NX_CLOUD_USE_NEW_TASK_APIS: 'true'
NX_CLOUD_USE_NEW_STREAM_OUTPUT: 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
fetch-depth: 0
filter: tree:0
- name: Fetch Master
run: git fetch origin master:master
if: ${{ github.event_name == 'pull_request' }}
- name: Set SHAs
uses: nrwl/nx-set-shas@v4
with:
main-branch-name: 'master'
- name: Start CI Run
run: npx nx-cloud@next start-ci-run --distribute-on="./.nx/workflows/dynamic-changesets.yaml" --stop-agents-after="e2e"
@@ -68,12 +65,6 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Check Documentation
run: pnpm nx documentation
timeout-minutes: 20
@@ -82,7 +73,7 @@ jobs:
run: |
pids=()
pnpm nx-cloud record -- nx format:check &
pnpm nx-cloud record -- nx format:check --base=$NX_BASE --head=$NX_HEAD &
pids+=($!)
pnpm nx-cloud record -- nx sync:check
@@ -94,7 +85,7 @@ jobs:
pnpm nx run-many -t check-imports check-commit check-lock-files check-codeowners --parallel=1 --no-dte &
pids+=($!)
pnpm nx affected --targets=lint,test,build,e2e,e2e-ci &
pnpm nx affected --targets=lint,test,build,e2e,e2e-ci --base=$NX_BASE --head=$NX_HEAD --parallel=3 &
pids+=($!)
for pid in "${pids[@]}"; do
@@ -104,40 +95,26 @@ jobs:
main-macos:
runs-on: macos-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !contains(github.event_name, 'push')}}
env:
NX_E2E_CI_CACHE_KEY: e2e-github-macos
NX_PERF_LOGGING: 'false'
NX_CI_EXECUTION_ENV: 'macos'
SELECTED_PM: 'npm'
steps:
- name: Log concurrency info
run: |
echo "Concurrency group: ${{ github.workflow }}-${{ github.ref }}"
echo "Concurrency cancel-in-progress: ${{ !contains(github.event_name, 'push') }}"
echo "Concurrency cancel-event-name: ${{ github.event_name }}"
if: always()
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
fetch-depth: 0
filter: tree:0
- name: Fetch Master
run: git fetch origin master:master
if: ${{ github.event_name == 'pull_request' }}
- name: Restore Homebrew packages
uses: actions/cache@v4
uses: actions/cache@v3
with:
path: |
/opt/Homebrew
/usr/local/Homebrew
~/Library/Caches/Homebrew
key: nrwl-nx-homebrew-packages
@@ -149,10 +126,10 @@ jobs:
timeout-minutes: 20
- name: Save Homebrew Cache
uses: actions/cache@v4
uses: actions/cache@v3
with:
path: |
/opt/Homebrew
/usr/local/Homebrew
~/Library/Caches/Homebrew
key: nrwl-nx-homebrew-packages
@@ -172,8 +149,6 @@ jobs:
- name: Set SHAs
uses: nrwl/nx-set-shas@v4
with:
main-branch-name: 'master'
- name: Run E2E Tests for macOS
run: |
@@ -182,4 +157,4 @@ jobs:
pnpm nx affected -t e2e-macos-local --parallel=1 --base=$NX_BASE --head=$NX_HEAD
else
echo "Skip E2E tests for macOS as there are no changes in React Native projects."
fi
fi
+307 -52
View File
@@ -24,28 +24,24 @@ jobs:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node_version:
- 18
- 20
- 22
# - 23
exclude:
# run just node v20 on macos and windows
# run just node v20 on macos
- os: macos-latest
node_version: 18
- os: macos-latest
node_version: 22
# - os: macos-latest
# node_version: 23
- os: windows-latest
node_version: 22
# - os: windows-latest
# node_version: 23
name: Cache install (${{ matrix.os }}, node v${{ matrix.node_version }})
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: pnpm/action-setup@v4
name: Install pnpm
@@ -103,41 +99,300 @@ jobs:
if: steps.cache-cypress.outputs.cache-hit != 'true'
run: npx cypress install
prepare-matrix:
name: Prepare matrix combinations
if: ${{ github.repository_owner == 'nrwl' }}
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.process-json.outputs.MATRIX }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Process matrix data
id: process-json
run:
echo "MATRIX=$(npx tsx .github/workflows/nightly/process-matrix.ts | jq -c .)" >> $GITHUB_OUTPUT
e2e:
if: ${{ github.repository_owner == 'nrwl' }}
needs:
- preinstall
- prepare-matrix
needs: preinstall
permissions:
contents: read
runs-on: ${{ matrix.os }}
timeout-minutes: 90
strategy:
matrix: ${{fromJson(needs.prepare-matrix.outputs.matrix)}} # Load matrix from previous job
matrix:
os:
- ubuntu-latest
- macos-latest
node_version:
- 18
- 20
- 22
# - 23
package_manager:
- npm
- yarn
- pnpm
project:
- e2e-angular
- e2e-cypress
- e2e-detox
- e2e-esbuild
- e2e-eslint
- e2e-expo
- e2e-gradle
- e2e-jest
- e2e-js
- e2e-lerna-smoke-tests
- e2e-next
- e2e-node
- e2e-nuxt
- e2e-nx-init
- e2e-nx
- e2e-playwright
- e2e-plugin
- e2e-react
- e2e-react-native
- e2e-release
- e2e-remix
- e2e-rollup
- e2e-storybook
- e2e-vite
- e2e-vue
- e2e-web
- e2e-webpack
- e2e-workspace-create
include:
# os short names
- os: ubuntu-latest
os_name: 'Linux'
- os: macos-latest
os_name: 'MacOS'
# test timeouts
- os: ubuntu-latest
os_timeout: 60
- os: macos-latest
os_timeout: 90
# codeowner groups
- project: e2e-angular
codeowners: 'S04SS457V38'
- project: e2e-cypress
codeowners: 'S04T16BTJJY'
- project: e2e-detox
codeowners: 'S04TNCNJG5N'
- project: e2e-esbuild
codeowners: 'S04SJ6HHP0X'
- project: e2e-expo
codeowners: 'S04TNCNJG5N'
- project: e2e-gradle
codeowners: 'S04TNCNJG5N'
- project: e2e-jest
codeowners: 'S04T16BTJJY'
- project: e2e-js
codeowners: 'S04SJ6HHP0X'
- project: e2e-lerna-smoke-tests
codeowners: 'S04TNCVEETS'
- project: e2e-eslint
codeowners: 'S04SYJGKSCT'
- project: e2e-next
codeowners: 'S04TNCNJG5N'
- project: e2e-node
codeowners: 'S04SJ6HHP0X'
- project: e2e-nx-init
codeowners: 'S04SYHYKGNP'
- project: e2e-nx
codeowners: 'S04SYHYKGNP'
- project: e2e-plugin
codeowners: 'S04SYHYKGNP'
- project: e2e-release
codeowners: 'S04SYHYKGNP'
- project: e2e-react
codeowners: 'S04TNCNJG5N'
- project: e2e-react-native
codeowners: 'S04TNCNJG5N'
- project: e2e-web
codeowners: 'S04SJ6PL98X'
- project: e2e-rollup
codeowners: 'S04SJ6PL98X'
- project: e2e-storybook
codeowners: 'S04SVQ8H0G5'
- project: e2e-playwright
codeowners: 'S04SVQ8H0G5'
- project: e2e-remix
codeowners: 'S04SVQ8H0G5'
- project: e2e-vite
codeowners: 'S04SJ6PL98X'
- project: e2e-vue
codeowners: 'S04SJ6PL98X'
- project: e2e-nuxt
codeowners: 'S04SJ6PL98X'
- project: e2e-webpack
codeowners: 'S04SJ6PL98X'
- project: e2e-workspace-create
codeowners: 'S04SYHYKGNP'
exclude:
# exclude react-native tests from ubuntu
- os: ubuntu-latest
project: e2e-react-native
- os: ubuntu-latest
project: e2e-detox
- os: ubuntu-latest
project: e2e-expo
# exclude non-CNW/Lerna tests from non-LTS node versions
- node_version: 18
project: e2e-angular
- node_version: 18
project: e2e-cypress
- node_version: 18
project: e2e-detox
- node_version: 18
project: e2e-esbuild
- node_version: 18
project: e2e-expo
- node_version: 18
project: e2e-gradle
- node_version: 18
project: e2e-jest
- node_version: 18
project: e2e-js
- node_version: 18
project: e2e-eslint
- node_version: 18
project: e2e-next
- node_version: 18
project: e2e-node
- node_version: 18
project: e2e-nuxt
- node_version: 18
project: e2e-nx-init
- node_version: 18
project: e2e-nx
- node_version: 18
project: e2e-plugin
- node_version: 18
project: e2e-playwright
- node_version: 18
project: e2e-react
- node_version: 18
project: e2e-react-native
- node_version: 18
project: e2e-web
- node_version: 18
project: e2e-remix
- node_version: 18
project: e2e-rollup
- node_version: 18
project: e2e-storybook
- node_version: 18
project: e2e-vite
- node_version: 18
project: e2e-vue
- node_version: 18
project: e2e-webpack
- node_version: 22
project: e2e-angular
- node_version: 22
project: e2e-cypress
- node_version: 22
project: e2e-detox
- node_version: 22
project: e2e-esbuild
- node_version: 22
project: e2e-expo
- node_version: 22
project: e2e-gradle
- node_version: 22
project: e2e-jest
- node_version: 22
project: e2e-js
- node_version: 22
project: e2e-eslint
- node_version: 22
project: e2e-next
- node_version: 22
project: e2e-node
- node_version: 22
project: e2e-nuxt
- node_version: 22
project: e2e-nx-init
- node_version: 22
project: e2e-nx
- node_version: 22
project: e2e-plugin
- node_version: 22
project: e2e-playwright
- node_version: 22
project: e2e-react
- node_version: 22
project: e2e-react-native
- node_version: 22
project: e2e-web
- node_version: 22
project: e2e-remix
- node_version: 22
project: e2e-rollup
- node_version: 22
project: e2e-storybook
- node_version: 22
project: e2e-vite
- node_version: 22
project: e2e-vue
- node_version: 22
project: e2e-webpack
# - node_version: 23
# project: e2e-angular
# - node_version: 23
# project: e2e-cypress
# - node_version: 23
# project: e2e-detox
# - node_version: 23
# project: e2e-esbuild
# - node_version: 23
# project: e2e-expo
# - node_version: 23
# project: e2e-gradle
# - node_version: 23
# project: e2e-jest
# - node_version: 23
# project: e2e-js
# - node_version: 23
# project: e2e-eslint
# - node_version: 23
# project: e2e-next
# - node_version: 23
# project: e2e-node
# - node_version: 23
# project: e2e-nuxt
# - node_version: 23
# project: e2e-nx-init
# - node_version: 23
# project: e2e-nx
# - node_version: 23
# project: e2e-plugin
# - node_version: 23
# project: e2e-playwright
# - node_version: 23
# project: e2e-react
# - node_version: 23
# project: e2e-react-native
# - node_version: 23
# project: e2e-web
# - node_version: 23
# project: e2e-remix
# - node_version: 23
# project: e2e-rollup
# - node_version: 23
# project: e2e-storybook
# - node_version: 23
# project: e2e-vite
# - node_version: 23
# project: e2e-vue
# - node_version: 23
# project: e2e-webpack
# run just npm v20 on macos
- os: macos-latest
package_manager: yarn
- os: macos-latest
package_manager: pnpm
- os: macos-latest
node_version: 18
- os: macos-latest
node_version: 22
# - os: macos-latest
# node_version: 23
fail-fast: false
name: ${{ matrix.os_name }}/${{ matrix.package_manager }}/${{ matrix.node_version }} ${{ join(matrix.project) }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Prepare dir for output
run: mkdir -p outputs
@@ -215,28 +470,30 @@ jobs:
- name: Set starting timestamp
id: before-e2e
shell: bash
run: |
echo "timestamp=$(date +%s)" >> $GITHUB_OUTPUT
- name: Run e2e tests
id: e2e-run
run: pnpm nx run ${{ matrix.project }}:e2e-local
shell: bash
run: pnpm nx run-many -t e2e-local -p ${{ matrix.project }}
timeout-minutes: ${{ matrix.os_timeout }}
env:
GIT_AUTHOR_EMAIL: test@test.com
GIT_AUTHOR_NAME: Test
GIT_COMMITTER_EMAIL: test@test.com
GIT_COMMITTER_NAME: Test
NX_E2E_CI_CACHE_KEY: e2e-gha-${{ matrix.os }}-${{ matrix.node_version }}-${{ matrix.package_manager }}
NX_DAEMON: 'true'
NX_PERF_LOGGING: 'false'
NX_E2E_VERBOSE_LOGGING: 'true'
NX_NATIVE_LOGGING: 'false'
NX_E2E_RUN_E2E: 'true'
NX_CLOUD_NO_TIMEOUTS: 'true'
NX_E2E_SKIP_CLEANUP: 'true'
NODE_OPTIONS: --max_old_space_size=8192
SELECTED_PM: ${{ matrix.package_manager }}
npm_config_registry: http://localhost:4872
YARN_REGISTRY: http://localhost:4872
NX_CACHE_DIRECTORY: 'tmp'
NX_E2E_SKIP_CLEANUP: 'true'
NX_E2E_RUN_E2E: 'true'
NX_E2E_VERBOSE_LOGGING: 'true'
NX_PERF_LOGGING: 'false'
NX_DAEMON: 'true'
NX_SKIP_LOG_GROUPING: 'true'
- name: Save matrix config in file
if: ${{ always() }}
@@ -249,23 +506,24 @@ jobs:
matrix=$((
echo '${{ toJSON(matrix) }}'
) | jq --argjson delta $delta -c '. + { "status": "${{ steps.e2e-run.outcome}}", "duration": $delta }')
echo "$matrix" > 'outputs/matrix.json'
echo "$matrix" > matrix
path=outputs/${{ matrix.os_name}}-${{ matrix.node_version}}-${{ matrix.package_manager}}-${{ matrix.project }}
echo "path=$path" >> $GITHUB_OUTPUT
echo "$matrix" > $path
- name: Upload matrix config
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: ${{ matrix.os_name}}-${{ matrix.node_version}}-${{ matrix.package_manager}}-${{ matrix.project }}
name: outputs
overwrite: true
if-no-files-found: 'ignore'
path: 'outputs/matrix.json'
path: ${{ steps.save-matrix.outputs.path }}
- name: Setup tmate session
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled && failure() }}
uses: mxschmitt/action-tmate@v3.8
timeout-minutes: 15
with:
sudo: ${{ matrix.os != 'windows-latest' }} # disable sudo for windows debugging
process-result:
if: ${{ always() && github.repository_owner == 'nrwl' }}
@@ -277,18 +535,16 @@ jobs:
pm-duration: ${{ steps.process-json.outputs.SLACK_PM_DURATION }}
codeowners: ${{ steps.process-json.outputs.CODEOWNERS }}
steps:
- name: Prepare dir for output
run: mkdir -p outputs
- name: Load outputs
uses: actions/download-artifact@v4
with:
name: outputs
path: outputs
- name: Join and stringify matrix configs
id: combine-json
run: |
combined=$((jq -s . outputs/*/matrix.json) | jq tostring)
combined=$((jq -s . outputs/*) | jq tostring)
echo "combined=$combined" >> $GITHUB_OUTPUT
- name: Make slack outputs
@@ -325,7 +581,6 @@ jobs:
});
result += `\`\`\``;
core.setOutput('SLACK_MESSAGE', trimSpace(result));
console.log(trimSpace(result));
function humanizeDuration(num) {
let res = '';
@@ -353,7 +608,7 @@ jobs:
};
const macosProjects = ['e2e-detox', 'e2e-expo', 'e2e-react-native'];
combined.forEach((matrix) => {
if (matrix.os_name === 'Linux' && matrix.node_version === 20) {
if (matrix.os_name === 'Linux' && matrix.node_version === 18) {
pmReport[matrix.package_manager] += matrix.duration;
}
if (matrix.os_name === 'Linux' || macosProjects.includes(matrix.project)) {
+471
View File
@@ -0,0 +1,471 @@
name: E2E matrix (Windows)
on:
schedule:
- cron: "0 5 * * *"
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
env:
CYPRESS_CACHE_FOLDER: ${{ github.workspace }}/.cypress
permissions: { }
jobs:
preinstall:
if: ${{ github.repository_owner == 'nrwl' }}
runs-on: windows-latest
strategy:
matrix:
node_version:
- 18
- 20
- 22
# - 23
name: Cache install (node v${{ matrix.node_version }})
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.8.0
run_install: false
- name: Set node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v4
with:
lookup-only: true
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install packages
if: steps.cache-modules.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v4
with:
lookup-only: true
path: '${{ github.workspace }}/.cypress'
key: windows-cypress
- name: Install Cypress
if: steps.cache-cypress.outputs.cache-hit != 'true'
run: pnpm cypress install
e2e:
if: ${{ github.repository_owner == 'nrwl' }}
needs: preinstall
permissions:
contents: read
runs-on: windows-latest
strategy:
matrix:
node_version:
- 18
- 20
- 22
# - 23
package_manager:
- npm
project:
- e2e-angular
- e2e-cypress
- e2e-esbuild
- e2e-eslint
- e2e-jest
- e2e-js
- e2e-lerna-smoke-tests
- e2e-next
- e2e-node
- e2e-nuxt
- e2e-nx-init
- e2e-nx
- e2e-playwright
- e2e-plugin
- e2e-react
- e2e-release
- e2e-remix
- e2e-rollup
- e2e-storybook
- e2e-vite
- e2e-vue
- e2e-web
- e2e-webpack
- e2e-workspace-create
include:
# codeowner groups
- project: e2e-angular
codeowners: 'S04SS457V38'
- project: e2e-cypress
codeowners: 'S04T16BTJJY'
- project: e2e-esbuild
codeowners: 'S04SJ6HHP0X'
- project: e2e-jest
codeowners: 'S04T16BTJJY'
- project: e2e-js
codeowners: 'S04SJ6HHP0X'
- project: e2e-lerna-smoke-tests
codeowners: 'S04TNCVEETS'
- project: e2e-eslint
codeowners: 'S04SYJGKSCT'
- project: e2e-next
codeowners: 'S04TNCNJG5N'
- project: e2e-node
codeowners: 'S04SJ6HHP0X'
- project: e2e-nx-init
codeowners: 'S04SYHYKGNP'
- project: e2e-nx
codeowners: 'S04SYHYKGNP'
- project: e2e-plugin
codeowners: 'S04SYHYKGNP'
- project: e2e-release
codeowners: 'S04SYHYKGNP'
- project: e2e-react
codeowners: 'S04TNCNJG5N'
- project: e2e-web
codeowners: 'S04SJ6PL98X'
- project: e2e-rollup
codeowners: 'S04SJ6PL98X'
- project: e2e-storybook
codeowners: 'S04SVQ8H0G5'
- project: e2e-playwright
codeowners: 'S04SVQ8H0G5'
- project: e2e-remix
codeowners: 'S04SVQ8H0G5'
- project: e2e-vite
codeowners: 'S04SJ6PL98X'
- project: e2e-vue
codeowners: 'S04SJ6PL98X'
- project: e2e-nuxt
codeowners: 'S04SJ6PL98X'
- project: e2e-webpack
codeowners: 'S04SJ6PL98X'
- project: e2e-workspace-create
codeowners: 'S04SYHYKGNP'
exclude:
# exclude non-CNW/Lerna tests from non-LTS node versions
- node_version: 18
project: e2e-angular
- node_version: 18
project: e2e-cypress
- node_version: 18
project: e2e-esbuild
- node_version: 18
project: e2e-jest
- node_version: 18
project: e2e-js
- node_version: 18
project: e2e-eslint
- node_version: 18
project: e2e-next
- node_version: 18
project: e2e-node
- node_version: 18
project: e2e-nuxt
- node_version: 18
project: e2e-nx-init
- node_version: 18
project: e2e-nx
- node_version: 18
project: e2e-plugin
- node_version: 18
project: e2e-playwright
- node_version: 18
project: e2e-react
- node_version: 18
project: e2e-web
- node_version: 18
project: e2e-remix
- node_version: 18
project: e2e-rollup
- node_version: 18
project: e2e-storybook
- node_version: 18
project: e2e-vite
- node_version: 18
project: e2e-vue
- node_version: 18
project: e2e-webpack
- node_version: 22
project: e2e-angular
- node_version: 22
project: e2e-cypress
- node_version: 22
project: e2e-esbuild
- node_version: 22
project: e2e-jest
- node_version: 22
project: e2e-js
- node_version: 22
project: e2e-eslint
- node_version: 22
project: e2e-next
- node_version: 22
project: e2e-node
- node_version: 22
project: e2e-nuxt
- node_version: 22
project: e2e-nx-init
- node_version: 22
project: e2e-nx
- node_version: 22
project: e2e-plugin
- node_version: 22
project: e2e-playwright
- node_version: 22
project: e2e-react
- node_version: 22
project: e2e-web
- node_version: 22
project: e2e-remix
- node_version: 22
project: e2e-rollup
- node_version: 22
project: e2e-storybook
- node_version: 22
project: e2e-vite
- node_version: 22
project: e2e-vue
- node_version: 22
project: e2e-webpack
# - node_version: 23
# project: e2e-angular
# - node_version: 23
# project: e2e-cypress
# - node_version: 23
# project: e2e-esbuild
# - node_version: 23
# project: e2e-jest
# - node_version: 23
# project: e2e-js
# - node_version: 23
# project: e2e-eslint
# - node_version: 23
# project: e2e-next
# - node_version: 23
# project: e2e-node
# - node_version: 23
# project: e2e-nuxt
# - node_version: 23
# project: e2e-nx-init
# - node_version: 23
# project: e2e-nx
# - node_version: 23
# project: e2e-plugin
# - node_version: 23
# project: e2e-playwright
# - node_version: 23
# project: e2e-react
# - node_version: 23
# project: e2e-web
# - node_version: 23
# project: e2e-remix
# - node_version: 23
# project: e2e-rollup
# - node_version: 23
# project: e2e-storybook
# - node_version: 23
# project: e2e-vite
# - node_version: 23
# project: e2e-vue
# - node_version: 23
# project: e2e-webpack
fail-fast: false
name: ${{ matrix.project }} (v${{ matrix.node_version }})
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare dir for output
run: mkdir -p outputs
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.8.0
run_install: false
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ github.run_id }}
- name: Install packages
run: pnpm install --frozen-lockfile
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v4
with:
path: '${{ github.workspace }}/.cypress'
key: ${{ runner.os }}-cypress
- name: Install Cypress
if: steps.cache-cypress.outputs.cache-hit != 'true'
run: npx cypress install
- name: Configure git metadata (needed for lerna smoke tests)
run: |
git config --global user.email test@test.com
git config --global user.name "Test Test"
- name: Run e2e tests
id: e2e-run
run: pnpm nx run ${{ matrix.project }}:e2e-local
shell: bash
timeout-minutes: 180
env:
GIT_AUTHOR_EMAIL: test@test.com
GIT_AUTHOR_NAME: Test
GIT_COMMITTER_EMAIL: test@test.com
GIT_COMMITTER_NAME: Test
NX_E2E_CI_CACHE_KEY: e2e-gha-windows-${{ matrix.node_version }}-${{ matrix.package_manager }}
NODE_OPTIONS: --max_old_space_size=8192
SELECTED_PM: ${{ matrix.package_manager }}
npm_config_registry: http://localhost:4872
NX_CACHE_DIRECTORY: 'tmp'
NX_E2E_SKIP_CLEANUP: 'true'
NX_E2E_RUN_E2E: 'true'
NX_E2E_VERBOSE_LOGGING: 'true'
NX_PERF_LOGGING: 'false'
NX_DAEMON: 'true'
NX_SKIP_LOG_GROUPING: 'true'
- name: Save matrix config in file
if: ${{ always() }}
id: save-matrix
shell: bash
run: |
matrix=$((
echo '${{ toJSON(matrix) }}'
) | jq -c '. + { "status": "${{ steps.e2e-run.outcome}}" }')
echo "$matrix" > matrix
path=outputs/windows-${{ matrix.node_version}}-${{ matrix.package_manager}}-${{ matrix.project }}
echo "path=$path" >> $GITHUB_OUTPUT
echo "$matrix" > $path
- name: Upload matrix config
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: outputs
overwrite: true
if-no-files-found: 'ignore'
path: ${{ steps.save-matrix.outputs.path }}
- name: Setup tmate session
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled && failure() }}
uses: mxschmitt/action-tmate@v3.8
timeout-minutes: 15
with:
sudo: false # disable sudo for windows debugging
process-result:
if: ${{ always() && github.repository_owner == 'nrwl' }}
runs-on: ubuntu-latest
needs: e2e
outputs:
message: ${{ steps.process-json.outputs.SLACK_MESSAGE }}
codeowners: ${{ steps.process-json.outputs.CODEOWNERS }}
steps:
- name: Load outputs
uses: actions/download-artifact@v4
with:
name: outputs
path: outputs
- name: Join and stringify matrix configs
id: combine-json
shell: bash
run: |
combined=$((jq -s . outputs/*) | jq tostring)
echo "combined=$combined" >> $GITHUB_OUTPUT
- name: Make slack outputs
id: process-json
uses: actions/github-script@v7
env:
GITHUB_TOKEN: ${{ github.token }}
with:
script: |
const combined = JSON.parse(${{ steps.combine-json.outputs.combined }});
const failedProjects = combined.filter(c => c.status === 'failure').sort((a, b) => a.project.localeCompare(b.project));
// codeowners
const codeowners = new Set();
failedProjects.forEach(c => {
codeowners.add(c.codeowners);
});
core.setOutput('CODEOWNERS', Array.from(codeowners).join(','));
// message
let result = `
*OS* Windows
*Package manager* npm
\`\`\`
| Failed project | Node |
|--------------------------------|------|`;
failedProjects.forEach(matrix => {
result += `\n| ${matrix.project.padEnd(30)} | v${matrix.node_version} |`
});
result += `\`\`\``;
const message = result.split('\n').map(l => l.trim()).join('\n');
core.setOutput('SLACK_MESSAGE', message);
report-failure:
if: ${{ failure() && github.repository_owner == 'nrwl' && github.event_name != 'workflow_dispatch' }}
needs: process-result
runs-on: ubuntu-latest
name: Report failure
steps:
- name: Send notification
uses: ravsamhq/notify-slack-action@v2
with:
status: 'failure'
message_format: '{emoji} Workflow has {status_message} ${{ needs.process-result.outputs.message }}'
notification_title: '{workflow}'
footer: '<{run_url}|View Run> / Last commit <{commit_url}|{commit_sha}>'
mention_groups: ${{ needs.process-result.outputs.codeowners }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
report-success:
if: ${{ success() && github.repository_owner == 'nrwl' && github.event_name != 'workflow_dispatch' }}
needs: e2e
runs-on: ubuntu-latest
name: Report success
steps:
- name: Send notification
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ needs.e2e.result }}
message_format: '{emoji} Workflow has {status_message}'
notification_title: '{workflow}'
footer: '<{run_url}|View Run> / Last commit <{commit_url}|{commit_sha}>'
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
+1 -1
View File
@@ -50,7 +50,7 @@ jobs:
- name: Collect Issue Data
id: collect
run: npx tsx ./scripts/issues-scraper/index.ts
run: npx ts-node ./scripts/issues-scraper/index.ts
env:
GITHUB_TOKEN: ${{ github.token }}
-117
View File
@@ -1,117 +0,0 @@
type MatrixDataProject = {
name: string,
codeowners: string,
};
type MatrixDataOS = {
os: string, // GH runner machine name: e.g. ubuntu-latest
os_name: string, // short name that will be printed in the report and on the action
os_timeout: number, // 60
package_managers: string[], // package managers to run on this OS
node_versions: number[], // node versions to run on this OS
excluded?: string[], // projects to exclude from running on this OS
};
type MatrixData = {
coreProjects: MatrixDataProject[],
projects: MatrixDataProject[],
nodeTLS: number,
setup: MatrixDataOS[],
}
// TODO: Extract Slack groups into named groups for easier maintenance
const matrixData: MatrixData = {
coreProjects: [
{ name: 'e2e-lerna-smoke-tests', codeowners: 'S04TNCVEETS' },
{ name: 'e2e-js', codeowners: 'S04SJ6HHP0X' },
{ name: 'e2e-nx-init', codeowners: 'S04SYHYKGNP' },
{ name: 'e2e-nx', codeowners: 'S04SYHYKGNP' },
{ name: 'e2e-release', codeowners: 'S04SYHYKGNP' },
{ name: 'e2e-workspace-create', codeowners: 'S04SYHYKGNP' }
],
projects: [
{ name: 'e2e-angular', codeowners: 'S04SS457V38' },
{ name: 'e2e-cypress', codeowners: 'S04T16BTJJY' },
{ name: 'e2e-detox', codeowners: 'S04TNCNJG5N' },
{ name: 'e2e-esbuild', codeowners: 'S04SJ6HHP0X' },
{ name: 'e2e-expo', codeowners: 'S04TNCNJG5N' },
{ name: 'e2e-gradle', codeowners: 'S04TNCNJG5N' },
{ name: 'e2e-jest', codeowners: 'S04T16BTJJY' },
{ name: 'e2e-eslint', codeowners: 'S04SYJGKSCT' },
{ name: 'e2e-next', codeowners: 'S04TNCNJG5N' },
{ name: 'e2e-node', codeowners: 'S04SJ6HHP0X' },
{ name: 'e2e-plugin', codeowners: 'S04SYHYKGNP' },
{ name: 'e2e-react', codeowners: 'S04TNCNJG5N' },
{ name: 'e2e-react-native', codeowners: 'S04TNCNJG5N' },
{ name: 'e2e-web', codeowners: 'S04SJ6PL98X' },
{ name: 'e2e-rollup', codeowners: 'S04SJ6PL98X' },
{ name: 'e2e-storybook', codeowners: 'S04SVQ8H0G5' },
{ name: 'e2e-playwright', codeowners: 'S04SVQ8H0G5' },
{ name: 'e2e-remix', codeowners: 'S04SVQ8H0G5' },
{ name: 'e2e-rspack', codeowners: 'S04SJ6HHP0X' },
{ name: 'e2e-vite', codeowners: 'S04SJ6PL98X' },
{ name: 'e2e-vue', codeowners: 'S04SJ6PL98X' },
{ name: 'e2e-nuxt', codeowners: 'S04SJ6PL98X' },
{ name: 'e2e-webpack', codeowners: 'S04SJ6PL98X' }
],
nodeTLS: 20,
setup: [
{ os: 'ubuntu-latest', os_name: 'Linux', os_timeout: 60, package_managers: ['npm', 'pnpm', 'yarn'], node_versions: [20, 22], excluded: ['e2e-detox', 'e2e-react-native', 'e2e-expo'] },
{ os: 'macos-latest', os_name: 'MacOS', os_timeout: 90, package_managers: ['npm'], node_versions: [20] },
{ os: 'windows-latest', os_name: 'WinOS', os_timeout: 180, package_managers: ['npm'], node_versions: [20], excluded: ['e2e-detox', 'e2e-react-native', 'e2e-expo'] }
]
};
const matrix: Array<{
project: string,
codeowners: string,
node_version: number,
package_manager: string,
os: string,
os_name: string,
os_timeout: number
}> = [];
function addMatrixCombo(project: MatrixDataProject, nodeVersion: number, pm: number, os: number) {
matrix.push({
project: project.name,
codeowners: project.codeowners,
node_version: nodeVersion,
package_manager: matrixData.setup[os].package_managers[pm],
os: matrixData.setup[os].os,
os_name: matrixData.setup[os].os_name,
os_timeout: matrixData.setup[os].os_timeout,
});
}
function processProject(project: MatrixDataProject, nodeVersion?: number) {
for (let os = 0; os < matrixData.setup.length; os++) {
for (let pm = 0; pm < matrixData.setup[os].package_managers.length; pm++) {
if (!matrixData.setup[os].excluded || !matrixData.setup[os].excluded?.includes(project.name)) {
if (nodeVersion) {
addMatrixCombo(project, nodeVersion, pm, os);
} else {
for (let n = 0; n < matrixData.setup[os].node_versions.length; n++) {
addMatrixCombo(project, matrixData.setup[os].node_versions[n], pm, os);
}
}
}
}
}
}
// process core projects
for (let p = 0; p < matrixData.coreProjects.length; p++) {
processProject(matrixData.coreProjects[p]);
}
// process other projects
for (let p = 0; p < matrixData.projects.length; p++) {
processProject(matrixData.projects[p], matrixData.nodeTLS);
}
if (matrix.length > 256) {
throw new Error('You have exceeded the size of the matrix. GitHub allows only 256 jobs in a matrix. Found ${matrix.length} jobs.');
}
// print result to stdout for pipeline to consume
process.stdout.write(JSON.stringify({ include: matrix }, null, 0));
+3
View File
@@ -294,12 +294,14 @@ jobs:
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
if: ${{ github.event_name != 'schedule' && !github.event.inputs.pr }}
with:
repository: ${{ needs.resolve-required-data.outputs.repo }}
ref: ${{ needs.resolve-required-data.outputs.ref }}
- name: Build
id: build
if: ${{ github.event_name != 'schedule' && !github.event.inputs.pr }}
uses: cross-platform-actions/action@v0.25.0
env:
DEBUG: napi:*
@@ -341,6 +343,7 @@ jobs:
echo "COMPLETE"
- name: Upload artifact
if: ${{ github.event_name != 'schedule' && !github.event.inputs.pr }}
uses: actions/upload-artifact@v4
with:
name: bindings-freebsd
-7
View File
@@ -2,7 +2,6 @@ node_modules
/.idea
/.fleet
/.vscode
/.cursor
dist
/build
/coverage
@@ -66,9 +65,3 @@ target
/wasi-sdk*
vite.config.*.timestamp*
storybook-static
# Ignore Gradle project-specific cache directory
.gradle
.kotlin
+4 -46
View File
@@ -19,20 +19,6 @@ launch-templates:
key: 'pnpm-lock.yaml'
paths: .pnpm-store
base-branch: 'master'
- name: Install zip and unzip
script: sudo apt-get -yqq install zip unzip
- name: Install bun
script: |
curl -fsSL https://bun.sh/install | bash
echo "BUN_INSTALL=$HOME/.bun" >> $NX_CLOUD_ENV
echo "PATH=$HOME/.bun/bin:$PATH" >> $NX_CLOUD_ENV
- name: Check bun
script: |
bun --version
- name: Install e2e deps
script: |
sudo apt-get update
@@ -64,18 +50,8 @@ launch-templates:
- name: Load Cargo Env
script: echo "PATH=$HOME/.cargo/bin:$PATH" >> $NX_CLOUD_ENV
- name: Setup Java 17
script: |
sudo apt update
sudo apt install -y openjdk-17-jdk
sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java
java -version
- name: Setup Gradle
script: |
./gradlew wrapper
./gradlew --version
- name: Install zip and unzip
script: sudo apt-get -yqq install zip unzip
linux-extra-large:
resource-class: 'docker_linux_amd64/extra_large'
image: 'ubuntu22.04-node20.11-v10'
@@ -96,20 +72,6 @@ launch-templates:
key: 'pnpm-lock.yaml'
paths: .pnpm-store
base-branch: 'master'
- name: Install zip and unzip
script: sudo apt-get -yqq install zip unzip
- name: Install bun
script: |
curl -fsSL https://bun.sh/install | bash
echo "BUN_INSTALL=$HOME/.bun" >> $NX_CLOUD_ENV
echo "PATH=$HOME/.bun/bin:$PATH" >> $NX_CLOUD_ENV
- name: Check bun
script: |
bun --version
- name: Install e2e deps
script: |
sudo apt-get update
@@ -141,9 +103,5 @@ launch-templates:
- name: Load Cargo Env
script: echo "PATH=$HOME/.cargo/bin:$PATH" >> $NX_CLOUD_ENV
- name: Setup Java 21
script: |
sudo apt update
sudo apt install -y openjdk-21-jdk
sudo update-alternatives --set java /usr/lib/jvm/java-21-openjdk-amd64/bin/java
java -version
- name: Install zip and unzip
script: sudo apt-get -yqq install zip unzip
+7 -29
View File
@@ -1,32 +1,10 @@
distribute-on:
default: auto linux-medium, 1 linux-extra-large
assignment-rules:
- targets:
- e2e-ci**
run-on:
- agent: linux-medium
parallelism: 1
- agent: linux-extra-large
parallelism: 1
- projects:
- nx-dev
targets:
- build*
run-on:
- agent: linux-extra-large
parallelism: 1
- targets:
- lint
run-on:
- agent: linux-medium
parallelism: 6
- targets:
- '*'
run-on:
- agent: linux-medium
parallelism: 3
- agent: linux-extra-large
parallelism: 3
- project: nx-dev
target: build-base
runs-on:
- linux-extra-large
- target: test
runs-on:
- linux-medium
-1
View File
@@ -2,4 +2,3 @@ nx-dev/**/jest.config.js
.next
_files
_solution
nx-dev/tutorial/**/templates
-2
View File
@@ -13,7 +13,6 @@ packages/express/src/schematics/**/files/**/*.json
packages/nest/src/schematics/**/files/**/*.json
packages/react/src/schematics/**/files/**/*.json
packages/jest/src/schematics/**/files/**/*.json
packages/gradle/project-graph/build/**/*.*
packages/nx/src/plugins/js/lock-file/__fixtures__/**/*.*
packages/**/schematics/**/files/**/*.html
packages/**/generators/**/files/**/*.html
@@ -48,6 +47,5 @@ CODEOWNERS
.pnpm-store
/.nx/workspace-data
/.nx/workflows/dynamic-changesets.yaml
_files
_solution
+2 -2
View File
@@ -145,8 +145,8 @@ rust-toolchain @nrwl/nx-native-reviewers
/packages/devkit/public-api.ts @FrozenPandaz @vsavkin
# Gradle
/packages/gradle/** @FrozenPandaz @MaxKless @xiongemi
/e2e/gradle/** @FrozenPandaz @MaxKless @xiongemi
/packages/gradle/** @FrozenPandaz @xiongemi
/e2e/gradle/** @FrozenPandaz @xiongemi
# Nx-Plugin
/docs/generated/packages/plugin/** @nrwl/nx-devkit-reviewers @nrwl/nx-docs-reviewers
Generated
+102 -1713
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -21,7 +21,7 @@
# Smart Monorepos · Fast CI
Build system, optimized for monorepos, with AI-powered architectural awareness and advanced CI capabilities.
Nx is a build system, optimized for monorepos, with plugins for popular frameworks and tools and advanced CI capabilities including caching and distribution.
Create a new Nx workspace with
-6
View File
@@ -1,6 +0,0 @@
plugins {
id("dev.nx.gradle.project-graph") version("0.1.0")
id("com.ncorti.ktfmt.gradle") version("+")
}
group = "dev.nx"
-5
View File
@@ -513,10 +513,5 @@
"name": "nx-foundry",
"description": "Foundry generators and inferred tasks for Nx",
"url": "https://github.com/juliangsibecas/nx-foundry"
},
{
"name": "@aws/nx-plugin",
"description": "Nx Plugin for AWS: Accelerate building cloud-native applications with AWS",
"url": "https://github.com/awslabs/nx-plugin-for-aws"
}
]
-8
View File
@@ -299,14 +299,6 @@ Have a more decent button-like widget that you can place below sections of a tut
{% video-link link="https://youtu.be/OQ-Zc5tcxJE?t=64" /%}
```
#### Course video embed
This is for embedding a video just like with the Youtube component, but in addition to have a link to a Nx Course (nx.dev/courses) video to improve the discoverability of these courses.
```markdown
{% course-video src="https://youtu.be/3hW53b1IJ84" courseTitle="From PNPM Workspaces to Distributed CI" courseUrl="/courses/pnpm-nx-next/lessons-01-nx-init" title="Initialize Nx in Your Project with nx init" /%}
```
#### Project Details View
Embed a Project Details View that is identical what is shown in Nx Console or `nx show project myproject --web`
@@ -19,7 +19,9 @@ While speed is of major importance, developer ergonomics shouldn't be left behin
## Update (Aug 2023): Want a non-monorepo setup?
This article walks you through how to setup a new Nx monorepo workspace with React. If you rather prefer starting with a single-project setup (also named "standalone") then you might want to have a look at the standalone tutorial (including video).
This article walks you through how to setup a new Nx monorepo workspace with React. If you rather prefer starting with a single-project setup (also named "standalone") then you might want to have a look at this tutorial (including video):
[/getting-started/tutorials/react-standalone-tutorial](/getting-started/tutorials/react-standalone-tutorial)
## Why use a devtool CLI?
@@ -197,14 +197,14 @@ This can be a game-changer when building huge apps. Stay tuned for more content
We recommend this approach if you want to speed up local serve and build times, but you still deploy the application as a whole.
Read more in our docs: [/concepts/module-federation/faster-builds-with-module-federation](/concepts/module-federation/faster-builds-with-module-federation)
Read more on our docs: [/concepts/module-federation/faster-builds-with-module-federation](/concepts/module-federation/faster-builds-with-module-federation)
## Micro Frontend Architecture with Nx
As mentioned in the previous section, Nx v14 comes with out-of-the-box for Webpack Module Federation. The Micro Frontend architecture builds on top of that and adds the ability for independent deployability. While Module Federation enables faster builds by vertically slicing your application into smaller ones, the MFE architecture layers _independent deployments_
on top of federation. Teams should only choose MFEs if they want to deploy their host and remotes on different cadences.
Read more in our docs: [/concepts/module-federation/micro-frontend-architecture](/concepts/module-federation/micro-frontend-architecture)
Read more on our docs: [/concepts/module-federation/micro-frontend-architecture](/concepts/module-federation/micro-frontend-architecture)
## Dark mode for Project Graph as well as path tracking
@@ -242,7 +242,7 @@ In version 13.4 we released a brand new dedicated package for developing pure Ja
We kept improving it, adding SWC support (including an easy migration between TSC → SWC using an Nx generator) and we're currently looking into automated publishing support.
Read all the details in our docs: [/getting-started/intro](/getting-started/intro)
Read all the details on our docs: [/getting-started/intro](/getting-started/intro)
## React
@@ -9,15 +9,6 @@ description: Learn to set up a monorepo with PNPM workspaces for Remix and React
In this article we're going to have a deep dive into setting up a new monorepo using [PNPM workspaces](https://pnpm.io/workspaces) that hosts a Remix application as well as a React-based library. We will learn how to run commands with PNPM, how to run them in parallel and finally we're going to add Nx for a more sophisticated task scheduling, including command caching and more.
{% callout type="warning" title="Updated video!" %}
We made a lot of improvements since we last wrote this article. Here's our **updated content**:
- [the full all-in-one video on Youtube](https://youtu.be/zX-1tpqUG5c)
- [our free course: From PNPM Workspaces to Distributed CI](/courses/pnpm-nx-next)
{% /callout %}
**Important:** If you are already familiar with the setup and configuration of a new PNPM workspace, feel free to skip to the part where we add Nx later in the article.
**Prefer a video walkthrough?**
@@ -753,5 +744,5 @@ You can find an example of such setup on the **Nx Recipe GitHub repository**:
- 🧠 [Nx Docs](/getting-started/intro)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nrwl Youtube Channel](https://www.youtube.com/@nxdevtools)
- 📹 [Nrwl Youtube Channel](https://www.youtube.com/nrwl_io)
- 🥚 [Free Egghead course](https://egghead.io/courses/scale-react-development-with-nx-4038)
@@ -300,5 +300,5 @@ npx nx migrate --run-migrations
- 🧠 [Nx Docs](/getting-started/intro)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nrwl Youtube Channel](https://www.youtube.com/@nxdevtools)
- 📹 [Nrwl Youtube Channel](https://www.youtube.com/nrwl_io)
- 🥚 [Free Egghead course](https://egghead.io/courses/scale-react-development-with-nx-4038)
@@ -94,5 +94,5 @@ How to enable it? [Read more on the Lerna docs](https://lerna.js.org/docs/featur
- 🧠 [Nx Docs](/getting-started/intro)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nrwl Youtube Channel](https://www.youtube.com/@nxdevtools)
- 📹 [Nrwl Youtube Channel](https://www.youtube.com/nrwl_io)
- 🥚 [Free Egghead course](https://egghead.io/courses/scale-react-development-with-nx-4038)
+2 -1
View File
@@ -181,6 +181,7 @@ It is an ongoing process, and we have a lot of content to cover! We follow the [
Besides the two new [package-based](/getting-started/tutorials/typescript-packages-tutorial) and [integrated style tutorials](/getting-started/tutorials/react-monorepo-tutorial) we also have two brand new reworked tutorials
- [/getting-started/tutorials/react-standalone-tutorial](/getting-started/tutorials/react-standalone-tutorial)
- [/getting-started/tutorials](/getting-started/tutorials)
Stay tuned for more updates to come.
@@ -256,5 +257,5 @@ npx nx migrate --run-migrations
- 🧠 [Nx Docs](/getting-started/intro)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nrwl Youtube Channel](https://www.youtube.com/@nxdevtools)
- 📹 [Nrwl Youtube Channel](https://www.youtube.com/nrwl_io)
- 🥚 [Free Egghead course](https://egghead.io/courses/scale-react-development-with-nx-4038)
@@ -200,7 +200,7 @@ npx nx g @nrwl/vite:configuration
This will adjust the NxExt Vite plugin configuration to match the one provided by our core team. Check out our docs for more info: [/nx-api/vite/generators/configuration](/nx-api/vite/generators/configuration)
You can also find all the details about the new Vite package in our docs: [/nx-api/vite](/nx-api/vite)
You can also find all the details about the new Vite package on our docs: [/nx-api/vite](/nx-api/vite)
## Adopting Nx has never been easier
@@ -271,7 +271,7 @@ This process will ask you a few questions about which operations are cacheable.
}
```
Read more in our docs: [/recipes/adopting-nx/adding-to-existing-project](/recipes/adopting-nx/adding-to-existing-project)
Read more on our docs: [/recipes/adopting-nx/adding-to-existing-project](/recipes/adopting-nx/adding-to-existing-project)
## Root-level Scripts
@@ -312,7 +312,7 @@ npx nx docs
As the next steps you might obviously want to add `docs` to the [cacheable operations](/ci/reference/config) and [fine-tune it's cache inputs](/recipes/running-tasks/configure-inputs).
Read more about it in our docs: [/recipes/running-tasks/root-level-scripts](/recipes/running-tasks/root-level-scripts)
Read more about it on our docs: [/recipes/running-tasks/root-level-scripts](/recipes/running-tasks/root-level-scripts)
## Simplified Nx run-commands
@@ -386,7 +386,7 @@ For simple commands this was a huge overhead, so we simplified it to just this:
Simple, isn't it! Obviously the expanded form is still there and also useful for when you need more options, run multiple commands or features such as argument forwarding.
You can read all about it in our docs: [/recipes/running-tasks/run-commands-executor](/recipes/running-tasks/run-commands-executor)
You can read all about it on our docs: [/recipes/running-tasks/run-commands-executor](/recipes/running-tasks/run-commands-executor)
## Coming up
@@ -39,7 +39,7 @@ And so did also [Fireship](https://youtu.be/2OTq15A5s0Y) and ultimately [Dan Abr
Code generators speed up such configuration tasks. They are valuable for scaffolding the initial project structure and adding new features to the app setup, such as Tailwind.
Nx has such generators. To use them, you need an Nx-based React setup. If you're starting new, you can create an Nx Standalone React project easily using the following command
Nx has such generators. To use them, you need an Nx-based React setup. If you're starting new, you can create an [Nx Standalone React project](/getting-started/tutorials/react-standalone-tutorial) easily using the following command
```shell
$ npx create-nx-workspace reactapp --preset=react-standalone
@@ -59,7 +59,7 @@ You can pass `--vite=false` if you still want to keep the Webpack configuration
## Generating a Tailwind Setup
Once you have a [Nx-based React](/getting-started/tutorials/react-monorepo-tutorial) setup, adding Tailwind is as easy as running:
Once you have a [Nx-based React](/getting-started/tutorials/react-standalone-tutorial) setup, adding Tailwind is as easy as running:
```shell
$ npx nx g @nrwl/react:setup-tailwind
@@ -79,6 +79,7 @@ You'll get
You should be all setup and ready now! Here are some related resources to explore:
- [Nx docs: React Standalone tutorial](/getting-started/tutorials/react-standalone-tutorial)
- [Nx docs: React Monorepo tutorial](/getting-started/tutorials/react-monorepo-tutorial)
- [Youtube: Is CRA Dead](https://youtu.be/fkTz6KJxhhE)
- [Nx docs: Migrate CRA to React and Vite](/recipes/adopting-nx/adding-to-existing-project)
@@ -151,7 +151,7 @@ Inspired by our new [Vite setup](/nx-api/vite), which allows for a more modular
![](/blog/images/2023-02-16/emRP2gF7umWc4UE-.avif)
If you want to upgrade but still retain the previous behavior, we introduced an `isolatedConfig` mode that can be set to `false`. More details in our docs: [/recipes/webpack/webpack-config-setup](/recipes/webpack/webpack-config-setup)
If you want to upgrade but still retain the previous behavior, we introduced an `isolatedConfig` mode that can be set to `false`. More details on our docs: [/recipes/webpack/webpack-config-setup](/recipes/webpack/webpack-config-setup)
## How to Update Nx
@@ -185,5 +185,5 @@ So keep an eye on our [Twitter](https://twitter.com/nxdevtools), [Youtube](https
- 🧠 [Nx Docs](/getting-started/intro)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nrwl Youtube Channel](https://www.youtube.com/@nxdevtools)
- 📹 [Nrwl Youtube Channel](https://www.youtube.com/nrwl_io)
- 🥚 [Free Egghead course](https://egghead.io/courses/scale-react-development-with-nx-4038)
@@ -124,4 +124,4 @@ You can find [a roadmap for all the features we plan to add in Lerna 7](https://
- [🧠 Lerna Docs](https://lerna.js.org/)
- [👩‍💻 Lerna GitHub](https://github.com/lerna/lerna)
- [💬 Nx Official Discord Server](https://go.nx.dev/community)
- [📹 Nrwl Youtube Channel](https://www.youtube.com/@nxdevtools)
- [📹 Nrwl Youtube Channel](https://www.youtube.com/nrwl_io)
@@ -636,7 +636,7 @@ This should give you a good insight into how to get started. But there's more to
- We could also include "[executors](/extending-nx/recipes/local-executors)", which are wrappers around tasks to abstract the lower-level details of it
- etc.
Now clearly this was a simple example of how you could build your own CRA using Nx. If you want to see a real-world React setup powered by Nx, check out our React Tutorial: [/getting-started/tutorials/react-monorepo-tutorial](/getting-started/tutorials/react-monorepo-tutorial)
Now clearly this was a simple example of how you could build your own CRA using Nx. If you want to see a real-world React setup powered by Nx, check out our React Tutorial: [/getting-started/tutorials/react-standalone-tutorial](/getting-started/tutorials/react-standalone-tutorial)
## Learn more
+1 -1
View File
@@ -306,7 +306,7 @@ We've also added the ability to sort the registry by these metrics as a way of s
![](/blog/images/2023-09-06/f0AhdlWaIcC96LXK.avif)
Go [check it out now](/plugin-registry) live in our docs site!
Go [check it out now](/plugin-registry) live on our docs site!
## DOCS ENHANCEMENT: Redesigned Intro & Examples
+3 -1
View File
@@ -54,6 +54,8 @@ And you'll have access to Nx generators so that you can generate Vue application
We're very excited for this support to land, and we're eager to get it into our user's hands and see what Nx can do to help Vue developers so we can continue to refine our support and make Vue with Nx an excellent developer experience.
If you're eager to learn more, make sure to check out our new [Vue standalone tutorial](/getting-started/tutorials/vue-standalone-tutorial).
## Enhancements to Module Federation Support
Nx already had great support for Module Federation — Nx 17 improves on this support:
@@ -234,7 +236,7 @@ For more [checkout our API docs](/nx-api/nx/documents/release), and be sure to c
At Nx, we're OBSESSED with building a better, more robust experience for our developers. Towards this end, we're now in [v2 of our Project Inference API](/extending-nx/recipes/project-graph-plugins).
This API is a way of extending the Nx project graph, which can be particularly helpful for extending Nx to support other languages, allowing Nx to determine where to find and draw boundaries around projects in your workspace. A great example is our very own [Vue plugin](/nx-api/vue).
This API is a way of extending the Nx project graph, which can be particularly helpful for extending Nx to support other languages, allowing Nx to determine where to find and draw boundaries around projects in your workspace. A great example is our very own [Vue plugin](/getting-started/tutorials/vue-standalone-tutorial).
Interestingly, v2 includes support for dynamic targets as well. This opens up exciting new doors to reducing configuration, and we hope to expand on this to better support our first-party plugins in the near future.
+1 -1
View File
@@ -35,7 +35,7 @@ In a nutshell, the Nx Docs AI Assistant works in the following way:
This is based on the Web Q&A Tutorial from OpenAI [(https://platform.openai.com/docs/tutorials/web-qa-embeddings)](https://platform.openai.com/docs/tutorials/web-qa-embeddings) and Supabases Vector Search example [(https://supabase.com/docs/guides/ai/examples/nextjs-vector-search)](https://supabase.com/docs/guides/ai/examples/nextjs-vector-search).
Its important to note here that we are not “training the model in our docs”. The model is pretrained. We are just giving the model parts of our docs which are relevant to the users question, and the model creates a coherent answer to the question. Its basically like pasting in ChatGPT a docs page and asking it “how do I do that?”. Except in this case, were first searching our documentation and giving GPT only the relevant parts (more about how we do that later in this article), which it can “read” and extract information from.
Its important to note here that we are not “training the model on our docs”. The model is pretrained. We are just giving the model parts of our docs which are relevant to the users question, and the model creates a coherent answer to the question. Its basically like pasting in ChatGPT a docs page and asking it “how do I do that?”. Except in this case, were first searching our documentation and giving GPT only the relevant parts (more about how we do that later in this article), which it can “read” and extract information from.
## Step 1: Preprocessing our docs
+2 -2
View File
@@ -220,7 +220,7 @@ And you'll then have access to Nx generators so you can create Vue applications,
![](/blog/images/2023-12-28/bodyimg6.gif)
Checkout out our [Vue API docs](/nx-api/vue), and stay tuned as Nx prepares to offer more Vue support (including support for [Nuxt](https://nuxt.com/), a full-stack framework built around Vue) in the near future!
Checkout out our [Vue standalone tutorial](/getting-started/tutorials/vue-standalone-tutorial) for more, as well as our [Vue API docs](/nx-api/vue), and stay tuned as Nx prepares to offer more Vue support (including support for [Nuxt](https://nuxt.com/), a full-stack framework built around Vue) in the near future!
### Extending Nx: Local Generators, Build your Own CLI, Verdaccio Support
@@ -328,7 +328,7 @@ You can also browse them in the [nx-recipes](https://github.com/nrwl/nx-recipes)
{% tweet url="https://twitter.com/juristr/status/1736023402933318011" /%}
And obviously, we jumped on the AI train as well. A couple of months ago, we added the [Nx Assistant](/ai-chat). A ChatGPT-powered interface trained in our docs. [Katerina](https://twitter.com/psybercity) wrote about it [on our blog](/blog/nx-docs-ai-assistant). The AI chat allows to interactively ask questions about Nx and will give you relevant answers from our docs (including linking to the sources).
And obviously, we jumped on the AI train as well. A couple of months ago, we added the [Nx Assistant](/ai-chat). A ChatGPT-powered interface trained on our docs. [Katerina](https://twitter.com/psybercity) wrote about it [on our blog](/blog/nx-docs-ai-assistant). The AI chat allows to interactively ask questions about Nx and will give you relevant answers from our docs (including linking to the sources).
## New Tagline: Smart Monorepos — Fast CI
@@ -1,17 +0,0 @@
---
title: 'Monorepos: the Benefits, Challenges, and Importance of Tooling Support '
description: 'Learn how monorepos and better tooling can help you overcome challenges in software development like scalability, maintenance, communication, and cost.'
date: 2024-01-24
slug: 'monorepos-the-benefits-challenges-and-importance-of-tooling-support'
authors: ['Juri Strumpflohner']
tags: [webinar]
cover_image: /blog/images/2024-01-24/january-webinar-card.png
status: Past - Gated
registrationUrl: https://go.nx.dev/january-webinar
---
Presented by Juri Strumpflohner
Learn how monorepos and better tooling can help you overcome challenges in software development like scalability, maintenance, communication, and cost.
{% call-to-action title="Download the recording" url="https://go.nx.dev/january-webinar" description="Sign up to gain access" /%}
@@ -21,7 +21,9 @@ As you can see `@tuskdesign/forms` relies on `@tuskdesign/buttons` and as such h
---
{% link-card title="Free Course: Versioning and Releasing NPM packages with Nx" type="external" url="https://www.epicweb.dev/tutorials/versioning-and-releasing-npm-packages-with-nx" icon="/documentation/shared/images/nx-release-course-logo.webp" /%}
**Prefer a video?**
{% youtube src="https://www.youtube.com/embed/KjZKFGu3_9I?si=L-8oRzy-hV-WF_pS" title="Versioning and Releasing Packages in a Monorepo" /%}
---
@@ -1,17 +0,0 @@
---
title: 'Nx Agents Walkthrough: Effortlessly Fast CI Built for Monorepos'
description: 'Learn how you can streamline your existing CI config to its absolute simplest form, reducing CI times from 30 minutes to ~5 minutes with Nx Agents. '
date: 2024-03-11
slug: 'nx-agents-walkthrough-effortlessly-fast-ci-built-for-monorepos'
authors: ['Rareș Matei']
tags: [webinar]
cover_image: /blog/images/2024-03-11/march-webinar.png
status: Past - Gated
registrationUrl: https://go.nx.dev/march-webinar
---
Presented by Rareș Matei
Learn how you can streamline your existing CI config to its absolute simplest form, reducing CI times from 30 minutes to ~5 minutes with Nx Agents.
{% call-to-action title="Download the recording" url="https://go.nx.dev/march-webinar" description="Sign up to gain access" /%}
+1
View File
@@ -4,6 +4,7 @@ slug: 'reliable-ci-a-new-execution-model-fixing-both-flakiness-and-slowness'
authors: [Victor Savkin]
cover_image: '/blog/images/2024-03-21/featured_img.png'
tags: [nx, nx-cloud, releases]
pinned: true
description: 'Learn how Nx Cloud revolutionizes CI with a task-based execution model that solves both flaky tests and slow pipelines.'
---
@@ -1,17 +0,0 @@
---
title: 'Making the Argument for Monorepos'
description: 'Trying to convince your colleagues to use a monorepo? Already using a monorepo and need to justify that decision? Check out this webinar to learn 7 essential reasons for using monorepos and bust a few myths and misconceptions along the way.'
date: 2024-04-17
slug: 'making-the-argument-for-monorepos'
authors: ['Miroslav Jonaš']
tags: [webinar]
cover_image: /blog/images/2024-04-17/april-webinar.png
status: Past - Gated
registrationUrl: https://go.nx.dev/april-webinar
---
Presented by Miroslav Jonaš
Trying to convince your colleagues to use a monorepo? Already using a monorepo and need to justify that decision? Check out this webinar to learn 7 essential reasons for using monorepos and bust a few myths and misconceptions along the way.
{% call-to-action title="Download the recording" url="https://go.nx.dev/april-webinar" description="Sign up to gain access" /%}
@@ -1,19 +0,0 @@
---
title: "Monorepos and CI can be a Mess - Here's How Nx and Nx Cloud Fixed It"
description: "Continuous Integration (CI) in monorepos can be notoriously slow and unreliable, quickly become a bottleneck for scaling monorepos.
Learn how Nx and Nx Cloud's new task-based approach ensures fast, resilient, and efficient CI for your monorepo projects."
date: 2024-06-26
slug: 'monorepos-and-ci-can-be-a-mess-heres-how-nx-and-nx-cloud-fixed-it'
authors: ['Juri Strumpflohner']
tags: [webinar]
cover_image: /blog/images/2024-06-26/June-Webinar-card.png
status: Past - Gated
registrationUrl: https://go.nx.dev/june-webinar
---
Presented by Juri Strumpflohner
Continuous Integration (CI) in monorepos can be notoriously slow and unreliable, quickly become a bottleneck for scaling monorepos.
Learn how Nx and Nx Cloud's new task-based approach ensures fast, resilient, and efficient CI for your monorepo projects.
{% call-to-action title="Download the recording" url="https://go.nx.dev/june-webinar" description="Sign up to gain access" /%}
+6 -11
View File
@@ -7,11 +7,11 @@ cover_image: /blog/images/evolving-nx/thumbnail.png
description: Nx's journey from a side project to a tool for millions, including Nx Cloud and Nx Powerpack developments.
---
{% callout type="info" title="Update - March 31st, 2025" %}
_Update from Jeff Cross, October 17, 2024_
Self-hosted caching is now free for everyone. Read more [in our blog post](/blog/custom-runners-and-self-hosted-caching) and in our documentation about [remote caching options with Nx](/remote-cache).
In my original version of this post, I said that Powerpack is completely new functionality. I mistakenly thought that all custom remote cache solutions were using private/unsupported APIs, but I've since learned that we've had docs and some APIs that helped people build their own remote caches. I'm sorry for the error, and have updated the text to indicate that Powerpack is mostly new functionality. We've also updated the [Powerpack page](/powerpack) to make it more explicit how some teams can get free Powerpack licenses.
{% /callout %}
---
Over the years, Nx has grown from a small 20% side project of our consulting business into a tool that empowers millions of developers worldwide and helps Fortune 500 companies ship high-quality software faster. In the last two years, we successfully transformed our consulting business into a product company, where our team can fully focus on evolving Nx and building Nx Cloud to extend Nx's capabilities beyond local development.
@@ -24,13 +24,11 @@ When we have new ideas to make Nx better, we've always had two options: it could
## Introducing Nx Powerpack
**[Nx Powerpack](/powerpack)** — our newest product designed to elevate the Nx CLI experience for enterprise environments. Powerpack offers advanced features like ~~self-hosted remote cache storage,~~ code ownership for monorepos, and workspace conformance, seamlessly integrating into sealed systems with strict security requirements. It's also designed for ease of implementation, helping enterprises bypass lengthy procurement processes and quickly access the tools they need.
**[Nx Powerpack](/powerpack)** — our newest product designed to elevate the Nx CLI experience for enterprise environments. Powerpack offers advanced features like self-hosted remote cache storage, code ownership for monorepos, and workspace conformance, seamlessly integrating into sealed systems with strict security requirements. It's also designed for ease of implementation, helping enterprises bypass lengthy procurement processes and quickly access the tools they need.
> If you want to get into the technical details, we wrote a separate blog post diving deeper into the technical details: [Introducing Nx Powerpack](/blog/introducing-nx-powerpack).
Powerpack is mostly new functionality. ~~However, this change coincides with some Nx improvements that will eventually interfere with users who were relying on our original filesystem-based implementation of local caching. We've completely rewritten Nx's local caching to be faster and more secure, partly by using a local database instead of checking the filesystem for artifact metadata. With this rewrite, any custom remote caches that rely on metadata reflected in the filesystem will not work as of Nx 21. This is why we decided to build an API into Powerpack to be able to connect Nx's cache to different clouds and data sources. Now with Powerpack, teams can use an officially-supported implementation of remote caching, without needing to use Nx Cloud.~~
_Edit: Self-hosted caching with Nx is now completely free for everyone. Read more in [our latest announcement.](/blog/custom-runners-and-self-hosted-caching)_
Powerpack is mostly new functionality. However, this change coincides with some Nx improvements that will eventually interfere with users who were relying on our original filesystem-based implementation of local caching. We've completely rewritten Nx's local caching to be faster and more secure, partly by using a local database instead of checking the filesystem for artifact metadata. With this rewrite, any custom remote caches that rely on metadata reflected in the filesystem will not work as of Nx 21. This is why we decided to build an API into Powerpack to be able to connect Nx's cache to different clouds and data sources. Now with Powerpack, teams can use an officially-supported implementation of remote caching, without needing to use Nx Cloud.
There's a Steve Jobs quote that I think rings true with all of us at Nx:
@@ -44,10 +42,7 @@ Like many open source projects, one of the bigger challenges to sustainability i
### What about my open-source repo ?
Open Source projects can:
- Get all Powerpack features as well as fully managed remote caching (and more) via the free Nx Cloud OSS plan. [Learn more here](/nx-enterprise/powerpack/licenses-and-trials#powerpack-for-oss-projects).
- Get self-hosted remote caches via the according Nx plugins. [Learn more in the docs](/recipes/running-tasks/self-hosted-caching).
Open source projects can continue to use Nx Cloud for **free** the same way they always have, and they can continue to use Nx with all its features. If you are an open-source maintainer and you want to use Powerpack, you will get a **free license**. Just reach out to us at [powerpack-support@nrwl.io](mailto:powerpack-support@nrwl.io).
## How to Get Nx Powerpack
@@ -4,22 +4,17 @@ slug: introducing-nx-powerpack
authors: [Juri Strumpflohner]
tags: [nx, release]
cover_image: /blog/images/introducing-powerpack/thumbnail.png
youtubeUrl: https://youtu.be/KZ0nh2lj8zE
description: Introducing Nx Powerpack, a paid extension suite for enterprise use cases, ensuring Nx remains open source and existing features are free.
---
{% callout type="info" title="Update - March 31st, 2025" %}
Self-hosted caching is now free for everyone. Read more [in our blog post](/blog/custom-runners-and-self-hosted-caching) and in our documentation about [remote caching options with Nx](/remote-cache).
{% /callout %}
Today we're introducing our latest product, **Nx Powerpack**, a suite of paid extensions for Nx, specifically designed around common enterprise needs. Now, before anyone draws the wrong conclusions:
- No, we're **not going to restrict Nx's license**, lock you in, and then harvest. Nx remains MIT licensed and fully open source.
- No, we're **not placing existing features behind a paywall**. Nx Powerpack introduces new features on top of Nx (more about that below).
- Yes, we still **strongly believe in OSS and our community**, and we will keep improving Nx more than ever; if anything, Powerpack will help us fund our OSS work on Nx core and ensure its long-term sustainability.
### What about my open-source repo?
### What about my open-source repo ?
Open source projects can continue to use Nx Cloud for **free** the same way they always have, and they can continue to use Nx with all its features. If you are an open-source maintainer and you want to use Powerpack, you will get a **free license**. Just reach out to us at [powerpack-support@nrwl.io](mailto:powerpack-support@nrwl.io).
@@ -28,9 +23,10 @@ So this leaves us with:
> But why are we releasing Nx Powerpack under a commercial license? Read all about our strategy, the reasoning behind Powerpack and OSS funding in the **blog post from our CEO, Jeff Cross**: [Evolving Nx](/blog/evolving-nx).
But now to the fun, technical part! Nx Powerpack is a bundle that - in this very first release - comes with these major features:
But now to the fun, technical part! Nx Powerpack is a bundle that - in this very first release - comes with three major features:
- [Codeowners for monorepos](#codeowners-for-monorepos)
- [Self-hosted cache storage](#selfhosted-cache-storage)
- [Workspace conformance (beta)](#workspace-conformance-beta)
Let's dive in!
@@ -42,7 +38,7 @@ All Powerpack features require a dedicated commercial license. You can get one h
Once you have your license, run the following command
```shell
npx nx register <your-activation-key>
npx nx activate-powerpack <your-license>
```
## Codeowners for Monorepos
@@ -65,7 +61,7 @@ One of the downsides of how codeowners works on today's VCS providers is that **
In a monorepo you reason based on projects. That's what you pass to your [Nx run commands](/features/run-tasks), what you see on the [project graph](/features/explore-graph) and also where owners should be defined. To get started install the Codeowners Powerpack plugin:
```shell
npx nx add @nx/owners
npx nx add @nx/powerpack-owners
```
This will allow you to define an owners section in your `nx.json` where you can define owners at the project level or even leverage project tags. Here's a small example:
@@ -126,17 +122,73 @@ A dedicated `nx sync` command automatically synchronizes these definitions to a
Read all about how to [configure Codeowners for your project in our docs](/nx-enterprise/powerpack/owners).
## Self-hosted Cache Storage
A continuous effort on our Nx core is to improve speed. Last year, we began **rewriting performance-critical parts of Nx into Rust**, and more core components are being rewritten. As part of this effort, we also changed how we manage local cache, moving from a **file-based to a database-based approach**. In addition to small performance gains from reduced I/O, this opens up many opportunities for improving local cache handling, such as keeping only relevant cache based on usage, more easily controlling maximum cache size, and optimizing task orchestration by running failed tasks earlier.
As part of this new approach we're also going to [deprecate custom task runners](/deprecated/legacy-cache) in Nx 20. I bring this up because it might affect users that relied on 3rd party tools that hooked into the task runners API.
To fill in on the custom task runner API we're providing a new Powerpack plugin that allows you to use S3 or a network drive as your storing mechanism for your Nx cache.
Here's an example of how to get started with [Amazon S3](https://aws.amazon.com/s3) based remote caching. First add the Powerpack plugin:
```shell
npx nx add @nx/powerpack-s3-cache
```
This will update your `nx.json` to add the new `cache` section.
```json {% fileName="nx.json" %}
{
...
"s3": {
"bucket": "your-s3-bucket-name",
"region": "us-east-1"
}
}
```
To then leverage the S3 powered remote cache on CI, [follow the official AWS documentation](https://github.com/aws-actions/configure-aws-credentials). Here's a short example snippet using OIDC to authenticate with AWS on GitHub Actions:
```yaml {% fileName=".github/workflows/ci.yml" %}
name: CI
...
permissions:
id-token: write
...
jobs:
main:
runs-on: ubuntu-latest
steps:
...
- name: 'Configure AWS Credentials'
uses: aws-actions/configure-aws-credentials@v4.0.2
with:
role-to-assume: arn:aws:iam::123456789123:role/GhAIBucketUserRole
aws-region: us-east-1
...
- run: pnpm exec nx affected -t lint test build
```
Similarly you can **set up network file based caching** using the `nx add @nx/powerpack-shared-fs-cache` package and by setting the `cacheDirectory` path in your `nx.json`.
Read all about how to [set up S3 or network drive based caching for your Nx workspace in our docs](/nx-enterprise/powerpack/custom-caching).
## Workspace Conformance (Beta)
We're releasing the `@nx/conformance` plugin in an early preview. This new package focuses specifically on the maintainability of your monorepo. It allows you to encode your organization's standards so they can be enforced automatically. In this first version, the workspace conformance package ships with:
We're releasing the `@nx/powerpack-conformance` plugin in an early preview. This new package focuses specifically on the maintainability of your monorepo. It allows you to encode your organization's standards so they can be enforced automatically. In this first version, the workspace conformance package ships with:
- [Enforce Module Boundaries](/nx-api/conformance#enforce-module-boundaries): Similar to the Nx ESLint [Enforce Module Boundaries rule](https://nx-dev-git-docs-powerpack-nrwl.vercel.app/features/enforce-module-boundaries), but enforces boundaries on every project dependency, not just those created from TypeScript imports or `package.json` dependencies.
- [Ensure Owners](/nx-api/conformance#ensure-owners): Requires every project to have an owner defined for the `@nx/owners` plugin.
- [Enforce Module Boundaries](/nx-api/powerpack-conformance#enforce-module-boundaries): Similar to the Nx ESLint [Enforce Module Boundaries rule](https://nx-dev-git-docs-powerpack-nrwl.vercel.app/features/enforce-module-boundaries), but enforces boundaries on every project dependency, not just those created from TypeScript imports or `package.json` dependencies.
- [Ensure Owners](/nx-api/powerpack-conformance#ensure-owners): Requires every project to have an owner defined for the `@nx/powerpack-owners` plugin.
To get started, install the following package:
```shell
npx nx add @nx/conformance
npx nx add @nx/powerpack-conformance
```
This allows you to define conformance rules in your `nx.json`. Here is an example:
@@ -147,12 +199,12 @@ This allows you to define conformance rules in your `nx.json`. Here is an exampl
"conformance": {
"rules": [
{
"rule": "@nx/conformance/enforce-module-boundaries",
"rule": "@nx/powerpack-conformance/enforce-module-boundaries",
"projects": ["!remix-app-e2e"],
"options": {}
},
{
"rule": "@nx/conformance/ensure-owners",
"rule": "@nx/powerpack-conformance/ensure-owners",
"projects": ["!remix-app-e2e"]
},
{
@@ -166,7 +218,7 @@ This allows you to define conformance rules in your `nx.json`. Here is an exampl
You can also define rules locally, as shown in the example above, which are simple TypeScript files:
```ts
import { createConformanceRule } from '@nx/conformance';
import { createConformanceRule } from '@nx/powerpack-conformance';
const rule = createConformanceRule({
name: 'local-conformance-rule-example',
@@ -2,8 +2,9 @@
title: Improve your architecture and CI pipeline times with Nx projects
slug: improve-architecture-and-ci-times-with-projects
authors: [Philip Fulcher]
tags: ['customer story']
tags: [nx, 'customer story']
cover_image: '/blog/images/2024-10-25/header.avif'
pinned: true
description: "US sports retailer's Nx monorepo transformation: CI pipeline times from 1hr to 7-9min, cache hit rates from 20% to 57%."
---
@@ -100,7 +100,7 @@ export async function libraryGenerator(
directory,
importPath,
tags: [`type:${options.type}`, `scope:${shared}`],
linter: 'eslint',
linter: Linter.EsLint,
style: 'css',
unitTestRunner: 'vitest',
});
+18 -6
View File
@@ -2,7 +2,7 @@
title: 'Nx Update: 20.3!'
slug: nx-update-20-3
authors: [Zack DeRose]
tags: [nx, release]
tags: [nx]
cover_image: /blog/images/2025-01-06/nx-20-3.png
description: Discover the latest in Nx 20.3, featuring TypeScript project references, enhanced Rspack support, Nx Console improvements, and powerful Nx Cloud updates.
---
@@ -15,7 +15,7 @@ It's been a few months now since our last major update with [Nx 20](), let's che
- [Nx Cloud Enhancements](#nx-cloud-enhancements)
- [Angular 19 Support](#angular-19-support)
- [Core Performance Improvements](#core-performance-improvements)
- [Self-hosted Cache Updates](#selfhosted-cache-updates)
- [Powerpack Updates](#powerpack-updates)
- [RFC for Infinite Tasks](#rfc-for-infinite-tasks)
You can also catch most of these updates direct from the team from our livestream:
@@ -191,19 +191,31 @@ We've also introduced spinners into the terminal ui for instances where a task i
![](/blog/images/2025-01-06/project-graph-spinner.gif)
## Self-hosted Cache Updates
## Powerpack Updates
> Update: Self-hosted cache was previously part of Powerpack. But no more, it is no free for everyone to use.
[Nx Powerpack](/nx-enterprise/powerpack) is a suite of paid extensions for the Nx CLI, that enables some features like [allowing for third-party storage services to be used for your remoted and shared caching](/nx-enterprise/powerpack/custom-caching), [specifying specific developers as owners of specific projects in your repo](/nx-enterprise/powerpack/owners), and [running language-agnostic conformance rules](/nx-enterprise/powerpack/conformance):
We just improved support for our [self-hosted caching packages](/recipes/running-tasks/self-hosted-caching) by adding adapters for [Azure](/nx-api/azure-cache) and [Google Cloud Storage](/nx-api/gcs-cache) as supported storage providers (in addition to [S3](/nx-api/s3-cache) or [simply using a shared file system](/nx-api/shared-fs-cache)).
{% cards cols="2" lgCols="3" mdCols="3" smCols="2" %}
We've also [added support for S3 compatible providers](/nx-api/s3-cache#s3-compatible-providers) such as:
{% link-card title="Conformance" type="Powerpack Feature" url="/nx-enterprise/powerpack/conformance" icon="CheckBadgeIcon" /%}
{% link-card title="Owners" type="Powerpack Feature" url="/nx-enterprise/powerpack/owners" icon="UserGroupIcon" /%}
{% link-card title="Self-Hosted Remote Cache" type="Powerpack Feature" url="/nx-enterprise/powerpack/custom-caching" icon="ServerIcon" /%}
{% /cards %}
Recently, we've added support for [Azure](/nx-api/powerpack-azure-cache) and [Google Cloud Storage](/nx-api/powerpack-gcs-cache) as supported storage providers (in addition to [S3](/nx-api/powerpack-s3-cache) or [simply using a shared file system](/nx-api/powerpack-shared-fs-cache)).
We've also [added support for S3 compatible providers](/nx-api/powerpack-s3-cache#s3-compatible-providers) such as:
- [MinIO](https://min.io/product/s3-compatibility)
- [LocalStack](https://www.localstack.cloud)
- [DigitalOcean Spaces](https://www.digitalocean.com/products/spaces)
- [Cloudflare](https://www.cloudflare.com/developer-platform/solutions/s3-compatible-object-storage)
We've also added the capability to allow folks to authenticate their Powerpack license via Nx Cloud (rather than requiring that the license be committed to the repository). This should enable oss library authors use Powerpack - without exposing their private license via their repo.
We are offering free Nx Powerpack licenses to all open source libraries. We also offer free licenses to smaller businesses. If you are interested, you may [request a license now using Nx Cloud](/nx-enterprise/powerpack/free-licenses-and-trials).
## RFC for Infinite Tasks
Last up, we have an [RFC for the concept of "Infinite Tasks"](https://github.com/nrwl/nx/discussions/29025) on GitHub now. This is a new feature that we'll be adding soon to support non-discrete tasks in terms of the task dependencies. It should come in handy for use-cases like:
@@ -199,4 +199,4 @@ We have an input format we want to work with - and an output format that we want
- 🧠 [Nx Docs](/getting-started/intro)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- 📹 [Nx Youtube Channel](https://www.youtube.com/nrwl_io)
@@ -1,17 +0,0 @@
---
title: 'Nx Cloud: Scale Your CI and Team with Ease'
description: 'Learn how you can attain fast, reliable CI and better coordination across your technical organization with Nx Cloud, and see our new multi-workspace features for organizational scaling in action.'
date: 2025-01-22
slug: 'nx-cloud-scale-your-ci-and-team-with-ease'
authors: ['Nicole Oliver', 'Rareș Matei', 'James Henry']
tags: [webinar]
cover_image: /blog/images/2025-01-22/Jan-webinar-image.png
status: Past - Gated
registrationUrl: https://go.nx.dev/jan2025-webinar
---
Presented by Nicole Oliver, Rareș Matei, and James Henry
Learn how you can attain fast, reliable CI and better coordination across your technical organization with Nx Cloud, and see our new multi-workspace features for organizational scaling in action.
{% call-to-action title="Download the recording" url="https://go.nx.dev/jan2025-webinar" description="Sign up to gain access" /%}
@@ -672,4 +672,4 @@ Also check out our docs:
- 🧠 [Nx Docs](/getting-started/intro)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- 📹 [Nx Youtube Channel](https://www.youtube.com/nrwl_io)
+1 -1
View File
@@ -380,4 +380,4 @@ If you're working in a large monorepo and **struggling with the performance issu
- 🧠 [Nx Docs](/getting-started/intro)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- 📹 [Nx Youtube Channel](https://www.youtube.com/nrwl_io)
+1 -1
View File
@@ -215,4 +215,4 @@ If you want more insight into this topic, here are other resources we recommend:
- 🧠 [Nx Docs](/getting-started/intro)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- 📹 [Nx Youtube Channel](https://www.youtube.com/nrwl_io)
@@ -1,90 +0,0 @@
---
title: 'Hetzner Cloud gets More Features to Market with Faster, More Reliable CI'
slug: hetzner-cloud-success-story
authors: [Juri Strumpflohner]
tags: ['customer story']
description: Discover how Hetzner Cloud uses Nx Enterprise to ship new features to market faster and with more reliability.
youtubeUrl: https://www.youtube.com/watch?v=2BLqiNnBPuU
cover_image: /blog/images/articles/hetzner-cloud-story-bg.jpg
pinned: true
metrics:
- value: '116+'
label: 'projects in modular architecture'
- value: '85%'
label: 'cache hit rate'
- value: '6 days'
label: 'of computation saved every single day'
- value: '45→6'
label: 'minutes on CI'
---
Hetzner Cloud is a leading provider of cloud infrastructure solutions, known for its reliability and flexibility. Their platform enables businesses to deploy and manage cloud environments efficiently, catering to a broad range of use cases, from hosting applications to scaling complex workloads. As the company grew, its engineering team faced challenges in maintaining development speed and team collaboration.
## Challenge
As Hetzner Cloud scaled its operations, two primary challenges emerged:
- **Team structure and scaling** The growing codebase made it difficult to organize teams efficiently and allocate clear ownership.
- **CI performance** Long feedback loops slowed down development, making it harder to ship updates quickly.
> Changes often required modifying several repositories and running multiple pipelines, adding unnecessary complexity and slowing development.
They found themselves in the situation that plagues most large organizations: the struggle with code organization. Over time, a monolithic architecture can become difficult to manage, with tightly interwoven dependencies making it hard to separate concerns. Hetzner Cloud's engineering team needed a structured approach to:
- Modularize their monolithic application into smaller, more manageable units.
- Allocate teams more effectively by defining ownership at a modular level.
- Enforce clear boundaries between different parts of the system to prevent unintentional dependencies.
In addition to their monolith, Hetzner Cloud had multiple related projects spread across GitLab. Changes often required modifying several repositories and running multiple pipelines, adding unnecessary complexity and slowing development.
Their existing CI setup presented another major challenge.
- Pipelines took **45 minutes per run**, introducing significant delays in shipping features.
- GitLab merge trains helped maintain code quality but resulted in redundant work, repeatedly running tests and builds even when unchanged code was involved.
Hetzner Cloud needed a solution that would streamline their development process, consolidate fragmented projects, and significantly improve CI performance.
## Solution
After evaluating Nx and Turborepo, Hetzner Cloud selected Nx for its advanced monorepo management capabilities. They started a [Nx Enterprise](/enterprise) contract and closely collaborated with the Nx Developer Productivity Engineers to assess Hetzner's current software landscape and evaluate the best strategy. Their goal was not necessarily to create a monorepo in the first place, but to modularize their monolithic application. Nx provided the right tools to:
- **Break down the monolith** into modular packages without affecting deployment.
- **Define clear domain boundaries** using [module boundary rules](/features/enforce-module-boundaries) and [conformance rules](/nx-api/conformance).
- **Improve ownership management** by having a more modular structure with clear boundaries allowing for easier allocaton of owernship. Something that could further be improved in the future by using [CodeOwners](/nx-enterprise/powerpack/owners).
Beyond modularization, Nx helped consolidate fragmented projects into a single, structured workspace. This reduced the overhead of maintaining multiple repositories and simplified dependency management. Using the [Nx Graph](/features/explore-graph), the team gained visibility into their project relationships, making it easier to coordinate work and optimize collaboration.
{% testimonial
name="Pavlo Grosse"
title="Senior Software Engineer, Hetzner Cloud"
image="/documentation/blog/images/articles/pavlo-grosse.avif" %}
Junior developers were amazed at how fast things became. They'd run tests expecting them to take 20 minutes, and they'd finish in seconds!
{% /testimonial %}
To tackle the CI performance bottleneck, Hetzner Cloud adopted [Nx Cloud](/ci/features/remote-cache), highly leveraging its [Nx Replay feature](/ci/features/remote-cache), ability to [distribute runs](/ci/features/distribute-task-execution) and re-run [flaky tasks automatically](/ci/features/flaky-tasks). These capabilities allowed them to optimize their CI workflows and eliminate inefficiencies that had previously slowed down development cycles.
- **Minimized redundant processing** PRs in merge trains only reprocessed necessary parts, restoring everything else from the [Nx remote cache](/ci/features/remote-cache).
- **Drastic CI time reduction** Pipelines that previously took **45 minutes** now averaged **6 minutes**, even as more projects were onboarded.
- **Improved debugging capabilities** Nx Cloud provides insights into task execution times and makes it easy to search logs of failed ones, making troubleshooting more efficient.
Also having the **[Nx Console extension in their IDE](/getting-started/editor-setup)** was a big time saver when working with a large workspace with hundreds of projects. It allows you to explore the workspace in a more visual way and trigger tasks directly from within the IDE vs typing commands in the terminal.
## Results
### From a Monolith to a Modular Architecture with 116+ Projects
By structuring their codebase into fine-grained packages, Hetzner Cloud successfully transitioned from a large monolith to a modular architecture. This shift **made the codebase easier to maintain and evolve**, reducing dependencies between different parts of the system. It also allowed teams to be allocated more effectively, ensuring **clear ownership of specific areas** within the codebase, leading to a more efficient and scalable development process.
### Pipeline Speed Improved Despite Codebase Growing to Hundreds of Projects
CI performance saw a dramatic improvement. **Build times dropped from 45 minutes to most runs being around 6 minutes**, with some reaching up to 20 minutes. As Hetzner Cloud modularized the monolith into separate projects and brought in additional ones, **the codebase grew, yet CI execution time kept decreasing**, making scaling seamless. An 85% cache hit rate saved a staggering 6 days of compute time per day, totaling 197 days saved monthly.
### Shipping Features Faster
Consolidating projects into a single repository **eliminated the complexity of managing multiple repositories and pipelines**, reducing overhead from maintaining separate CI setups. This simplified cross-project changes, **allowing the team to ship features faster** and with greater confidence.
### Continuous Refinement in Collaboration with Nx DPE Team
Hetzner Cloud continues to **work closely with the Nx Developer Productivity Engineering (DPE) team** to monitor and refine their setup. By actively collaborating, they ensure that their monorepo remains optimized and that their CI is continuously improved. This ongoing partnership allows Hetzner Cloud to adapt to new challenges, fine-tune configurations, and further push the boundaries of efficiency in their development workflow.
{% call-to-action title="Want to achieve similar results?" url="/enterprise" icon="nxcloud" description="Learn more about Nx Enterprise or get started with a free trial." /%}
@@ -1,78 +0,0 @@
---
title: 'Vattenfall changes the math on concurrent PRs with Nx Agents'
slug: nx-agents-changes-the-math
authors: [Philip Fulcher]
tags: ['customer story']
cover_image: /blog/images/2025-02-12/header.avif
description: 'Vattenfall solves their CI runner limitation using Nx Cloud, improving from 4 concurrent PRs to 100.'
metrics:
- value: '4→100'
label: 'concurrent PRs on CI'
- value: '44%'
label: 'reduction in CI runtimes'
- value: '> 1 year'
label: 'of computation saved every 30 days'
---
[Vattenfall](https://group.vattenfall.com/), a world leader in energy production, has been rapidly expanding their IT organization over the past few years exponentially growing both their development teams and their codebase. As more developers joined and modular frontends proliferated, what started as a performant CI pipeline began showing signs of strain. The increasing complexity of their applications and test suites, combined with their commitment to maintaining high quality standards, created unprecedented demands on their CI infrastructure. Their CI provider had a limit of 100 CI runners in a pool, combined with a limit of one pool. If a single runner per PR would be enough, this would lead to 100 concurrent PRs. More than enough for most teams. However, their workspace needed 25+ runners to complete in a timely manner. This resulted in only four concurrent PRs available, slowing down their team immensely and blocking important work from making it through CI.
## Hitting the limits of CI providers
It's typical for some limits to be imposed by your CI provider. You may have a set number of persistent runners that can't be increased. Even if you have ephemeral runners, you likely have a limit on how many of those runners can be active at a time. These limits might be driven by cost control or technical limitations by the provider, but they all mean the same thing: **the number of concurrent PRs you can run is limited by your number of runners**.
In a world where each PR needs one runner for CI, you can have one concurrent PR running for each runner you have. But a single runner per PR just doesnt scale. Instead, youll need to distribute tasks across multiple runners.
Now you're in a balancing act of how many runners can be assigned to a PR so that it completes faster vs how many PRs can be run at the same time. Your number of concurrent PRs becomes your available runners divided by the number of runners for each PR.
![Formula for calcuating number of concurrent PRs: "Available Runners" divided by "Runners per PR" equals "Concurrent PRs".](/blog/images/2025-02-12/previous-formula.avif)
## Nx Agents unlocks concurrency
Working with our [Nx Enterprise](/enterprise) team, Vattenfall was able to unblock their team with Nx Agents enabling **more concurrent PR runs**. Not only that, but Nx Agents **lowered PR runtimes by 44%** and unlocked other features and tools that had been limited by their number of runners.
Nx Agents makes it quick and easy to enable task distribution in your PR runs without consuming CI runners. How?
When using Nx Agents, the tasks for your PR are now completed by Nx Agents rather than your CI runners. Your CI runner starts, runs your configured Nx commands to collect the tasks that need to be completed, and sends them to Nx Cloud. From there, Nx Agents are spun up and complete the work for each task to report back to the CI runner.
![Illustration showing Nx Agents pulling a task to complete.](/blog/images/2025-02-12/agents.avif)
This reduces our concurrency calculation to be 1:1 with our number of runners while still reaping the benefits of parallelism across multiple agents.
![Modified Formula for calcuating number of concurrent PRs: "Runners per PR" is scratched out and replaced by "Nx Cloud" leaving "Available Runners" equals "Concurrent PRs".](/blog/images/2025-02-12/new-formula.avif)
## From 4 concurrent PRs to 100
So, how did Nx Agents help with the concurrent PR runs problem Vattenfall was facing? Our Nx Enterprise team was able to [trial Agents](/enterprise/trial) with them, quickly resulting in huge benefits for their team. They were able to re-enable that 100 PR concurrency by distributing all work to Nx Agents. Their limited pool of 100 runners was again able to handle 100 concurrent PRs, while still retaining the benefits of distributing tasks across Nx Agents. Nx Agents will continue to scale, adding more agents as needed to keep PR runtimes within reason. Concurrent PR runs will continue to match their number of CI runners no matter how many agents they need to distribute tasks.
![Graph showing pipeline improvements before and after Nx Agents. CI pipeline times (in minutes) improve from 70 moinutes to less than 10 minutes. Concurrent PRs improve from 4 to 100.](/blog/images/2025-02-12/pipeline-improvements.avif)
## Unlocking more than just concurrent PR runs
What else did Vattenfall unlock with more concurrent PR runs?
### Reduced CI runtimes by 44%
This increase in concurrent PRs is a big win in and of itself, but it also resulted in faster CI run times. Average CI runtimes went from 39 minutes to 22 minutes, a **44% improvement**. Not only are there more PRs running concurrently, they're running faster.
### Enabling flaky test detection to avoid PR re-runs
Using Nx Agents has also enabled flaky task retries for them, reducing the number of times that PRs have to be re-run. Tasks that fail only sometimes and only in certain environments are called "flaky tasks." They are enormously time-consuming to identify and debug. **Nx Cloud can reliably detect flaky tasks and automatically schedule them to be re-run on a different agent**. By re-running flaky tasks until they pass, Nx Cloud ensures that the PR run completes the first time and doesnt have to be re-run just to get a flaky task to pass.
### Unlocking RenovateBot
RenovateBot helps automate dependency updates by creating pull requests when dependencies need to be updated. Previously, this PR would have consumed more CI runners and would have been yet another blocker on their team for making progress. They had to prioritize the runners for PRs created by engineers rather than allow RenovateBot to run. With the increased concurrency allowed by Nx Agents, they are now able to run RenovateBot on a regular basis.
{% testimonial
name="Martijn van der Meij"
title="Solution Designer, Vattenfall"
image="/documentation/blog/images/2025-02-12/martijn.avif" %}
Other engineers in other business units are seeing the advantage of Nx, and their managers are talking to our managers about copying the way we work. **They're saying "Nx is solving this problem we didn't even know we had"**
{% /testimonial %}
## What could Nx Agents unlock for you?
What's blocking you from getting your products to market fast? Let our team figure it out for you! With Nx Enterprise, you receive expert guidance from day one, ensuring your setup is optimized for maximum efficiency. Whether you're starting fresh, migrating, or scaling your developer platform, we'll work with you to tailor the perfect solution for your team.
{% call-to-action title="Get a Free Trial of Nx Enterprise" url="/enterprise" icon="nxcloud" description="Learn more about our enterprise offerings or request a free trial of Nx Enterprise" %}
{% /call-to-action %}
@@ -1,153 +0,0 @@
---
title: 'Nx Just Made Your LLM Way Smarter'
slug: nx-just-made-your-llm-smarter
authors: ['Juri Strumpflohner']
tags: ['nx']
description: 'Learn how monorepos with Nx enhance AI capabilities by providing rich metadata and context, making LLMs smarter and more architecturally aware.'
cover_image: /blog/images/articles/monorepos-are-ai-future-proof-bg.jpg
youtubeUrl: https://youtu.be/RNilYmJJzdk
---
{% callout type="deepdive" title="Series: Making your LLM smarter" expanded=true %}
- **Nx Just Made Your LLM Way Smarter**
- [Making Cursor Smarter with an MCP Server For Nx Monorepos](/blog/nx-made-cursor-smarter)
- [Nx MCP Now Available for VS Code Copilot](/blog/nx-mcp-vscode-copilot)
- [Nx and AI: Why They Work so Well Together](/blog/nx-and-ai-why-they-work-together)
{% /callout %}
Everyone is constantly pushing to be more productive: delivering more features, reducing overhead, and keeping up with increasing demands. Companies want to move faster, and engineering teams work toward the same goal, looking for ways to streamline development and ship more with fewer resources. LLMs offer a promising way to boost efficiency, whether by assisting individual developers or improving workflows across a team.
However, the quality of an LLM's response depends entirely on the data and context it has access to. Ask an LLM (in this case, GitHub Copilot with GPT-4o) about the structure of an NPM workspace monorepo, and you probably won't be satisfied with the result:
![nx-ai-before-workspace-structure.avif](/blog/images/articles/nx-ai-before-workspace-structure.avif)
Now compare that result, using the exact same question, but with additional context provided to the LLM:
![nx-ai-after-workspace-structure.avif](/blog/images/articles/nx-ai-after-workspace-structure.avif)
The difference is huge. Copilot now understands the architectural structure of the workspace. It recognizes that there are apps and libraries, their types (such as "data access" libraries), and how each relates to other projects in the monorepo.
![nx-ai-after-workspace-structure2.avif](/blog/images/articles/nx-ai-after-workspace-structure2.avif)
**So what changed?** Let's break it down.
{% toc /%}
## Monorepos Break Down Barriers
When we (at Nx) [work with large enterprises](/enterprise), we often see patterns that lead to inefficiencies:
- **Siloed knowledge** Developers only have visibility into the areas they actively work on. Without a broader view, duplication increases, communication slows down, and collaboration suffers.
- **Fragmentation** Code is spread across multiple repositories with little integration. LLMs don't automatically understand how different projects connect or who owns what.
- **Lack of integration** Many productivity bottlenecks come from friction at integration points between teams.
LLMs face the same challenges. They operate on a small scope, usually a few files at a time, but **lack architectural awareness**. They don't know how projects relate to each other, where the integration points are, or which team owns a given project.
Monorepos solve visibility and fragmentation issues by consolidating related projects into a single repository. This gives teams a shared view, removes communication barriers, reduces duplication, and improves collaboration.
**The same visibility that helps developers also helps an LLM.** Think about it: when you open your monorepo in VSCode or Cursor, you can see multiple related projects in one place. That's very different from working across scattered repositories.
The problem? Even though your entire codebase is accessible, an LLM still only sees files and their contents. It doesn't understand which project a file belongs to or how that project interacts with others. It simply lacks that knowledge.
This is where Nx comes in.
## Nx Understands Your Monorepo
Monorepos don't come for free. While they improve visibility and collaboration, they introduce scaling challenges. This is where tools like Nx step in, helping you get the benefits of a monorepo while managing the complexity that comes with it.
Over the years, we've built features like [Nx Replay](/ci/features/remote-cache) and [Nx Agents](/ci/features/distribute-task-execution) to keep CI fast, while [conformance rules](/nx-enterprise/powerpack/conformance), [ownership](/nx-enterprise/powerpack/owners), and [local repository automation](/extending-nx/intro/getting-started) help manage and scale a monorepo in the long run.
To power these features, **Nx collects metadata about your workspace**, understanding relationships between projects, ownership, technology types, available tasks, and more. The [Nx daemon](/concepts/nx-daemon) runs in the background, keeping this metadata up to date and making sure Nx operates efficiently.
**Nx understands project relationships down to the file level**, tracking dependencies. For example, in the image below, `src/app/app.tsx` imports a component from `@aishop/feat-create-order`, and Nx knows exactly how these projects connect.
![nx-ai-project-relationships.avif](/blog/images/articles/nx-ai-project-relationships.avif)
**Nx also tracks available targets for each project**. If you're using [Code Owners](/nx-enterprise/powerpack/owners), it **knows who owns what within your monorepo**.
![nx-ai-project-detail-view.avif](/blog/images/articles/nx-ai-project-detail-view.avif)
It **identifies relevant files for each target** based on the input and output properties defined in the [cache configuration](/features/cache-task-results#finetune-caching-with-inputs-and-outputs).
![nx-ai-cache-inputs.avif](/blog/images/articles/nx-ai-cache-inputs.avif)
Nx also knows about **project tags, helping classify domains, project types, or any other custom attributes** you've applied.
![nx-ai-project-tags.avif](/blog/images/articles/nx-ai-project-tags.avif)
Nx plugins come with **[code generators](/features/generate-code)** that can scaffold entire projects. These generators have well-defined [schemas](https://github.com/nrwl/nx/blob/804df721a729da41d804c57a829828c96d265d79/packages/js/src/generators/library/schema.json) that describe the available properties, their descriptions, and which ones are required. This structured metadata makes them an ideal data source for LLMs, allowing them to provide more accurate and meaningful suggestions when interacting with your monorepo.
![nx-ai-generator-schema.avif](/blog/images/articles/nx-ai-generator-schema.avif)
These are just some examples of the metadata Nx maintains about your monorepo.
Beyond that, the [Nx documentation already includes an AI-powered chat](/ai-chat), and its data can be injected directly into your LLM conversations as well.
![nx-ai-docs-assistant.avif](/blog/images/articles/nx-ai-docs-assistant.avif)
## Nx Makes Your LLM Way Smarter
All of this data is a goldmine for enhancing your LLM. Luckily we're kinda obsessed with good DX which is why we had an editor for a long time: [Nx Console](/getting-started/editor-setup).
While you could build your own chat-based LLM integration, the best approach is to make it work where developers already spend their time: inside the editor. Nx Console is the perfect fit for this. It already enhances your monorepo workflow by providing IntelliSense, running code generators, and [integrating with CI](/blog/nx-cloud-pipelines-come-to-nx-console). Now, we've taken it a step further.
We extended Nx Console with an integration for Copilot that preprocesses Nx metadata and provides the LLM with details about:
- The workspace structure, including applications and libraries.
- How projects are connected.
- A project's technology stack.
- Tasks and which files are relevant for each task (e.g., spec files for test runs).
- Categorization via tags and dependency rules.
- Project ownership information.
-
The result: **your LLM just got significantly smarter**, moving beyond basic file-level reasoning to understanding your workspace at an architectural level.
Let's go through some concrete examples. You can try these yourself by [installing Nx Console](/getting-started/editor-setup) or updating to the latest version.
Here, we ask Copilot about projects, their dependencies, and ownership details:
![nx-ai-example-project-data.avif](/blog/images/articles/nx-ai-example-project-data.avif)
We can also go deeper, asking where to best implement certain types of functionality:
![nx-ai-example-data-access-feature.avif](/blog/images/articles/nx-ai-example-data-access-feature.avif)
In a larger enterprise, this also means you can ask about who to talk to when implementing or planning a new feature. Thanks to Nx metadata, the LLM understands ownership:
![nx-ai-example-ownership.avif](/blog/images/articles/nx-ai-example-ownership.avif)
And since we made the LLM aware of [Nx generators](/features/generate-code), we can ask it to help set up a new project. Notice how it not only suggests the correct command but also places the new project in the `packages/products` subfolder. We even added action buttons to either run the command immediately or open it in [Nx Console's generator UI](/recipes/nx-console/console-generate-command).
![nx-ai-example-generate-code.avif](/blog/images/articles/nx-ai-example-generate-code.avif)
Beyond that, since we also feed documentation data into the LLM, it can now answer questions about Nx itself:
![nx-ai-example-cache-config.avif](/blog/images/articles/nx-ai-example-cache-config.avif)
## Nx Monorepos Are AI Future-Proof
Right now, most LLM editor extensions operate at the file level, unless you manually feed them additional context. But this is going to change. LLMs will continue to improve, and most importantly, their context windows will grow.
That's why **we strongly believe monorepos are AI future-proof**. They provide a consolidated view of multiple projects, and when enhanced with Nx metadata, they allow an LLM to reason at a higher architectural level. Instead of just answering file-specific questions, it can assist with broader development workflows, project structure, and cross-project interactions.
And this is just the beginning. While Nx already understands your local monorepo, [Nx Cloud](/nx-cloud) holds valuable CI-related data, tracking which tasks take the longest, where failures are most common, identifying flaky tasks, and even mapping project relationships beyond a single monorepo. Combining local workspace metadata with Nx Cloud insights creates an even richer foundation for LLMs, unlocking more meaningful suggestions and optimizations.
## Try It Out Yourself
If you want to test this out, [create a new Nx workspace](/getting-started/intro#try-nx-yourself) and make sure you have [Nx Console](/getting-started/editor-setup) installed or updated to the latest version.
> If you already have an existing NPM/Yarn/PNPM workspace, you can add Nx with `nx init`. Check out [our free course](/courses/pnpm-nx-next) to learn more.
While Nx Console is also available for WebStorm, the AI-powered extensions currently only work with VSCode and Copilot.
---
Learn more:
- 🧠 [Nx Docs](/getting-started/intro)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
@@ -1,719 +0,0 @@
---
title: 'Using Apollo GraphQL in an Nx Workspace'
slug: 'using-apollo-graphql-in-an-nx-workspace'
authors: ['Philip Fulcher']
cover_image: '/blog/images/2025-02-21/header.avif'
tags: [nx]
description: 'Learn how to create an Nx workspace that provides a GraphQL API via Apollo Server, a React frontend, and code generated by GraphQL Codegen to save time on development.'
---
Because of the Nx's robust support for a diverse ecosystem of JavaScript development, it enables you to build your entire full-stack application in a single repo. This allows you to share code and interfaces between your frontend and backend and acts as a multiplier on your development velocity.
[GraphQL](https://graphql.org/) is a query language for your API. Because of its typed schema definition, its a great candidate for defining the contract between your API and its consumers. By using smart tools to generate code based on that schema, you can save yourself a lot of time and enforce better cooperation between your frontend and backend.
In this article, you will build a simple GraphQL API that tracks some information about Lego sets. Youll create this API using Apollo Server, and it will be consumed by a React application. Youll have this all inside of an Nx Workspace in a single repository.
In this article, youll learn how to:
- Create an Nx workspace for both frontend and backend applications
- Create a GraphQL API using [Apollo Server](https://www.apollographql.com/docs/apollo-server)
- Generate frontend code and backend resolver types based on your GraphQL schema using [GraphQL Codegen](https://the-guild.dev/graphql/codegen)
- Create a [React](https://react.dev/) application to consume your GraphQL API
{% callout type="note" title="Minimal configuration" %}
When given the option to enable another tool, like linting or testing, we're going to decline. This keeps this article focussed on GraphQL instead of having lint and test configs in the example. As you progress, feel free to enable these additional options if you'd like, especially if you're adding to an existing workspace that has those tools enabled.
{% /callout %}
An example repo with all the work youll be doing here can be found in [our Nx Recipes repo](https://github.com/nrwl/nx-recipes/tree/main/apollo-graphql)
## Create a new workspace
Start by creating an Nx workspace:
```shell
npx create-nx-workspace@latest --preset=node-monorepo nx-apollo
```
When prompted, answer the prompts as follows:
```shell
npx create-nx-workspace@latest --preset node nx-apollo
NX Let's create a new workspace [https://nx.dev/getting-started/intro]
✔ Application name · api
✔ What framework should be used? · none
✔ Would you like to generate a Dockerfile? [https://docs.docker.com/] · No
✔ Which CI provider would you like to use? · skip
✔ Would you like remote caching to make your build faster? · skip
```
## Create GraphQL schema and project
We want to generate model types from our schema that can be used by other projects in our workspace, so we'll start by creating a new project:
```shell
npx nx g @nx/js:library --directory=libs/models-graphql models-graphql
```
When prompted, answer the prompts as follows:
```shell
npx nx g @nx/js:library --directory=libs/models-graphql models-graphql
NX Generating @nx/js:library
✔ Which bundler would you like to use to build the library? Choose 'none' to skip build setup. · none
✔ Which linter would you like to use? · none
✔ Which unit test runner would you like to use? · none
```
{% callout type="note" title="Why do I need a separate project?" %}
When you have your GraphQL schema and generated models in a separate project, other projects can depend on it. This ensures that all projects are using the same version of the schema and models. This exemplifies the "modulith" structure for monorepos. [Read more](/blog/virtuous-cycle-of-workspace-structure)
{% /callout %}
You need a GraphQL schema to create the API, so write a very simple one with a single query and a single mutation. Create a file named `schema.graphql` in the new `models-graphql` project:
```graphql {% fileName="libs/models-graphql/src/lib/schema.graphql" %}
type Set {
id: Int!
name: String
year: Int
numParts: Int
}
type Query {
allSets: [Set]
}
type Mutation {
addSet(name: String, year: String, numParts: Int): Set
}
```
To start generating our models from this schema, we'll use [GraphQl Codegen](https://the-guild.dev/graphql/codegen). Install the packages needed:
```shell
npm install -D @graphql-codegen/cli @graphql-codegen/typescript @graphql-codegen/typescript-resolvers @graphql-codegen/typescript-react-apollo
```
GraphQL Codegen is controlled by a configuration file named `codegen.ts` in each project that needs it. Create one for `models-graphql`:
```typescript {% fileName="libs/models-graphql/codegen.ts" %}
import type { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
schema: 'libs/models-graphql/src/lib/schema.graphql',
generates: {
'libs/models-graphql/src/lib/__generated__/models.ts': {
plugins: ['typescript'],
config: {
avoidOptionals: true,
},
},
},
};
export default config;
```
To run GraphqlQL Codegen, we need a target added to our project. Add this to the `project.json` for `models-graphql`:
```json {% fileName="libs/models-graphql/project.json" %}
"targets": {
"codegen": {
"command": "npx graphql-codegen --config {projectRoot}/codegen.ts"
}
}
```
Run the `codegen` task to generate our new models:
```shell
npx nx codegen models-graphql
```
You should see the new models created in the `__generated__` directory in `models-graphql`. To use them outside the project, export them from the `index.ts`:
```typescript {% fileName="libs/models-graphql/src/index.ts" %}
export * from './lib/__generated__/models';
```
## Create GraphQL API
Use Apollo Server to create your GraphQL api. Start by installing the GraphQL modules needed for Apollo
```shell
npm install @apollo/server graphql
```
The workspace was generated with a Node application for us, but we need to make some small changes to support ESM for Apollo Server. First, change these compiler options in `tsconfig.app.json`:
```json {% fileName="apps/api/tsconfig.app.json" %}
"compilerOptions": {
"lib": ["es2020"],
"target": "es2020",
"module": "esnext",
"moduleResolution": "node",
"esModuleInterop": true,
...
}
```
And change the `build` target config in `project.json`:
```json {% fileName="apps/api/project.json" %}
"targets": {
"build": {
...
"options": {
...
"format": ["esm"]
}
}
}
```
GraphQl Codegen has already created our models for our GraphQL schema, but it can also generate the resolver types we'll want to implement in Apollo Server. Like before, create a `codegen.ts` in the `api` application:
```typescript {% fileName="apps/api/codegen.ts" %}
import type { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
schema: 'libs/models-graphql/src/lib/schema.graphql',
generates: {
'apps/api/src/__generated__/resolvers.ts': {
plugins: ['add', 'typescript-resolvers'],
config: {
useIndexSignature: true,
content: 'import * as types from "@nx-apollo/models-graphql"',
namespacedImportName: 'types',
},
},
},
};
export default config;
```
And add the task to our targets:
```json {% fileName="apps/api/project.json" %}
"targets": {
"codegen": {
"command": "npx graphql-codegen --config {projectRoot}/codegen.ts"
}
}
```
And run the task:
```shell
npx nx codegen api
```
And now there should be resolver types in the `__generated__` directory. We're ready to put create our Apollo Server application. Replace the contents of `main.ts` with this:
```typescript {% fileName="apps/api/src/main.ts" %}
import { ApolloServer } from '@apollo/server';
import { startStandaloneServer } from '@apollo/server/standalone';
import { Set } from '@nx-apollo/models-graphql';
import { readFileSync } from 'fs';
import { join } from 'path';
import { Resolvers } from './__generated__/resolvers';
// Note: this uses a path relative to the project's
// root directory, which is the current working directory
// if the server is executed using `npm run`.
const typeDefs = readFileSync(
join('libs/models-graphql/src/lib', 'schema.graphql'),
{ encoding: 'utf-8' }
);
const sets: Set[] = [
{
id: 1,
name: 'Voltron',
numParts: 2300,
year: '2019',
},
{
id: 2,
name: 'Ship in a Bottle',
numParts: 900,
year: '2019',
},
];
// Resolvers define how to fetch the types defined in your schema.
// This resolver retrieves books from the "books" array above.
const resolvers: Resolvers = {
Query: {
allSets: () => sets,
},
Mutation: {
addSet: (parent, args) => {
const newSet = {
id: sets.length + 1,
name: args.name,
year: args.year,
numParts: +args.numParts,
};
sets.push(newSet);
return newSet;
},
},
};
// The ApolloServer constructor requires two parameters: your schema
// definition and your set of resolvers.
const server = new ApolloServer({
typeDefs,
resolvers,
});
// Passing an ApolloServer instance to the `startStandaloneServer` function:
// 1. creates an Express app
// 2. installs your ApolloServer instance as middleware
// 3. prepares your app to handle incoming requests
const { url } = await startStandaloneServer(server, {
listen: { port: 4000 },
});
console.log(`🚀 Server ready at: ${url}`);
```
This is already enough to see some progress when you run the `api` application.
```shell
npx nx serve api
```
When the application is running, bring up the GraphQL Playground in your browser at [http://localhost:4000/](http://localhost:4000/)
Here you can inspect your GraphQL schema as well as submit queries and mutations.
This is a very simple resolver that holds data in memory. It returns the current contents of the sets array for the `allSets` query and allows users to add a new set using the `addSet` mutation. Add this resolver to the providers array in your app module:
Go back to your GraphQL Playground and see if your queries return any data now. Try a query and a mutation:
```graphql
query allSets {
allSets {
id
name
numParts
}
}
mutation addSet {
addSet(name: "My New Set", numParts: 200, year: "2020") {
id
}
}
```
Now that the API is working, youre ready to build a frontend to access this.
## Add React frontend
Start by adding a React app to your workspace using the `@nx/react` plugin:
```shell
npx nx add @nx/react
```
Create the React app using the generator:
```shell
npx nx g @nx/react:app --directory=apps/frontend frontend
```
When prompted, answer the prompts as follows:
```shell
npx nx g @nx/react:app --directory=apps/frontend frontend
NX Generating @nx/react:application
✔ Which stylesheet format would you like to use? · tailwind
✔ Would you like to add React Router to this application? (y/N) · false
✔ Which bundler do you want to use to build the application? · vite
✔ Which linter would you like to use? · none
✔ What unit test runner should be used? · none
✔ Which E2E test runner would you like to use? · none
```
We use Tailwind styles here for convenience. It will allow us to add some simple styles to our app without adding CSS files and importing them.
The Apollo client makes it easy to consume your GraphQL API. Install the client:
```shell
npm install @apollo/client
```
Modify your `app.tsx` to provide the Apollo Client:
```typescript {% fileName="apps/frontend/src/main.tsx" %}
import { StrictMode } from 'react';
import * as ReactDOM from 'react-dom/client';
import App from './app/app';
import { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
const client = new ApolloClient({
uri: 'http://localhost:4000/graphql',
cache: new InMemoryCache(),
});
root.render(
<StrictMode>
<ApolloProvider client={client}>
<App />
</ApolloProvider>
</StrictMode>
);
```
## Create React library
Nx helps you break down your code into well-organized libraries for consumption by apps, so create a couple of React libraries to organize your work. Create a `data-access` library that handles communication with the backend and a `feature-sets` library that includes container components for displaying the Lego set data. In a real app, you might also create a `ui` library that includes reusable presentational components, but that is not part of this example. For more information on how to organize your React monorepo using Nx, read our book _Effective React Development with Nx_ by registering [here](https://go.nx.dev/react-book)
To create the described project, run this command:
```shell
npx nx g @nx/react:lib --directory=libs/feature-sets feature-sets
```
When prompted, answer the prompts as follows:
```shell
npx nx g @nx/react:lib --directory=libs/feature-sets feature-sets
NX Generating @nx/react:library
✔ Which bundler would you like to use to build the library? Choose 'none' to skip build setup. · none
✔ What unit test runner should be used? · none
```
## Setup React Code Generation
A tool called GraphQL Codegen makes the development of your feature library faster.
You need to create some GraphQL queries and mutations for the frontend to consume. Create a file named `operations.graphql` in the projects:
```graphql {% fileName="libs/feature-sets/src/lib/operations.graphql" %}
mutation addSet($name: String!, $year: String!, $numParts: Int!) {
addSet(name: $name, year: $year, numParts: $numParts) {
id
name
numParts
year
}
}
query setList {
allSets {
id
name
numParts
year
}
}
```
Once again create a `codegen.ts` for the project:
```typescript {% fileName="libs/feature-sets/codegen.ts" %}
import { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
schema: 'libs/models-graphql/src/lib/schema.graphql',
documents: ['libs/feature-sets/src/**/*.graphql'],
generates: {
'libs/feature-sets/src/lib/__generated__/operations.ts': {
plugins: ['add', 'typescript-operations', 'typescript-react-apollo'],
config: {
useIndexSignature: true,
content: 'import * as types from "@nx-apollo/models-graphql"',
namespacedImportName: 'types',
},
},
},
ignoreNoDocuments: true,
};
export default config;
```
This configuration grabs all of your GraphQL files and generates all the needed types and services to consume the API.
Add a new task in `project.json` to run this code generator:
```json {% fileName="libs/feature-sets/project.json" %}
"targets": {
"codegen": {
"command": "npx graphql-codegen --config {projectRoot}/codegen.ts"
}
}
```
Now you can run that task using the Nx CLI:
```shell
npx nx codegen feature-sets
```
You should now have a folder called `__generated__` in your `feature-sets` library with a file named `operations.ts`. It contains typing information about the GraphQL schema and the operations you defined. It even has some hooks that make consuming this API superfast.
## Create React components
You now have everything needed to start building your React components. Create two components: a list of Lego sets and a form to add a Lego set. Use Nx generators to scaffold these:
```shell
npx nx generate @nx/react:component libs/feature-sets/src/lib/add-set-form
```
```shell
npx nx generate @nx/react:component libs/feature-sets/src/lib/set-list
```
When prompted, answer the prompts as follows:
```shell
npx nx generate @nx/react:component libs/feature-sets/src/lib/add-set-form
NX Generating @nx/react:component
✔ Should this component be exported in the project? (y/N) · false
```
In the `SetList` component, add the following:
```tsx {% fileName="libs/feature-sets/src/lib/set-list.tsx" %}
import { useSetListQuery } from './__generated__/operations';
export function SetList() {
const { loading, data } = useSetListQuery();
return loading ? (
<p>Loading ...</p>
) : (
<ul className="mx-6 w-full list-none">
{data &&
data.allSets?.map(({ id, name, numParts, year }) => (
<li className="p-2 even:bg-slate-200">
{year} - <strong>{name}</strong> ({numParts} parts)
</li>
))}
</ul>
);
}
export default SetList;
```
Notice how `useSetListQuery` is imported from the data-access library. This is a hook generated by GraphQL Codegen that provides the results of the `SetList` query. This entire pipeline is type-safe, using the types generated by GraphQL Codegen.
In the `AddSetForm` component, add the following:
```tsx {% fileName="libs/feature-sets/src/lib/add-set-form.tsx" %}
import { useRef } from 'react';
import { useAddSetMutation } from './__generated__/operations';
export function AddSetForm() {
const formRef = useRef<HTMLFormElement>(null);
const [addSet] = useAddSetMutation({
refetchQueries: ['setList'],
});
const handleSubmit = (formData: FormData) => {
const name = formData.get('name')?.toString();
const year = formData.get('year')?.toString();
const numParts = parseInt(formData.get('numParts')?.toString() || '0', 10);
if (name && year && numParts > 0) {
addSet({ variables: { name, year, numParts } });
}
formRef.current?.reset();
};
return (
<form
ref={formRef}
action={handleSubmit}
className="mx-6 max-w-60 border border-slate-200 p-6"
>
<label
htmlFor="name"
className="block text-sm/6 font-medium text-gray-900"
>
Name
</label>
<div className="mt-2">
<input
id="name"
name="name"
type="text"
className="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6"
/>
</div>
<label
htmlFor="name"
className="mt-2 block text-sm/6 font-medium text-gray-900"
>
Year
</label>
<div className="mt-2">
<input
id="year"
name="year"
type="text"
className="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6"
/>
</div>
<label
htmlFor="name"
className="mt-2 block text-sm/6 font-medium text-gray-900"
>
Number of Parts
</label>
<div className="mt-2">
<input
id="numParts"
name="numParts"
type="number"
className="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6"
/>
</div>
<button
type="submit"
className="mt-6 rounded-md bg-indigo-600 px-2.5 py-1.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
Create new set
</button>
</form>
);
}
export default AddSetForm;
```
Again, notice that the component imports hooks, queries, and typing information from our generated code to accomplish this.
## Integrate components into the app
Final step: bring those new components into `FeatureSets` component:
```tsx {% fileName="libs/feature-sets/src/lib/feature-sets.tsx" %}
import AddSetForm from './add-set-form';
import SetList from './set-list';
export function FeatureSets() {
return (
<div className="flex">
<AddSetForm></AddSetForm>
<SetList></SetList>
</div>
);
}
export default FeatureSets;
```
And bring that component into your app:
```tsx {% fileName="apps/frontend/src/app/app.tsx" %}
import { FeatureSets } from '@nx-apollo/feature-sets';
export function App() {
return (
<div>
<h1 className="my-6 text-center text-2xl font-bold">My Lego Sets</h1>
<FeatureSets></FeatureSets>
</div>
);
}
export default App;
```
If your API isnt running already, go ahead and start it:
```shell
npx nx serve api
```
And now start your React app in a separate terminal:
```shell
npx nx serve frontend
```
Browse to [http://localhost:4200](http://localhost:4200) and see the results of your work!
## Extend `codegen` configuration
The configuration for the `codegen` targets is a good start, but it's currently lacking two things:
1. [Caching](/features/cache-task-results)
2. [Dependent tasks](/concepts/task-pipeline-configuration)
Without caching enabled, `codegen` tasks will be run every time, regardless if they need to be or not. And without dependent tasks configured, we can't be sure that `codegen` is run any time our generated code depends on the generated code in another project. IOn our example, the generated code in both `api` and `feature-sets` rely on the models generated in `models-graphql`. If we make changes to the schema in `models-graph` and then run `codegen` on `api`, our models will be out-of-sync and lead to errors.
Let's fix both of these problems with a target default for `codegen`. In `nx.json`, add this:
```json {% fileName="nx.json" %}
"targetDefaults": {
...
"codegen": {
"cache": true,
"outputs": ["{projectRoot}/src/__generated__"],
"inputs": ["{workspaceRoot}/libs/models-graphql/src/lib/schema.graphql","{projectRoot}/**/*.graphql"],
"dependsOn": ["^codegen"]
}
}
```
Now try running `codegen` for `api` to see that `codegen` for `models-graphql` is run first:
```shell
npx nx codegen api
✔ 1/1 dependent project tasks succeeded [0 read from cache]
Hint: you can run the command with --verbose to see the full dependent project outputs
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> nx run api:codegen
> npx graphql-codegen --config apps/api/codegen.ts
✔ Parse Configuration
✔ Generate outputs
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
NX Successfully ran target codegen for project api and 1 task it depends on (2s)
```
Try running the command again, and you'll see that the results are pulled from the cache, and the task ends immediately.
## Further Reading
- [Apollo Server](https://www.apollographql.com/docs/apollo-server)
- [Apollo React Client](https://www.apollographql.com/docs/react/)
- [GraphQL Codegen](https://the-guild.dev/graphql/codegen)
- 🧠 [Nx Docs](/getting-started/intro)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
@@ -1,19 +0,0 @@
---
title: "React Development for 2025"
description: "In this webinar, well dive into building modern React applications using platform-native tools like NPM workspaces and TypeScript project references.
Learn how Nx improves the developer experience all while letting you ship your React apps faster. Well explore features like project references, how they work, and why they can significantly improve the performance of large React and TypeScript monorepos, both locally and on CI."
date: 2025-02-26
slug: 'react-development-for-2025'
authors: ['Juri Strumpflohner']
tags: [webinar]
cover_image: /blog/images/2025-02-26/Feb-Webinar-Card.png
status: Past - Gated
registrationUrl: https://go.nx.dev/feb2025-webinar
---
Presented by Juri Strumpflohner
In this webinar, well dive into building modern React applications using platform-native tools like NPM workspaces and TypeScript project references.
Learn how Nx improves the developer experience all while letting you ship your React apps faster. Well explore features like project references, how they work, and why they can significantly improve the performance of large React and TypeScript monorepos, both locally and on CI.
{% call-to-action title="Download the recording" url="https://go.nx.dev/feb2025-webinar" description="Sign up to gain access" /%}
@@ -1,152 +0,0 @@
---
title: 'Making Cursor Smarter with an MCP Server For Nx Monorepos'
slug: nx-made-cursor-smarter
authors: ['Juri Strumpflohner', 'Max Kless']
tags: ['nx']
cover_image: /blog/images/articles/cursor-nx-mcp-heroimg.jpg
description: 'Learn how Nx enhances Cursor IDE with a dedicated MCP server, providing AI assistants with rich monorepo metadata for smarter code assistance.'
youtubeUrl: https://youtu.be/V2W94Sq_v6A
pinned: true
---
{% callout type="deepdive" title="Series: Making your LLM smarter" expanded=true %}
- [Nx Just Made Your LLM Way Smarter](/blog/nx-just-made-your-llm-smarter)
- **Making Cursor Smarter with an MCP Server For Nx Monorepos**
- [Nx MCP Now Available for VS Code Copilot](/blog/nx-mcp-vscode-copilot)
- [Nx and AI: Why They Work so Well Together](/blog/nx-and-ai-why-they-work-together)
{% /callout %}
A couple of weeks ago, we [announced how Nx makes your LLM smarter](/blog/nx-just-made-your-llm-smarter) by providing rich metadata about your monorepo structure, project relationships, and architectural context. This enhancement was initially available through GitHub Copilot in VSCode, but now we're taking it a step further by implementing the Model Context Protocol (MCP) for Cursor, making your AI assistant even more powerful.
{% call-to-action title="Learn more about Nx and AI" url="https://go.nx.dev/march2025-webinar" description="LLM-focused Webinar on March 19th" /%}
{% toc /%}
## What is the Model Context Protocol (MCP)?
The Model Context Protocol is an open standard - pioneered by [Anthropic](https://www.anthropic.com/) - that enables AI models to interact with your development environment in a more structured and powerful way. It provides a standardized interface for tools and resources that can be used by AI assistants to better understand and interact with your codebase.
![mcp-architecture.avif](/blog/images/articles/mcp-architecture.avif)
_(Source: [Official MCP documentation](https://modelcontextprotocol.io))_
According to the [MCP documentation](https://modelcontextprotocol.io/introduction), it's designed to:
- Provide structured access to development tools and resources
- Enable AI models to take actions in your development environment
- Create a consistent interface for different AI assistants
- Allow for better context management and tool selection
This protocol is particularly powerful for monorepo development because it allows AI assistants to understand not just individual files, but the entire workspace structure, project relationships, and available tools. When combined with Nx's rich metadata about your monorepo, it creates an incredibly powerful development experience.
The advantage of MCP is that it can become a standard. In fact, more and more libraries provide implementations (e.g. [Spring AI's MCP integration](https://docs.spring.io/spring-ai/reference/api/mcp/mcp-overview.html)).
We're leveraging this by exposing such an MCP from our Nx Language server that comes with Nx Console so Cursor and other MCP compatible clients can automatically hook into the data Nx has about your workspace.
## How to enable it in your Cursor IDE
Getting started with Nx's MCP integration in Cursor is straightforward. Here's what you need to do:
**Install Nx Console** in your Cursor IDE by following our [editor setup guide](/getting-started/editor-setup).
Once installed, Cursor will automatically detect Nx Console and prompt you to configure the MCP server. You'll see a notification like this:
![cursor-nx-notification.avif](/blog/images/articles/cursor-nx-notification.avif)
**Click on the notification** to open Cursor's settings. The Nx Console notification conveniently provides a direct link to the MCP settings:
![cursor-nx-enable-mcp.avif](/blog/images/articles/cursor-nx-enable-mcp.avif)
In the settings, you'll see the Nx Console MCP server listed as "Disabled". **Click on it to enable it**:
![Cursor MCP settings screen showing the disabled Nx Console MCP server](/blog/images/articles/mcp-cursor-disabled.avif)
Once enabled, you'll see the server status change:
![Cursor MCP setting screen showing the enabled Nx MCP server](/blog/images/articles/cursor-mcp-server-config.avif)
If this is your first MCP installation, you'll notice a new `.cursor/mcp.json` file in your workspace. This file contains your MCP configuration:
![Cursor MCP configuration](/blog/images/articles/cursor-nx-mcp-configuration.avif)
Share this configuration with your team to ensure consistent settings or add it to `.gitignore` if you prefer to keep your local configuration private.
That's it! Your Cursor IDE is now configured to use Nx's MCP integration. For more details about the available features and capabilities, check out our [AI enhancement documentation](/features/enhance-AI).
{% callout type="note" title="Manual Setup" %}
If you've missed the notification, you can always run the `nx.configureMcpServer` command via the command prompt (`Ctrl/Cmd` + `Shift` + `P`) and install the MCP server that way.
{% /callout %}
## How it works
The Nx MCP integration is built on top of the official [Model Context Protocol TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk). When you enable the integration, we automatically spin up a local MCP server that communicates with Cursor using Server-Sent Events (SSE). This server runs on a random available port on your localhost, ensuring it doesn't conflict with other services.
![Cursor MCP Architecture Diagram](/blog/images/articles/mcp-nx-architecture.avif)
The MCP server is configured through the `.cursor/mcp.json` file, which is automatically created in your workspace as mentioned in the previous section. Nx Console will automatically read the port specified there and spin up a matching MCP server.
You can always view and modify the configuration through `Cursor Settings -> MCP`.
### Available Tools
While the Model Context Protocol defines various functionalities (tools, resources, roots, and sampling), support in popular clients like Cursor or Claude Desktop is limited. For now, we've focused on providing a set of essential tools that leverage Nx's rich metadata:
- `nx_workspace`: Provides an annotated representation of your Nx configuration and project graph
- `nx_project_details`: Returns comprehensive configuration for any specific Nx project
- `nx_docs`: Retrieves relevant documentation sections based on your queries
- `nx_generators`: Lists all available code generators in your workspace
- `nx_generator_schema`: Provides detailed schema information for specific generators
- `nx_visualize_graph`: Opens interactive project or task graph visualizations directly in your IDE
### Data Flow
Behind the scenes, we use the Nx Language Server (`nxls`) that comes as part of the [Nx Console extension](/getting-started/editor-setup) to gather workspace information. Each tool request triggers a specific data flow:
1. The tool receives your query
2. `nxls` retrieves relevant workspace information from your Nx workspace
3. We transform this data into a format optimized for LLM consumption
4. The transformed data is enriched with natural language descriptions
5. The result is passed back to the AI assistant
For example, when handling project graph queries, we transform the raw graph data into a more structured format that includes explanations about project relationships and dependencies. You can see this transformation in action in our [project graph transformation code](https://github.com/nrwl/nx-console/blob/9a0425d8c0ae74d326bdd030e8793f2c4d0161e9/libs/shared/llm-context/src/lib/project-graph.ts#L5).
### IDE Integration
The MCP's true potential lies in its deep integration with your IDE. Right now, it can trigger these actions directly in your IDE:
- Visualize the project graph focused on a specific project
- Visualize the task graph for a specific project and target
This is just the beginning. We plan to expand these capabilities in future releases and would love to hear your feedback and ideas on what you'd like to see.
### Using MCP Outside Cursor
If you want to use our MCP integration with other tools that support the protocol (like Claude Desktop, Cline, Windsurf and more), you can run it in `stdio` mode. This allows direct communication between the client and server process. Follow the instructions in the [nx-mcp npm package documentation](https://www.npmjs.com/package/nx-mcp?activeTab=readme) to set this up.
## Let's see it in action
The [Youtube video]() above showcases the below example queries, showing how Cursor leverages the different exposed Nx MCP tools to get more information to correctly take action.
- If I change the public API of feat-product-detail, which other projects might be affected by that change?
- Use Nx to generate a new React library for handling past orders.
- Can you configure Nx release for the packages of this workspace? Just update nx.json with the necessary configuration. Use conventional commits as the versioning strategy. Also feel free to use the Nx docs to pull more info on how to configure it.
## Wrapping up
This is just our very first version of developing an MCP server. The protocol is evolving as we speak and getting more powerful by implementing new possibilities for enriching your LLM queries with more contextual data.
But already these first interactions show how much more helpful and precise the answers become, making Cursor specifically a lot more useful.
We **want your feedback though!** Reach out on our socials ([Twitter/X](https://x.com/NxDevTools), [Bluesky](https://bsky.app/profile/nx.dev) and [LinkedIn](https://www.linkedin.com/company/nrwl/)) or hop into our [weekly office hours on Discord](http://go.nx.dev/office-hours).
Stay tuned for more updates on this MCP integration as well as enhancements on the [VSCode Copilot front](/blog/nx-just-made-your-llm-smarter).
---
Learn more:
- 🧠 [Nx AI Docs](/features/enhance-AI)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
-108
View File
@@ -1,108 +0,0 @@
---
title: 'Nx Update: 20.5'
slug: nx-update-20-5
authors: [Philip Fulcher]
tags: [nx, release]
cover_image: /blog/images/2025-03-07/header.png
description: Discover the latest in Nx 20.5, featuring TypeScript project references improvements, migration docs, and tool updates like Angular 19.2, React 19, and Vite 6.
youtubeUrl: https://youtu.be/IujhR3-Iidk
---
Time moves fast, and so do Nx releases. Lets catch up with the latest development on Nx since our [last release post for 20.3](/blog/nx-update-20-3#rfc-for-infinite-tasks).
{% toc /%}
## LLM improvements galore
We think that monorepos are the solution to better AI-assisted development, and were doing the work to support that. Weve recently released updates that enhance the LLM experience for both [Copilot](/blog/nx-just-made-your-llm-smarter) and [Cursor](/blog/nx-made-cursor-smarter).
AI-powered coding assistants can edit files, but they're blind to the bigger picture they don't understand how your entire codebase fits together. Nx changes that. With full visibility into your monorepo's project relationships, dependencies, and ownership, Nx enables your LLM to move beyond local file changes by providing this essential monorepo context.
Take each of these for a spin and then [sign up for our webinar](/blog/are-monorepos-the-answer-to-better-aiassisted-development) on Nx and AI-assisted development.
{% youtube src="https://www.youtube.com/watch?v=V2W94Sq_v6A" /%}
## TypeScript project references improvements
ICYMI, we announced a [new experience for TypeScript monorepos](/blog/new-nx-experience-for-typescript-monorepos) in January. The new setup is [faster, more efficient in memory use](/blog/new-nx-experience-for-typescript-monorepos#key-highlight-performance), and fixes common issues with TypeScript editor support for large monorepos. Since then, weve steadily improved this experience with many performance and quality-of-life improvements.
One of the significant improvements is that you can now run tasks with a partial match of the project name rather than needing to use the full name every time. Say you have these projects:
```text
@org/foo
@org/bar
```
You can run the `lint` task for `@org/foo` with `nx lint foo` rather than `nx build @org/foo` every time. A keystroke saved is time saved. 🧠
By default, Nx will use the `name` property from the `package.json` for a project to determine its name. For more flexibility, you can also define a name as part of the `nx` properties:
```jsx
{
"name": "@org/foo",
"nx": {
"name": "foo"
}
}
```
We have also made projects inferred by `@nx/js` more efficient by eliminating the duplicate typechecks that were occurring. Previously, when `@nx/js` inferred tasks in a workspace using TypeScript project references, buildable libraries would have both a `build` and `typecheck` target inferred. However, since typechecking occurs as part of `build`, this resulted in typechecking being run twice. Now, buildable projects will only have the `build` target, saving time.
[See more details on how `@nx/js` infers tasks](/nx-api/js#how-nxjs-infers-tasks)
{% youtube src="https://www.youtube.com/watch?v=O2xBQJMTs9E" /%}
## Migration docs
When `nx migrate` is run, Nx determines what migrations need to be run, but it hasn't been easy for users to understand what the migrations do. The first step we're taking to address this is providing migrations docs for each plugin, going back to version 20 of Nx. [See the Angular plugin migration for an example](/nx-api/angular/migrations).
Additionally, when running migrations, the terminal will provide links for each migration with richer information about what is actually happening. This is just our first step in addressing confusion during migrations, keep an eye out for more development here.
## ESM support for eslint config
`@nx/eslint` now uses ESM for configuration by default. This means that new workspaces will use ESM. Existing workspaces will continue to use CommonJS. We dont currently have a migration path between CommonJS and ESM because of the possibility to break something in your lint rules. Both CommonJS and ESM will be supported for the near future.
## React 19 support for new workspaces
New Nx workspaces now default to React 19. Note that due to the extent of breaking changes coming with React 19, we will not be providing an automated migration to React 19 via [**`nx migrate`**](/nx-api/nx/documents/migrate). If youre ready to make this migration on your own, [see our docs about using the new `reactCompiler`](/recipes/react/react-compiler#react-compiler-with-nx)
## Angular 19.2 support
`@nx/angular` now supports up to Angular 19.2 Time to give their new experimental [Resources API](https://angular.dev/guide/signals/resource) a try! If youre not quite ready to upgrade your version of Angular, remember that you can migrate to the latest Nx while keeping your current version of Angular using the `--interactive` flag during migration. [See our docs for more details](/recipes/tips-n-tricks/advanced-update#choosing-optional-package-updates-to-apply).
## Vite 6 + Vitest 3 support
`@nx/vite` now supports [Vite 6](https://vite.dev/blog/announcing-vite6) and [Vitest 3](https://vitest.dev/blog/vitest-3.html). This allows you to use the latest features in Vite like the [experimental Environment API](https://main.vite.dev/guide/api-environment) and brings us up-to-date with the latest in the Vite ecosystem!
## Update on Infinite Tasks/Continuous Tasks
In our [20.3 release post](/blog/nx-update-20-3#rfc-for-infinite-tasks), we introduced an RFC for “Infinite Tasks” (now called [Continuous Tasks](https://github.com/nrwl/nx/discussions/29025)). Nx will add the concept of **Continuous tasks** which Nx will orchestrate as part of the task graph. This will allow for tasks to depend on other running tasks in addition how it already allows depending on other completed tasks. This will allow for better support of long-running tasks like backend servers for frontend applications that depend on them, or tools that run in a watch mode. Weve been hard at work implementing this feature, and you can look forward to a beta version before the release of Nx 21.
## Fixes and improvements
As always, there are many fixes and improvements being added to Nx every day like:
- Calculating project graph speed has been significantly improved
- Improved stability of the daemon
Be sure to check out the [full release notes](https://github.com/nrwl/nx/releases/tag/20.5.0) for all the details.
## Automatically Update Nx
As always - updating Nx and its plugins is easy as we ship an [automated migration command](https://www.notion.so/features/automate-updating-dependencies).
```bash
npx nx migrate latest
```
After updating your dependencies, run any necessary migrations.
```bash
npx nx migrate --run-migrations
```
## Learn more
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
@@ -1,395 +0,0 @@
---
title: 'Modern Angular Testing with Nx'
slug: modern-angular-testing-with-nx
authors: ['Jack Hsu']
tags: ['angular', 'nx']
cover_image: /blog/images/2025-03-17/modern-angular-testing.png
description: 'Learn how Nx enhances Angular testing by integrating modern tools like Playwright and Vitest, improving test speed, reliability, and CI scalability.'
---
{% callout type="deepdive" title="Angular Week Series" expanded=true %}
This article is part of the Angular Week series:
- **Modern Angular Testing with Nx**
- [Angular Architecture Guide To Building Maintainable Applications at Scale](/blog/architecting-angular-applications)
- [Using Rspack with Angular](/blog/using-rspack-with-angular)
- [Enterprise Patterns](/blog/enterprise-angular-book)
{% /callout %}
Testing is a crucial part of any application to ensure correctness and guard against regression, and Angular is no exception. Here at Nx, we're big fans of Angular, and we think that we can drastically improve the unit testing and end-to-end (E2E) experience for Angular developers.
Modern tools have evolved to make testing faster, more reliable, and developer-friendly. The Angular team has recognized this shift in the testing landscape. They've officially announced that [Protractor is in maintenance mode](https://blog.angular.dev/the-state-of-end-to-end-testing-with-angular-d175f751cb9c) and recommend using modern alternatives like Playwright or Cypress. Similarly, while Karma is still supported, the team [acknowledges the benefits of modern test runners](https://blog.angular.dev/moving-angular-cli-to-jest-and-web-test-runner-ef85ef69ceca) like Jest and Vitest, especially in terms of performance and developer experience.
In this post, we'll explore how the Nx unlocks modern testing tools for Angular developers, and how Nx can help your CI scale as your team and codebase grow.
## **Effortless E2E Testing at Scale**
New Nx Angular workspaces come with Playwright as the E2E testing framework by default.
```shell
npx create-nx-workspace@latest --preset=angular-monorepo --appName=my-app
```
You can use Cypress by passing the `--e2eTestRunner=cypress` option. We will use Playwright for this example, but the benefits that Nx brings apply to both frameworks.
Once you have the workspace created, you can see the E2E tests in action by running the following:
```shell
npx nx e2e my-app-e2e
```
This command runs `playwright test` underneath the hood. This is just standard tooling, and there is nothing Nx-specific about the tests. Nx comes into play with the `@nx/playwright` plugin, as you see inside your `nx.json` file. The `@nx/playwright` plugin does a few things.
First, it makes the `e2e` command cacheable, so running it again without changes source files nor test files will replay the command from cache.
```shell
npx nx e2e my-app-e2e
```
You should see a message as follows the second time:
```{% command="npx nx e2e my-app-e2e" %}
NX Successfully ran target e2e for project my-app-e2e (154ms)
Nx read the output from the cache instead of running the command for 1 out of 1 tasks.
```
This is a powerful feature, especially when used in conjunction with [Remote Caching](/ci/features/remote-cache) (i.e. Nx Replay).
How does Nx understand when a task can be read from cache? Well, the `@nx/playwright` also autoconfigures task inputs for you. So, unless a relevant file is changed, the task can be read from cache. That means updates to `README.md` will replay E2E tests from cache rather than running the expensive task.
Another thing that Nx handles automatically for you is restoring outputs from cache. You'll notice that an HTML report is generated in the `dist/.playwright` folder.
```
dist/.playwright/apps/my-app-e2e
├── playwright-report
│ └── index.html
└── test-output
```
You can remove this folder, and when Nx replays the task from cache, the test artifacts will be restored.
```
rm -rf dist
npx nx e2e my-app-e2e
tree dist/.playwright/apps/my-app-e2e
```
You should see the exact same output in `dist` even though the Playwright tests didn't actually run.
To see how Nx configures your project, you can use `nx show project`.
```shell
npx nx show project my-app-e2e
npx nx show project my-app
```
![Nx Cloud Result](/blog/images/2025-03-17/Screenshot_2025-03-05_at_10.44.52_AM.png)
We also recommend that you install the Nx Console extension for VSCode, Cursor, and IntelliJ. It seamlessly integrates the [Project Details View](/recipes/nx-console/console-project-details) with your editor. To install it visit the Marketplace pages:
- [VSCode extension](https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console)
- [IntelliJ plugin](https://plugins.jetbrains.com/plugin/21060-nx-console)
Okay, the caching is already great on its own, but Nx has another very powerful feature to help you scale your CI.
### **Automatic E2E Test Distribution**
As workspaces grow, they often run into CI scaling issues that are hard to solve. E2E tests are often the main culprit of CI slowness, as a test suite can take several hours to run in large workspaces. This is just the reality for many teams, where you need the large test suites to ensure quality, but it's impossible to iterate quickly when each CI run takes hours.
Fortunately, Nx has a solution that does not require complicated pipeline files or a whole team of infrastructure engineers to keep CI running smoothly. That solution is [Automatic Test Splitting](/ci/features/split-e2e-tasks) (or Nx Atomizer).
If you view the `my-app-e2e` project (`npx nx show project my-app-e2e`), you will notice that there is an `e2e-ci` target, with additional targets created for each test file. This is the task splitting feature that `@nx/playwright` enables. Whereas the `e2e` target runs the full Playwright suite, the `e2e-ci` task runs additional tasks created from test files.
When run on a single machine, `e2e-ci` will be slower because it starts multiple Playwright processes, which is why we only allow it to run through distribution. To [enable distribution](/ci/features/split-e2e-tasks#enable-automated-e2e-task-splitting), you must connect your workspace to [Nx Cloud](/nx-cloud). This is easily done with the `connect` command.
```shell
npx nx connect
```
Follow the onboarding steps and you should be connected within five minutes. For more information, check out our [GitHub Actions Tutorial](/ci/intro/tutorials/github-actions) or our [guides](/ci/recipes/set-up) for all supported CI providers (GitHub, GitLab, Azure, etc.).
Now, let's take a look at a concrete example to get an idea of how much time-saving you can unlock with Nx Atomizer. I created [this repo](https://github.com/jaysoo/angular-testing-demo) that contains a simple Angular application and a UI package. It also has 40 Playwright test files.
```
apps/demo-e2e/src
├── example-1.spec.ts
├── example-2.spec.ts
├── example-3.spec.ts
├── ...
└── example-40.spec.ts
```
Where each file uses `page.waitForTimeout` to artificially simulate run-running tests.
```ts
import { test, expect } from '@playwright/test';
test('example 1 - test 1', async ({ page }) => {
await page.goto('/');
await page.waitForTimeout(3000);
expect(page.url()).toBe(page.url());
});
test('example 1 - test 2', async ({ page }) => {
await page.goto('/');
await page.waitForTimeout(3000);
expect(page.url()).toBe(page.url());
});
// ...
test('example 1 - test 10', async ({ page }) => {
await page.goto('/');
await page.waitForTimeout(3000);
expect(page.url()).toBe(page.url());
});
```
Using this [workflow file](https://github.com/jaysoo/angular-testing-demo/blob/main/.github/workflows/ci.yml) for GitHub Actions, we see that running unit tests and E2E tests take roughly 23 minutes in total.
- CI without distribution: [https://github.com/jaysoo/angular-testing-demo/actions/runs/13677108651](https://github.com/jaysoo/angular-testing-demo/actions/runs/13677108651)
In the [`feat/nx-cloud/setup`](https://github.com/jaysoo/angular-testing-demo/tree/feat/nx-cloud/setup) branch and PR, you can see that the [workflow file](https://github.com/jaysoo/angular-testing-demo/blob/feat/nx-cloud/setup/.github/workflows/ci.yml) is updated to enable distribution via Nx Agents.
```yaml
name: CI
# ...
jobs:
main:
runs-on: ubuntu-latest
steps:
# ...
- run: npx nx-cloud start-ci-run --distribute-on="8 linux-medium-js" --stop-agents-after="e2e-ci"
# ...
- run: npx nx affected -t test e2e-ci
```
With distribution enabled, the total CI time went from 23 minutes to 6 minutes, which is over 70% reduction in total duration.
- CI with distribution: [https://github.com/jaysoo/angular-testing-demo/actions/runs/13677116398](https://github.com/jaysoo/angular-testing-demo/actions/runs/13677116398)
You can see that the CI pipeline distributes individual test files on multiple agents.
![Nx Cloud In Progress](/blog/images/2025-03-17/Screenshot_2025-03-05_at_8.32.11_AM.png)
That is significant time-saving! As your codebase grows, you have the option to increase distribution by changing the `--distribute-on` option to ensure that CI still runs fast.
```yaml
# Use 12 agents
npx nx-cloud start-ci-run --distribute-on="12 linux-medium-js" --stop-agents-after="e2e-ci"
```
### Dynamic Agent Allocation
You can even [dynamically allocate agents](/ci/features/dynamic-agents#dynamically-allocate-agents) depending on how big the changeset is. To do this, add an YAML file as follows:
```yaml
# .nx/workflows/distribution-config.yaml
distribute-on:
small-changeset: 3 linux-medium-js
medium-changeset: 8 linux-medium-js
large-changeset: 12 linux-medium-js
```
Then, use that file in the `--distribute-on` option.
```yaml
npx nx-cloud start-ci-run --distribute-on=".nx/workflows/distribution-config.yaml" --stop-agents-after="e2e-ci"
```
### Flakiness Detection and Automatic Re-runs
One last thing I want to mention, is that Nx can also help with flaky tests. Nx Cloud can reliably detect flaky tests and automatically re-run them. See the documentation on the [Re-run Flaky Tests](/ci/features/flaky-tasks) for more detail.
All of this power comes at very little complexity and maintenance burden. Nx allows you to declaratively describe what you want to run, and how you want to distribute tasks, and we do all the heavy lifting for you.
As we've seen, Nx is the easiest way for you to scale your E2E tests as your team and codebase grow, without dealing with complicated CI pipelines yourself. CI times can be drastically cut down by more than 70%, as seen in the example above. This enables teams to move faster and deliver value without being slowed down by CI.
Next, let's take a look at how Nx helps with modernizing unit tests.
## **Modern Unit Testing: Beyond Karma**
While Angular CLI traditionally uses [Karma for unit testing](https://angular.dev/guide/testing/test-environment), Nx enables you to leverage more modern testing frameworks like [Vitest](https://vitest.dev/) and [Jest](https://jestjs.io/). The Angular team has been [exploring modern alternatives to Karma](https://blog.angular.dev/moving-angular-cli-to-jest-and-web-test-runner-ef85ef69ceca), recognizing the benefits these tools bring. Let's explore why this matters by comparing Vitest with Karma. Many of these benefits also apply to Jest, which the Angular CLI team has plans to officially support. There are currently no plan for Angular CLI to support Vitest.
### **Why Choose Vitest over Karma?**
The benefits of modern test runners like Vitest are well-documented in the [official Vitest documentation](https://vitest.dev/guide/why.html) and the [Angular blog](https://blog.angular.dev/moving-angular-cli-to-jest-and-web-test-runner-ef85ef69ceca). Here's why they're a compelling choice:
### **Performance Features**
- **Native ESM Support**: Tests run directly without bundling, unlike Karma
- **Parallel Test Execution**: Tests run concurrently by default
- **Efficient Resource Usage**: Modern architecture reduces memory usage
- **Watch Mode with HMR**: Near-instant feedback during development
### **Developer Experience**
- **Better Debugging**: Improved error messages and stack traces
- **Rich Plugin Ecosystem**: Wide range of tools and extensions
- **Snapshot Testing**: Easily test UI components
- **Modern API**: Intuitive, promise-based test writing
- **Active Community**: Regular updates and improvements
While actual performance gains vary by project size, teams consistently report faster test execution and improved developer experience when switching from Karma to modern test runners. This improvement in speed is can be largely attributed to not relying on real browsers and running tests in a simulated environment using pure-JavaScript DOM implementations such as `jsdom`.
### **Setting Up Modern Unit Tests**
Setting up Vitest for your Angular project with Nx is straightforward:
```bash
# Add the Vite plugin
npx nx add @nx/vite
# Configure Vitest for a project
npx nx g @nx/vite:vitest
```
This should generate a Vitest configuration file like the following:
```tsx
// vite.config.mts
/// <reference types='vitest' />
import { defineConfig } from 'vite';
import angular from '@analogjs/vite-plugin-angular';
export default defineConfig({
plugins: [angular()],
test: {
watch: false,
globals: true,
environment: 'jsdom',
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
setupFiles: ['src/test-setup.ts'],
reporters: ['default'],
coverage: {
reportsDirectory: './coverage/my-app',
provider: 'v8',
},
},
});
```
Now, you can run your unit tests through Vitest:
```shell
npx nx test my-app --watch
```
![Vitest Output](/blog/images/2025-03-17/Screenshot_2025-03-05_at_1.14.58_PM.png)
Note, that you may have a conflicting `test` target, which can be resolved by removing or renaming the old target in `project.json`:
```json
{
"targets": {
"karma:test": {
"executor": "@angular-devkit/build-angular:karma",
"options": {
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "tsconfig.spec.json",
"assets": [
{
"glob": "**/*",
"input": "public"
}
],
"styles": ["src/styles.css"],
"scripts": []
}
}
}
}
```
Big shout-out to Brandon Roberts and the Analog team for bringing [Angular-support to Vitest](https://analogjs.org/docs/features/testing/vitest).
Try it out yourself by cloning the example repo:
```shell
# Set up
git clone https://github.com/jaysoo/angular-testing-demo.git
cd angular-testing-demo
npm install
# Run test for each project
npx nx test demo
npx nx test ui
# Run in interactive mode (try updating files to see how fast HMR is)
npx nx test ui --watch
# Run all tests
npx nx run-many -t test
```
The improvements for local development is night and day. Receive instant feedback when you run in watch mode, leverage modern [debugging tools integration](https://vitest.dev/guide/debugging), better error messages and stack traces, and more. CI is also improved by reducing flakiness and inconsistencies across environments, by not relying on real browsers.
### Generate New Projects with Vitest
The application and library generators that come with `@nx/angular` both support using Vitest as the unit test runner.
```shell
npx nx g @nx/angular:app apps/demo --unitTestRunner=vitest
npx nx g @nx/angular:lib packages/ui --unitTestRunner=vitest
```
Note that Jest is also supported if that is preferred.
```shell
npx nx g @nx/angular:app apps/demo --unitTestRunner=jest
npx nx g @nx/angular:lib packages/ui --unitTestRunner=jest
```
This means you can easily create new projects and be productive immediately.
## Getting Started with Nx
Now that youre convinced to give Nx a try, let's go over a few ways to install Nx to your workspace.
For a new workspaces, which is great to get started with Nx for the first time, use the `create-nx-workspace` command.
```shell
npx create-nx-workspace@latest --preset=angular-monorepo --appName=my-app
```
Follow, the prompts and you're good to go!
For existing Angular CLI projects, you can run `nx init` inside the workspace. This will keep the file structure as is and minimally add Nx to the workspace.
```shell
ng new my-app
cd my-app
npx nx@latest init
```
Alternatively, you can convert your project into a monorepo using the `--integrated` flag. A monorepo gives you the ability to integrate more projects to it, such as other webapps or backends.
```shell
ng new my-app
cd my-app
npx nx@latest init --integrated
```
Run a few Nx commands to try it out!
```shell
npx nx show project my-app
npx nx graph
npx nx serve my-app
npx nx test my-app
```
For more information, check out our [Getting Started](/getting-started/intro) docs.
## **Conclusion**
Modern testing tools have evolved significantly, offering better developer experience and faster execution times. By leveraging Nx's capabilities with Playwright for E2E testing and modern frameworks like Vitest for unit testing, you can create a more efficient and enjoyable testing workflow for your Angular teams.
CI reliability and duration are improved through:
- Automatic and effortless E2E test distribution
- Flaky task detection and automatic retries
- Faster and more consistent unit tests through modern tools like Vitest
@@ -1,550 +0,0 @@
---
title: 'Angular Architecture Guide To Building Maintainable Applications at Scale'
slug: architecting-angular-applications
authors: ['Juri Strumpflohner']
tags: ['nx']
description: 'Learn how to build scalable Angular applications using domain-driven design, clear boundaries, and Nx tooling for better maintainability and team collaboration.'
cover_image: /blog/images/articles/architecting-angular-apps-bg.jpg
---
{% callout type="deepdive" title="Angular Week Series" expanded=true %}
This article is part of the Angular Week series:
- [Modern Angular Testing with Nx](/blog/modern-angular-testing-with-nx)
- **Angular Architecture Guide To Building Maintainable Applications at Scale**
- [Using Rspack with Angular](/blog/using-rspack-with-angular)
- [Enterprise Patterns](/blog/enterprise-angular-book)
{% /callout %}
Software Architecture consists of a variety of aspects that need to be considered. One key aspect though is to maximize the ability to remain flexible and adaptable to new customer requirements. Maybe you've already come across the "Project Paradox":
![Project Paradox](/blog/images/articles/project-paradox.avif)
A good software architecture helps mitigate the Project Paradox by enabling reversible decisions, progressive evolution, and delaying commitments until more knowledge is available. This can be achieved by aiming for a modular design that facilitates encapsulation, allowing incremental changes, and decoupling dependencies with clearly defined boundaries.
In this article we focus mostly on:
- how to implement a scalable architecture, not only at runtime, but at development time
- how to structure your codebase and establish boundaries
- how to encode and automate best practices to ensure their longevity
{% toc /%}
## Pizza-boxes, Onions and Hexagons - How to organize code
Probably the simplest and most widespread (and probably most straightforward) approach for separating different aspects of an application is the **layered architecture** (in Italy we call them Pizza-box architecture).
![layered-architecture.avif](/blog/images/articles/layered-architecture.avif)
If you ever looked into software architecture and structuring of projects, this is probably what you've come across. There are variations of this such as the hexagonal and onion architecture, which differ mostly in how dependencies are wired up.
The common denominator of these architectures (often also denoted as **horizontal approaches**) is that they are mostly focused on dividing the system based on technical responsibilities.
On the other hand, **vertical architecture approaches** organize the application into functional segments or domains focusing on the business capabilities. This is a common approach in microservices architectures.
![Possible domain architecture for our example application](/blog/images/articles/domain-driven-architecture.avif)
## Breaking up the Monolith - How to identify where boundaries are
{% video-player src="/documentation/blog/media/layered-to-domain-areas.mp4" alt="Moving from a layered architecture to domain oriented" showDescription=true showControls=false autoPlay=true loop=true /%}
Instead of organizing code by technical types (components, services, directives) we want to structure our codebase around business domains. Good candidates for domains are areas that:
- have distinct business capabilities (e.g. in the example of an online shop: orders, products, payments)
- reflect team structure within the organization; domain boundaries often mirror organizational structure (Conway's Law)
- can evolve independently from each other, at different speeds
- have clear responsibilities and boundaries
To use the example of an e-commerce application, we might have:
- Products: Product catalog, inventory, categorization
- Orders: Order processing, history, fulfillment
- Checkout: Payment processing, cart management
- User Management: Authentication, profiles, preferences
- Shipping & Logistics: Delivery options, tracking, address management
All of these need to work together for fulfilling the business requirements, but they can evolve independently and responsibilities can clearly be associated. In general, start broad and then refine over time as you gain more insights.
Having such boundaries clearly separated not only helps with the longer-term maintainability of the application, but also helps assign teams and minimizes cross-team dependencies.
## Start Small, Grow as you Need It
A common mistake is to think too much about the ideal end goal and prepare things "just in case". Yep, over-engineering. Exactly, you might not need a monorepo (at least not yet). However, you want to make sure to not add roadblocks in your way.
A lot of our Angular users don't necessarily start to use Nx because they need a monorepo, but because they want to be able to modularize their monolithic codebase. Hetzner Cloud - one of [our customers](/customers) - is a good example for that. Their main goal for initially adopting Nx was to [break apart their monolith](/blog/hetzner-cloud-success-story).
If you want to start building a single Angular application with Nx, you can use the `--preset=angular-standalone` flag:
```shell
npx create-nx-workspace myshop --preset=angular-standalone
```
This creates a new Angular workspace (not a monorepo) with a single application located in the `src` folder.
```text
└─ myshop
├─ e2e
│ ├─ ...
│ ├─ playwright.config.ts
│ └─ tsconfig.json
├─ public/
├─ src
│ ├─ app
│ │ ├─ ...
│ │ ├─ app.component.ts
│ │ ├─ app.config.ts
│ │ └─ app.routes.ts
│ ├─ index.html
│ ├─ ...
│ └─ main.ts
├─ eslint.config.mjs
├─ jest.config.ts
├─ jest.preset.js
├─ nx.json
├─ project.json
├─ tsconfig.app.json
├─ tsconfig.editor.json
├─ tsconfig.json
└─ tsconfig.spec.json
```
It uses Nx for running and building your project. Nx relies on the Angular Devkit builders but might also add in its own to fill in gaps (e.g. adding Jest/Vitest support). Have a look at the `project.json`:
```json {% fileName="project.json" %}
{
"name": "myshop",
"sourceRoot": "./src",
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:browser",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/myshop",
"index": "./src/index.html",
"main": "./src/main.ts",
...
},
"configurations": {...},
"defaultConfiguration": "production"
},
"serve": {
"executor": "@angular-devkit/build-angular:dev-server",
...
},
...
"lint": {
"executor": "@nx/eslint:lint",
"options": {
"lintFilePatterns": ["./src"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectName}"],
"options": {
"jestConfig": "jest.config.ts"
}
},
"serve-static": {
"executor": "@nx/web:file-server",
"options": {
"buildTarget": "myshop:build",
"port": 4200,
"spa": true
}
}
}
}
```
If you have an existing Angular CLI project, you can also [add Nx support to it](/recipes/angular/migration/angular) by running:
```shell
npx nx init
```
If you already know you want to go straight to an Nx monorepo, you can add the `--integrated` flag to the `nx init` command.
## Modularize your Code into Projects Following Your Domain Areas
When starting with Angular, you might structure your application like this:
```text
src/
├── app/
│ ├── auth/ # Authentication feature
│ ├── products/ # Product management feature
│ ├── cart/ # Shopping cart feature
│ └── checkout/ # Checkout feature
├── assets/
└── styles/
```
This feature-based organization is already an improvement over the traditional "type-based" structure (where code is organized by technical type like components/, services/, etc.). However, it still has limitations:
- Boundaries are purely folder-based with no real enforcement
- Easy to create unwanted dependencies between features
- Hard to maintain as the application grows
- No clear rules about what can depend on what
Instead of relying on folder-based separation, we can create dedicated projects (also called libraries) for different parts of our application. Looking at our workspace structure, we have organized our code into domain-specific projects:
```text
myshop/
├── src/ # Main application
└── packages/ # Library projects
├── products/ # Product domain
├── orders/ # Order management
├── checkout/ # Checkout process
├── user-management/
├── shipping-logistics/
└── ...
```
These projects aren't necessarily meant to be published as npm packages - their main purpose is to create clear boundaries in your codebase. The application still builds everything together, but the project structure helps maintain clear separation of concerns.
As domains grow more complex, you might want to split them further into more specialized libraries. For example, our products domain is organized as:
```text
packages/products/
├── data-access/ # API and state management
├── feat-product-list/ # Product listing feature
├── feat-product-detail/ # Product detail feature
├── feat-product-reviews/ # Product reviews feature
├── ui-product-card/ # Reusable product card component
└── ui-product-carousel/ # Product carousel component
```
This structure follows a pattern where each domain can have:
- **Feature libraries** (`feat-*`): Implement specific business features or pages
- **UI libraries** (`ui-*`): Contain presentational components
- **Data-access libraries**: Handle API communication and state management
Since this is a standalone application (not a monorepo), we use TypeScript path mappings to link these projects together. In our `tsconfig.base.json`, you can see how each project is mapped:
```json {% fileName="tsconfig.base.json" %}
{
"compilerOptions": {
"paths": {
"@myshop/products-data-access": [
"packages/products/data-access/src/index.ts"
],
"@myshop/products-feat-product-list": [
"packages/products/feat-product-list/src/index.ts"
],
"@myshop/products-ui-product-card": [
"packages/products/ui-product-card/src/index.ts"
],
...
}
}
}
```
These mappings allow you to have clear imports in your code:
```typescript
// Clear imports showing the domain and type of code you're using
import { ProductListComponent } from '@myshop/products-feat-product-list';
import { ProductCardComponent } from '@myshop/products-ui-product-card';
import { ProductService } from '@myshop/products-data-access';
```
This makes it immediately obvious:
1. Which domain the code belongs to (`products`)
2. What type of code it is (`feat-*`, `ui-*`, `data-access`)
3. What specific feature or component you're importing
## The Application is Your Linking and Deployment Container
![Distribution of apps and libs in an Nx workspace](/blog/images/articles/nx-app-libs-distribution.avif)
In a well-modularized architecture, your application shell should be surprisingly thin. Think of your main application as primarily a composition layer: it imports and coordinates the various domain libraries but contains minimal logic itself.
The ideal application structure has:
- **Thin application shell** - Contains mainly routing configuration, bootstrap logic, and layout composition
- **Domain libraries** - All business logic, UI components, and data access code
At the Angular router level you then import the various feature libraries:
```typescript
...
export const appRoutes: Route[] = [
{
path: 'products',
loadComponent: () =>
import('@myshop/products-feat-product-list').then(
(m) => m.ProductsFeatProductListComponent
),
},
{
path: 'product/:id',
loadComponent: () =>
import('@myshop/products-feat-product-detail').then(
(m) => m.ProductsFeatProductDetailComponent
),
},
{
path: 'reviews',
loadComponent: () =>
import('@myshop/products-feat-product-reviews').then(
(m) => m.ProductsFeatProductReviewsComponent
),
},
{
path: 'orders',
loadComponent: () =>
import('@myshop/orders-feat-order-history').then(
(m) => m.OrdersFeatOrderHistoryComponent
),
},
{
path: 'create-order',
loadComponent: () =>
import('@myshop/orders-feat-create-order').then(
(m) => m.OrdersFeatCreateOrderComponent
),
},
{
path: 'checkout',
loadComponent: () =>
import('@myshop/checkout-feat-checkout-flow').then(
(m) => m.CheckoutFeatCheckoutFlowComponent
),
},
...
{
path: '',
redirectTo: 'products',
pathMatch: 'full',
},
];
```
> This routing configuration is just an example to convey the idea. You can go even further by having the top level domain-entry routing at the application and then domain specific routing is added by the various domain libraries themselves.
When building, Nx compiles all the imported libraries together with your application code, creating a single deployable bundle. The libraries themselves don't produce deployable artifacts, they are implementation details that are consumed by the application.
This pattern makes it much easier to move features between applications later if needed, as your business logic isn't tied to any specific application shell. It also provides a clear mental model: applications are for deployment, libraries are for code organization and reuse.
## When to Create a New Library
There is really no correct or wrong answer here. You should not just go and create a library for each component. That's probably too much. It really depends on how closely related various components or use cases are.
Let's have a look at our current product domain example:
```text
packages/products/
├── data-access/ # API and state management
├── feat-product-list/ # Product listing feature
├── feat-product-detail/ # Product detail feature
├── feat-product-reviews/ # Product reviews feature
├── ui-product-card/ # Reusable product card component
└── ui-product-carousel/ # Product carousel component
```
We could easily just have a single `feat-product-list` which contains both, the list as well as detail view navigation because they might be closely connected. Similarly we could group `ui-product-card` and `ui-product-carousel` into a single `ui-product` library.
A good rule of thumb is to understand and see how often various parts change over time. As your application grows, watch for these signs that your library boundaries might need adjustment:
- **Frequent Cross-Library Changes** - You consistently need to modify multiple libraries for a single feature change
- **Circular Dependencies** - Libraries depend on each other in ways that create circular references
- **Unclear Ownership** - Multiple teams frequently need to coordinate to modify the same library
- **Complex Dependencies** - Simple features require importing from many different libraries or domains
- **Excessive Shared Code** - You find yourself duplicating types and utilities across domains
Remember that library boundaries aren't set in stone - they should evolve with your application. Start with broader boundaries and refine them as you gain insights into how your code changes together.
## Guard Your Boundaries - Automatically Enforcing Clear Dependencies
Once you've established your domain boundaries and architectural layers, you need to ensure they remain intact as your codebase grows. Nx provides powerful tools to enforce these boundaries through module boundary rules that can be configured in your ESLint configuration.
In our example, we use a dual-tagging approach:
1. **Scope tags** (`scope:<name>`): These reflect our domain boundaries, representing different business capabilities like `products`, `orders`, `checkout` etc. They encode our vertical slicing approach.
2. **Type tags** (`type:<name>`): These represent our horizontal architectural layers such as `feature`, `ui`, `data-access`, and `util`.
Here's how the rules are configured:
```typescript
// Type-based rules
{
sourceTag: 'type:feature',
onlyDependOnLibsWithTags: ['type:feature', 'type:ui', 'type:data-access']
},
{
sourceTag: 'type:ui',
onlyDependOnLibsWithTags: ['type:ui', 'type:util', 'type:data-access']
},
// Domain-based rules
{
sourceTag: 'scope:orders',
onlyDependOnLibsWithTags: ['scope:orders', 'scope:products', 'scope:shared']
},
{
sourceTag: 'scope:products',
onlyDependOnLibsWithTags: ['scope:products', 'scope:shared']
}
```
The rules enforce a clear dependency structure:
- **Type rules** ensure architectural layering. For instance, UI components can only depend on other UI components, utilities, and data-access libraries. This prevents circular dependencies and maintains a clean architecture.
- **Domain rules** control which domains can talk to each other. For example, the `orders` domain can depend on `products` (since orders contain products), but `products` cannot depend on `orders`.
- Every domain can depend on `shared` code, but `shared` code can only depend on other shared code, preventing it from becoming a source of circular dependencies.
These rules are enforced at build time through ESLint. If a developer tries to import from a forbidden domain or layer, they'll receive an immediate error, helping maintain the architectural integrity of your application. This allows you to get feedback as early as possible when you run your PR checks on CI.
Note that this tagging structure is just a suggestion - you can adapt it to your specific needs. The key is to have clear, enforceable boundaries that reflect both your technical architecture and your business domains.
Read more about [Nx boundary rules in our documentation](/features/enforce-module-boundaries).
## Automate Your Standards
As your workspace grows, it becomes increasingly important to automate and enforce your team's standards and best practices.
The key to successful automation is finding the right balance. Start with automating the most common patterns that need standardization, and gradually add more automation as patterns emerge. Focus on the standards that provide the most value to your team. These automation capabilities are really here to ensure that your team's standards are not just documented but actively enforced through tooling, making it easier for developers to do the right thing by default.
Nx provides powerful mechanisms to achieve this.
### Custom Generators for Consistent Code Generation
Nx is extensible. As such it allows you to create custom code generators that you can use to encode your organization's standards and best practices.
The generator itself is just a function that manipulates files:
```typescript
import { Tree, formatFiles } from '@nx/devkit';
export default async function (tree: Tree, schema: any) {
// Add your generator logic here
// For example, create files, modify configurations, etc.
await formatFiles(tree);
}
```
Your team can then run these generators through the Nx CLI (via the `nx generate ...` command) or [Nx Console](/getting-started/editor-setup):
For more detailed information about creating custom generators, including how to add options, create files, and modify existing ones, check out the [Local Generators documentation](/extending-nx/recipes/local-generators).
### Leverage Nx Console AI Integration
If you use [Nx Console](/getting-started/editor-setup), Nx's editor extension for VSCode and IntelliJ, then you should already have the latest AI capabilities enabled.
Nx Console [just got some enhancements](/blog/nx-made-cursor-smarter) with the goal of providing contextual information to editor integrated LLMs such as Copilot and Cursor. By providing Nx workspace metadata to these models they are able to provide much more valuable, context specific information and perform actions via the Nx CLI.
You can find more detailed information [in our documentation](/features/enhance-AI) about how to enable and use the capabilities.
## Single-app vs Multiple App Deployment
Until now we didn't really talk about a monorepo at all. We have a single Angular application and modularized its features into dedicated projects. The projects themselves are really just to encapsulate their logic and structure our application. While we could make them buildable by themselves (mostly for leveraging speed gains from incremental building) most of them do not have build targets. You can test and lint them independently but with a standalone Angular application, all your features are bundled and deployed together as a single unit.
While this approach is simple and works well for smaller applications, there are several scenarios where you might want to split your application:
- **Different scaling requirements**: Your customer-facing store might need high availability and scalability to handle thousands of concurrent users, while your admin interface serves a much smaller number of internal users
- **Resource optimization**: Not all users need all features. For example, administrative features like inventory management are only needed by staff members
- **Independent deployment cycles**: Different parts of your application might need to evolve at different speeds. Your admin interface might need frequent updates for internal tools, while your customer-facing store remains more stable
- **Security considerations**: Keeping administrative features in a separate application can reduce the attack surface of your customer-facing application
As your application grows, you might want to split it into multiple applications - perhaps separating your customer-facing storefront from your administrative interface. The first step is to convert your standalone application into a monorepo structure. Nx comes with a `convert-to-monorepo` command to do exactly that:
```shell
nx g convert-to-monorepo
```
This command moves your existing application into an `apps` directory and adjusts any configuration that needs to be adjusted for supporting multiple side-by-side applications in a monorepo setup.
> Note: If you're looking for a NPM/Yarn/PNPM workspaces based monorepo setup, then make sure to read our article about the [New Nx Experience for TypeScript Monorepos](/blog/new-nx-experience-for-typescript-monorepos).
### Creating Multiple Applications
Once you have a monorepo structure, you can create additional applications that share code with your original app. For example, you might want to create an admin application:
```shell
nx g @nx/angular:app admin
```
Now you can move administrative features (like inventory management) to the new admin app by importing libraries relevant to the new app (such as for example the inventory management libraries).
Here's what the new structure could look like:
```text
myshop/
├── apps/
│ ├── shop/ # Customer-facing storefront (high availability needed)
│ └── admin/ # Administrative interface (internal users only)
└── packages/
├── products/ # Shared product domain
├── orders/ # Shared order management
├── checkout/ # Shop-specific checkout process
└── shared/ # Common utilities and components
```
You can see how the already modular structure allows you to adjust your application structure and re-link some of the packages into the new application. Something that would have otherwise been a major undertaking.
Similarly to how we now have two applications that can be deployed and scaled independently, we could go even further and convert it into a microfrontend approach. But more on that in another article.
## Scaling Development
Obviously as your codebase keeps growing you need to have the tooling support that helps keep it sustainable. In particular CI might become a concern as the number of projects grows. For that purpose Nx has several features to keep your CI fast and efficient:
- **[Remote Caching (Nx Replay)](/ci/features/remote-cache)** ensures your code is never rebuilt or retested unnecessarily.
- **[Distributed Task Execution (Nx Agents)](/ci/features/distribute-task-execution)** intelligently allocates tasks across multiple machines.
- **[Atomizer](/ci/features/split-e2e-tasks)** helps manage growing test suites by automatically splitting them into more fine-grained runs and by leveraging Nx Agents to parallelize them across machines.
- **[Flaky Task Detection](/ci/features/flaky-tasks)** identifies flaky tasks (often automated unit or e2e tests) and re-runs them automatically for you.
One of the key advantages of using Nx is that it's not limited to just Angular either. As your application grows, you might need to:
- Add a documentation site using static site generators like [Analog](https://analogjs.org/)
- Create landing pages with Next.js or Astro
- Build backend services with NestJS or Express
- Add specialized tools for specific business needs
Nx supports all these scenarios while maintaining the ability to share code between different technologies. For example, you could:
```text
myshop/
├── apps/
│ ├── shop/ # Main Angular application
│ ├── admin/ # Angular admin interface
│ ├── docs/ # Analog documentation site
│ ├── landing/ # Next.js marketing site
│ └── api/ # NestJS backend
└── packages/
├── products/ # Shared product domain (used by both front and backend)
├── orders/ # Shared order management
└── shared/ # Common utilities and types
```
The modular structure we established earlier makes it easy to share types and interfaces between frontend and backend and reuse business logic across different applications.
## Wrapping up
Building maintainable Angular applications at scale requires thoughtful architecture decisions and proper tooling support. We've covered several key aspects:
1. **Domain-Driven Structure**: Moving from traditional layered architectures to organizing code around business domains creates clearer boundaries and better maintainability.
2. **Incremental Adoption**: Starting small with a standalone application and growing into a more complex structure as needed, rather than over-engineering from the start.
3. **Clear Boundaries**: Using projects/libraries to create explicit boundaries between different parts of your application, with automated enforcement through module boundary rules.
4. **Automation & Standards**: Leveraging custom generators and AI-enhanced tooling to maintain consistency and best practices across your codebase.
5. **Scalability Options**: Understanding when and how to evolve from a single application to multiple applications or even microfrontends, while maintaining code sharing and reusability.
Remember that architecture is not a one-time decision but an evolving process - start with clear boundaries and good practices, then adapt as your application and team's needs grow. The key to success lies in having the proper tooling and automation in place to support you as your application grows.
---
Learn more:
- 🧠 [Nx AI Docs](/features/enhance-AI)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
@@ -1,20 +0,0 @@
---
title: 'Are Monorepos the Answer to Better AI-Assisted Development?'
description: 'In this webinar, Nx CTO Victor Savkin and Senior Engineer Max Kless will break down **why monorepos are inherently more AI-friendly**, giving LLMs the full context they need to generate more accurate, actionable insights. Youll also learn how Nx provides deep architectural awareness, making AI tools smarter and more effective.'
date: 2025-03-06
slug: 'are-monorepos-the-answer-to-better-aiassisted-development'
authors: ['Victor Savkin', 'Max Kless']
tags: [webinar]
cover_image: /blog/images/2025-03-19/March-2025-Webinar-card.png
time: 1pm EDT/5pm UTC
status: Past - Gated
registrationUrl: https://go.nx.dev/march2025-webinar
---
**Mar 19, 2025 - 1pm EDT/5pm UTC**
Presented by Victor Savkin and Max Kless
In this webinar, Nx CTO Victor Savkin and Senior Engineer Max Kless will break down **why monorepos are inherently more AI-friendly**, giving LLMs the full context they need to generate more accurate, actionable insights. Youll also learn how Nx provides deep architectural awareness, making AI tools smarter and more effective.
{% call-to-action title="Download the recording" url="https://go.nx.dev/march2025-webinar" description="Sign up to gain access" /%}
@@ -1,237 +0,0 @@
---
title: 'Using Rspack with Angular'
date: 2025-03-19
slug: using-rspack-with-angular
authors: [Colum Ferry]
tags: [angular, webpack, rspack, nx]
cover_image: /blog/images/2025-03-19/rspack.avif
description: Learn about how and why to use Rspack with Angular thanks to Nx's efforts for supporting Rspack for Angular.
---
{% callout type="deepdive" title="Angular Week Series" expanded=true %}
This article is part of the Angular Week series:
- [Modern Angular Testing with Nx](/blog/modern-angular-testing-with-nx)
- [Angular Architecture Guide To Building Maintainable Applications at Scale](/blog/architecting-angular-applications)
- **Using Rspack with Angular**
- [Enterprise Patterns](/blog/enterprise-angular-book)
{% /callout %}
Configuring your build tooling for [Angular](https://angular.dev) applications has always been a lesser concern for most Angular developers due to the abstractions that Angular created called `builders`. The underlying implementation details were hidden from the developer who only needed to run either `ng build` or `nx build`.
Despite this, most Angular developers knew that it was originally [Webpack](https://webpack.js.org/) that was used to build their applications. This was a great solution at the time and it was even possible to extend their builds by leveraging custom webpack configurations and plugins.
Over time, as applications grew in size and complexity, it became clear that the inherit slowness with Webpack build speeds was becoming more and more of an issue for Angular developers.
The Angular Team decided to address this issue by creating a new build pipeline that leveraged [Esbuild](https://esbuild.github.io/).
> Esbuild brought much-needed performance improvements to Angular builds, but existing Webpack-based applications were left with either a difficult migration path or no clear upgrade strategy.
To this day, many existing Angular applications still rely on Webpack because they cannot readily replace their Webpack configurations and plugins with equivalent Esbuild plugins. Thus, they are continuing to fight with slow builds reducing their productivity.
## What about Rspack?
[Rspack](https://rspack.dev) is a high performance JavaScript bundler written in Rust. It offers strong compatibility with the Webpack ecosystem, allowing for almost seamless replacement of webpack, and provides lightning fast build speeds.
Because it supports the existing Webpack ecosystem, it provides an answer to teams that maintain Angular applications using Webpack and want to migrate to a faster build pipeline.
However, it is crucial to understand that Rspack is not _completely_ compatible with the Webpack ecosystem with some slight nuances and low-level api differences that prevent certain plugins and loaders from working out of the box.
One such example is the `AngularIvyPlugin` which is a Webpack plugin that is used to support Angular's Ivy compiler. Therefore, it was not possible to simply drop in Rpsack and expect it to work with Angular applications.
Many people have tried to get Rspack working with Angular, but it has proven to be a challenge, with partial support and partial success being reported in the past but with a lot of limitations or actual performance degradations over the Webpack approach.
Previous attempts to get Rspack working with Angular focused on porting the Webpack-specific plugins, loaders and configurations to Rspack, either as-is or by reproducing them. This approach was never fully successful.
Instead, a new approach was needed to support Rspack with Angular. A closer examination of how Angular compiles and bundles the application was required.
## Introducing Angular Rspack
![Angular Rspack Logo](/blog/images/2025-03-19/angular-rspack-logo-small.avif)
Angular Rspack started in September 2024 after I spent way too long investigating and researching how exactly Angular compiles and bundles for both their Webpack support and Esbuild support.
Something that I kept coming back to was that any Rspack solution that relied too much on Angular's Webpack support had the chance of being dropped by the Angular team as they continue to build out incredible new features with Esbuild. Instead, I decided that replicating and utilizing the abstractions the Angular team provided for their Esbuild support had a much stronger chance of longevity.
But before we dive into the technical details, I am excited to announce that Angular Rspack is now being maintained by the Nx team and is available for use with Nx. This means that you can now use Rspack with Angular and Nx and enjoy the benefits of both.
The new package is called [@nx/angular-rspack](https://www.npmjs.com/package/@nx/angular-rspack) and it is available on npm while the repository has been moved to [nrwl/angular-rspack](https://github.com/nrwl/angular-rspack).
Nx already supports and integrates with a wide variety of build tooling across the ecosystem - filling in the gaps where developer experience (DX) needs to be improved - which makes Nx the perfect fit for continuing to maintain and build out Angular Rspack.
The support is still currently experimental, however, it is in a state that may be sufficient for your current needs. We invite you to try it out and to let us know if you run into issues by raising issues on the [angular-rspack repo](https://github.com/nrwl/angular-rspack/issues/new).
There are some limitations and missing features that are currently being worked on and on the roadmap to support. They have been listed at the bottom of this article.
## Migrating from Angular Webpack to Angular Rspack
To make the migration process as smooth as possible, a new generator has been added to the `@nx/angular` package called `convert-to-rspack` which will help you migrate your Angular applications from Webpack to Rspack.
The steps are very simple:
1. Run `nx migrate latest` to update your workspace to the latest version of Nx.
2. Run `nx g @nx/angular:convert-to-rspack` to migrate your Angular application to Rspack.
There is also a [guide in our documentation](/recipes/angular/rspack/migrate-from-webpack) that walks you through the process step-by-step.
Even if you're currently using the Angular CLI, it's as simple as first running `npx nx init` in your workspace and then running `npx nx g convert-to-rspack`.
## Using Angular Rspack
You'll notice that after migrating to Angular Rspack your `build` and `serve` targets have been removed from your project, and are instead [inferred](/concepts/inferred-tasks) by the `@nx/rspack/plugin`.
In addition, a new `rspack.config.ts` file has been created in your project which looks something like this:
```ts
import { createConfig } from '@nx/angular-rspack';
export default createConfig(
{
options: {
root: __dirname,
outputPath: {
base: '../../dist/apps/app',
},
index: './src/index.html',
browser: './src/main.ts',
polyfills: ['zone.js'],
tsConfig: './tsconfig.app.json',
assets: [
'./src/favicon.ico',
'./src/assets',
{
input: './public',
glob: '**/*',
},
],
styles: ['./src/styles.scss'],
scripts: [],
},
},
{
production: {
options: {
outputPath: {
base: '../../dist/apps/app-prod',
},
index: './src/index.prod.html',
browser: './src/main.prod.ts',
tsConfig: './tsconfig.prod.json',
},
},
}
);
```
{% callout type="deepdive" title="createConfig Information" %}
The `createConfig` function is used to create an Rspack configuration object setup for Angular applications.
You can read more about it [here](/nx-api/angular-rspack/documents/create-config).
{% /callout %}
### Building and Serving your Application
You can now run `nx build app` and `nx serve app` to build and serve your application via Rspack.
```{% command="nx build app" %}
> nx run app:build
> rspack build --node-env=production
● ━━━━━━━━━━━━━━━━━━━━━━━━━ (100%) emitting after emit browser:
browser compiled successfully in 2.32 s
```
```{% command="nx serve app" %}
> nx run app:serve
> rspack serve --node-env=development
<i> [webpack-dev-server] [HPM] Proxy created: /api -> http://localhost:3000
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://127.0.0.1:8080/
<i> [webpack-dev-server] Content not from webpack is served from '/Users/columferry/dev/nrwl/issues/rspack-angular/ng-rspack/e2e/fixtures/rspack-csr-css/public' directory
<i> [webpack-dev-server] 404s will fallback to '/index.html'
Listening on port: 8080
● ━━━━━━━━━━━━━━━━━━━━━━━━━ (100%) emitting after emit browser:
browser compiled successfully in 2.33 s
```
### Using a configuration
To run the build with the `production` configuration:
```bash
NGRS_CONFIG=production nx build app
```
`NGRS_CONFIG` is an environment variable that you can use to specify which configuration to use. If the environment variable is not set, the `production` configuration is used by default.
## Creating a new Angular Rspack application
We currently do not have a generator for creating a new Angular Rspack application, but we will soon and it will be available under a `--bundler=rspack` option on the `@nx/angular:application` generator.
However, you can still create a new Angular Rspack application by running the following commands:
```shell
nx g @nx/angular:application myapp --bundler=webpack
nx g @nx/angular:convert-to-rspack myapp
```
## Benchmarks
![Benchmarks](/blog/images/2025-03-19/bundler-build-times.avif)
Below is a table of benchmarks for the different bundlers available, run against an application consisting of ~800 lazy loaded routes with ~10 components each - totaling ~8000 components.
**System Info**
- MacBook Pro (macOS 15.3.1)
- Processor: M2 Max
- Memory: 96 GB
- `@nx/angular-rspack` version: 20.6.2
- Angular version: ~19.2.0
| Build/Bundler | Prod SSR (s) | Prod (s) | Dev (s) |
| ------------- | ------------ | -------- | ------- |
| Webpack | 198.614 | 154.339 | 159.436 |
| esbuild | 23.701 | 19.569 | 15.358 |
| Rsbuild | 23.949 | 20.490 | 18.209 |
| Rspack | 30.589 | 19.269 | 19.940 |
> You can find the benchmarks and run them yourself: [https://github.com/nrwl/ng-bundler-benchmark](https://github.com/nrwl/ng-bundler-benchmark)
As can be seen by the benchmarks above, Rspack is significantly faster than Webpack and very close to Esbuild.
Given that the primary goal for Angular Rspack is to provide a faster build system for Angular Webpack applications while supporting their existing Webpack configurations and plugins, we are confident that Angular Rspack will be a great choice for teams that want to migrate to a faster build system.
## Known Limitations and Missing Features
The following are known limitations and missing features of Angular Rspack:
- Static Site Generation (SSG) is not supported.
- Angular's built-in support for Internationalization (i18n) is not supported.
- Server Routing is not supported - still experimental in Angular currently.
- App Engine APIs are not supported - still experimental in Angular currently.
- Optimization is not currently 1:1 with Angular's optimization - however, there are still great optimizations that are made.
- Styles optimization for `inline-critical` and `remove-special-comments` are not yet implemented.
- Inlining of fonts is not yet implemented.
- Web Workers are not fully supported.
- Hot Module Replacement (HMR) is partially supported.
If you have any other missing features or limitations, please [let us know](https://github.com/nrwl/angular-rspack/issues/new).
## What's Next?
We are actively working on improving the experience, stability and performance of Angular Rspack. Our next steps will revolve around getting to feature parity with Angular's build system - addressing the items listed above to achieve this.
The `@nx/angular` plugin will also be updated to support generating new Angular Rspack applications as well as supporting Rspack Module Federation with Angular.
Exciting times ahead! You can follow our progress by starring the [Angular Rspack repository](https://github.com/nrwl/angular-rspack) and following us on [X](https://X.com/nxdevtools).
## Further Reading
- [Nx Angular Rspack](/recipes/angular/rspack/introduction)
- [Angular](https://angular.dev)
- [Rspack](https://rspack.dev)
- 🧠 [Nx Docs](/getting-started/intro)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
@@ -1,26 +0,0 @@
---
title: 'Enterprise Angular Monorepo Patterns'
date: 2025-03-20
slug: enterprise-angular-book
authors: [Mike Hartington]
tags: [angular, nx, architecture]
cover_image: /blog/images/2025-03-20/book-relaunch.avif
description: Get the latest version of the Enterprise Angular Monorepo patterns book.
---
{% callout type="deepdive" title="Angular Week Series" expanded=true %}
This article is part of the Angular Week series:
- [Modern Angular Testing with Nx](/blog/modern-angular-testing-with-nx)
- [Angular Architecture Guide To Building Maintainable Applications at Scale](/blog/architecting-angular-applications)
- [Using Rspack with Angular](/blog/using-rspack-with-angular)
- **Enterprise Patterns**
{% /callout %}
Building applications is often a challenge when you're working as an enterprise developer. But thankfully, Nx can help teams keep on the happy path when building for these challenging environments. We've had a book available since 2018 to help teams follow established patterns and ensure high quality code, however 2018 was quite a long time ago. Times have changed and so has the best practices for building Angular applications.
As part of our Week of Angular, I'm thrilled to share that we've revised our book "Enterprise Angular Monorepo Patterns" and have updated it for 2025!
If you'd like to get your copy of the book, be sure to [check it out](https://go.nx.dev/angular-patterns-ebook) and download your free copy!
@@ -1,73 +0,0 @@
---
title: 'Custom Task Runners and Self-Hosted Caching Changes'
slug: custom-runners-and-self-hosted-caching
authors: [Victor Savkin]
description: 'Learn about free plugins for self-hosting your cache, a new Open API RFC and hooks for the task lifecycle as well as the commitment to open source and improved community collaboration.'
tags: [nx]
cover_image: /blog/images/articles/bg-self-hosted-caching-article.jpg
---
**TL;DR:** **Nx remains free for everyone who chooses to self-host their own cache**. There will be two ways to self-host:
1. **Maximum independence and control:** An OpenAPI specification so you can run your own cache server implementation on your own terms.
2. **Maximum convenience:** Free plugins for each major cloud storage provider (and arbitrary file system storage), all maintained by us.
These options will be released before Nx 21.
---
**So, what happened?**
In September 2024, we announced that custom task runners would be deprecated and would reach end-of-life in April 2025. This announcement is consistent with how we typically design and ship. We create a draft proposal (for example, a new API) that doesn't affect anyone immediately and give ourselves 6 to 12 months to gather feedback from the community, with real teams. After which, once it becomes stable, we finalize the design. I strongly believe in designing-while-doing and we've found that continuous-thinking-without-doing re-enforces ivory tower solutions.
In this instance, we did not spend enough time engaging with the community on a couple key concerns. Our communication around this situation also fell short and I sincerely apologize for the confusion and concern this caused. I will outline the feedback we heard below and explain what we're improving to ensure this does not happen again.
## **1. "We don't want open source capabilities to be taken away."**
While we're still deprecating the older custom task runners API, our mistake was in not providing one-for-one replacement. To address this, we are introducing new APIs to replace the old one — **fully supporting everything the previous implementation offered, including free self-hosted caching.**
### Self-Hosted Cache API RFC
We have [published a new RFC](https://github.com/nrwl/nx/discussions/30548) detailing a custom self-hosted cache based on an OpenAPI specification. This will be available before Nx 21, ensuring a smooth migration path for those who are looking for full control.
### New preTasksExecution and postTasksExecution API
Some teams used custom task runners for non-cache-related workflows, and removing them created gaps in functionality. We have released open-source preTasksExecution and postTasksExecution hooks to provide the same capabilities in a more composable way. More details [in our docs](/extending-nx/recipes/task-running-lifecycle). We also [added detailed instructions to migrate to this new API](/deprecated/custom-tasks-runner#the-pretasksexecution-and-posttasksexecution-hooks) if you've been using custom task runners for such use cases in the past.
We worked closely with large teams that have advanced use cases to ensure they can still accomplish everything they did before.
{% callout title="A Clear Commitment Moving Forward" type="info" %}
Our commitment is that **no major open-source feature or API will be replaced with a non-open-source alternative.** Some features will inevitably become obsolete over time, but when that happens, we will provide clear deprecation notices and migration strategies. Nx will continue to evolve, but removing an old API will never be a means to move users toward a paid feature.
We will keep developing Nx Cloud and other premium offerings for teams that need enterprise-scale solutions, but we remain focused on a strong open-source foundation that allows teams to use and scale Nx without requiring paid features.
Nx open-source remains a primary focus for us as a company.
{% /callout %}
### **@nx/s3, @nx/gcp, @nx/azure… and related packages are free for everyone**
In addition to updating the API, we believe the first-party packages we offer are the best option for most organizations using self-hosted cache today **so we've made them free for everyone**. The activation is simple and can be done in the CLI. _Full refunds will be issued to anyone who paid for these packages during this transition._
> **Why is there an activation process?** It simply helps us better understand our users as we continue to improve our tools. You can also use the OpenAPI specification to run your own cache for complete independence.
## 2. "We want more input into the roadmap."
We recognize that some of these changes felt abrupt. To address that, we've put the following measures in place to improve how we involve the community in major decisions:
- **New RFC Process:** We've started putting all major API changes through an RFC process before being finalized:
- [**RFC: Nx Custom Self-Hosted Remote Cache**](https://github.com/nrwl/nx/discussions/30548)
- [**RFC: Linking Packages with Workspaces**](https://github.com/nrwl/nx/discussions/29099) (new [TypeScript Setup](/blog/new-nx-experience-for-typescript-monorepos))
- [**RFC: Infinite Tasks**](https://github.com/nrwl/nx/discussions/29025)
- **Regular Office Hours:** A space for open discussions, where we share updates and answer questions. Join us [here](http://go.nx.dev/office-hours)!
- **Published Roadmaps:** More transparency on what's coming next. View [current roadmap](https://github.com/nrwl/nx/discussions/28731).
- **Closer Collaboration with Nx Champions and teams:** This new approach and even this post were shaped through dozens of conversations with [**Nx Champions**](/community) and many teams. We will continue to do so to minimize future blindspots.
### **Moving Forward**
The community's enthusiasm is what makes Nx successful, and we're very grateful for it. Good developer tools aren't built in isolation; they come from working together, listening, and refining as we go. The conversations we had over the past few months have helped us shape a better solution one that works for more teams while keeping Nx fast and powerful.
A huge thank you to everyone who shared their thoughts and helped push Nx forward - we wouldn't be where we are without you!
- Victor Savkin and the Nx Team
@@ -1,105 +0,0 @@
---
title: 'Vibe Exploring a Codebase with LLMs'
slug: vibe-exploring-a-codebase
authors: ['Juri Strumpflohner']
tags: ['nx', 'nx-console', 'ai']
cover_image: /blog/images/articles/bg-vibe-querying-codebase.avif
description: 'A walkthrough of using the Nx MCP integration in Cursor to navigate and understand the Nx Console codebase, demonstrating how AI assistance simplifies development tasks.'
youtubeUrl: https://youtu.be/WUm61cDH8C8
---
[Nx Console](/getting-started/editor-setup) is our IDE extension for VSCode, Cursor, IntelliJ IDEA and other Jetbrains IDEs. It integrates deeply with Nx workspaces. Recently, we've also added features to [enhance your LLM assistant](/features/enhance-AI) with rich context about your monorepo, which is particularly valuable for exploring large codebases. Our Model Context Protocol (MCP) integration specifically improves the AI's reasoning capabilities in these complex environments. Read more in the [announcement blog post](/blog/nx-made-cursor-smarter).
While often associated with code generation, LLMs are **incredibly powerful for exploration and understanding complex codebases**. Imagine onboarding a new developer onto a large project an LLM armed with workspace context could significantly speed up their learning process.
I recently experienced this firsthand as I needed to test an upcoming PR for Nx Console itself. Having not touched the packaging part of the codebase for a while, I wasn't sure about the current structure or how to generate the `.vsix` package for local testing. Instead of manually digging through files, I decided to leverage Nx Console's own LLM integration within the Nx Console codebase (pure inception!). I used it to query the structure and figure out the necessary build commands.
Let's see how that went.
{% toc /%}
## Setting up the Nx MCP
First, you need to ensure the Model Context Protocol (MCP) integration is set up, which allows Cursor to understand your Nx workspace. This starts with having the [Nx Console](/getting-started/editor-setup) extension installed, as it provides the necessary MCP server.
When you start Cursor (version 0.46 or newer) in an Nx workspace with Nx Console present, it should automatically detect the server and prompt you via a notification to enable the "Nx Enhancement" agent. Clicking the notification is the easiest way, but you can also manually trigger the setup using the `nx.configureMcpServer` command from the command palette (`Ctrl/Cmd + Shift + P`).
Finally, verify that the "Nx Console MCP" server is listed and enabled within Cursor's settings (`Cursor -> Settings -> Cursor Settings -> MCP`). This step confirms that Cursor is connected to the local MCP server provided by Nx Console. Once enabled, the AI assistant gains access to a powerful set of tools, allowing it to query detailed information about your Nx workspace structure, project configurations, and task dependencies.
![Making sure the Nx MCP is registered in Cursor settings](/blog/images/articles/cursor-mcp-registered.avif)
The [docs have all the details](/features/enhance-AI) if you need more infos.
## Figuring out the Build Process
My goal was to build the VS Code extension package (`.vsix` file) so I could install and test it locally. I wasn't sure about the exact command.
**Query:** "What command can I use to build the VS Code extension so I can try it out locally?"
Initially, the assistant might search for generic build scripts. However, thanks to the `nx_workspace` tool provided by the MCP, it quickly identifies the project as an Nx workspace.
![MCP identifying Nx workspace and project structure](/blog/images/articles/mcp-identifying-nx-workspace.avif)
It accesses the workspace details and finds the `project.json` for the VS Code extension project (likely located under an `apps` directory). Within this file, it discovers the available targets, including `build` and `package`.
**Query:** "What is the difference between the `build` and `package` command? I want to get an extension VSIX file that I can install. Which one should I use?"
The assistant, using the `nx_project_details` tool, examines the configuration for both targets. It determines that the `package` target is the one that produces the `.vsix` file needed for installation, while `build` likely just compiles the code.
## Understanding Task Dependencies
A common question when dealing with [build pipelines](/features/run-tasks#defining-a-task-pipeline) is whether prerequisite steps need to be run manually.
**Query:** "When I run the package command, do I need to run build beforehand?"
This is where the Nx MCP integration truly shines. Nx allows defining dependencies between tasks. The assistant analyzes the project configuration again.
**Query:** "Where is that dependency between the `package` and `build` command defined?"
It reads the `project.json` for the VS Code project, specifically looking at the `package` target:
```json
// Example structure within project.json (apps/vscode/project.json)
{
// ... other config ...
"targets": {
"build": {
// build configuration
},
"package": {
"executor": "nx:run-commands",
"options": {
"commands": ["node ./tools/scripts/vscode-vsce.js"]
},
"dependsOn": [
"build" // <-- Here's the dependency!
"^build"
]
}
// ... other targets ...
}
}
```
The assistant points out the `dependsOn` array within the `package` target configuration. This explicitly tells Nx to run the `build` target before executing the `package` command.
This **understanding comes directly from the structured data provided by the MCP server about the Nx workspace's configuration and task graph**. Without the MCP, the AI would lack the context of Nx's task dependency system.
## Wrapping Up
Much of the buzz around LLMs focuses on code generation (a major use case, for sure) or even the more extreme "vibe coding". However, as this walkthrough demonstrates, using LLMs for **exploring and understanding large codebases** is an incredibly valuable application, especially within an Nx monorepo enhanced with our MCP integration.
Think about navigating an unfamiliar project: you can ask the AI where specific functionality is located, how different parts are connected, or where new code should ideally be placed. This can help accelerate the onboarding process for new team members.
We're really just getting started with Nx's LLM integration. Keep an eye on our social channels ([@nxdevtools on X/Twitter](https://x.com/nxdevtools), [@nx.dev on Bluesky](https://bsky.app/profile/nx.dev), and our [Nx YouTube channel](https://www.youtube.com/@nxdevtools)) where we regularly share showcases and announce new features we're releasing improvements almost weekly!
---
Learn more:
- 🧠 [Nx AI Docs](/features/enhance-AI)
- 📖 [Making Cursor Smarter with an MCP Server For Nx Monorepos](/blog/nx-made-cursor-smarter)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 👩‍💻 [Nx Console GitHub](https://github.com/nrwl/nx-console)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
@@ -1,139 +0,0 @@
---
title: 'Scaffolding New Apps With Angular Rspack'
date: 2025-04-15
slug: scaffold-angular-rspack-applications
authors: [Colum Ferry]
tags: [angular, webpack, rspack, nx]
cover_image: /blog/images/2025-04-14/scaffold-angular-rspack-applications.avif
description: Learn about how to scaffold a new Angular Rspack application with Nx.
---
It is not uncommon to see [Angular](https://angular.dev) applications that rely on a custom [Webpack](https://webpack.js.org) configuration - especially in enterprise settings. These applications rely heavily on the extensibility offered by Webpack via its Plugin and Loader ecosystem.
However, building Angular applications with Webpack has historically been slow. In fact, slow builds with Webpack is something that even the wider JavaScript Ecosystem has come to expect. The result? Many new bundler options have been created to tackle the issue. Vite, Rollup, Rolldown, Esbuild, Turbopack and more.
The frustration over build performance became so great that the Angular team decided to switch to [Esbuild](https://esbuild.github.io) which has offered an incredible improvement on build speed.
The problem with Esbuild and with the other bundler options listed above stems from the _reason_ teams needed custom Webpack configurations in the first place. The extensibility.
While most of the bundler options that are available today offer some kind of API to extend the build process, the ability to replicate the functionality of certain Webpack plugins and loaders is either impossible or would involve a large effort to build a homebrewed solution that would need to be maintained internally over time.
That is, until [ByteDance](https://bytedance.com/en) released [Rspack](https://rspack.dev).
## Rspack
![Rspack Logo](/blog/images/2025-04-14/rspack-logo.avif)
Rspack is a high performance JavaScript bundler written in Rust. It offers strong compatibility with the Webpack ecosystem, allowing for near-seamless replacement of Webpack, while providing lightning fast build speeds.
That sounds compelling enough as it is, especially for anyone that is currently using Webpack to build their applications. You can see from the benchmark results below just _how much_ faster than Webpack it really is. You can view the benchmark details [here](https://github.com/rspack-contrib/build-tools-performance).
![Rspack Benchmarks](/blog/images/2025-04-14/rspack-benchmarks.png)
Docusaurus has even [reported that switching to Rspack has resulted in a 2x-4x faster production build](https://docusaurus.io/blog/releases/3.6#docusaurus-faster)!
However, Angulars Webpack build pipeline proved to be an issue. It had not been possible to use Rspack as a drop-in replacement for Angular applications.
Which is why [Angular Rspack](/recipes/angular/rspack/introduction) was created.
## Angular Rspack
![Angular Rspack Logo](/blog/images/2025-03-19/angular-rspack-logo-small.avif)
Angular Rspack provides Rspack Plugins and Loaders that makes it possible to build Angular applications with Rspack.
{% callout type="note" title="Learn More" %}
You can learn more about Angular Rspack from the resources below:
- [Angular Rspack - Introduction](/recipes/angular/rspack/introduction)
- [Using Rspack with Angular](/blog/using-rspack-with-angular)
{% /callout %}
At the time of writing, Angular still supports building applications with Webpack alongside Esbuild. However, they are two different build pipelines.
Therefore, if the Angular team were to **drop support for Webpack** and remove the code from the Angular Devkit packages entirely, **Angular Rspack will continue to operate**.
- By using Rspack the majority of Plugins and Loaders used by Angular applications with custom Webpack Configurations will continue to be supported
- It does not rely on Angulars Webpack build pipeline directly. Instead it uses the abstractions in place for the Esbuild pipeline.
From the benchmark results below, you can see the vast improvement using Angular Rspack has over sticking with Webpack. You can view the benchmark details [here](https://github.com/nrwl/ng-bundler-benchmark).
![Angular Rspack Benchmarks](/blog/images/2025-03-19/bundler-build-times.avif)
You can see that the results from Rspack are comparable to the results provided by Angulars Esbuild build pipeline.
That said, it is worth noting that there are still currently some [known limitations and missing features](/recipes/angular/rspack/introduction#known-limitations-and-missing-features).
## Why Choose Rspack for New Projects?
Given the results above, its clear that migrating Angular Webpack applications to Rspack can lead to significant time savings — reducing CI durations and boosting overall developer productivity.
But at this point, you might be asking _why_ you should start a new Angular project with **Rspack** instead of **Esbuild**, especially considering that benchmarks show Esbuild is still slightly faster when building Angular apps.
Heres why Rspack is often the better choice for new projects:
- **Speed** While Esbuild may still win out slightly in raw benchmarks, Rspack delivers massive speed improvements over traditional Webpack — especially in large projects or CI environments. Its fast enough to feel like a completely different experience for developers used to legacy builds.
- **Extensibility** Rspack provides a much more extensible architecture than Esbuild. This allows teams to customize and fine-tune their build processes far more effectively. For projects that have complex build requirements or need to integrate custom tooling, this flexibility is a major advantage.
- **Compatibility** Rspack is designed to be highly compatible with the existing Webpack ecosystem. This means many plugins and loaders that teams already rely on can continue to work with minimal or no changes. It eases the migration path and preserves your existing investment in tooling and configuration.
- **Micro-frontend support** If you're building applications that rely heavily on **[Module Federation](https://module-federation.io)**, Rspack is the clear winner. Its compatibility and support for advanced use cases in micro-frontends are significantly more mature than what's possible with Esbuild.
- **Chunking control** Esbuild has a long-standing [issue](https://github.com/angular/angular-cli/issues/27715) with generating an excessive number of chunks, offering very limited control over how chunking is performed. This can cause performance issues in certain scenarios. In contrast, Rspack offers fine-grained chunking strategies that let teams precisely shape how their bundles are produced.
These advantages make Rspack not just a performance play, but a more adaptable and production-ready solution for modern Angular projects.
## How to Scaffold a New Angular Rspack Project?
Nx provides two methods for creating a new Angular Rspack project, one for existing Nx Workspaces and one for new Workspaces.
### New Workspaces
To create a new Nx Workspace with an Angular Rspack project run the following command and select the options listed below:
```{% command="npx create-nx-workspace myorg" path="~/" %}
NX Let's create a new workspace [[https://nx.dev/getting-started/intro](https://nx.dev/getting-started/intro)]
✔ Which stack do you want to use? · angular
✔ Integrated monorepo, or standalone project? · integrated
✔ Application name · myorg
✔ Which bundler would you like to use? · rspack
✔ Default stylesheet format · css
✔ Do you want to enable Server-Side Rendering (SSR)? · No
✔ Which unit test runner would you like to use? · vitest
✔ Test runner to use for end to end (E2E) tests · playwright
✔ Which CI provider would you like to use? · skip
✔ Would you like remote caching to make your build faster? · skip
NX Creating your v20.8.0 workspace.
```
### Existing Workspaces
In existing Nx Workspaces, ensure you are on Nx version `20.8.0` or greater and simply run:
```
npx nx g @nx/angular:app myapp --bundler=rspack
```
### Converting an Existing Angular Webpack Application
If you have an existing Angular Webpack application you can easily migrate it to use Angular Rspack by using the `@nx/angular:convert-to-rspack` generator. The [Migrate Angular with Webpack to Rspack](/recipes/angular/rspack/migrate-from-webpack) guide explains more on this.
## Future Work
Its been great to see the progress on Angular Rspack so far, but its not done yet. Well be working on making it closer to feature parity with the Angular CLI by addressing:
- Internationalization (i18n) support
- Static Site Generation (SSG) support
- and more!
Stay tuned to our socials to stay up to date on the latest Angular Rspack news!
- 🧠 [**Nx Docs**](/getting-started/intro)
- 👩‍💻 [**Nx GitHub**](https://github.com/nrwl/nx)
- 💬 [**Nx Official Discord Server**](https://go.nx.dev/community)
- 📹 [**Nx Youtube Channel**](https://www.youtube.com/@nxdevtools)
@@ -1,126 +0,0 @@
---
title: 'Nx MCP Now Available for VS Code Copilot'
slug: nx-mcp-vscode-copilot
authors: ['Juri Strumpflohner']
tags: ['nx', 'nx-console', 'ai']
cover_image: /blog/images/articles/bg-copilot-nx-mcp.avif
description: 'Learn how to enhance VS Code Copilot with Nx MCP integration, providing rich monorepo context for smarter AI assistance.'
youtubeUrl: https://youtu.be/dRQq_B1HSLA
---
{% callout type="deepdive" title="Series: Making your LLM smarter" expanded=true %}
- [Nx Just Made Your LLM Way Smarter](/blog/nx-just-made-your-llm-smarter)
- [Making Cursor Smarter with an MCP Server For Nx Monorepos](/blog/nx-made-cursor-smarter)
- **Nx MCP Now Available for VS Code Copilot**
- [Nx and AI: Why They Work so Well Together](/blog/nx-and-ai-why-they-work-together)
{% /callout %}
Back in [February we shipped the first version of Nx Console with AI features](/blog/nx-just-made-your-llm-smarter), directly integrating with GitHub Copilot's APIs to provide rich monorepo context. Now, VS Code has finally adopted the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction), and we've adapted our Cursor-based MCP implementation to work with all MCP clients, including Copilot. This integration makes your AI assistant even more powerful by providing rich context about your Nx workspace. Let's see how to set it up and what it can do for you.
{% toc /%}
## Setting up MCP in VS Code
Getting started with Nx's MCP integration in VS Code is straightforward:
1. **Install Nx Console** from the VS Code marketplace if you haven't already.
2. Once installed, VS Code will show a notification to "Improve Copilot agent with Nx-specific context"
3. Click "Yes" to automatically configure the Nx MCP server in your `.vscode/mcp.json` file
![VS Code showing the Nx MCP installation prompt](/blog/images/articles/copilot-mcp-install.avif)
{% callout type="note" title="Missed the notification?" %}
If you missed the notification, you can always run the `nx.configureMcpServer` command from the command palette (`Ctrl/Cmd + Shift + P`).
{% /callout %}
VS Code will automatically start the MCP server when needed during your interactions with the LLM. You can verify the installation by checking your VS Code settings, where you should see the Nx MCP server listed along with its available tools.
## Why Use Nx MCP in Your Monorepo?
While VS Code and Copilot can already gather information from your monorepo context, Nx MCP provides several advantages:
1. **Efficient Data Access**: Instead of analyzing numerous files to infer relationships, Nx MCP provides direct access to pre-computed metadata about your workspace.
2. **Rich Project Context**: Nx maintains detailed information about:
- Project relationships and dependencies
- Project tags and categorization
- Available tasks and their configurations
- Code ownership
- And more...
This information is already maintained by Nx for optimizing your monorepo, and the Nx MCP makes it now available to your AI assistant as well. Most importantly, this enables Copilot to move beyond simple file-level understanding to gain more of an **architectural awareness of your workspace**. Instead of just seeing individual files and their contents, it now understands the broader context: how projects are connected, where integration points exist, which teams own what, and how changes might impact the broader system. This architectural awareness is particularly powerful in a monorepo setting, where understanding these relationships is crucial for making informed development decisions.
## Nx MCP in Action
Let's look at some practical examples of how Nx MCP enhances your AI assistant's capabilities:
### Understanding Project Relationships
You can ask questions about project dependencies and get accurate answers based on the actual project graph:
```typescript
// Example query:
'Use the provided Nx MCP tools to figure out which order projects
are related to the data-access-order project';
```
The AI will use the `nx_workspace` tool to analyze project relationships and can even visualize them using the `nx_visualize_graph` tool, showing both direct dependencies and upstream projects.
### Smart Code Generation
While LLMs can generate code on their own, Nx MCP provides a powerful combination of predictable code generation through Nx generators and AI-driven customization:
```typescript
// Example query:
"Create a new feature library in packages/order/feat-cancel-order.
Make it a React library and link it to the data-access-order project.
Don't use a bundler or generate components."
```
The AI will:
1. Use `nx_generators` to identify available generators
2. Execute the React library generator with precise options
3. Set up proper project tags and dependencies
### Documentation-Aware Configuration
To prevent hallucination and ensure up-to-date information, Nx MCP provides access to the current Nx documentation:
```typescript
// Example query:
'Add a task pipeline in nx.json that runs the build of all downstream projects before the dev command';
```
The AI will:
1. Query the Nx docs for task pipeline configuration
2. Update `nx.json` with the correct syntax
3. Configure the dependencies accurately
## Beyond File-Level Thinking
This integration isn't just about fancy AI features - it's about making your existing editor experience more productive by integrating AI capabilities where they actually make sense. Instead of jumping on the AI hype train, we're focusing on exposing Nx's deep understanding of your workspace directly in your editor through tools like Copilot. This enables:
- More precise and contextual suggestions
- Architecture-aware refactoring
- Better understanding of project boundaries and relationships
- Improved onboarding assistance for new team members
We're actively developing this integration and would love to hear your feedback! If you have ideas about what you'd like to see or how we can make this more useful for your workflow, reach out to us on [Twitter/X](https://x.com/NxDevTools), [Bluesky](https://bsky.app/profile/nx.dev), [LinkedIn](https://www.linkedin.com/company/nrwl/), or join our [weekly office hours on Discord](http://go.nx.dev/office-hours).
Also, subscribe to our [YouTube channel](https://www.youtube.com/@nxdevtools) for upcoming feature announcements and demonstrations.
Want to try it out? Install [Nx Console from the VS Code marketplace](/getting-started/editor-setup) and follow the MCP setup prompts to get started.
---
Learn more:
- 🧠 [Nx AI Docs](/features/enhance-AI)
- 📖 [Making Cursor Smarter with MCP](/blog/nx-made-cursor-smarter)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 👩‍💻 [Nx Console GitHub](https://github.com/nrwl/nx-console)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
@@ -1,190 +0,0 @@
---
title: 'Nx and AI - Why They Work so Well Together'
slug: nx-and-ai-why-they-work-together
authors: ['Victor Savkin']
tags: ['nx', 'ai', 'monorepo']
cover_image: /blog/images/articles/bg-nx-and-ai-powered-dev.avif
description: 'Explore how Nx monorepos amplify AI benefits by providing complete context and consistent tooling, creating a growing competitive advantage for enterprise development.'
---
{% callout type="deepdive" title="Series: Making your LLM smarter" expanded=true %}
- [Nx Just Made Your LLM Way Smarter](/blog/nx-just-made-your-llm-smarter)
- [Making Cursor Smarter with an MCP Server For Nx Monorepos](/blog/nx-made-cursor-smarter)
- [Nx MCP Now Available for VS Code Copilot](/blog/nx-mcp-vscode-copilot)
- **Nx and AI: Why They Work so Well Together**
{% /callout %}
**TLDR:**
1. **Monorepos Amplify AI Benefits**: Monorepos inherently enhance the utility of coding assistants by providing complete context, creating a growing competitive advantage.
2. **Consistency is Key**: The primary challenge with AI coding assistants is maintaining consistency and reliability. This affects both AI and human developers' future effectiveness, but can be mitigated with Nx capabilities.
3. **Integrated Tooling**: Tools connecting CI, editors, and coding assistants create powerful development workflows.
4. **Mitigated Downsides**: Traditional monorepo disadvantages (like the necessity for large-scale code changes) can be effectively addressed with agentic AI.
5. **Cross-Repository Context**: Benefits extend beyond single repositories to connected repositories using Nx Cloud Polygraph.
{% toc /%}
{% call-to-action title="Are Monorepos the Answer to Better AI-Assisted Development?" url="https://go.nx.dev/april2025-webinar" description="Upcoming webinar: save your spot" /%}
## It's All About Context
> _"Context is worth 80 IQ points." — Alan Kay_
Why do tools like Bolt.new work so well for streamers and indie developers bootstrapping new projects but not so much for enterprise developers that work on an existing large codebase? The answer is context. With Bolt, an LLM can access the entire context of a smaller repo, making local changes with short-term considerations.
Enterprise systems present a different challenge:
- Highly complex and interdependent
- Built by hundreds of engineers over many years
- Often spread across hundreds of repositories
- Integrated with numerous external systems
In these environments, **LLMs lack the necessary context to make changes that account for all considerations**. Like human developers, LLMs struggle with complex systems, but unlike humans, they don't have tacit knowledge from wikis, meetings, or informal conversations. As a result, they only see a small fraction of the system.
![LLMs with limited context can only see a small fraction of the system](/blog/images/articles/nx-ai-limited-context-problem.avif)
LLMs rely entirely on provided context. Because monorepos consolidate all code in one place, they fundamentally improve contextual access. However, **raw code access isn't enough. It's analogous to navigating a city using only street view.** This makes it unlikely to pick optimal routes.
![Navigating code with raw access only is like using street view without a map](/blog/images/articles/nx-ai-street-view-problem.avif)
**What's needed is a "map" of your codebase and organization. Nx via its plugins builds this "map".** It includes:
1. High-level repository structure
2. System architecture
3. Organizational structure and ownership
4. Information about used tools, frameworks, their versions and dependencies
5. CI information (frequency, failures)
This information is used to make CI execution fast, to ensure boundaries, and now **Nx provides this information to [coding assistants through MCP servers](/features/enhance-AI), enabling LLMs to answer questions like**:
- "Who should I consult about creating a new bank library for overdraft payments?"
- "Create a library using the bank team's best practices."
- "Identify and suggest fixes for circular dependencies."
- "Which shared libraries does the overdraft library depend on? Which teams own them?"
- "Which projects owned by my team fail frequently in CI? Which ones affect other teams' work?"
![Nx provides a 30,000-foot view map of your entire system](/blog/images/articles/nx-ai-map-view-visualization.avif)
With this map, Nx provides a "30,000-foot view" of the entire system (architecture, organization, CI). Coding assistants are able to read relevant files and see the 0-foot view. This combination creates very powerful interactions.
But we are working on providing a "10,000-foot view" by compressing relevant content about projects and project clusters in the repository. Another way to think of this is **"d.ts" files for AI coding assistants**. With this, your coding assistant is able to jump between different abstraction levels to get relevant information.
![Different abstraction levels help AI understand your codebase better](/blog/images/articles/nx-ai-abstraction-levels.avif)
## Beyond Speed: Writing Correct and Consistent Code
> _"It is better to take many small steps in the right direction than to make a great leap forward only to stumble backward." — Chinese Proverb_
Research shows enterprise developers commit only 20-30 lines of code daily. The bottleneck isn't coding speed but determining the correct approach to minimize technical debt and long-term impact.
Enterprise developers spend 90%+ of their time not actively writing code. **LLMs excel at generating code, and if that's what they are used for, they can only help with that 10% of the development process.**
To realize substantial gains we need to:
1. Enable LLMs to help with the 90% by providing better context (see section above)
2. Ensure generated code is correct, consistent with the organization's best practices, and doesn't introduce technical debt
Without these considerations, you might be 5x more productive in the first month but progressively slower throughout the year due to accumulated technical debt. So you might not even break even.
### Consistency Through Best Practices and Metadata
One way to minimize technical debt is by codifying and reusing best practices:
**Human Approach**:
- Senior developers examine feature libraries from the bank team
- They identify common patterns and create a local plugin with a generator
- They teach other developers about the new generator
**LLM Approach**:
- Developers ask LLM powered by Nx to extract common patterns from all bank libraries
- LLM creates a local plugin with a generator for bank libraries
- Developer refines the generator
- Another developer requests a new bank feature library
- LLM finds and runs the new generator in dry-run mode for confirmation
- LLM can open a generator UI for parameter tweaking
- Developer selects parameters and generates code
- LLM picks it up and offers additional customization
You don't have to create libraries reflecting organization's best practices. Nx plugins come with many generators.
The reason why this approach works with Nx is that everything in Nx (including [its generators](/features/generate-code)) comes with a lot of static metadata. Traditionally this metadata was used to power the terminal UI, graphic UI, docs and more. Turns out it's also extremely useful for LLMs. **With this metadata they know all the inputs into each generator and what each of them does. But it gets better! Nx's virtual file system lets LLMs run the generators in dry run mode to get the generator outputs.** With this, LLMs can derive which generators work well with which parameters. **Additional metadata specifically designed for LLMs is being added.**
LLMs excel at impressive demonstrations but struggle with consistency and correctness. This is why they work better for new applications where correctness is loosely defined and consistency is not important. Being able to access a large library of annotated generators helps LLMs reduce variability of what they generate, which improves consistency and quality. They use a generator and make some small modifications on top instead of trying to author everything from scratch.
### Migrations
[Nx Migrations](/features/automate-updating-dependencies) are special generators that update codebases to use newer tool versions and new APIs. AI agents can enhance this process with specialized metadata for validation and fixes.
### Human in the Loop
Human oversight remains crucial as AI is good at being "almost correct." Having a human in the loop, especially for high-impact operations, helps with the need to correct what LLMs generate. Nx offers a tool that lets LLMs open the generator UI and allows the developer to customize and preview what will be generated.
## The Integrated Development Advantage: Multiplying AI's Power
> _"The whole is greater than the sum of its parts." — Aristotle_
The utility of your coding assistant goes up significantly as the number of tools it can access increases, which includes the rest of your editor and IDE and your local tools. Nx has always believed in this, and that's why we always put so much effort into our VSCode and IntelliJ plugins. The bet paid off. With agentic AI being available, the value of those plugins is going up 10x.
This is the sketch I drew a while back, and we have been moving toward this vision:
![Integrated development tools and AI systems working together seamlessly](/blog/images/articles/nx-ai-integrated-tools-vision.avif)
**These are some of the things Nx either already does or is about to do in the next couple of weeks:**
1. Coding assistants can open and manipulate the [Nx project graph visualization](/features/explore-graph).
2. Coding assistants are able to open the generation UI, prefill the right values.
3. Coding assistants are able to fetch up-to-date docs to ensure they don't hallucinate.
4. Coding assistants get notified about CI execution results while the CI is still running. The assistant gets relevant logs and files and is able to explain or fix the CI error and push changes before the CI execution even completes.
5. Coding assistants will integrate with the new Nx interactive UI so they can see what the developer sees and are able to address issues while the Nx command is still running. **Tell the LLM to fix the error, and it will know what error you are looking at.**
## From Pain Points to Power Moves
> _"What was once impossible becomes merely difficult; what was difficult becomes easy; and what was easy becomes elegant." — Alan Kay_
Monorepos offer many benefits but come with caveats. The main concern is managing large-scale changes across the repository, such as updating all applications to the latest React version.
Nx has always addressed this with ["migrations" - specialized generators](/features/automate-updating-dependencies) optimized for such tasks. Typically, migrations handle 80% of the work, with the remaining 20% potentially taking weeks for a small team in large repos.
This is precisely where agentic coding assistants excel. **By building on Nx's migration capabilities, AI increases completion from 80% to a much higher percentage, reducing effort from weeks to days or even hours.** What was difficult becomes easy.
The ability to update all code simultaneously is also a significant benefit of monorepos. Small changes like renaming can be executed in a single step, eliminating entire classes of "breaking" changes. Your code is less defensive. This is a huge advantage preventing your code from becoming stale. It's a form of economy of scale, where you can make a code cleanup for a dozen applications in a time that is a tiny fraction of what it would have taken if they were in separate repos.
**Agentic coding assistants significantly expand the range of "reliable transformations" that can be done quickly, turning what were before long refactorings into minutes-long tasks. With this, the delta between what you can do in a monorepo compared to a polyrepo gets substantially more significant.**
## Repository Interconnectedness: Breaking Down the Final Silos
> _"Silos create boundaries. Networks create possibilities." — Anonymous_
This document was about Nx monorepos. But most organizations using Nx have dozens or hundreds of Nx repos and oftentimes hundreds or thousands of other repos as well. Because we recognize this reality, we built **Nx Polygraph** (available for [Nx Enterprise users](/enterprise)) which lets you connect multiple repositories into a federated meta-repo. With this, you will get some of the advantages outlined in this document in H1 2025.
## The Long View: Designing for AI's Continued Evolution
_"The path of technological progress is neither random nor accidental, but follows paths of least resistance toward inevitable destinations." — Kevin Kelly_
Some might argue that coding assistants aren't that reliable now and perhaps some of the benefits aren't realizable. A lot of it is new ([VSCode MCP support is a few weeks old](/blog/nx-mcp-vscode-copilot)) so we are working hard to provide the necessary context to them, and not everything at this point is as good as it should be. What matters though is not the current state but the direction.
**Many advantages are inherent to Nx's approach:**
- Consolidating information
- Providing a navigable "map" of the codebase
- Using metadata-driven generators and migrations that are inherently LLM-friendly
- Enabling large-scale transformations in a monorepo
Although it's not entirely impossible, it is significantly harder to provide the same advantages in a polyrepo where information isn't consolidated, where there is no "map", where there is no codification of best practices, where cross-cutting code changes are effortful and non-atomic.
**The trajectory is clear: monorepos with tools like Nx are positioned to leverage AI capabilities more effectively as the technology evolves.**
---
Learn more:
- 🧠 [Nx AI Docs](/features/enhance-AI)
- 📖 [Nx MCP Now Available for VS Code Copilot](/blog/nx-mcp-vscode-copilot)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 👩‍💻 [Nx Console GitHub](https://github.com/nrwl/nx-console)
- 💬 [Nx Official Discord Server](https://go.nx.dev/community)
- 📹 [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
@@ -1,100 +0,0 @@
---
title: 'Nx Cloud Update - Assignment rules come out of beta and more!'
slug: nx-cloud-update-april-2025
authors: ['Philip Fulcher']
tags: ['nx-cloud']
cover_image: /blog/images/2025-04-21/header.avif
description: 'Nx Cloud updates for April 2025 include assignment rules coming out of beta, CIPE filters, flaky retry configuration, and more!'
youtubeUrl: https://youtu.be/mug02alT7rQ
---
We're rolling out updates to Nx Cloud constantly, so we wanted to bring you up to date with what we've been working on lately.
{% toc /%}
## Assignment Rules come out of beta
In your CI pipeline, you've got some tasks of different sizes. Some tasks are quick, like linting or format checking, but you've got more resource-intensive tasks like building apps or running e2e suites. Your smaller tasks can run on a small agent with fewer CPU cores or less memory, but your larger tasks need a larger agent.
But when you're spreading tasks across multiple agents, it's inefficient to increase the size of all the agents to accommodate your larger tasks. So ideally, you have smaller agents for small tasks and larger agents for your larger tasks. But how do you make sure tasks get assigned to the right agent?
Many CI tools have ways of handling this, but we wanted to make things easier. That's why Nx Cloud now has [Assignment Rules](/ci/reference/assignment-rules). This configuration allows you to control which tasks are assigned to certain agents.
Let's take a look at a quick example for [Nx Agents](/ci/features/distribute-task-execution):
```yaml {% fileName=".nx/workflows/distribution-config.yaml" /%}
# Create five agents using the `linux-medium-js` launch template and five agents using `linux-large-js`
distribute-on:
default: 5 linux-medium-js, 5 linux-large-js
assignment-rules:
# for our `app1` projects...
- projects:
- app1
# for targets beginning with "e2e-ci"...
targets:
- e2e-ci*
# and using the `production` configuration
configurations:
- production
# run matching tasks on a `linux-medium-js` agent with parallelism set to 5
run-on:
- agent: linux-medium-js
parallelism: 5
# for lint and build tasks on any project
- targets:
- lint
- build
# run matching tasks on a `linux-large-js` agent with parallelism set to 10
run-on:
- agent: linux-large-js
parallelism: 10
```
As you can see, there's a lot of flexibility in the configuration here to fine-tune your agent assignments.
We're so excited about this feature that we've built it to work with both [Agents](/ci/features/distribute-task-execution) and [Manual DTE](/ci/recipes/dte/github-dte). So, no matter how you're distributing tasks using Nx Cloud, you can use this new feature! Be sure to [check the docs](/ci/reference/assignment-rules) for more details.
We're also providing a new UI that tells you exactly what tasks are being run on which agents and the rules impacting them.
![Screenshot of UI showing how assignment rules are affecting tasks](/blog/images/2025-04-21/assignment-rules-viz.avif)
## Find your CIPEs with better filtering
![Screenshot of UI showing filters for CIPEs view](/blog/images/2025-04-21/cipe-filters.avif)
Having trouble finding a CI Pipeline Execution (CIPE)? We've added new filter options for the CIPEs list. You can now filter by committer, branch, or date range. You can even sort by duration to help find your longest CIPEs.
## Control how flaky task retries work with your workspace
![Screenshot of UI showing configuration options for flaky task retries](/blog/images/2025-04-21/flaky-retries.avif)
Flaky retries are great at unblocking your CI pipelines by automatically retrying tasks that Nx Cloud detects as flaky. This means you spend less time re-running CI pipelines when you have a task that passes sometimes and fails other times. You now have more control over this process. You can fine-tune how Nx Cloud retries tasks, specify a time range when flakiness is determined, or even turn it off entirely. This helps optimize when tasks are retried so you can control resource use and CI cost.
## Request access to protected views
![Screenshot of UI showing an option to request access to a protected resource](/blog/images/2025-04-21/request-access.avif)
Access control is important, but it can be time-consuming to give the right access to the right people. Now, users can request access with a simple button click, and an admin will be alerted to adjust their access. This automated process saves your team time by not having to send another email or submit a support ticket for access.
## Nx Agents supports custom GitHub domains
![Screenshot of UI showing how to use a custom GitHub URL for Nx Agents](/blog/images/2025-04-21/github-url.avif)
Using GitHub Enterprise and having a custom URL? Nx Agents now works with these custom domains, check for the option to override your domain during setup.
{% call-to-action title="Not using Nx Cloud yet?" url="https://cloud.nx.app/get-started/?utm_source=nx-dev" icon="nxcloud" description="Get started now for free!" /%}
---
## Learn more
- [Nx Cloud Docs](/ci)
- [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)
@@ -1,170 +0,0 @@
---
title: '3 Test Splitting Techniques that Cut E2E Times up to 90%'
slug: test-splitting-techniques
authors: [Miroslav Jonaš]
description: "Learn the techniques for optimizing CI by splitting long-running tests, using sharding, Atomizer, and manual E2E project splitting, all enhanced by Nx Cloud's distributed task execution for improved stability and performance."
tags: [nx, architecture]
cover_image: /blog/images/articles/bg-test-splitting-techniques.avif
---
> "There's nothing worse than waiting for a build to complete, or those e2e tests to run. With Nx Cloud, our development team has saved over 104 hours, almost cutting our build times in half. The installation is seamless and the results are immediate. It's nice to have a tool that passively saves so much development time." - Director of Software Development, enterprise digital marketing firm
One of the most impactful core features of Nx is the affected graph. The affected graph helps us to skip unnecessary work and focus only on the things that have been changed, speeding up our CI and helping us ship features and hotfixes faster.
However, long-running tasks, especially End-to-End (E2E) tests, can become a significant bottleneck and prevent getting the code changes out faster. This is particularly true for monolithic projects, but also in cases when there is a single large E2E project that covers the entire scope of the application. In these scenarios, the full benefits of an affected graph cannot be realized.
In this guide, we'll explore three techniques to speed up your CI by splitting these lengthy test tasks.
{% toc /%}
## Built-in Test Sharding
One of the simplest ways to split long-running tests is by using built-in test sharding features available in popular testing frameworks like **Jest** and **Playwright**. These tools allow you to divide your test suite into multiple shards that can be executed in parallel, reducing the perceived test execution time.
In **Jest** we can utilize the new `--shard` option to split your test suite. The example below shows splitting into 4 shards.
```shell
nx affected -t test -- --shard=1/4
nx affected -t test -- --shard=2/4
nx affected -t test -- --shard=3/4
nx affected -t test -- --shard=4/4
```
**Playwright** also supports the `--shard` option:
```shell
nx affected -t e2e -- --shard=1/4
nx affected -t e2e -- --shard=2/4
nx affected -t e2e -- --shard=3/4
nx affected -t e2e -- --shard=4/4
```
Now that we have our tests sharded, we can distribute the test load and achieve faster feedback. But what about the test runners that don't support sharding?
## Nx Atomizer
{% youtube
src="https://youtu.be/0YxcxIR7QU0"
title="10x Faster e2e Tests!"
width="100%" /%}
For more granular control over test distribution, Nx offers the [Atomizer](/ci/features/split-e2e-tasks). This feature allows you to split tasks per file. This splitting further allows us to distribute long-running tasks across a larger number of agents, providing detailed insights into flaky tests and enabling automatic re-runs. If one of the flaky tests fails, we will still cache the results of all the other task slices and can even have a successful run if the flaky test re-run succeeded.
![The `nx-e2e` task atomized to 13 e2e sub-tasks](/blog/images/articles/atomized-nx-e2e-ci.avif)
With Atomizer, you can achieve a higher level of parallelism and ensure that only the necessary tests are executed, further optimizing your CI pipeline.
To enable the Atomizer, we need to use supported inferred plugins or create our own.
```json {% fileName="nx.json" %}
{
// ...
"plugins": [
{
"plugin": "@nx/cypress/plugin",
"options": {
"targetName": "e2e",
"ciTargetName": "e2e-ci"
}
},
{
"plugin": "@nx/playwright/plugin",
"options": {
"targetName": "e2e",
"ciTargetName": "e2e-ci"
}
},
{
"plugin": "@nx/jest/plugin",
"options": {
"targetName": "test",
"ciTargetName": "test-ci"
}
},
{
"plugin": "@nx/gradle",
"options": {
"classesTargetName": "classes",
"buildTargetName": "build",
"testTargetName": "test",
"ciTargetName": "test-ci"
}
}
]
}
```
The `test-ci` and `e2e-ci` targets will automatically be split into the following format:
- `e2e-ci--path/to/test/file`
- `test-ci--path/to/test/file`
Or more generically:
- `{ciTargetName}--{path/to/test/file}`
You can find more information on how to configure the Atomizer on the respective [Jest](/nx-api/jest#splitting-e2e-tests), [Cypress](/nx-api/cypress#nxcypress-configuration), [Playwright](/nx-api/playwright#nxplaywright-configuration), [Gradle](/nx-api/gradle/documents/overview#nxgradle-configuration) or follow [this recipe](/extending-nx/recipes/project-graph-plugins) to create your own inferred plugin.
## Manual E2E Project Splitting
In addition to automated splitting like sharding or atomization, manually splitting E2E projects into scopes can provide additional significant performance benefits.
Let's look at the simplified graph below:
![Nx graph with single application, e2e project and several libraries](/blog/images/articles/single-e2e-project.avif)
Our E2E project contains tests for each of the application features - products, orders and checkout. Any change made in the graph will cause all our E2E tests to be re-run. Even if we only modified `products`, we will still re-run the tests for `orders` and `checkout`. Although the Atomizer will help us split that work per file and distribute it, we will still end up running unnecessary work.
By defining scopes that implicitly depend on feature libraries rather than the entire application, you can ensure that only relevant tests are run when changes are made.
- **Scope Definition**: Break down your E2E tests into smaller, focused scopes.
- **Dependency Management**: Ensure that scopes depend on specific feature libraries, reducing unnecessary test execution.
![Nx graph with several e2e applications depending on different scopes of the application](/blog/images/articles/manually-split-e2e-projects.avif)
This approach offers both speed of distribution and caching efficiency. Every time the application is affected, we will only run the small subset of sanity smoke tests to ensure the application still runs, but specific features will only be tested if the relevant feature library has been modified or affected and skipped otherwise.
The tricky part comes from the fact that our split E2E applications still depend on the full application being served. But using the combination of `implicitDependencies` and `dependsOn` we can ensure that the application is running for our E2E tests without explicitly depending on it.
```json {% fileName="libs/checkout-e2e/project.json" %}
{
...
"implicitDependencies": ["checkout"],
"targets": {
"e2e": {
"dependsOn": ["^build", { "target": "build", "projects": "app" }]
}
}
}
```
When we look at the graph, we will only see an edge from `checkout-e2e` to `checkout`, but having an explicit `dependsOn` `app:build` ensures that the build of the application was successful and the distributed agent running our E2E task has app's build cache replayed.
As of Nx version `20.8.0` you can now combine manual splitting with the Atomizer. In order to split atomized projects, we will have to override their `dependsOn` property to target also `app:build`:
```json {% fileName="libs/checkout-e2e/project.json" %}
{
...
"implicitDependencies": ["checkout"],
"targets": {
"e2e": {
"dependsOn": ["^build", { "target": "build", "projects": "app" }]
},
"e2e-ci--**/**": {
"dependsOn": ["^build", { "target": "build", "projects": "app" }]
}
}
}
```
This small improvement gives us the best of both worlds - using the Atomizer to automatically split long running tasks into smaller chunks and using manual splitting to skip entire work if dependencies haven't changed.
## Conclusion
By implementing these techniques — the built-in test sharding, Nx Atomizer, and manual E2E project splitting — you can significantly cut down CI time. That means fewer bottlenecks, less time waiting on pipelines, and more time spent delivering features, fixing bugs, and improving the product. When CI runs faster, teams can iterate quickly, merge with confidence, and ship value to users without the drag of slow test cycles.
Faster CI is just the beginning. When combined with Nx Cloud's distributed task execution, these strategies not only bring stability and improved performance but also offer better developer ergonomics and a comprehensive overview of your testing processes. This powerful combination allows your team to ship with greater confidence.
Give these techniques a try and see the difference for yourself.
{% call-to-action title="Ready to go further?" url="/contact/sales?utm_source=nx-blog&utm_medium=blog&utm_campaign=technical-blog&utm_id=040925" icon="nxcloud" description="Let's talk about how Nx Cloud can help you scale with speed." /%}
@@ -1,20 +0,0 @@
---
title: 'Are Monorepos the Answer to Better AI-Assisted Development?'
description: 'In this webinar, Nx CTO Victor Savkin and Senior Engineer Max Kless will break down **why monorepos are inherently more AI-friendly**, giving LLMs the full context they need to generate more accurate, actionable insights. Youll also learn how Nx provides deep architectural awareness, making AI tools smarter and more effective.'
date: 2025-04-16
slug: 'are-monorepos-the-answer-to-better-aiassisted-development'
authors: ['Victor Savkin', 'Max Kless']
tags: [webinar]
cover_image: /blog/images/2025-04-30/April-2025-Webinar-Card.png
time: 10:30am ET/2:30pm UTC
status: Upcoming
registrationUrl: https://go.nx.dev/april2025-webinar
---
**Apr 30, 2025 - 10:30am ET/2:30pm UTC**
Presented by Victor Savkin and Max Kless
In this webinar, Nx CTO Victor Savkin and Senior Engineer Max Kless will break down **why monorepos are inherently more AI-friendly**, giving LLMs the full context they need to generate more accurate, actionable insights. Youll also learn how Nx provides deep architectural awareness, making AI tools smarter and more effective.
{% call-to-action title="Register today!" url="https://go.nx.dev/april2025-webinar" description="Save your spot" /%}
-18
View File
@@ -141,23 +141,5 @@
"image": "/blog/images/Nicolas Beaussart.jpeg",
"twitter": "beaussan",
"github": "beaussan"
},
{
"name": "Nicole Oliver",
"image": "/blog/images/Nicole Oliver.jpeg",
"twitter": "nixcodes",
"github": "nixallover"
},
{
"name": "Rareș Matei",
"image": "/blog/images/Rareș Matei.jpeg",
"twitter": "__rares",
"github": "rarmatei"
},
{
"name": "James Henry",
"image": "/blog/images/James Henry.jpeg",
"twitter": "MrJamesHenry",
"github": "JamesHenry"
}
]
Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 599 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 621 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 596 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 966 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 755 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 923 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 850 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 655 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 538 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

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