Compare commits

...

168 Commits

Author SHA1 Message Date
Jason Jean 20bf4c199d fix(core): fix wasm build (#27830)
<!-- 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 -->

wasm build is broken, blocking releases.

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

wasm build is not broken.

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

Fixes #

(cherry picked from commit d47d41cd53)
2024-09-09 10:38:31 -04:00
Isaac Mann 27b11e0cf3 docs(core): add ahmed elsakaan to champions (#27827)
Add Ahmed Elsakaan to the champions page
@ixahmedxi

(cherry picked from commit e768de6296)
2024-09-09 10:34:02 -04:00
Leosvel Pérez Espinosa 6bf5e35f40 fix(graph): fix "args" help tooltip in pdv and only show "args" usage in fallback example (#27808)
<!-- 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 help tooltip for an example using `args` is misleading. It states
that `args` are CLI positional arguments, but they can also be CLI
flags.
Additionally, the fallback example shows an example using `options`,
which has a few caveats.

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

The help tooltip for an example using `args` should state that `args`
are CLI flags or positional arguments.
The fallback example should show only an example using `args` to reduce
the likelihood of users bumping into any of the caveats of using
`options`, which could be frustrating.

Note: a separate change to the docs will be made to explicitly call out
these caveats. Users would still be able to use `options`, but it
shouldn't be the recommended way of providing args unless they are well
aware of the caveats.

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

Fixes #

(cherry picked from commit 27b8649f5c)
2024-09-09 10:34:02 -04:00
Isaac Mann 65d3914fdf docs(core): remove William Ghelfi from champions (#27826)
Removes William Ghelfi from the champions list

(cherry picked from commit e5e242a46f)
2024-09-09 10:34:01 -04:00
James Henry e71ef0579e docs(nx-dev): explicit callout for plan:check in CI (#27784)
(cherry picked from commit a9beb62b0d)
2024-09-09 10:34:00 -04:00
Juri Strumpflohner ef4b7f9dd5 feat(core): update PNPM GH action setup to use v4 and pnpm version 9 (#27664)
<!-- 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
-->

Newly generated `ci-workflow` setups should use the latest GH package +
v9 PNPM version

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

Fixes #

(cherry picked from commit 1a4e663c5f)
2024-09-09 10:33:59 -04:00
Juri bb0e987504 docs(misc): add videos plus details to performance profiling
(cherry picked from commit 0b99d1deff)
2024-09-09 10:33:59 -04:00
Jason Jean e99617943a fix(linter): fix plugin race condition (#27810)
<!-- 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 a race condition in the `@nx/eslint/plugin` causing projects to
be missing lint.

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

The `@nx/eslint/plugin` creates a map of lintable files up front before
analyzing any particular project and there is no race condition.

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

Fixes #

(cherry picked from commit 035b40620b)
2024-09-06 18:21:17 -04:00
Craigory Coppola 0d9ff239de fix(core): optimize daemon output glob matching (#27775)
<!-- 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
- Nonexistant outputs are considered globs
- Glob outputs are walked from workspace root, which is slow on large
repos

[NX Daemon Server] - 2024-09-06T19:44:39.674Z - Done responding to the
client outputsHashesMatch
[NX Daemon Server] - 2024-09-06T19:44:39.674Z - Handled
OUTPUTS_HASHES_MATCH. Handling time: 94. Response time: 0.
[NX Daemon Server] - 2024-09-06T19:44:39.775Z - [REQUEST]: Responding to
the client. recordOutputsHash
[NX Daemon Server] - 2024-09-06T19:44:39.775Z - Done responding to the
client recordOutputsHash
[NX Daemon Server] - 2024-09-06T19:44:39.775Z - Handled
RECORD_OUTPUTS_HASH. Handling time: 100. Response time: 0.
[NX Daemon Server] - 2024-09-06T19:44:39.818Z - [REQUEST]: Responding to
the client. PROCESS_IN_BACKGROUND
[NX Daemon Server] - 2024-09-06T19:44:39.818Z - Done responding to the
client PROCESS_IN_BACKGROUND
[NX Daemon Server] - 2024-09-06T19:44:39.818Z - Handled
PROCESS_IN_BACKGROUND. Handling time: 14. Response time: 0.

## Expected Behavior
- Nonexistant outputs are only globs if they should be
- Globs are a bit faster

[NX Daemon Server] - 2024-09-06T19:43:36.899Z - Handled
OUTPUTS_HASHES_MATCH. Handling time: 0. Response time: 0.
[NX Daemon Server] - 2024-09-06T19:43:36.900Z - [REQUEST]: Responding to
the client. recordOutputsHash
[NX Daemon Server] - 2024-09-06T19:43:36.900Z - Done responding to the
client recordOutputsHash
[NX Daemon Server] - 2024-09-06T19:43:36.900Z - Handled
RECORD_OUTPUTS_HASH. Handling time: 0. Response time: 0.
[NX Daemon Server] - 2024-09-06T19:43:36.944Z - [REQUEST]: Responding to
the client. PROCESS_IN_BACKGROUND
[NX Daemon Server] - 2024-09-06T19:43:36.944Z - Done responding to the
client PROCESS_IN_BACKGROUND
[NX Daemon Server] - 2024-09-06T19:43:36.944Z - Handled
PROCESS_IN_BACKGROUND. Handling time: 13. Response time: 0.
[NX Daemon Server] - 2024-09-06T19:43:36.949Z - Uploading file artifacts
[NX Daemon Server] - 2024-09-06T19:43:36.949Z - Done uploading file
artifacts

> Note timings are from Nx repo, close enough to be comparable. No real
improvement was expected here, mainly checking that things didn't get
worse.

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

(cherry picked from commit ac9da418bd)
2024-09-06 18:21:02 -04:00
Jack Hsu bb7d9c99f6 Revert "feat(core): add shutdown lifecycle hook to node executor" (#27794)
Reverts nrwl/nx#27354

This patch is causing issues that are more serious than what it fixes.

(cherry picked from commit e71e2f3da8)
2024-09-06 18:16:27 -04:00
Juri 1ff0c6cfb2 docs(misc): add videos to feature pages
(cherry picked from commit 7b5c831630)
2024-09-06 18:16:21 -04:00
Austin Fahsl a61dcda5b9 docs(release): add recipe for preVersionCommand (#27782)
Adds a recipe for using `release.preVersionCommand` to ensure packages
are built before they are versioned.

(cherry picked from commit 3d8c3ed4b5)
2024-09-06 18:16:16 -04:00
Benjamin Cabanes a87556f360 fix(nx-dev): update Bill's website link (#27790)
It updates the link to Bill's website and adds the Amplify icon to the nx-dev site for better clarity and branding.

(cherry picked from commit d0293b28c0)
2024-09-06 18:16:15 -04:00
Leosvel Pérez Espinosa dee325f0d0 feat(core): allow skipping sync when running tasks (#27697)
- Add a new flag `--skipSync` to the run commands to skip running
syncing when running tasks.

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

Fixes #

(cherry picked from commit ccda7f9f00)
2024-09-06 18:14:24 -04:00
Jack Hsu 32bc46c3ed fix(vite): tsconfig paths plugin should resolve file extensions (#27774)
This PR updates the tsconfig paths plugin for Vite such that it resolves
paths with file extensions as well.

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

(cherry picked from commit eb7ac2c57a)
2024-09-06 18:13:51 -04:00
Benjamin Cabanes c02d09b89c feat(nx-dev): add create-nx-workspace from nx-cloud on ci section (#27756)
It updates the "Connect to Nx Cloud" button link to point to dedicated
screen on the Nx Cloud application.

(cherry picked from commit dbf7c2030c)
2024-09-06 18:13:51 -04:00
Colum Ferry 151a5f503a fix(module-federation): ssr uses async-node with runtime plugin (#27492)
- fix(module-federation): SSR should work correctly
- fix(module-federation): ssr-dev-servers should wait for remotes before
starting final 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 -->

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

(cherry picked from commit f17e5efc08)
2024-09-06 18:13:50 -04:00
James Henry 5f04890a51 fix(release): show version plan deletion log in dry-run (#27744)
(cherry picked from commit 00b5d3927d)
2024-09-06 18:13:49 -04:00
Juri Strumpflohner a7a047b348 docs(nx-cloud): improve nx agents feature page (#27606)
(cherry picked from commit 10b905100e)
2024-09-06 18:13:26 -04:00
Benjamin Cabanes b825d36b7d feat(nx-dev): make animations more performant (#27757)
It updates the animations to make them more performant, using variaous techniques to reduce the number of renders.

(cherry picked from commit e516fd12d7)
2024-09-06 18:13:26 -04:00
Miroslav Jonaš ba8de6780c chore(repo): fix missing tsconfig paths (#27759)
<!-- 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 #

(cherry picked from commit 963a1c5621)
2024-09-06 18:13:25 -04:00
Benjamin Cabanes aa4d40537b feat(nx-dev): add Mike Hartington in the team section (#27755)
It add Mike Hartington to the Nx company team.

(cherry picked from commit 27a01861c3)
2024-09-06 18:13:24 -04:00
Benjamin Cabanes d93cd00123 fix(nx-dev): change connect to nx cloud link in home page
(cherry picked from commit f39b995b88)
2024-09-06 18:13:23 -04:00
Miroslav Jonaš 199c9b8cad feat(linter): add option to exclude projects from circular deps check (#27504)
<!-- 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: FrozenPandaz <jasonjean1993@gmail.com>
(cherry picked from commit c4c8b0150d)
2024-09-06 18:13:23 -04:00
Julián Gómez Sibecas df2f2684c4 docs(core): improve typing (#27731)
<!-- 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>
(cherry picked from commit c30415e892)
2024-09-03 13:18:56 -04:00
MaxKless 11cdc46a1d docs(misc): change 'editors support' to 'editor integration (#27740)
(cherry picked from commit 72e3e89999)
2024-09-03 12:30:01 -04:00
James Henry 454efb7ce4 fix(release): version plan changelogs should contain authors and refs (#27737)
(cherry picked from commit 71715363bf)
2024-09-03 12:29:59 -04:00
Rares Matei 55e2fff354 docs(nx-cloud): update launch template props (#27735)
<!-- 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 #

(cherry picked from commit d46edc4ff2)
2024-09-03 12:29:58 -04:00
Victor Berchet ef599e192d fix(misc): fix the URL of the @naxodev/nx-cloudflare plugin (#27723)
The former URL returns a 404

(cherry picked from commit 07333a5c4d)
2024-09-03 12:29:57 -04:00
Nicolas Beaussart 3c7706df70 fix(core): bump plugin pool attempts to work with slow runtimes (#27726)
<!-- 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 -->

With plugin isolation turned on, it works on CI but doesn't on slow
laptops due to corporate software.

We currently run nx with the following patch to figure out why it happen
:

```patch
diff --git a/src/project-graph/plugins/isolation/plugin-pool.js b/src/project-graph/plugins/isolation/plugin-pool.js
index b10ee0d28c994db4e39c4f650dd47496c22cdb60..5a4dfb015906de8a0f9028e09140c6a3f543ca28 100644
--- a/src/project-graph/plugins/isolation/plugin-pool.js
+++ b/src/project-graph/plugins/isolation/plugin-pool.js
@@ -266,6 +266,7 @@ async function startPluginWorker() {
         const id = setInterval(async () => {
             const socket = await isServerAvailable(ipcPath);
             if (socket) {
+                console.log('Managed to start the worker after', attempts, 'attempts.')
                 socket.unref();
                 clearInterval(id);
                 resolve({
@@ -273,10 +274,10 @@ async function startPluginWorker() {
                     socket,
                 });
             }
-            else if (attempts > 1000) {
+            else if (attempts > 10000) {
                 // daemon fails to start, the process probably exited
                 // we print the logs and exit the client
-                reject('Failed to start plugin worker.');
+                reject('Failed to start plugin worker after ' + attempts + ' attempts.');
             }
             else {
                 attempts++;

```

With the added logging, we can see the following:

On ci (nx agents, or circleci)
```
Managed to start the worker after 17 attempts.
Managed to start the worker after 20 attempts.
Managed to start the worker after 23 attempts.
Managed to start the worker after 26 attempts.
Managed to start the worker after 27 attempts.
Managed to start the worker after 27 attempts.
Managed to start the worker after 28 attempts.
Managed to start the worker after 39 attempts.
Managed to start the worker after 47 attempts.
Managed to start the worker after 34 attempts.
Managed to start the worker after 36 attempts.
Managed to start the worker after 40 attempts.
Managed to start the worker after 47 attempts.
Managed to start the worker after 52 attempts.
Managed to start the worker after 54 attempts.
Managed to start the worker after 54 attempts.
Managed to start the worker after 55 attempts.
Managed to start the worker after 41 attempts.
Managed to start the worker after 53 attempts.
Managed to start the worker after 59 attempts.
Managed to start the worker after 46 attempts.
Managed to start the worker after 60 attempts.
Managed to start the worker after 52 attempts.
Managed to start the worker after 67 attempts.
```

On local (Mac, silicon m1)
```
Managed to start the worker after 59 attempts.
Managed to start the worker after 112 attempts.
Managed to start the worker after 166 attempts.
Managed to start the worker after 221 attempts.
Managed to start the worker after 274 attempts.
Managed to start the worker after 160 attempts.
Managed to start the worker after 269 attempts.
Managed to start the worker after 436 attempts.
Managed to start the worker after 390 attempts.
Managed to start the worker after 480 attempts.
Managed to start the worker after 427 attempts.
Managed to start the worker after 655 attempts.
Managed to start the worker after 754 attempts.
Managed to start the worker after 745 attempts.
Managed to start the worker after 200 attempts.
Managed to start the worker after 158 attempts.
Managed to start the worker after 854 attempts.
Managed to start the worker after 852 attempts.
Managed to start the worker after 1011 attempts.
Managed to start the worker after 373 attempts.
Managed to start the worker after 1180 attempts.
Managed to start the worker after 628 attempts.
Managed to start the worker after 789 attempts.
Managed to start the worker after 747 attempts.
```

We even got to numbers as high as 2000 on some laptops.

For the reference, we have the following plugins on our `nx.json`

```json
{
  "plugins": [
    {
      "name": "tsc",
      "plugin": "./tools/nx-tools/src/plugins/tsc.ts",
      "options": {
        "targetName": "type-check"
      }
    },
    {
      "name": "eslint",
      "plugin": "./tools/nx-tools/src/plugins/eslint.ts",
      "options": {
        "targetName": "lint"
      }
    },
    {
      "plugin": "@nx/vite/plugin",
      "options": {
        "buildTargetName": "build",
        "previewTargetName": "preview",
        "testTargetName": "test",
        "serveTargetName": "dev",
        "serveStaticTargetName": "serve-static"
      }
    },
    {
      "plugin": "./tools/nx-tools/src/plugins/jest.ts",
      "options": {
        "targetName": "test"
      }
    },
    {
      "plugin": "./tools/nx-tools/src/plugins/tsup.ts",
      "options": {
        "targetName": "build"
      }
    },
    {
      "plugin": "./tools/nx-tools/src/plugins/storybook.ts",
      "options": {
        "buildStorybookTargetName": "build-storybook",
        "serveStorybookTargetName": "storybook",
        "testStorybookTargetName": "test-storybook",
        "staticStorybookTargetName": "static-storybook"
      }
    }
  ]
}
```

One thing we managed to find out is the more plugin on the project, the
bigger the number.

So for now, the current workaround is to bump to 10000 instead of 1000
tries

_Debugged in pair with @AgentEnder_

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

Plugin worker should work and nx should be working with plugin isolation

(cherry picked from commit 9039e5e0a6)
2024-09-03 12:29:56 -04:00
Mike Hartington 0b0db04c0a docs(misc): add initial speaker post (#27715)
<!-- 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 #

(cherry picked from commit 18e5535940)
2024-09-03 12:29:55 -04:00
MaxKless 67ce0ae26f fix(core): add parallelism to target defaults schema (#27710)
<!-- 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
Parallelism is part of the project schema but not `targetDefaults`. This
means it's highlighted as a warning in `nx.json`

## Expected Behavior
There should be no warning.

(cherry picked from commit 4abcf61748)
2024-09-03 12:29:54 -04:00
Austin Fahsl d0e022b227 fix(release): release plan command should take filters and touched projects into account (#27706)
(cherry picked from commit 4c39ad76bd)
2024-09-03 12:29:54 -04:00
Emily Xiong 16bf2dc842 fix(detox): fix name with camel case (#27602)
<!-- 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 create an app with `--appName <app name in camel case>`, it
currently has an error. it is caused by line:
```
  const { root: appRoot } = readProjectConfiguration(
    host,
    names(options.appProject).fileName
  );
```
it should not convert appProject to fileName, it should just take the
appProject as it is:
```
const { root: appRoot } = readProjectConfiguration(host, options.appProject);
```

## 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/24080

(cherry picked from commit 79b75ad140)
2024-09-03 12:29:10 -04:00
Jack Hsu 578d06794e fix(core): filter branch in preparation for nx import (#27652)
This PR fixes an issue with `nx import` where multiple directories
cannot be imported from the same repo. We now use `git filter-repo` (if
installed) or `git filter-branch` (fallback) to prepare the repo for
import so anything not in the subdirectory will be ignored (i.e. cleaner
history).

Note: `filter-repo` is much faster but requires the user to install it
first via their package manager (e.g. `brew install git-filter-repo` or
`apt install git-filter-repo`). We fallback to `git filter-branch` since
it comes with git, but it is slower, so the process may take 10+ minutes
on really large monorepos (e.g. next.js).

Also:
- Use `await` before returning a promise to Node can maintain correct
stacktrace
- Remove logic for `if (relativeSourceDir === '')` since using
`filter-branch` moves all the files to the root (`.`)
- Default destination project location to be the same as source (e.g.
importing `packages/a` will go to `packages/a` unless user types in
something else)
- Add `--depth` option if users don't want to clone with full history
(default is full history)
- Fix issues with special characters causing `git ls-files` + `git mv`
to since `mv` doesn't work with escaped names

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

(cherry picked from commit ab408ab30c)
2024-09-03 12:29:08 -04:00
Emily Xiong d2b333f8c0 fix(expo): add cacheVersion to metro.config (#27646)
<!-- 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 -->
expo tends to cache the output if there is no change in metro.config.js
we don't need to explicitly set the args --clear when
https://github.com/expo/expo/issues/30930 is fixed

## 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/27392

(cherry picked from commit 925672e20b)
2024-09-03 12:29:07 -04:00
Emily Xiong 778fc6cef9 fix(react-native): change hermesCommand to build android (#27641)
<!-- 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/27367

(cherry picked from commit f64aa9a915)
2024-09-03 12:29:05 -04:00
Leosvel Pérez Espinosa a13debd2f7 fix(core): handle file change conflicts between sync generators (#27695)
<!-- 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 running sync generators in the background (daemon) to cache the
results for when needed, they are isolated from each other (each run
with its own `Tree`). This is done because there's no guarantee which
sync generator will be run together since that would depend on each
specific task graph being run. When a task is run, a task graph is
constructed, and sync generators are collected from it and run/retrieved
from the cache.

Currently, when we run a task and ask the daemon to run the relevant
generators, if there are cached results for a generator that ran in
isolation, we return it. We don't check if its file changes conflict
with those of another generator included in the task graph. This results
in the changes for those conflicting files of the first generator
getting overwritten by the changes of the second generator.

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

When running tasks for which there are conflicting file changes between
generators in the daemon, the conflicting generators should be re-run
sequentially using the same `Tree` to guarantee that file changes are
not overwritten and lost.

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

Fixes #

(cherry picked from commit 3562131820)
2024-09-03 12:29:04 -04:00
Isaac Mann a9b7cde559 fix(nx-dev): show first tab if none selected (#27701)
Tabs are not displaying correctly on the second page that is viewed.

Should be able to select the `project.json` tab on `Run Tasks` and then
switch to `Cache Task Results` and have the `Nx >= 17` tab shown.

(cherry picked from commit a7b2787069)
2024-09-03 12:29:02 -04:00
Philip Fulcher c5a4964b34 docs(nx-dev): add Explain with AI doc links to blog
(cherry picked from commit a0cc0a9735)
2024-09-03 12:29:01 -04:00
Emily Xiong 8406864438 fix(expo): fix unable to build expo local for yarn 4 (#26992)
<!-- 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/22631

(cherry picked from commit 81acdedb18)
2024-09-03 12:29:01 -04:00
Jack Hsu 82e8586c6c fix(core): fixes an issue where using "node:test" results in infinite loop (#27685)
This PR fixes an issue with `node:test` not being recognized as a
built-in Node module, and since it is not in `node_modules` with a
resolvable `package.json`, it hits an infinite loop.

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

(cherry picked from commit e28de09c40)
2024-08-28 16:35:56 -04:00
Jack Hsu 5f34910c86 fix(js): respect "watch" option when "runBuildTargetDependencies" is true (#27677)
This PR fixes and issue when `watch: false` and
`runBuildTargetDependencies: true` results in the server process
restarting, but no build happens.

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

(cherry picked from commit d1c901df1e)
2024-08-28 16:35:54 -04:00
Jack Hsu 9dcc4584ef chore(bundling): rename env vars so we do not cause Nx Cloud connection errors (#27681)
<!-- 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 #

(cherry picked from commit adcefcc6da)
2024-08-28 16:35:50 -04:00
Jack Hsu 2bac4656df chore(storybook): rename env vars so we do not cause Nx Cloud connection errors (#27680)
The test to ensure we don't bundle secrets/tokens is causing an error
like this:

```
 NX   Connection to Nx Cloud failed with status code ERR_BAD_REQUEST
```

e.g. https://staging.nx.app/runs/0IjxPh53dK

Likely due to validation errors now in place. We shouldn't be hitting Nx
Cloud from the test project, so I've renamed the variables to be
something that isn't used to connect to Cloud.

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

(cherry picked from commit be37c35351)
2024-08-28 16:35:49 -04:00
Juri d460d9ea20 chore(nx-cloud): blog post about the newest Nx Cloud table log view
(cherry picked from commit 56311ae959)
2024-08-28 10:37:33 -04:00
James Henry af7142aaf3 fix(release): programmatic API types should not be any (#27647)
(cherry picked from commit 13170da88b)
2024-08-28 10:37:32 -04:00
MaxKless 9d13a7a6ff fix(core): make sure env vars specified in run-commands envFile option take priority over other loaded env files (#27583)
<!-- 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 specify the `envFile` property on a `nx:run-commands` executor,
values in that file don't override values from other loaded env files
(like `.env` and others that are loaded by the task runner).

## Expected Behavior
`envFile` contents should take precedence. The properties specified in
the `env` option should still override this.

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

Fixes #

(cherry picked from commit 3fbaf7f873)
2024-08-28 10:37:31 -04:00
Emily Xiong 90ebb22004 fix(gradle): fix find root for projects (#27651)
<!-- 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 #

(cherry picked from commit 6cb0720009)
2024-08-28 10:37:30 -04:00
Colum Ferry 9c964a15e2 fix(vite): plugin should infer ts project correctly for libs (#27649)
<!-- 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 vite plugin's typecheck target is not using the tsconfig.lib.json
project when running typecheck for libs

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

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

Fixes #27501

(cherry picked from commit 564834462e)
2024-08-28 10:37:28 -04:00
Colum Ferry b892d66a86 fix(testing): application generators should accurately configure e2e projects (#27453)
- feat(devkit): add util for determining the e2e web server info
- feat(vite): add util for determining the e2e web server info
- feat(webpack): add util for determining the e2e web server info
- fix(webpack): allow port override
- fix(devkit): e2e web server info util should handle target defaults
- feat(webpack): export the e2e web server info utils
- fix(vite): rename util
- fix(devkit): util should determine the devTarget for cypress
- fix(react): improve accuracy of e2e project generation

<!-- 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 logic for finding the correct targets and web addresses to use when
setting up e2e projects is flawed and missing some key considerations.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The logic is accurate and usage is simplified across plugins

Projects:
- [x] Angular
- [x] Expo
- [x] Next
- [x] Nuxt
- [x] Vue
- [x] Web
- [x] Remix
- [x] React
- [x] React Native

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

Fixes #

(cherry picked from commit 320d9f223f)
2024-08-28 10:37:28 -04:00
Juri 7ee307183e docs(nx-cloud): improve e2e test splitting feature page
(cherry picked from commit 57f3701372)
2024-08-28 10:37:27 -04:00
Juri 2e38860db2 feat(nx-dev): add deepdive callout component
(cherry picked from commit daf5837a21)
2024-08-28 10:37:24 -04:00
Craigory Coppola e4a8edb6eb fix(core): negative workspace-root filesets should override positive filesets (#27524)
(cherry picked from commit 61ecd4b4f8)
2024-08-28 10:37:23 -04:00
Jason Jean 266b51f850 fix(gradle): fix child project deps (#27643)
## Current Behavior
<!-- This is the behavior we have today -->

When the name of a gradle project is overwritten by a different plugin,
the plugin throws an error creating dependencies.

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

The plugin uses the `CreateDependenciesContext` to get the name of a
project at the project root and uses that to create the dependency.

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

Fixes #

(cherry picked from commit 036e5fcf3e)
2024-08-28 10:37:22 -04:00
Emily Xiong 297a9406f3 fix(core): fix --e2eTestRunner for create-nx-workspace with react native (#27543)
<!-- 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 -->
--e2eTestRunner option is not working when create-nx-workspace with
preset react native

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
--e2eTestRunner option should be working when create-nx-workspace with
preset react native

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

Fixes #

(cherry picked from commit f02e2fc76e)
2024-08-28 10:37:21 -04:00
Jason Jean c8088e7666 fix(core): do not stream output when static output style is enabled (#27642)
## Current Behavior
<!-- This is the behavior we have today -->

Output is still streamed sometimes when `--outputStyle static` is used.

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

Output is not streamed when `--outputStyle static` is used.

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

Fixes #

(cherry picked from commit 45e088e066)
2024-08-28 10:37:20 -04:00
Jason Jean 96824d6907 feat(core): return task results from imperative task runner (#27640)
## Current Behavior
<!-- This is the behavior we have today -->

Imperatively running tasks does not return task results.

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

Imperatively running tasks returns task results along with the overall
status and the task graph

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

Fixes #

(cherry picked from commit 6fff9b5e81)
2024-08-28 10:37:19 -04:00
FrozenPandaz 542719994c Revert "fix(bundling): update snapshots for copy assets plugin (#27610)"
This reverts commit d9c9568d45.
2024-08-26 16:52:27 -04:00
Jason Jean 8488f34855 chore(repo): update pnpm to v9.8 (#27637)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

This repo uses pnpm `9.2.0`

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

This repo uses pnpm `9.8.0`

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

Fixes #

(cherry picked from commit f0e419b04f)
2024-08-26 13:32:43 -04:00
Colum Ferry 0711f17aca fix(core): nx migrate should determine angular devkit migration from cli or schematics #20282 (#27634)
<!-- 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 check the CLI property exists and if it's not `nx` we will use the ng
compat layer to run the migration.
If the CLI property does not exist, we check both if the migration is in
the `schematics` object on the `migrations.json` and if the contents of
the migration implementation contains an import from `@angular-devkit`.

The problem with the fallback is that if only types are imported from
`@angular-devkit` the import is stripped from the migration
implementation completely.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
We had planned already to remove the fallback of reading the file
contents.
We had also planned to remove using the `cli` property to determine if
the migration needed the `ng compat layer`.

However, as the `cli` property is still useful for now for package's
that needed some manner to circumvent the flawed fallback logic, let's
continue to use it until v21.
Log a warning however if the `cli !== 'nx'` and it is placed in the
`generators` section of the `migrations.json` to provide ample time for
plugin developers to move them to the `schematics` property.

Fallback has been updated to whether or not the migration lives in
`schematics` and not flawed read file logic.

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

Fixes #20282

(cherry picked from commit 62c651272c)
2024-08-26 13:32:42 -04:00
Juri e8b3e41439 docs(nx-cloud): some improvements based on feedback
(cherry picked from commit a139e91943)
2024-08-26 13:32:41 -04:00
Juri 5850e5eab9 docs(nx-cloud): improve dynamic agents feature page
(cherry picked from commit f8fe80f87d)
2024-08-26 10:56:00 -04:00
Paweł Twardziak f81b9066b2 feat(core): expose graph json type (#27496)
Closes #3283

## Current Behavior
See #3283

## Expected Behavior
See #3283

## Related Issue(s)
#3283

Fixes #
-  expose graph json type

---------

Co-authored-by: @NgDaddy Paweł Twardziak <contact@ngdaddy.com>
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
(cherry picked from commit 2c0a50c0d8)
2024-08-23 21:52:38 -04:00
Emily Xiong be620eb109 fix(core): not parse hex to number (#27515)
<!-- 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/26889

(cherry picked from commit ec53f315b9)
2024-08-23 17:56:39 -04:00
Paweł Twardziak b32a5715a7 docs(misc): recipes - update your global nx installation … (#27591)
… - update to yarn 2+

Closes #27588

## Current Behavior
See #27588

## Expected Behavior
See #27588

## Related Issue(s)
See #27588

Fixes #

Co-authored-by: @NgDaddy Paweł Twardziak <contact@ngdaddy.com>
(cherry picked from commit 15b8d49c4b)
2024-08-23 17:56:37 -04:00
Jason Jean e25c7544d3 chore(repo): update to pnpm 9 (#27624)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

This repo uses pnpm v8

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

This repo uses pnpm v9

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

Fixes #

---------

Co-authored-by: “JamesHenry” <james@henry.sc>
(cherry picked from commit 088a95b7e5)
2024-08-23 17:56:36 -04:00
Isaac Mann 8e2c26a6a7 docs(core): remove non-features from changelog (#27600)
Remove:
- Automatically update Nx
- Monorepo World Conference Speakers Announced

From changelog page, since those are not new features in 19.5

(cherry picked from commit 51ecd54ea1)
2024-08-23 17:56:34 -04:00
Zachary DeRose 333d55a84a docs(misc): trunk livestream (#27603)
(cherry picked from commit 560cbce65c)
2024-08-23 17:56:32 -04:00
Jason Jean cec4ec2410 fix(core): change order of CI providers to match their popularity (#27623)
<!-- 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 order of the CI providers prompt does not match their popularity

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

The order of the CI providers prompt matches their popularity

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

Fixes #

(cherry picked from commit 77cbfa0e87)
2024-08-23 17:56:30 -04:00
Jack Hsu e8833fc267 fix(webpack): add migration for proxy config (#27621)
Webpack-dev-server v5 changed the proxy config to only accept arrays.
This PR adds a migration for JSON proxy config files to automatically do
the conversion for users. If it's not a JSON format, then we log a
warning and point them to the v5 migration page.

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

(cherry picked from commit f9bb3082b7)
2024-08-23 17:56:28 -04:00
Colum Ferry 18a21ba7a4 fix(react): tailwind with rspack should work on generation #27028 (#27619)
<!-- 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 -->
React, Tailwind and Rspack is not working out of the box

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
It works out of the box.

In tandem with nrwl/nx-labs#415

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

Fixes #27028

(cherry picked from commit add4183d0a)
2024-08-23 17:56:27 -04:00
Colum Ferry 0e9fd64507 fix(core): ensure file watcher is looking for correct config on windows (#27594)
<!-- 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 build native isn't working correctly on windows, stating that
`window` is not a correct option for `cfg!`.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Use the `windows` option for `cfg!` as stated by the error message

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

Fixes #

(cherry picked from commit 692504f1c9)
2024-08-23 17:56:26 -04:00
Colum Ferry cbe06c6c60 fix(angular): ensure target default for '@nx/angular:webpack-browser' is set #26483 (#27616)
<!-- 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 incremental builds with `@nx/angular:webpack-browser` the
dependent libraries need to be built.
However, there is no target default to force a build to build
dependents.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Add a targetDefault and update docs to reflect this requirement

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

Fixes #26483

(cherry picked from commit d9fed4b832)
2024-08-23 17:56:25 -04:00
Juri 73f1b35849 docs(nx-cloud): fix missing e2e-ci mention on the CI tutorial command
(cherry picked from commit 004fc4bd07)
2024-08-23 17:56:23 -04:00
Jason Jean d9c9568d45 fix(bundling): update snapshots for copy assets plugin (#27610)
<!-- 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 -->

Unit tests are failing due to failing snapshots

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

Snapshots are updated appropritately.

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

Fixes #

(cherry picked from commit 1824267788)
2024-08-23 17:56:22 -04:00
Leosvel Pérez Espinosa 38b8b7b274 docs(linter): call out up to date lock file requirement for @nx/dependency-checks rule (#27587)
Updated doc:
https://nx-dev-git-docs-dependency-checks-lock-file-callout-nrwl.vercel.app/nx-api/eslint-plugin/documents/dependency-checks

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

(cherry picked from commit 35899e3a25)
2024-08-23 17:56:21 -04:00
Jack Hsu 453404efae docs(misc): add more to 19.6 release notes (#27605)
<!-- 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 #

(cherry picked from commit 3d940c8884)
2024-08-23 17:56:19 -04:00
Jason Jean 10cae67295 chore(repo): update nx to 19.7.0-beta.1 (#27576)
## Current Behavior
<!-- This is the behavior we have today -->

This repo uses Nx `19.6.0-beta.6`

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

This repo uses Nx `19.7.0-beta.1`

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

Fixes #

(cherry picked from commit 2ccf0d27c2)
2024-08-23 17:56:17 -04:00
MaxKless b1cde101c4 fix(core): enable using the daemon in docker if enabled explicitly (#27585)
<!-- 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 daemon is hard-disabled in docker, even if you try to explicilty
enable it using the `NX_DAEMON` env var.

## Expected Behavior
We should disable the daemon by default in docker but allow users to
opt-in using the env var. There might be issues that come with that but
since it's opt-in, it will be at their own risk.

## Related Issue(s)

Fixes https://github.com/nrwl/nx/issues/14126

(cherry picked from commit eeb60b64af)
2024-08-23 17:56:16 -04:00
Emily Xiong 0d67e185e1 fix(react-native): remove upgrade command in migration (#27467)
<!-- 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/27357

(cherry picked from commit c0ebc16089)
2024-08-23 17:56:14 -04:00
Emily Xiong 0d79bc7966 fix(expo): add expoLibraryGenerator to export (#27520)
<!-- 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/26850

(cherry picked from commit cc322eb01e)
2024-08-23 17:56:13 -04:00
Juri Strumpflohner ab61ddee5b chore(repo): update to nx-cloud@next to handle nxCloudId auth logic (#27581)
<!-- 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
-->

Fixes login issue with nx Cloud due to switch to new nxCloudId auth
method

![image](https://github.com/user-attachments/assets/5d6c0765-f3ac-4bf1-b055-fab984e55e55)

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

Fixes #

(cherry picked from commit adf9f2e444)
2024-08-23 17:56:13 -04:00
Emily Xiong 01deef8ea6 fix(js): fix verdaccio windows for registry (#27350)
<!-- 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/27135

(cherry picked from commit 00710b9187)
2024-08-23 17:56:10 -04:00
Jack Hsu 7f071c08b0 fix(core): support import detection of packages installed from git remote URL (#27569)
(cherry picked from commit 16b2e028c0)
2024-08-21 17:28:52 -04:00
Isaac Mann 3dc6a45475 fix(nx-plugin): allow create-package without e2eProject (#27572)
Current behavior:
`nx g create-package create-my-plugin --project my-plugin` fails because
`e2eProject` defaults to the root project.

Expected behavior:
`nx g create-package create-my-plugin --project my-plugin` succeeds.

(cherry picked from commit ecbd2cba04)
2024-08-21 17:28:51 -04:00
Jack Hsu 205550d5d5 fix(node): generate webpack server apps with generatePackageJson:true by default (#27570)
We already do this for esbuild apps (e.g. express, fastify, koa), but we
don't do it for webpack (nest).

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

(cherry picked from commit ca89950920)
2024-08-21 17:28:50 -04:00
Isaac Mann 24fed73faf docs(core): use nx release in create install package recipe (#27567)
Use `nx release` in the create install package recipe

(cherry picked from commit b6dd9251f5)
2024-08-21 17:28:49 -04:00
Feliche-Demian Netliukh b9367ed2a6 fix(nextjs): schema type for unitTestRunner for library (#26824)
## Current Behavior
The [docs](https://nx.dev/nx-api/next/generators/library#unittestrunner)
say that you can use vitest as a unitTestRunner option. It also worked
when I tested with the following command:
```sh
nx g @nx/next:library shared --dir=modules/shared --style none --dry-run --projectNameAndRootFormat as-provided --component false --unitTestRunner vitest
```

But types say otherwise:
![CleanShot 2024-07-04 at 16 24
44@2x](https://github.com/nrwl/nx/assets/51330172/13a2d0ca-6950-413b-ac80-5d33cd64a714)

## Expected Behavior
Types will allow 'vitest' option for a unitTestRunner

## Related Issue(s)
none

Co-authored-by: Emily Xiong <xiongemi@gmail.com>
(cherry picked from commit 73f12a322d)
2024-08-21 17:28:48 -04:00
Leosvel Pérez Espinosa 013ac952f1 fix(js): ensure assets option in tsc executor defaults to empty array for programmatic usage (#27565)
<!-- 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 #19911
Fixes #27421

(cherry picked from commit 0f3120712f)
2024-08-21 17:28:47 -04:00
Jason Jean c652f4316d fix(core): use withVerbose util (#27553)
<!-- 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 `withVerbose` util is only used in a few places.

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

The `withVerbose` util is used throughout and also contains middleware
to default to the value in `process.env.NX_VERBOSE_LOGGING === 'true'`

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

Fixes #

(cherry picked from commit 9269de7763)
2024-08-21 13:18:02 -04:00
Colum Ferry 652180f7b0 fix(esbuild): declaration:true should find the correct package root regardless of cwd #26261 (#27560)
<!-- 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 types that are generated for esbuild packages are not placed into
the correct folder structure in the built package and is very dependent
of the CWD.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The declaration files should be generated correctly to match the package
and not dependent on CWD

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

Fixes #26261 #26376

(cherry picked from commit c427717fc1)
2024-08-21 13:18:00 -04:00
zack-derose 8c44988211 docs(misc): adding episode 4 of the podcast
(cherry picked from commit d557fe207c)
2024-08-21 13:17:59 -04:00
Leosvel Pérez Espinosa 01b77cac52 fix(testing): fix issues in static server target migrations (#27547)
<!-- 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 #27470

(cherry picked from commit 2ffec0aa3f)
2024-08-21 13:17:58 -04:00
Isaac Mann 17b30216ec docs(core): update create-install-package (#27562)
Updates the create-install-package recipe to match what is currently
generated

Fixes #22663

(cherry picked from commit da823e04a9)
2024-08-21 13:17:57 -04:00
Guilherme Prezzi 4fb32b6181 fix: missing export for setRemoteDefinition (#27491)
## Current Behavior
It's not possible to import `setRemoteDefinition` from `@nx/angular/mf`.

## Expected Behavior
Export `setRemoteDefinition` in `@nx/angular/mf`

(cherry picked from commit a08e2adda6)
2024-08-21 13:17:56 -04:00
Louie Weng 4aeb4ebcda chore(repo): use nx cloud id for auth (#27546)
<!-- 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 Cloud uses the nxCloudAccessToken to authenticate and provide
permissions access the cache.

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

Users who want to use Nx Cloud locally with a read-write token will need
to run `nx-cloud login` to generate a personal access token and have
`nxCloudId` in their nx.json. These two pieces of identification are
needed together to provide permissions to access nx cloud features.

By default users who do not have a personal access token/do not have an
Nx Cloud account will have 'read' permissions.

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

Fixes #

(cherry picked from commit 20650334e7)
2024-08-21 13:17:55 -04:00
Emily Xiong 8f150b119e fix(gradle): fix tasksFileLines might be undefined (#27548)
<!-- 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 #

(cherry picked from commit 7e158385fd)
2024-08-21 13:17:54 -04:00
Jack Hsu fde1f9cfda docs(react): add instructions for how to add SVGR for Vite + React (#27551)
This PR adds a section to the `Adding Images, Fonts, and Files` React
recipe to show how to use SVGR with Vite.

With our Vite setup, we're keeping the configuration minimal so we don't
want SVGR out of the box.

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

(cherry picked from commit 046abc4938)
2024-08-21 13:17:53 -04:00
Nicholas Cunningham 142d0a28fc fix(nextjs): Should be able to run custom server targets with swc (#27526)
## Currently
When we installed swc from the Next.js generator it installed an older
version that expected version of swc this caused the node & build
generator to not work.

## Expected
With these changes the version will be in sync with what the
`@nx/js:swc` executor is expecting. With that in mind the build should
now work as expected and by extension the serve target for custom server
as well.

fixes: #27222
(cherry picked from commit 554e979abf)
2024-08-21 13:17:52 -04:00
Emily Xiong 42a977356f feat(graph): add expandedTargets to project details on nx dev (#26911)
<!-- 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 -->

https://nx.dev/getting-started/tutorials/gradle-tutorial#running-tasks

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

https://nx-dev-git-feat-graph-add-expand-targets-nrwl.vercel.app/getting-started/tutorials/gradle-tutorial#running-tasks

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

Fixes #

---------

Co-authored-by: Max Kless <maxk@nrwl.io>
(cherry picked from commit 66ff751f0d)
2024-08-21 13:17:51 -04:00
Nicholas Cunningham 23a06c6493 fix(nextjs): should not fail when running outside of nx cli (#27523)
fixes: #22450

<!-- 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, if you run any next target outside of nx the build will fail
because we only fallback for graph creation of if running prod server.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Targets should work if they are run outside of the Nx cli

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

Fixes #

(cherry picked from commit 31c5745126)
2024-08-21 13:17:50 -04:00
Isaac Mann e0b3cfc768 feat(nx-dev): honor prefers-reduced-motion (#27541)
Disables animations when browser is set to `prefers-reduced-motion`

Fixes #27114

(cherry picked from commit d6c3b24eb8)
2024-08-21 13:17:49 -04:00
Isaac Mann d078a9b551 docs(core): add redirect for github setup recipe (#27542)
Fixes #27495

(cherry picked from commit 27fe4c6401)
2024-08-21 13:17:48 -04:00
Isaac Mann 29e82ec0df docs(core): fix changelog link (#27544)
Fixes a broken link

(cherry picked from commit 83a4db719e)
2024-08-21 13:17:47 -04:00
Jack Hsu 7834cbd454 feat(bundling): add option to generate sourcemaps for Rollup build (#27539)
This PR adds `sourceMap` option to `@nx/rollup:rollup` executor and the
`withNx` util (for Project Crystal). The same option is used for
Webpack.

## 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 #9199

(cherry picked from commit fdb488b394)
2024-08-21 13:17:46 -04:00
Juri ff3b901bad docs(misc): update pinned logic + set pinned blog posts
(cherry picked from commit 27982fbbe8)
2024-08-21 13:17:45 -04:00
James Henry a00cf765ca fix(js): only sync references when composite is true, preserve comments in other parts of file (#27530)
(cherry picked from commit c22c0772dd)
2024-08-21 13:17:44 -04:00
Jack Hsu ea1ca8c4ed feat(js): add skipPackageManager option to build executors in order to skip generating "packageManager" entry in package.json (#27518)
This PR adds `skipPackageManager` option to several build executors in
order to disable generating the `packageManager` field in the resulting
`package.json` file. This field may be problematic on different
platforms so we want a way to work around it.

Affected executors:
- `@nx/webpack:webpack`
- `@nx/vite:build`
- `@nx/next:build`
- `@nx/remix:build`

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

(cherry picked from commit 83237a8670)
2024-08-21 13:17:19 -04:00
Colum Ferry ceff54177b fix(vite): add typecheck inferred target for vite plugin #27501 (#27531)
<!-- 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 -->
Vite intentionally does not run typechecking on projects. They recommend
running `tsc --noEmit` separately.
The `@nx/vite/plugin` could make this easier by adding a `typecheck`
when it detects a `tsconfig` file in the `projectRoot`.
This can then be added to the build pipeline on CI. Or users can add it
to a `dependsOn` for the `build` target if they wish.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The `@nx/vite/plugin` could make this easier by adding a `typecheck`
when it detects a `tsconfig` file in the `projectRoot`.
This can then be added to the build pipeline on CI. Or users can add it
to a `dependsOn` for the `build` target if they wish.

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

Fixes #27501

(cherry picked from commit 6d963fd21d)
2024-08-21 13:17:18 -04:00
Juri 5441638388 docs(nx-cloud): improve AI feature pages
(cherry picked from commit 59280014c6)
2024-08-21 13:17:16 -04:00
Leosvel Pérez Espinosa 500a3db69a fix(react): handle more scenarios when collecting component props for generating stories (#27528)
<!-- 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 -->

Stories generation for React components only handles components
receiving a `props` argument typed with an `Interface`.

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

Stories generation for React components should handle receiving the
props with any name or as a destructured object and typed with an
`Interface`, a type literal definition, or an inline type literal. In
case it's a destructured object, it also supports having no type, in
which case the story args will have those properties with type
`unknown`.

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

Fixes #22053

(cherry picked from commit fd74969367)
2024-08-21 13:17:15 -04:00
Colum Ferry 5b4efce265 docs(module-federation): improve creating a host recipe with some additional relevant information (#27534)
<!-- 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 #

(cherry picked from commit 6d6c3515fd)
2024-08-21 13:17:14 -04:00
James Henry bae3e50d6e fix(nx-dev): modify prompt (#27536)
(cherry picked from commit aafed19f9b)
2024-08-21 13:17:13 -04:00
Isaac Mann bdcee8e1e9 docs(core): fix add astro typo (#27535)
Fixes #20140

(cherry picked from commit 8af66c1a00)
2024-08-21 13:17:12 -04:00
Connor Sullivan 8fadc07d04 chore(vite): allow experimental vitest 2 support (#27371)
Allows consumers to use vitest 2 with the @nx/vite plugin.

closed #27259

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

Users cannot use Vitest 2 with @nx/vite.

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

Users can use Vitest 2 with @nx/vite.

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

Fixes #27259

(cherry picked from commit 186e4c7606)
2024-08-21 13:17:11 -04:00
Isaac Mann 23e6029449 docs(core): update Nx tag line (#27481)
Update tag line everywhere

(cherry picked from commit 08536905a2)
2024-08-21 13:17:10 -04:00
Emily Xiong cfdf9a0954 fix(gradle): track childProjects in properties report (#27488)
<!-- 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/27160

(cherry picked from commit 7c45589a71)
2024-08-21 13:17:10 -04:00
Isaac Mann e17b775188 feat(devkit): prefer strings over Linter enum (#27209)
We should be consistent about how options are defined in our plugins.
Currently, there are some options that use `enum`s and some that use
typed strings. I think typed strings are preferable because someone
extending a generator only needs to import the main generator that
they're extending, not all the transitive dependencies of that
generator.

Current extending code:
```
// ...
import { applicationGenerator as reactApplicationGenerator } from '@nx/react';
import { Linter } from '@nx/eslint';

export async function applicationGenerator(
  tree: Tree,
  options: ApplicationGeneratorSchema
) {
  reactApplicationGenerator(tree, {
    ...options,
    linter: Linter.EsLint,
  });
}
```

Desired extending code:
```
// ...
import { applicationGenerator as reactApplicationGenerator } from '@nx/react';

export async function applicationGenerator(
  tree: Tree,
  options: ApplicationGeneratorSchema
) {
  reactApplicationGenerator(tree, {
    ...options,
    linter: 'eslint',
  });
}
```

The problem is not just an extra line of code, the person extending the
`reactApplicationGenerator` has to dig into the implementation details
of the generator itself in order to know where to find the `Linter`
enum. The `e2eTestRunner` is already a typed string and is easily
extended.

The solution I'm proposing in this PR would define a typed string in the
same file as the existing enum. None of the implementations need to
change. No community plugin code will be broken.

(cherry picked from commit 839dc1585b)
2024-08-21 13:17:09 -04:00
Isaac Mann 7b100e9090 docs(core): promote powershell env vars callout (#27521)
Makes the powershell env vars callout more prominent

Fixes #27287

(cherry picked from commit 14be63b337)
2024-08-21 13:16:45 -04:00
Isaac Mann d15de4e007 docs(core): changelog for 19.6.0 (#27519)
19.6.0 changelog

(cherry picked from commit 3e871a9055)
2024-08-21 13:16:44 -04:00
Jason Jean 8ea11bd7cd fix(core): fix importing files with special characters (#27484)
<!-- 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 -->

Files which have special characters in the path cannot be imported.

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

Files which have special characters in the path can be imported.

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

Fixes #27468

(cherry picked from commit a5b93b8e83)
2024-08-21 13:16:43 -04:00
Jack Hsu e2694143ef docs(node): update recipe on setting up proxies (#27517)
This PR expands the recipe for [Set Up App
Proxies](https://nx.dev/recipes/node/application-proxies). There is no
way for us to add proxy config automatically since `proxy.json` is
specific to our executor, and users should use the underlying tools'
proxy support instead.

Also adds an info for users using `--frontendProject` option in
crystalized workspaces.

Note: The proxy feature from Webpack and Vite allow more advanced use
cases, so it's preferred to the old `proxy.json` support anyway.

Preview:
https://nx-dev-git-docs-node-proxy-config-nrwl.vercel.app/recipes/node/application-proxies#set-up-application-proxies

<!-- 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 #27321, #23158

(cherry picked from commit d8d57c862b)
2024-08-21 13:16:42 -04:00
Jack Hsu b3a68a5a28 docs(webpack): present correct config file formats for inferred tasks (#27516)
We're showing `.cts` and `.mts` files as supported, but Webpack CLI will
not load them.

The language support is outlined here:
https://webpack.js.org/configuration/configuration-languages/#typescript

This PR removes those extensions to match what our plugin actually
infers from.

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

(cherry picked from commit aa59a69af2)
2024-08-21 13:16:41 -04:00
Jack Hsu c5af8dd4ef fix(vite): load the correct config file from @nx/vite:test executor (#27514)
This PR ensures that we pass Vite config file to the programmatic
`startTest` API from Vitest. It fixes the issue with plugins not loading
as well as other issues with the config file not being used.

This mainly affects a custom `configFile` option being passed to the
executor. The previous fix to additionally load in `plugins` via
overrides is causing plugins to load twice when the Vite config file is
picked up by Vitest (e.g. #27500).

## 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 #27500, #22001

(cherry picked from commit 402bae2ce1)
2024-08-21 13:16:40 -04:00
Isaac Mann 37beeaad80 docs(core): add bun tab to install commands (#27511)
Add a bun tab to everywhere we list package manager install commands

(cherry picked from commit 0de28ccfe1)
2024-08-21 13:16:39 -04:00
Colum Ferry 6a5564c3a3 fix(vite): plugin should infer serve target if server config defined #27370 (#27507)
<!-- 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 -->
Vite Plugin was originally only checking if the `lib` option was defined
in a vite config, and using that to avoid inferring serve targets.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Some libraries may still need a serve target, and if they have a server
config defined, the serve target should be inferred

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

Fixes #27370

(cherry picked from commit 08fc13de5f)
2024-08-21 13:16:38 -04:00
Colum Ferry d179bcdfbb fix(module-federation): ensure shared packages can be shared from host #27162 (#27513)
<!-- 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 host application is never set as a candidate to share packages from.
Particularly in angular, this causes issues with the injection context

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Host application should be a valid option for sharing packages

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

Fixes #27162

(cherry picked from commit 813770862e)
2024-08-21 13:16:37 -04:00
Colum Ferry dfa344196a fix(storybook): should generate correct config for nextjs apps #27233 (#27510)
<!-- 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 -->
With the introduction of App Router by NextJs, components may not live
in a `components` directory. Storybook config should reflect this.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Stories path should be a glob from project root

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

Fixes #27233

(cherry picked from commit afe83b4b07)
2024-08-21 13:16:36 -04:00
Juri b726117d5a docs(nx-cloud): improve the flaky task feature page
(cherry picked from commit a1a4b6e2db)
2024-08-21 13:16:36 -04:00
Juri 26587d8e72 docs(nx-cloud): improve nx affected feature page
(cherry picked from commit d848d3f5c3)
2024-08-21 13:16:35 -04:00
Leosvel Pérez Espinosa 303d124655 fix(angular): bump ngrx version to 18.0.2 (#27506)
Bump the NgRx package versions to ensure the `@ngrx/signals` package is
migrated correctly. That package version was out of sync with the rest
of the NgRx packages. Starting on v18.0.2, the package version is in
sync with the rest.

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

(cherry picked from commit 54f70c7587)
2024-08-19 10:20:25 -04:00
Tine Kondo fb6ddb7b3d fix(nx-dev): fix use key instead of env to reference cache key in… (#26644)
… `launch-templates`

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

(cherry picked from commit b91d78809e)
2024-08-19 10:20:20 -04:00
mathis 40307dcd2e chore(core): update axios to ^1.7.4 (#27420)
Closes CVE-2024-39338

## Related Issue(s)

Fixes #27419

(cherry picked from commit 8295275dc6)
2024-08-19 10:20:17 -04:00
Kamenskih Dmitriy eb87866dbb fix(node): build-esbuild-options.ts browser user define envs by config (#27480)
## Current Behavior
When you use esbuild in 'browser' mode you have to provide all 'define'
attributes as environment variables and only with "NX_PUBLIC_" prefix

## Expected Behavior
Esbuild configuration has to work as it is described in docs. And prefix
feature has to work as an additional functionality

## Related Issue(s)
This issue will be fixed: https://github.com/nrwl/nx/issues/19106

Co-authored-by: Dmitrii Kamenskikh <dkamenskikh@devexperts.com>
(cherry picked from commit 4941be6197)
2024-08-19 10:20:16 -04:00
Wei Liang d2ee81b2e8 feat(core): add shutdown lifecycle hook to node executor (#27354)
<!-- 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 the application are received a shutdown signal, the application
doesn't execute before shutdown functions and directly shutdown whole
application. The situation cannot execute before shutdown functions like
[NestJS Lifecycle
Events](https://docs.nestjs.com/fundamentals/lifecycle-events) and
custom shutdown hooks.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The application can run shutdown hooks like below output:

 NX   Successfully ran target build for project nest-test (5s)

Debugger listening on
ws://localhost:9229/e4bd44c0-9a6a-468a-8b46-b6fef1cef1c7
For help, see: https://nodejs.org/en/docs/inspector

```
 NX   Successfully ran target build for project nest-test (4s)

Debugger listening on ws://localhost:9229/75c8449b-43a4-4d8b-88c0-231761d7248c
For help, see: https://nodejs.org/en/docs/inspector

To exit the process with SIGINT, press Ctrl+C
[Nest] 393107  - 08/09/2024, 6:31:26 PM     LOG [NestFactory] Starting Nest application...
[Nest] 393107  - 08/09/2024, 6:31:26 PM     LOG [InstanceLoader] AppModule dependencies initialized +10ms
[Nest] 393107  - 08/09/2024, 6:31:26 PM     LOG [RoutesResolver] AppController {/api}: +7ms
[Nest] 393107  - 08/09/2024, 6:31:26 PM     LOG [RouterExplorer] Mapped {/api, GET} route +3ms
[Nest] 393107  - 08/09/2024, 6:31:26 PM     LOG [NestApplication] Nest application successfully started +2ms
[Nest] 393107  - 08/09/2024, 6:31:26 PM     LOG 🚀 Application is running on: http://localhost:3000/api
[Nest] 393107  - 08/09/2024, 6:31:29 PM     LOG onModuleDestroy
onModuleDestroy: 5.001s
[Nest] 393107  - 08/09/2024, 6:31:34 PM     LOG beforeApplicationShutdown SIGINT
beforeApplicationShutdown: 5.004s
[Nest] 393107  - 08/09/2024, 6:31:39 PM     LOG onApplicationShutdown SIGINT
onApplicationShutdown: 5.005s

 NX  Process exited with code 130, waiting for changes to restart...
```

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

Fixes #9237 and #18037

---------

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
(cherry picked from commit b5a93364c5)
2024-08-19 10:20:14 -04:00
Benjamin Cabanes 25e4bbef74 chore(nx-dev): change help section titles for clarity (#27465)
Renamed "Sales" to "Talk to Sales" and "Engineers" to "Learn more about Nx Cloud".

(cherry picked from commit 958f188bd0)
2024-08-19 10:20:12 -04:00
Benjamin Cabanes 974e022020 feat(nx-dev): add Monorepo World banner to hero (#27482)
Integrate a new Monorepo World banner with animations in the hero section using framer-motion. Updated the UI icons library to include Monorepo World icon and relevant SVG file.

(cherry picked from commit 289b23bfdf)
2024-08-19 10:20:11 -04:00
Isaac Mann e4d1a81e0b docs(core): link blog to parallelism reference (#27483)
Link the parallelism blog post to the actual reference document.
Currently the blog post shows up in a search for `parallelism` but the
actual reference does not. This link can help while we work on the
search.

(cherry picked from commit 15bc7ac69b)
2024-08-19 10:20:08 -04:00
Jack Hsu 4d478a5b4e docs(core): add scroll_25, scroll_50, scroll_75, and scroll_90 events to track engagement (#27461)
This PR adds events to track engagement in our docs. Since we use a
scrollable `<div>` in our docs, the normal `scroll` events in GA do not
work.

A new `<ScrollableContent>` component is added that will do two things:
- Send `scroll_25`, `scroll_50`, `scroll_75`, and `scroll_90` events
whenever the user scrolls to 25%, 50%, 75%, of 90% of the content
- Optionally reset scroll top to zero whenever router changes (existing
behavior)

All of the places where we have content in a scrollable `<div>` is
replaced with `<ScrollableContent>`.

Note: 90% means user has reached the bottom, since it's not usually
possible to get to 100%.

(cherry picked from commit 9dca7c7025)
2024-08-19 10:20:05 -04:00
Leosvel Pérez Espinosa 7d59927ed4 fix(linter): update the @nx/dependency-checks rule to read the package.json content from the rule context (#27476)
<!-- 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 `@nx/dependency-checks` rule sometimes doesn't apply all identified
fixes and wrongly succeeds. ESLint performs multiple passes to try to
apply fixes, and in each pass the rule receives the updated source code
with the previously applied fixes. This allows merging different fixes,
but the `@nx/dependency-checks` rule always reads the `package.json`
file from the filesystem, caches it globally, and mutates it. It never
uses the updated source code provided in the rule context.

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

The `@nx/dependency-checks` rule should apply all identified fixes [as
long as they don't
conflict](https://eslint.org/docs/latest/extend/custom-rules#conflicting-fixes).

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

Fixes #27412

(cherry picked from commit b699207070)
2024-08-19 10:20:04 -04:00
Isaac Mann 81439245c8 docs(core): plugin atomizer set up (#27478)
Update plugin overview pages to describe atomizer set up

(cherry picked from commit d378f2c449)
2024-08-19 10:20:03 -04:00
Isaac Mann 3d0bdf023f docs(core): fix installation tutorial link (#27479)
Fix a link on the installation page

(cherry picked from commit c28148b70b)
2024-08-19 10:20:02 -04:00
Leosvel Pérez Espinosa 791a8ef7e1 fix(js): handle arbitrary nested ts path mappings when re-mapping them to the outputs (#27429)
<!-- 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 re-mapping a TS path mapping like `"@foo/lib1/plugins/some-file":
["packages/lib1/src/plugins/some-file.ts"]`, it results in:

```json
"@foo/lib1/plugins/some-file": [
  "dist/packages/lib1/plugins/some-file",
  "dist/packages/lib1/src/plugins/some-file.ts"
]
```

The first path is wrong because it's missing the `src` directory, and
the second one has a file extension that's not in the output.

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

When re-mapping a TS path mapping like `"@foo/lib1/plugins/some-file":
["packages/lib1/src/plugins/some-file.ts"]`, it should result in:

```json
"@foo/lib1/plugins/some-file": [
  "dist/packages/lib1/plugins/some-file",
  "dist/packages/lib1/src/plugins/some-file",
  "dist/packages/lib1/src/plugins/some-file.ts"
]
```

In this case, the second path would correctly point to the output. It
doesn't have an extension, which allows the compiler to pick up the
correct one.

Note that while the first and third paths are still not valid for this
specific use case, they could still be valid for other use cases, and in
any case, they're still kept for backward compatibility. The util to
re-map these paths is currently very generic and generates potentially
valid paths. The invalid paths for a given use case won't throw an error
as long as there's one that's valid.

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

Fixes #21699

(cherry picked from commit 89f6ad4d8d)
2024-08-19 10:19:59 -04:00
Colum Ferry b6214549d6 fix(module-federation): ensure target defaults are set correctly #27448 (#27472)
<!-- 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 -->
Target Defaults set up for the Module Federation builds is incorrect or
missing.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Target Defaults for Module Federation builds is set up correctly

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

Fixes #27448

(cherry picked from commit 396a5deea9)
2024-08-19 10:19:58 -04:00
@NgDaddy 0c4857d637 fix(react): enable vitejs-plugin-react-swc for swc compiler (#27457)
## Current Behavior
see #27433

## Expected Behavior
see #27433

## Related Issue(s)
see #27433

Fixes #
- if compiler is `swc`, `@vitejs/plugin-react-swc` is being imported;
otherwise `@vitejs/plugin-react` is being imported

Co-authored-by: Emily Xiong <xiongemi@gmail.com>
(cherry picked from commit 7f2c5565de)
2024-08-19 10:19:56 -04:00
Colum Ferry 289c1cb470 fix(angular): module-federation-ssr-dev-server should call correct builder (#27477)
<!-- 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 -->
`module-federation-ssr-dev-server` is calling `dev-server` builder
instead of `ssr-dev-server` builder

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
`module-federation-ssr-dev-server` calls the correct builder

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

Fixes #

(cherry picked from commit 829f5fa758)
2024-08-19 10:19:54 -04:00
Leosvel Pérez Espinosa c009c7480e fix(angular): generate @nx/angular in devDependencies and move to dependencies when using runtime helpers (#27405)
<!-- 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 -->

New workspaces are generated with `@nx/angular` as a production
dependency even though the generated code does not use any runtime
helper from it.

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

New workspaces should be generated with `@nx/angular` as a development
dependency. When generating a new MF host or dynamic MF application
(host or remote), the `@nx/angular` package should be moved to the
production dependencies because the generated code uses some runtime
helpers from it.

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

Fixes #27333

(cherry picked from commit 1ae3c2d8f9)
2024-08-19 10:19:53 -04:00
satanluimm 022754c96b docs(misc): fix react monorepo tutorial link in installation page (#27388)
docs(react): fix link to react monorepo tutorial

(cherry picked from commit 44068b58c0)
2024-08-19 10:19:52 -04:00
Isaac Mann 519ec11a14 fix(nx-dev): bad link from home page (#27475)
Fixes #27417

(cherry picked from commit e7a9f36762)
2024-08-19 10:19:50 -04:00
Benjamin Cabanes 7675f010f4 chore(nx-dev): remove redundant period in plan table (#27464)
Corrects a minor formatting issue by removing an unnecessary period in
the explanation text for failed task outputs.

(cherry picked from commit 0b2f4527d9)
2024-08-19 10:19:48 -04:00
Leosvel Pérez Espinosa 6ae5cdd915 fix(testing): fix misc issues in migrations (#27471)
(cherry picked from commit e368cd4ae1)
2024-08-19 10:19:47 -04:00
robertIsaac 7d1d14fa03 cleanup(js): fix test cases on windows (#27300)
## Current Behavior
running `nx test js` fail on windows

## Expected Behavior
running `nx test js` succeed

## side notes
1. I was skipping `packages/js/src/plugins/typescript/plugin.spec.ts`
because it makes all tests fail, and even in wsl it's very flaky, it
fail 90% of the times, but I couldn't figure out why
I think it's worth looking at from someone with more experience with the
repo
2. for some of the cases that I fixed I'm not sure if I should change
the code to always return `/` or should change the test to adapt `/` in
linux and `\` in windows, so please if I mistaken one of them let me
know and I will do it the other way around but I believe it should be
fine since in windows `foo/bar` does work as a path still

(cherry picked from commit 69c989ed9b)
2024-08-19 10:19:45 -04:00
Colum Ferry f57780d3a5 fix(react): ensure @vitejs/plugin-react is installed for storybook (#27463)
(cherry picked from commit ce2dff303a)
2024-08-19 10:19:42 -04:00
Zachary DeRose c4a1de4fae Adding podcast episodes (#27462)
<!-- 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 #

(cherry picked from commit f7eab14f6b)
2024-08-19 10:19:39 -04:00
Jason Jean 60e301140d fix(repo): add dependsOn to native build (#27446)
<!-- 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:build-native` updates the typings which `graph-client:build-client`
uses. Not running it in the right order could result in a compilation
error.

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

`nx:build-native` updates the typings which `graph-client:build-client`
uses so it depends on `nx:build-native`

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

Fixes #

(cherry picked from commit 01985c11db)
2024-08-19 10:19:36 -04:00
Nicholas Cunningham 560daa55a2 Podcast page (#26971)
(cherry picked from commit 6d7cdd7d41)
2024-08-19 10:19:35 -04:00
Craigory Coppola b9cdcf30d7 chore(repo): docs generation should work on windows (#27444)
<!-- 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 #

(cherry picked from commit 4f1db3e07a)
2024-08-19 10:19:34 -04:00
Nicholas Cunningham 12e21bc7c1 fix(nx-dev): Og image path generation (#27456)
<!-- 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 og images for the blogs are not being generated.

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

The og images for all blogs should be generated.

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

(cherry picked from commit 2e48ebf433)
2024-08-19 10:19:32 -04:00
Juri 0c31f0b067 docs(nx-cloud): update remote caching feature page
(cherry picked from commit 5c890de630)
2024-08-19 10:19:30 -04:00
EGonz1PCTY dbce9f5214 fix(misc): ensure custom reporters are usable with @nx/playwright:playwright (#27443)
<!-- 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
Custom reporters are not usable because we enforce an enum on the schema

## Expected Behavior
Custom reporters can be specified

## 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>
(cherry picked from commit 8c7e3619a9)
2024-08-19 10:19:28 -04:00
James Henry 8529d665b4 docs(release): file based versioning, version plans (#27428)
<!-- 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 -->

Version plans, stable in the imminent `19.6.0` release, is undocumented.

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

Version plans is a documented feature.

## 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>
(cherry picked from commit f1ecad0a8e)
2024-08-19 10:19:27 -04:00
Benjamin Cabanes 81f2ddbcd0 feat(nx-dev): add Explain with AI to Enterprise and Pro Plans (#27455)
This commit integrates the "Explain with AI" feature into the Enterprise
and Pro plans for providing detailed explanations and insights for
failed task outputs. It also remove the Nx Workflows mention of the
pricing page. It also updates various links within the Hobby plan and
modifies plan table descriptions to reflect the accurate feature names.

(cherry picked from commit 96b8133d85)
2024-08-19 10:19:26 -04:00
Colum Ferry bccd543695 docs(module-federation): update host serve diagram (#27454)
<!-- 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 #

(cherry picked from commit d8de0cd792)
2024-08-19 10:19:24 -04:00
Jack Hsu 4758714b87 docs(core): add a recipe for convert-to-inferred migrations (#27442)
This PR adds a recipe for converting executor-based configuration to
inferred configuration.

The goal of the recipe is to guide users on what commands to run,
understand what changes were applied, and how to verify the migrations.

Preview:
https://nx-dev-git-docs-inferred-migration-recipe-nrwl.vercel.app/recipes/running-tasks/convert-to-inferred

[x] Link to this from Project Crystal concept page
[x] Mark recipe as related to Migration feature page

<!-- 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@gmail.com>
(cherry picked from commit 99b0557fb9)
2024-08-19 10:19:23 -04:00
Isaac Mann 0c82ac8560 docs(core): add organization plugin tutorial (#27279)
Updates the Extending Nx section.

- New intro content
- Enforce Organizational Best Practices tutorial
- Tooling Plugin tutorial
    - Flexible base generators
    - Inferred tasks
    - Executors
    - Migration generators
    - Publishing and listing the plugin
    - E2E testing with Verdaccio

In a separate PR:
- Repository Structure Plugin tutorial
    - Presets
    - Create-* script
    - Migration generators

(cherry picked from commit ba47c72981)
2024-08-19 10:19:20 -04:00
MaxKless 42e1684c7d chore(repo): add comments to make sure code stays manually synced with nx console (#27410)
this code is needed in a version-independent way in Nx Console and right
now there's no good place to share it.
So for now we will duplicate it

(cherry picked from commit cf5dd4da08)
2024-08-19 10:19:19 -04:00
Jonathan Cammisuli dfd5385553 feat(docs): update OpenAI model to use gpt-4o-mini (#27434)
<!-- 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 -->
Current docs chat uses `gpt-3.5-turbo`

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Docs are now using `gpt-4o-mini`

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

Fixes #

(cherry picked from commit 5cd08e2828)
2024-08-19 10:19:18 -04:00
678 changed files with 38294 additions and 26365 deletions
+3 -3
View File
@@ -48,7 +48,7 @@ commands:
- run:
name: Install pnpm package manager (linux)
command: |
npm install --prefix=$HOME/.local -g @pnpm/exe@8
npm install --prefix=$HOME/.local -g @pnpm/exe@9.8.0
- when:
condition:
equal: [<< parameters.os >>, macos]
@@ -56,7 +56,7 @@ commands:
- run:
name: Install pnpm package manager (macos)
command: |
npm install -g @pnpm/exe@8
npm install -g @pnpm/exe@9.8.0
- run:
name: Install Dependencies
command: |
@@ -91,7 +91,7 @@ jobs:
- checkout
- nx/set-shas:
main-branch-name: 'master'
- run: npx nx-cloud@latest start-ci-run --distribute-on="auto linux-medium" --stop-agents-after="e2e"
- run: npx nx-cloud@next start-ci-run --distribute-on="auto linux-medium" --stop-agents-after="e2e"
- run:
command: |
sudo apt-get update
+6 -6
View File
@@ -22,7 +22,7 @@ env:
NX_RUN_GROUP: ${{ github.run_id }}-${{ github.run_attempt }}
CYPRESS_INSTALL_BINARY: 0
NODE_VERSION: 18
PNPM_VERSION: 8.15.7 # Aligned with root package.json (pnpm/action-setup will helpfully error if out of sync)
PNPM_VERSION: 9.8.0 # Aligned with root package.json (pnpm/action-setup will helpfully error if out of sync)
jobs:
# We first need to determine the version we are releasing, and if we need a custom repo or ref to use for the git checkout in subsequent steps.
@@ -138,7 +138,7 @@ jobs:
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: |-
set -e &&
npm i -g pnpm@8.15.7 --force &&
npm i -g pnpm@9.8.0 --force &&
pnpm --version &&
pnpm install --frozen-lockfile &&
pnpm nx run-many --verbose --target=build-native -- --target=x86_64-unknown-linux-gnu
@@ -147,7 +147,7 @@ jobs:
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |-
set -e &&
npm i -g pnpm@8.15.7 --force &&
npm i -g pnpm@9.8.0 --force &&
pnpm --version &&
pnpm install --frozen-lockfile &&
pnpm nx run-many --verbose --target=build-native -- --target=x86_64-unknown-linux-musl
@@ -165,7 +165,7 @@ jobs:
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
build: |-
set -e &&
npm i -g pnpm@8.15.7 --force &&
npm i -g pnpm@9.8.0 --force &&
pnpm --version &&
pnpm install --frozen-lockfile &&
pnpm nx run-many --verbose --target=build-native -- --target=aarch64-unknown-linux-gnu
@@ -191,7 +191,7 @@ jobs:
build: |-
set -e &&
rustup target add aarch64-unknown-linux-musl &&
npm i -g pnpm@8.15.7 --force &&
npm i -g pnpm@9.8.0 --force &&
pnpm --version &&
pnpm install --frozen-lockfile &&
pnpm nx run-many --verbose --target=build-native -- --target=aarch64-unknown-linux-musl
@@ -318,7 +318,7 @@ jobs:
env
whoami
sudo pkg install -y -f node libnghttp2 www/npm git
sudo npm install --location=global --ignore-scripts pnpm@8.15.7
sudo npm install --location=global --ignore-scripts pnpm@9.8.0
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain stable
source "$HOME/.cargo/env"
+1 -1
View File
@@ -28,7 +28,7 @@ launch-templates:
sudo apt-get install -y ca-certificates lsof libvips-dev libglib2.0-dev libgirepository1.0-dev
- name: Install Pnpm
script: |
npm install -g pnpm@8
npm install -g pnpm@9.8.0
- name: Pnpm Install
script: |
+1
View File
@@ -172,6 +172,7 @@ rust-toolchain @nrwl/nx-native-reviewers
/CONTRIBUTING.md @FrozenPandaz @isaacplmann
/CODE_OF_CONDUCT.md @FrozenPandaz @isaacplmann
/CODEOWNERS @FrozenPandaz @AgentEnder
/packages/nx/src/nx-cloud/utilities/url-shorten.ts @MaxKless
# Scripts
/scripts/documentation @nrwl/nx-docs-reviewers
+1 -1
View File
@@ -21,7 +21,7 @@
# Smart Monorepos · Fast CI
Nx is a build system with built-in tooling and advanced CI capabilities. It helps you maintain and scale monorepos, both locally and on CI.
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
+1 -1
View File
@@ -457,7 +457,7 @@
{
"name": "@naxodev/nx-cloudflare",
"description": "Nx plugin for Cloudflare, in particular Cloudflare workers. It allows to generate build and run Cloudflare workers in your Nx workspace.",
"url": "https://github.com/naxodev/oss/tree/main/packages/plugins/nx-cloudflare"
"url": "https://github.com/naxodev/oss/tree/main/packages/nx-cloudflare"
},
{
"name": "@ziacik/azure-func",
+5 -5
View File
@@ -94,14 +94,14 @@ Your content goes here.
{% /callout %}
```
#### Disclosure
#### Deep Dives
A disclosure can be used for less important information that is initially collapsed.
These are special callouts that are collapsed with the intention of containing more deep-dive information about the topic which isn't required to understand right away.
```markdown
{% disclosure title="string" %}
Your content goes here.
{% /disclosure %}
{% callout type="deepdive" title="string" %}
Your deep-dive content goes here.
{% /callout %}
```
#### Cards
+1 -1
View File
@@ -54,7 +54,7 @@ With Nx Replay, you can see significant speed improvements in your CI pipelines
[Nx Agents](/ci/features/distribute-task-execution) represent the pinnacle of task distribution optimization, ensuring that tasks are executed as efficiently as possible based on the specific requirements of each change. Some features that make up this effort are:
- [Easy integration with existing providers](/ci/features/distribute-task-execution#cicd-guides)
- [Easy integration with existing providers](/ci/recipes/set-up)
- Distribution is handled on the Nx Cloud infrastructure and all you need is a single line. Whats more, all results are played back to your original CI provider script which triggers the Nx Cloud distribution, so that you can make use of the resulting artifacts
- [Efficient task distribution](/ci/features/dynamic-agents)
- Save compute resources and reduce costs, minimizing idle time and compute waste
+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
---
The proverbial slow and flaky CI isnt the failure of the developers or even the testing tools. Its the failure of the CI execution model we relied on for the last 20 years.
@@ -0,0 +1,18 @@
---
title: 'Nx Enterprise Podcast Episode 1: Hicham El Hammouchi'
slug: 'hicham-el-hammouchi-podcast-1'
authors: ['Zack DeRose']
tags: [podcast]
cover_image: /blog/images/2024-06-18/ep-1-hicham.png
podcastYoutubeId: 8iiLB_2djZ8
podcastSpotifyId: 24yagCNpu9EGj0fCwSDQkj
podcastAmazonUrl: https://music.amazon.com/podcasts/a221fdad-36fd-4695-a5b4-038d7b99d284/episodes/899a2e4c-2e56-4dfa-a3e3-e69eb216f2b0/the-enterprise-software-podcast-by-nx-the-enterprise-software-podcast-by-nx-1-hicham-el-hamouchi
podcastAppleUrl: https://podcasters.spotify.com/pod/show/enterprise-software/episodes/The-Enterprise-Software-Podcast-By-Nx-1--Hicham-El-Hamouchi-e2l0302
podcastIHeartUrl: https://www.iheart.com/podcast/269-the-enterprise-software-po-186891508/episode/the-enterprise-software-podcast-by-nx-186891511/
---
In this episode, Zack DeRose from Nx chats with Hicham El Hammouchi, a veteran in enterprise software. Hicham dives into his background, sharing his career journey and the wealth of experience he's gathered along the way.
They tackle the tough challenges that companies face in software development. Hicham offers practical insights and real-life examples from his own career, making complex issues easier to understand. He also shares some tried-and-true strategies for overcoming these hurdles, emphasizing the importance of teamwork and effective project management.
As the chat continues, Zack and Hicham explore the latest tech trends and innovations that are shaking up the industry. Hicham's forward-thinking views provide a sneak peek into the future of enterprise software. They also discuss detailed case studies of successful projects, highlighting the importance of staying focused on customer needs and feedback.
@@ -0,0 +1,18 @@
---
title: 'Nx Enterprise Podcast Episode 2: Tine Kondo'
slug: 'tine-kondo-podcast-2'
authors: ['Zack DeRose']
tags: [podcast]
cover_image: /blog/images/2024-07-19/ep-2-tine.png
podcastYoutubeId: Nzf3BmymfEo
podcastSpotifyId: 0CCQaWCln7rvwkkVvsyxsk
podcastAmazonUrl: https://music.amazon.com/podcasts/a221fdad-36fd-4695-a5b4-038d7b99d284/episodes/53934cd9-c521-441e-8523-8b947ed207ca/the-enterprise-software-podcast-by-nx-the-enterprise-software-podcast-by-nx-2-tine-kondo
podcastAppleUrl: https://podcasts.apple.com/us/podcast/the-enterprise-software-podcast-by-nx-2-tine-kondo/id1752704996?i=1000662764990
podcastIHeartUrl: https://www.iheart.com/podcast/269-the-enterprise-software-po-186891508/episode/the-enterprise-software-podcast-by-nx-197335640/
---
In this episode, welcome Nx Champion and Nx Expert, Tine Kondo. Our discussion highlights how Nx is poised to make an impact in the Java space.
We touch on the difficulties larger organizations face when merging PRs in a timely manner, emphasizing how a monorepo alleviates the headache of coordinating multiple PRs across various repositories, and share firsthand experiences and frustrations with traditional multi-repo setups, underscoring the benefits of a unified approach.
In particular, Nx's new plugin: [@nx/gradle](/nx-api/gradle) is of interest, and Tine provides some valuable insight on the impact this plugin can make, as well as the importance for Maven support.
+5 -1
View File
@@ -4,13 +4,15 @@ slug: 'explain-with-ai'
authors: ['Philip Fulcher']
cover_image: '/blog/images/2024-07-29/explain-with-ai-header.avif'
tags: [nx, nx-cloud, ai, release]
youtubeUrl: https://youtu.be/g2m9cHp-O-Q?si=ax-SKCO0Xvy9vFIz
pinned: true
---
It's Friday, and you absolutely, positively have to deploy to production. But you can't get CI to pass your PR. What do you do? It's an inevitable part of your life as a developer, and you've built a collection of tools to deal with it: Google, MDN, Discord, ChatGPT. We've got one more tool for your toolbox: **"Explain with AI" for [Nx Cloud](/nx-cloud)**.
## Your ticket to fast error debugging
"Explain with AI" is a new feature for all Nx Cloud Pro users that is going to help you troubleshoot those pesky failing tasks. Whenever you get an error message on CI, look for the "Explain with AI" button on the upper right-hand corner:
"[Explain with AI](/ci/features/explain-with-ai)" is a new feature for all Nx Cloud Pro users that is going to help you troubleshoot those pesky failing tasks. Whenever you get an error message on CI, look for the "Explain with AI" button on the upper right-hand corner:
![Explain with AI button](/blog/images/2024-07-29/explain-with-ai-button.avif)
@@ -20,6 +22,8 @@ Once you hit that button, we collect the terminal output and other Nx task infor
No more switching back and forth between a dozen tabs with different solutions. No more providing the right context for your masterfully written chat prompt. **Get your suggested fix and get back to work.**
Also make sure [to check out our docs](/ci/features/explain-with-ai) for more information.
## How can I start using this today?
![Nx Cloud organization settings section for enabling AI features](/blog/images/2024-07-29/ai-features.avif)
+4 -1
View File
@@ -4,12 +4,14 @@ slug: 'nx-19-5-adds-stackblitz-new-features-and-more'
authors: ['Zack DeRose']
cover_image: '/blog/images/2024-08-01/nx-19-5-thumbnail.png'
tags: [nx, release]
pinned: true
---
## Table of Contents
In this blog post:
- [Video Summary](#video-summary)
- [Announcing Nx Cloud Hobby Tier](#announcing-nx-cloud-hobby-tier)
- [StackBlitz Support](#stackblitz-support)
- [Bun and Pnpm v9 Support](#bun-and-pnpm-v9-support)
@@ -25,6 +27,7 @@ In this blog post:
- [Support for React 19 (rc) and Angular 18.1](#support-for-react-19-rc-and-angular-181)
- [Automatically Update Nx](#automatically-update-nx)
- [Monorepo World Conference Speakers Announced!!](#monorepo-world-conference-speakers-announced)
- [Learn more](#learn-more)
## Video Summary
@@ -142,7 +145,7 @@ To accommodate port collisions in end-to-end tests, we've long adjusted our gene
Unfortunately, this approach is more imperative, as it instructs how to run and order your CI rather than defining what should be run. Additionally, these instructions cause `lint`, `test`, and `build` targets to run first and wait until they all complete before running `e2e-ci`, leading to inefficiencies.
To address this, all tasks now support a `parallelism` property. By setting this property to `false`, you can instruct the Nx task runner not to run a specific task in parallel. This allows us to define parallelism as a task property, making our CI configuration more declarative.
To address this, all tasks now support a [`parallelism` property](/reference/project-configuration#parallelism). By setting this property to `false`, you can instruct the Nx task runner not to run a specific task in parallel. This allows us to define parallelism as a task property, making our CI configuration more declarative.
Both our `@nx/playwright` and `@nx/cypress` plugins will now automatically set `targetDefaults` for atomized tests to disable parallelism:
@@ -0,0 +1,16 @@
---
title: 'Nx Enterprise Podcast Episode 3: Ahmed Elsakaan'
slug: 'ahmed-elsakaan-podcast-3'
authors: ['Zack DeRose']
tags: [podcast]
cover_image: /blog/images/2024-08-14/ep-3-ahmed.png
podcastYoutubeId: l_b6EOXqYRg
podcastSpotifyId: 4d4oE8B3y9BmECZ3P4uvDP
podcastAmazonUrl: https://music.amazon.com/podcasts/a221fdad-36fd-4695-a5b4-038d7b99d284/episodes/28209cf9-1b88-48b5-a798-7b24c843e9b1/the-enterprise-software-podcast-by-nx-the-enterprise-software-podcast-by-nx-3-ahmed-elsakaan
podcastAppleUrl: https://podcasts.apple.com/us/podcast/the-enterprise-software-podcast-by-nx-3-ahmed-elsakaan/id1752704996?i=1000665363260
podcastIHeartUrl: https://www.iheart.com/podcast/269-the-enterprise-software-po-186891508/episode/the-enterprise-software-podcast-by-nx-205664230/
---
In this episode we welcome Nx Champion and creator of [noodle](https://noodle.run) and [OrbitKit](https://orbitkit.dev/): Ahmed Elsakaan.
As a monorepo enthusiast, we explore Ahmed's thoughts on monorepos and how these tools can add value to developers - both in the space of setting up your monorepo (like Nx does) and in the space of creating reusable customizable modules (like OrbitKit is attempting).
@@ -0,0 +1,16 @@
---
title: 'Nx Enterprise Podcast Episode 4: Cvent Platform Architecture Panel'
slug: 'cvent-podcast-3'
authors: ['Zack DeRose']
tags: [podcast]
cover_image: /blog/images/2024-08-21/ep-4-cvent.png
podcastYoutubeId: _7uK1V_xu9k
podcastSpotifyId: 1zWuMFxcnGy90AN41gkodx
podcastAmazonUrl: https://music.amazon.com/podcasts/a221fdad-36fd-4695-a5b4-038d7b99d284/episodes/7e19eb25-76f9-4d1e-89c0-c2fd1f585f9b/the-enterprise-software-podcast-by-nx-the-enterprise-software-podcast-by-nx-4-cvent-platform-architect-panel
podcastAppleUrl: https://podcasts.apple.com/us/podcast/the-enterprise-software-podcast-by-nx-4-cvent/id1752704996?i=1000666133320
podcastIHeartUrl: https://www.iheart.com/podcast/269-the-enterprise-software-po-186891508/episode/the-enterprise-software-podcast-by-nx-207751657/
---
In this edition of the Nx Enterprise Podcast, Zack sits down with a panel of Platform Architects from the event platform company, [Cvent](https://www.cvent.com/).
The panel, featuring Youssef Taghlabi, Kevin O'Brien, Josh Lartz, and Ladi Kobiti, dives into their approach to platform engineering—focusing on how they empower teams across their organization and the critical role Nx plays in achieving those goals.
@@ -0,0 +1,47 @@
---
title: New Table Log View on CI with Nx Cloud
slug: improved-ci-log-with-nx-cloud
authors: ['Juri Strumpflohner']
tags: [nx-cloud, release]
cover_image: /blog/images/2024-08/nx-cloud-table-log-output-thumb.jpg
youtubeUrl: https://youtu.be/aacrw0H0m4Q
---
Whenever we talk about Nx Cloud, speed is often a major focus—and for good reason. However, Nx Cloud isn't just about speed. Similar to Nx itself, it's about making work within monorepos more pleasant and efficient. A key part of that is continuously **optimizing developer ergonomics**.
Structuring your log output is one example. In a polyrepo setup, this isn't a big deal since you typically run tasks for a single project. However, in a monorepo setup, you might be running hundreds of tasks in parallel across multiple projects. **Quickly finding a failed task in this context can be challenging.**
## New Table Log View
Today, we released an update that improves how logs are displayed on your CI provider when using Nx Cloud. Instead of streaming all logs directly into your CI provider's pipeline, **we now render a structured table view**. This table shows all tasks, their status (success or failure), timing, and whether they had a cache hit or miss.
![New Table Log View](/blog/images/2024-08/circle-table-log-view.avif)
At the end of the log output, you'll also see aggregated stats about executed tasks, cache hits, and a link to the Nx Cloud dashboard with full details of the run.
![Nx Cloud Dashboard](/blog/images/2024-08/nx-cloud-dashboard-log-view.avif)
## Revert to the Old Behavior
If you prefer the previous log view in your CI, you can opt-out of the new table view. Simply go to your Nx Cloud workspace settings and enable the "Display live terminal outputs in CI pipeline log" option.
![](/blog/images/2024-08/nxcloud-display-live-terminal-output.avif)
## Not Using Nx Cloud Yet?
If you're not on Nx Cloud yet, you can **connect your Nx workspace** by running:
```shell
npx nx connect
```
This command will guide you through the setup. We recently introduced a [new Hobby plan](/pricing), which lets you experiment with all the Nx Cloud features for free. This is a great way to see if it's a good fit for your team.
## Learn More
- [Nx on CI](/ci)
- [Task Distribution with Nx Agents](/ci/features/distribute-task-execution)
- [Automated e2e Test Splitting](/ci/features/split-e2e-tasks)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
@@ -0,0 +1,10 @@
---
title: How to Fast-Track Your PRs with Trunk.io | Nx Live
slug: nx-live-trunk-io
authors: ['Zack DeRose']
tags: [livestream]
cover_image: /blog/images/2024-08-29/nx-live-trunk.png
youtubeUrl: https://youtube.com/live/E8Gh-Vkxok0
---
In this episode of Nx Live, Zack sits down with David from [Trunk.io](https://trunk.io) to explore hands-on examples of how to fast-track your PRs using Nx and Trunk Merge Queues. They also discuss the latest [first-class support for Nx](https://docs.trunk.io/merge-queue/parallel-queues/nx) recently added to Trunk, demonstrating how these tools can streamline your development workflow.
@@ -0,0 +1,39 @@
---
title: Announcing your Monorepo World Speakers
slug: announcing-your-monorepo-world-speakers
authors: ['Mike Hartington']
tags: [monorepo-world]
cover_image: /blog/images/2024-08-30/mw-blog-post.avif
---
[Monorepo World](https://monorepo.world) is our two-track conference bringing together experts in developer tooling and of course, monorepos. Were thrilled to share some of this year's speakers, including folks from Zephyr Cloud, Atlassian, GitHub, and HeroDevs. Without further ado, lets meet your first round of speakers!
### Hacking Bundlers in Nx
[Lois Zhao](https://x.com/zmzlois), Zephyr Cloud
Want to know how builders work and how they can impact your projects? Lets look at various bundlers and see how they affect the build time and output while also potentially saving organizations millions of dollars.
### What's In Your Dependency Graph
[Josh VanAllen](https://x.com/JVAsays), HeroDevs
Ever ask yourself “why is this build taking so long?” Youre not alone. With monorepos, managing your workspaces dependency graph can make the difference between spending countless hours waiting to see if your simple changes fixes your apps. Learn how to find the hidden bottlenecks in your dependency graphs and make them efficient!
### How To Use Git - The Right Way - For Monorepos
[Scott Arbeit](https://x.com/ScottArbeit), GitHub
We all use git in our day to day, and its great! Until you have to clone a large repository, like potentially a monorepo. Thankfully, there are some tips and tricks you can use to work with large repositories and git that can greatly improve your user experience.
### Atlassian Frontend's Journey To The Monorepo
Manoraj K & Sourav Shaw, Atlassian
Adopting a monorepo for an organization can be a transformative experience. Learn from the folks at Atlassian to hear how they migrated to a monorepo and what strategies they employ to merge multiple repositories into one unified structure.
## Get Your Tickets Today
We hope youre excited to see these amazing sessions! Well have more to share soon about what other speakers you can expect to see at Monorepo world! Dont forget to register and get your ticket before prices go up September 6th 😱!
[Get your tickets today!](https://bit.ly/3YZcb5r)
+6
View File
@@ -58,5 +58,11 @@
"image": "/blog/images/Philip Fulcher.jpeg",
"twitter": "philipjfulcher",
"github": "philipjfulcher"
},
{
"name": "Mike Hartington",
"image": "/blog/images/Mike Hartington.png",
"twitter": "mhartington",
"github": "mhartington"
}
]
Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 921 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

-2
View File
@@ -20,7 +20,5 @@ Read the [blogpost](/blog/nx-19-5-adds-stackblitz-new-features-and-more) for ful
{% card title="Experimental: Gradle Test Atomization" type="document" url="/blog/nx-19-5-adds-stackblitz-new-features-and-more#experimental-gradle-test-atomization" /%}
{% card title="Experimental: Nx Release Adds Version Plans Support" type="document" url="/blog/nx-19-5-adds-stackblitz-new-features-and-more#experimental-nx-release-adds-version-plans-support" /%}
{% card title="Support for React 19 (rc) and Angular 18.1" type="document" url="/blog/nx-19-5-adds-stackblitz-new-features-and-more#support-for-react-19-rc-and-angular-181" /%}
{% card title="Automatically Update Nx" type="document" url="/blog/nx-19-5-adds-stackblitz-new-features-and-more#automatically-update-nx" /%}
{% card title="Monorepo World Conference Speakers Announced!!" type="document" url="/blog/nx-19-5-adds-stackblitz-new-features-and-more#monorepo-world-conference-speakers-announced" /%}
{% /cards %}
+15
View File
@@ -0,0 +1,15 @@
# Nx 19.6
## Features
{% cards cols="2" %}
{% card title="Explain with AI" type="document" url="/ci/features/explain-with-ai" /%}
{% card title="File-Based Versioning for Nx Release (Version Plans)" type="document" url="/recipes/nx-release/file-based-versioning-version-plans" /%}
{% card title="Migrate to Inferred Tasks (Project Crystal)" type="document" url="/recipes/running-tasks/convert-to-inferred" /%}
{% card title="Angular 18.2.0 Support" type="document" url="https://github.com/nrwl/nx/pull/27379" /%}
{% card title="Storybook 8 Support" type="document" url="https://github.com/nrwl/nx/pull/27214" /%}
{% /cards %}
## Breaking Changes
We updated `webpack-dev-server` to v5 in `@nx/webpack`, which comes with some breaking changes. See their [migration guide](https://github.com/webpack/webpack-dev-server/blob/master/migration-v5.md) for more details.
+1 -1
View File
@@ -121,7 +121,7 @@ Generate a 'src/' directory for Next.js
Type: `string`
Choices: [github, circleci, gitlab, azure, bitbucket-pipelines, skip, yes]
Choices: [github, gitlab, azure, bitbucket-pipelines, circleci, skip, yes]
Which CI provider would you like to use?
+6
View File
@@ -149,6 +149,12 @@ Type: `string`
Use the provided versions for packages instead of the ones calculated by the migrator (e.g., --to="@nx/react@16.0.0,@nx/js@16.0.0")
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
+35
View File
@@ -0,0 +1,35 @@
# Interface: GraphJson
The data type that `nx graph --file graph.json` or `nx build --graph graph.json` contains
## Table of contents
### Properties
- [graph](../../devkit/documents/GraphJson#graph): ProjectGraph
- [taskPlans](../../devkit/documents/GraphJson#taskplans): Record<string, string[]>
- [tasks](../../devkit/documents/GraphJson#tasks): TaskGraph
## Properties
### graph
**graph**: [`ProjectGraph`](../../devkit/documents/ProjectGraph)
The project graph
---
### taskPlans
`Optional` **taskPlans**: `Record`\<`string`, `string`[]\>
The plans for hashing a task in the task graph
---
### tasks
`Optional` **tasks**: [`TaskGraph`](../../devkit/documents/TaskGraph)
A graph of tasks populated with `nx build --graph`
+1
View File
@@ -35,6 +35,7 @@ It only uses language primitives and immutable objects
- [FileData](../../devkit/documents/FileData)
- [FileMap](../../devkit/documents/FileMap)
- [GeneratorsJson](../../devkit/documents/GeneratorsJson)
- [GraphJson](../../devkit/documents/GraphJson)
- [Hash](../../devkit/documents/Hash)
- [HasherContext](../../devkit/documents/HasherContext)
- [ImplicitJsonSubsetDependency](../../devkit/documents/ImplicitJsonSubsetDependency)
+66 -66
View File
@@ -207,28 +207,6 @@
"path": "/ci/features/distribute-task-execution",
"tags": []
},
{
"id": "nx-cloud-ai",
"name": "Nx Cloud AI",
"description": "Learn how to enable AI features in Nx Cloud, and what features it enables",
"mediaImage": "",
"file": "nx-cloud/features/ai-features",
"itemList": [],
"isExternal": false,
"path": "/ci/features/nx-cloud-ai",
"tags": []
},
{
"id": "dynamic-agents",
"name": "Dynamically Allocate Agents",
"description": "Learn how to dynamically allocate agents based on the size of a PR, keeping the balance of speed and cost.",
"mediaImage": "",
"file": "nx-cloud/features/dynamic-agents",
"itemList": [],
"isExternal": false,
"path": "/ci/features/dynamic-agents",
"tags": []
},
{
"id": "split-e2e-tasks",
"name": "Automatically Split E2E Tasks (Atomizer)",
@@ -250,6 +228,28 @@
"isExternal": false,
"path": "/ci/features/flaky-tasks",
"tags": []
},
{
"id": "dynamic-agents",
"name": "Dynamically Allocate Agents",
"description": "Learn how to dynamically allocate agents based on the size of a PR, keeping the balance of speed and cost.",
"mediaImage": "",
"file": "nx-cloud/features/dynamic-agents",
"itemList": [],
"isExternal": false,
"path": "/ci/features/dynamic-agents",
"tags": []
},
{
"id": "explain-with-ai",
"name": "Explain With AI",
"description": "",
"mediaImage": "",
"file": "nx-cloud/features/explain-with-ai",
"itemList": [],
"isExternal": false,
"path": "/ci/features/explain-with-ai",
"tags": []
}
],
"isExternal": false,
@@ -289,28 +289,6 @@
"path": "/ci/features/distribute-task-execution",
"tags": []
},
"/ci/features/nx-cloud-ai": {
"id": "nx-cloud-ai",
"name": "Nx Cloud AI",
"description": "Learn how to enable AI features in Nx Cloud, and what features it enables",
"mediaImage": "",
"file": "nx-cloud/features/ai-features",
"itemList": [],
"isExternal": false,
"path": "/ci/features/nx-cloud-ai",
"tags": []
},
"/ci/features/dynamic-agents": {
"id": "dynamic-agents",
"name": "Dynamically Allocate Agents",
"description": "Learn how to dynamically allocate agents based on the size of a PR, keeping the balance of speed and cost.",
"mediaImage": "",
"file": "nx-cloud/features/dynamic-agents",
"itemList": [],
"isExternal": false,
"path": "/ci/features/dynamic-agents",
"tags": []
},
"/ci/features/split-e2e-tasks": {
"id": "split-e2e-tasks",
"name": "Automatically Split E2E Tasks (Atomizer)",
@@ -333,6 +311,28 @@
"path": "/ci/features/flaky-tasks",
"tags": []
},
"/ci/features/dynamic-agents": {
"id": "dynamic-agents",
"name": "Dynamically Allocate Agents",
"description": "Learn how to dynamically allocate agents based on the size of a PR, keeping the balance of speed and cost.",
"mediaImage": "",
"file": "nx-cloud/features/dynamic-agents",
"itemList": [],
"isExternal": false,
"path": "/ci/features/dynamic-agents",
"tags": []
},
"/ci/features/explain-with-ai": {
"id": "explain-with-ai",
"name": "Explain With AI",
"description": "",
"mediaImage": "",
"file": "nx-cloud/features/explain-with-ai",
"itemList": [],
"isExternal": false,
"path": "/ci/features/explain-with-ai",
"tags": []
},
"/ci/concepts": {
"id": "concepts",
"name": "Concepts",
@@ -383,6 +383,17 @@
"isExternal": false,
"path": "/ci/concepts/cache-security",
"tags": []
},
{
"id": "nx-cloud-ai",
"name": "Nx Cloud AI",
"description": "Learn how to enable AI features in Nx Cloud, and what features it enables",
"mediaImage": "",
"file": "nx-cloud/concepts/ai-features",
"itemList": [],
"isExternal": false,
"path": "/ci/concepts/nx-cloud-ai",
"tags": []
}
],
"isExternal": false,
@@ -433,6 +444,17 @@
"path": "/ci/concepts/cache-security",
"tags": []
},
"/ci/concepts/nx-cloud-ai": {
"id": "nx-cloud-ai",
"name": "Nx Cloud AI",
"description": "Learn how to enable AI features in Nx Cloud, and what features it enables",
"mediaImage": "",
"file": "nx-cloud/concepts/ai-features",
"itemList": [],
"isExternal": false,
"path": "/ci/concepts/nx-cloud-ai",
"tags": []
},
"/ci/recipes": {
"id": "recipes",
"name": "Recipes",
@@ -1997,17 +2019,6 @@
"isExternal": false,
"path": "/ci/troubleshooting/ci-execution-failed",
"tags": []
},
{
"id": "explain-with-ai",
"name": "Explain With AI",
"description": "",
"mediaImage": "",
"file": "nx-cloud/troubleshooting/explain-with-ai",
"itemList": [],
"isExternal": false,
"path": "/ci/troubleshooting/explain-with-ai",
"tags": []
}
],
"isExternal": false,
@@ -2024,16 +2035,5 @@
"isExternal": false,
"path": "/ci/troubleshooting/ci-execution-failed",
"tags": []
},
"/ci/troubleshooting/explain-with-ai": {
"id": "explain-with-ai",
"name": "Explain With AI",
"description": "",
"mediaImage": "",
"file": "nx-cloud/troubleshooting/explain-with-ai",
"itemList": [],
"isExternal": false,
"path": "/ci/troubleshooting/explain-with-ai",
"tags": []
}
}
+89 -67
View File
@@ -8,7 +8,7 @@
"itemList": [
{
"id": "getting-started",
"name": "Getting Started with Plugins",
"name": "Extending Nx with Plugins",
"description": "Learn how to extend Nx by creating and releasing your own Nx plugin.",
"mediaImage": "",
"file": "shared/plugins/intro",
@@ -24,7 +24,7 @@
},
"/extending-nx/intro/getting-started": {
"id": "getting-started",
"name": "Getting Started with Plugins",
"name": "Extending Nx with Plugins",
"description": "Learn how to extend Nx by creating and releasing your own Nx plugin.",
"mediaImage": "",
"file": "shared/plugins/intro",
@@ -35,31 +35,31 @@
},
"/extending-nx/tutorials": {
"id": "tutorials",
"name": "5 Min Tutorials",
"name": "Tutorials",
"description": "Get started with plugins",
"mediaImage": "",
"file": "",
"itemList": [
{
"id": "create-plugin",
"name": "Create a Local Plugin",
"id": "organization-specific-plugin",
"name": "Enforce Organizational Best Practices",
"description": "",
"mediaImage": "",
"file": "shared/plugins/create-plugin",
"file": "shared/plugins/organization-specific-plugin",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/tutorials/create-plugin",
"path": "/extending-nx/tutorials/organization-specific-plugin",
"tags": []
},
{
"id": "publish-plugin",
"name": "Maintain a Published Plugin",
"id": "tooling-plugin",
"name": "Create a Tooling Plugin",
"description": "",
"mediaImage": "",
"file": "shared/plugins/maintain-published-plugin",
"file": "shared/plugins/tooling-plugin",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/tutorials/publish-plugin",
"path": "/extending-nx/tutorials/tooling-plugin",
"tags": []
}
],
@@ -67,26 +67,26 @@
"path": "/extending-nx/tutorials",
"tags": []
},
"/extending-nx/tutorials/create-plugin": {
"id": "create-plugin",
"name": "Create a Local Plugin",
"/extending-nx/tutorials/organization-specific-plugin": {
"id": "organization-specific-plugin",
"name": "Enforce Organizational Best Practices",
"description": "",
"mediaImage": "",
"file": "shared/plugins/create-plugin",
"file": "shared/plugins/organization-specific-plugin",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/tutorials/create-plugin",
"path": "/extending-nx/tutorials/organization-specific-plugin",
"tags": []
},
"/extending-nx/tutorials/publish-plugin": {
"id": "publish-plugin",
"name": "Maintain a Published Plugin",
"/extending-nx/tutorials/tooling-plugin": {
"id": "tooling-plugin",
"name": "Create a Tooling Plugin",
"description": "",
"mediaImage": "",
"file": "shared/plugins/maintain-published-plugin",
"file": "shared/plugins/tooling-plugin",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/tutorials/publish-plugin",
"path": "/extending-nx/tutorials/tooling-plugin",
"tags": []
},
"/extending-nx/recipes": {
@@ -96,28 +96,6 @@
"mediaImage": "",
"file": "",
"itemList": [
{
"id": "local-executors",
"name": "Write a Simple Executor",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/local-executors",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/local-executors",
"tags": []
},
{
"id": "compose-executors",
"name": "Compose Executors",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/compose-executors",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/compose-executors",
"tags": []
},
{
"id": "local-generators",
"name": "Write a Simple Generator",
@@ -184,6 +162,28 @@
"path": "/extending-nx/recipes/migration-generators",
"tags": ["create-your-own-plugin"]
},
{
"id": "local-executors",
"name": "Write a Simple Executor",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/local-executors",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/local-executors",
"tags": []
},
{
"id": "compose-executors",
"name": "Compose Executors",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/compose-executors",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/compose-executors",
"tags": []
},
{
"id": "create-preset",
"name": "Create a Preset",
@@ -208,7 +208,7 @@
},
{
"id": "project-graph-plugins",
"name": "Modify the Project Graph",
"name": "Infer Tasks or Projects",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/project-graph-plugins",
@@ -216,34 +216,23 @@
"isExternal": false,
"path": "/extending-nx/recipes/project-graph-plugins",
"tags": ["create-your-own-plugin", "explore-graph", "inferred-tasks"]
},
{
"id": "publish-plugin",
"name": "Publish a Plugin",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/publish-plugin",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/publish-plugin",
"tags": ["create-your-own-plugin"]
}
],
"isExternal": false,
"path": "/extending-nx/recipes",
"tags": []
},
"/extending-nx/recipes/local-executors": {
"id": "local-executors",
"name": "Write a Simple Executor",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/local-executors",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/local-executors",
"tags": []
},
"/extending-nx/recipes/compose-executors": {
"id": "compose-executors",
"name": "Compose Executors",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/compose-executors",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/compose-executors",
"tags": []
},
"/extending-nx/recipes/local-generators": {
"id": "local-generators",
"name": "Write a Simple Generator",
@@ -310,6 +299,28 @@
"path": "/extending-nx/recipes/migration-generators",
"tags": ["create-your-own-plugin"]
},
"/extending-nx/recipes/local-executors": {
"id": "local-executors",
"name": "Write a Simple Executor",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/local-executors",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/local-executors",
"tags": []
},
"/extending-nx/recipes/compose-executors": {
"id": "compose-executors",
"name": "Compose Executors",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/compose-executors",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/compose-executors",
"tags": []
},
"/extending-nx/recipes/create-preset": {
"id": "create-preset",
"name": "Create a Preset",
@@ -334,7 +345,7 @@
},
"/extending-nx/recipes/project-graph-plugins": {
"id": "project-graph-plugins",
"name": "Modify the Project Graph",
"name": "Infer Tasks or Projects",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/project-graph-plugins",
@@ -342,5 +353,16 @@
"isExternal": false,
"path": "/extending-nx/recipes/project-graph-plugins",
"tags": ["create-your-own-plugin", "explore-graph", "inferred-tasks"]
},
"/extending-nx/recipes/publish-plugin": {
"id": "publish-plugin",
"name": "Publish a Plugin",
"description": "",
"mediaImage": "",
"file": "shared/recipes/plugins/publish-plugin",
"itemList": [],
"isExternal": false,
"path": "/extending-nx/recipes/publish-plugin",
"tags": ["create-your-own-plugin"]
}
}
+181 -93
View File
@@ -1177,6 +1177,14 @@
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Migrate to Inferred Tasks (Project Crystal)",
"path": "/recipes/running-tasks/convert-to-inferred",
"id": "convert-to-inferred",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"disableCollapsible": false
@@ -1962,6 +1970,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "File Based Versioning (Version Plans)",
"path": "/recipes/nx-release/file-based-versioning-version-plans",
"id": "file-based-versioning-version-plans",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Configure Custom Registries",
"path": "/recipes/nx-release/configure-custom-registries",
@@ -2017,6 +2033,14 @@
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Build Before Versioning",
"path": "/recipes/nx-release/build-before-versioning",
"id": "build-before-versioning",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"disableCollapsible": false
@@ -2175,6 +2199,14 @@
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Migrate to Inferred Tasks (Project Crystal)",
"path": "/recipes/running-tasks/convert-to-inferred",
"id": "convert-to-inferred",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"disableCollapsible": false
@@ -2267,6 +2299,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Migrate to Inferred Tasks (Project Crystal)",
"path": "/recipes/running-tasks/convert-to-inferred",
"id": "convert-to-inferred",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Adopting Nx",
"path": "/recipes/adopting-nx",
@@ -3681,6 +3721,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "File Based Versioning (Version Plans)",
"path": "/recipes/nx-release/file-based-versioning-version-plans",
"id": "file-based-versioning-version-plans",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Configure Custom Registries",
"path": "/recipes/nx-release/configure-custom-registries",
@@ -3736,6 +3784,14 @@
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Build Before Versioning",
"path": "/recipes/nx-release/build-before-versioning",
"id": "build-before-versioning",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"disableCollapsible": false
@@ -3772,6 +3828,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "File Based Versioning (Version Plans)",
"path": "/recipes/nx-release/file-based-versioning-version-plans",
"id": "file-based-versioning-version-plans",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Configure Custom Registries",
"path": "/recipes/nx-release/configure-custom-registries",
@@ -3828,6 +3892,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Build Before Versioning",
"path": "/recipes/nx-release/build-before-versioning",
"id": "build-before-versioning",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Other",
"path": "/recipes/other",
@@ -4946,7 +5018,7 @@
"isExternal": false,
"children": [
{
"name": "Getting Started with Plugins",
"name": "Extending Nx with Plugins",
"path": "/extending-nx/intro/getting-started",
"id": "getting-started",
"isExternal": false,
@@ -4957,7 +5029,7 @@
"disableCollapsible": false
},
{
"name": "Getting Started with Plugins",
"name": "Extending Nx with Plugins",
"path": "/extending-nx/intro/getting-started",
"id": "getting-started",
"isExternal": false,
@@ -4965,23 +5037,23 @@
"disableCollapsible": false
},
{
"name": "5 Min Tutorials",
"name": "Tutorials",
"path": "/extending-nx/tutorials",
"id": "tutorials",
"isExternal": false,
"children": [
{
"name": "Create a Local Plugin",
"path": "/extending-nx/tutorials/create-plugin",
"id": "create-plugin",
"name": "Enforce Organizational Best Practices",
"path": "/extending-nx/tutorials/organization-specific-plugin",
"id": "organization-specific-plugin",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Maintain a Published Plugin",
"path": "/extending-nx/tutorials/publish-plugin",
"id": "publish-plugin",
"name": "Create a Tooling Plugin",
"path": "/extending-nx/tutorials/tooling-plugin",
"id": "tooling-plugin",
"isExternal": false,
"children": [],
"disableCollapsible": false
@@ -4990,17 +5062,17 @@
"disableCollapsible": false
},
{
"name": "Create a Local Plugin",
"path": "/extending-nx/tutorials/create-plugin",
"id": "create-plugin",
"name": "Enforce Organizational Best Practices",
"path": "/extending-nx/tutorials/organization-specific-plugin",
"id": "organization-specific-plugin",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Maintain a Published Plugin",
"path": "/extending-nx/tutorials/publish-plugin",
"id": "publish-plugin",
"name": "Create a Tooling Plugin",
"path": "/extending-nx/tutorials/tooling-plugin",
"id": "tooling-plugin",
"isExternal": false,
"children": [],
"disableCollapsible": false
@@ -5011,22 +5083,6 @@
"id": "recipes",
"isExternal": false,
"children": [
{
"name": "Write a Simple Executor",
"path": "/extending-nx/recipes/local-executors",
"id": "local-executors",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Compose Executors",
"path": "/extending-nx/recipes/compose-executors",
"id": "compose-executors",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Write a Simple Generator",
"path": "/extending-nx/recipes/local-generators",
@@ -5075,6 +5131,22 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Write a Simple Executor",
"path": "/extending-nx/recipes/local-executors",
"id": "local-executors",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Compose Executors",
"path": "/extending-nx/recipes/compose-executors",
"id": "compose-executors",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Create a Preset",
"path": "/extending-nx/recipes/create-preset",
@@ -5092,32 +5164,24 @@
"disableCollapsible": false
},
{
"name": "Modify the Project Graph",
"name": "Infer Tasks or Projects",
"path": "/extending-nx/recipes/project-graph-plugins",
"id": "project-graph-plugins",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Publish a Plugin",
"path": "/extending-nx/recipes/publish-plugin",
"id": "publish-plugin",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"disableCollapsible": false
},
{
"name": "Write a Simple Executor",
"path": "/extending-nx/recipes/local-executors",
"id": "local-executors",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Compose Executors",
"path": "/extending-nx/recipes/compose-executors",
"id": "compose-executors",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Write a Simple Generator",
"path": "/extending-nx/recipes/local-generators",
@@ -5166,6 +5230,22 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Write a Simple Executor",
"path": "/extending-nx/recipes/local-executors",
"id": "local-executors",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Compose Executors",
"path": "/extending-nx/recipes/compose-executors",
"id": "compose-executors",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Create a Preset",
"path": "/extending-nx/recipes/create-preset",
@@ -5183,12 +5263,20 @@
"disableCollapsible": false
},
{
"name": "Modify the Project Graph",
"name": "Infer Tasks or Projects",
"path": "/extending-nx/recipes/project-graph-plugins",
"id": "project-graph-plugins",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Publish a Plugin",
"path": "/extending-nx/recipes/publish-plugin",
"id": "publish-plugin",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
]
},
@@ -5349,9 +5437,17 @@
"disableCollapsible": false
},
{
"name": "Nx Cloud AI",
"path": "/ci/features/nx-cloud-ai",
"id": "nx-cloud-ai",
"name": "Automatically Split E2E Tasks (Atomizer)",
"path": "/ci/features/split-e2e-tasks",
"id": "split-e2e-tasks",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Identify and Re-run Flaky Tasks",
"path": "/ci/features/flaky-tasks",
"id": "flaky-tasks",
"isExternal": false,
"children": [],
"disableCollapsible": false
@@ -5365,17 +5461,9 @@
"disableCollapsible": false
},
{
"name": "Automatically Split E2E Tasks (Atomizer)",
"path": "/ci/features/split-e2e-tasks",
"id": "split-e2e-tasks",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Identify and Re-run Flaky Tasks",
"path": "/ci/features/flaky-tasks",
"id": "flaky-tasks",
"name": "Explain With AI",
"path": "/ci/features/explain-with-ai",
"id": "explain-with-ai",
"isExternal": false,
"children": [],
"disableCollapsible": false
@@ -5408,9 +5496,17 @@
"disableCollapsible": false
},
{
"name": "Nx Cloud AI",
"path": "/ci/features/nx-cloud-ai",
"id": "nx-cloud-ai",
"name": "Automatically Split E2E Tasks (Atomizer)",
"path": "/ci/features/split-e2e-tasks",
"id": "split-e2e-tasks",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Identify and Re-run Flaky Tasks",
"path": "/ci/features/flaky-tasks",
"id": "flaky-tasks",
"isExternal": false,
"children": [],
"disableCollapsible": false
@@ -5424,17 +5520,9 @@
"disableCollapsible": false
},
{
"name": "Automatically Split E2E Tasks (Atomizer)",
"path": "/ci/features/split-e2e-tasks",
"id": "split-e2e-tasks",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Identify and Re-run Flaky Tasks",
"path": "/ci/features/flaky-tasks",
"id": "flaky-tasks",
"name": "Explain With AI",
"path": "/ci/features/explain-with-ai",
"id": "explain-with-ai",
"isExternal": false,
"children": [],
"disableCollapsible": false
@@ -5476,6 +5564,14 @@
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Nx Cloud AI",
"path": "/ci/concepts/nx-cloud-ai",
"id": "nx-cloud-ai",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"disableCollapsible": false
@@ -5512,6 +5608,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Nx Cloud AI",
"path": "/ci/concepts/nx-cloud-ai",
"id": "nx-cloud-ai",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Recipes",
"path": "/ci/recipes",
@@ -6655,14 +6759,6 @@
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Explain With AI",
"path": "/ci/troubleshooting/explain-with-ai",
"id": "explain-with-ai",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"disableCollapsible": false
@@ -6674,14 +6770,6 @@
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Explain With AI",
"path": "/ci/troubleshooting/explain-with-ai",
"id": "explain-with-ai",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
]
},
+99
View File
@@ -1608,6 +1608,17 @@
"isExternal": false,
"path": "/recipes/running-tasks/skipping-cache",
"tags": []
},
{
"id": "convert-to-inferred",
"name": "Migrate to Inferred Tasks (Project Crystal)",
"description": "",
"mediaImage": "",
"file": "shared/recipes/running-tasks/convert-to-inferred",
"itemList": [],
"isExternal": false,
"path": "/recipes/running-tasks/convert-to-inferred",
"tags": ["inferred-tasks", "automate-updating-dependencies"]
}
],
"isExternal": false,
@@ -2681,6 +2692,17 @@
"path": "/recipes/nx-release/customize-conventional-commit-types",
"tags": ["nx-release"]
},
{
"id": "file-based-versioning-version-plans",
"name": "File Based Versioning (Version Plans)",
"description": "",
"mediaImage": "",
"file": "shared/recipes/nx-release/file-based-versioning-version-plans",
"itemList": [],
"isExternal": false,
"path": "/recipes/nx-release/file-based-versioning-version-plans",
"tags": ["nx-release"]
},
{
"id": "configure-custom-registries",
"name": "Configure Custom Registries",
@@ -2757,6 +2779,17 @@
"isExternal": false,
"path": "/recipes/nx-release/publish-custom-dist-directory",
"tags": ["nx-release"]
},
{
"id": "build-before-versioning",
"name": "Build Before Versioning",
"description": "",
"mediaImage": "",
"file": "shared/recipes/nx-release/build-before-versioning",
"itemList": [],
"isExternal": false,
"path": "/recipes/nx-release/build-before-versioning",
"tags": ["nx-release"]
}
],
"isExternal": false,
@@ -2974,6 +3007,17 @@
"isExternal": false,
"path": "/recipes/running-tasks/skipping-cache",
"tags": []
},
{
"id": "convert-to-inferred",
"name": "Migrate to Inferred Tasks (Project Crystal)",
"description": "",
"mediaImage": "",
"file": "shared/recipes/running-tasks/convert-to-inferred",
"itemList": [],
"isExternal": false,
"path": "/recipes/running-tasks/convert-to-inferred",
"tags": ["inferred-tasks", "automate-updating-dependencies"]
}
],
"isExternal": false,
@@ -3101,6 +3145,17 @@
"path": "/recipes/running-tasks/skipping-cache",
"tags": []
},
"/recipes/running-tasks/convert-to-inferred": {
"id": "convert-to-inferred",
"name": "Migrate to Inferred Tasks (Project Crystal)",
"description": "",
"mediaImage": "",
"file": "shared/recipes/running-tasks/convert-to-inferred",
"itemList": [],
"isExternal": false,
"path": "/recipes/running-tasks/convert-to-inferred",
"tags": ["inferred-tasks", "automate-updating-dependencies"]
},
"/recipes/adopting-nx": {
"id": "adopting-nx",
"name": "Adopting Nx",
@@ -5038,6 +5093,17 @@
"path": "/recipes/nx-release/customize-conventional-commit-types",
"tags": ["nx-release"]
},
{
"id": "file-based-versioning-version-plans",
"name": "File Based Versioning (Version Plans)",
"description": "",
"mediaImage": "",
"file": "shared/recipes/nx-release/file-based-versioning-version-plans",
"itemList": [],
"isExternal": false,
"path": "/recipes/nx-release/file-based-versioning-version-plans",
"tags": ["nx-release"]
},
{
"id": "configure-custom-registries",
"name": "Configure Custom Registries",
@@ -5114,6 +5180,17 @@
"isExternal": false,
"path": "/recipes/nx-release/publish-custom-dist-directory",
"tags": ["nx-release"]
},
{
"id": "build-before-versioning",
"name": "Build Before Versioning",
"description": "",
"mediaImage": "",
"file": "shared/recipes/nx-release/build-before-versioning",
"itemList": [],
"isExternal": false,
"path": "/recipes/nx-release/build-before-versioning",
"tags": ["nx-release"]
}
],
"isExternal": false,
@@ -5164,6 +5241,17 @@
"path": "/recipes/nx-release/customize-conventional-commit-types",
"tags": ["nx-release"]
},
"/recipes/nx-release/file-based-versioning-version-plans": {
"id": "file-based-versioning-version-plans",
"name": "File Based Versioning (Version Plans)",
"description": "",
"mediaImage": "",
"file": "shared/recipes/nx-release/file-based-versioning-version-plans",
"itemList": [],
"isExternal": false,
"path": "/recipes/nx-release/file-based-versioning-version-plans",
"tags": ["nx-release"]
},
"/recipes/nx-release/configure-custom-registries": {
"id": "configure-custom-registries",
"name": "Configure Custom Registries",
@@ -5241,6 +5329,17 @@
"path": "/recipes/nx-release/publish-custom-dist-directory",
"tags": ["nx-release"]
},
"/recipes/nx-release/build-before-versioning": {
"id": "build-before-versioning",
"name": "Build Before Versioning",
"description": "",
"mediaImage": "",
"file": "shared/recipes/nx-release/build-before-versioning",
"itemList": [],
"isExternal": false,
"path": "/recipes/nx-release/build-before-versioning",
"tags": ["nx-release"]
},
"/recipes/other": {
"id": "other",
"name": "Other",
+38 -3
View File
@@ -269,7 +269,7 @@
"description": "",
"file": "shared/recipes/plugins/project-graph-plugins",
"id": "project-graph-plugins",
"name": "Modify the Project Graph",
"name": "Infer Tasks or Projects",
"path": "/extending-nx/recipes/project-graph-plugins"
},
{
@@ -353,6 +353,13 @@
"name": "Automate Updating Dependencies",
"path": "/features/automate-updating-dependencies"
},
{
"description": "",
"file": "shared/recipes/running-tasks/convert-to-inferred",
"id": "convert-to-inferred",
"name": "Migrate to Inferred Tasks (Project Crystal)",
"path": "/recipes/running-tasks/convert-to-inferred"
},
{
"description": "",
"file": "shared/recipes/tips-n-tricks/keep-nx-versions-in-sync",
@@ -490,6 +497,13 @@
"name": "Customize Conventional Commit Types",
"path": "/recipes/nx-release/customize-conventional-commit-types"
},
{
"description": "",
"file": "shared/recipes/nx-release/file-based-versioning-version-plans",
"id": "file-based-versioning-version-plans",
"name": "File Based Versioning (Version Plans)",
"path": "/recipes/nx-release/file-based-versioning-version-plans"
},
{
"description": "",
"file": "shared/recipes/nx-release/configure-custom-registries",
@@ -539,6 +553,13 @@
"name": "Publish a Custom Dist Directory",
"path": "/recipes/nx-release/publish-custom-dist-directory"
},
{
"description": "",
"file": "shared/recipes/nx-release/build-before-versioning",
"id": "build-before-versioning",
"name": "Build Before Versioning",
"path": "/recipes/nx-release/build-before-versioning"
},
{
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
"file": "generated/packages/nx/documents/release",
@@ -585,11 +606,18 @@
"name": "Inferred Tasks",
"path": "/concepts/inferred-tasks"
},
{
"description": "",
"file": "shared/recipes/running-tasks/convert-to-inferred",
"id": "convert-to-inferred",
"name": "Migrate to Inferred Tasks (Project Crystal)",
"path": "/recipes/running-tasks/convert-to-inferred"
},
{
"description": "",
"file": "shared/recipes/plugins/project-graph-plugins",
"id": "project-graph-plugins",
"name": "Modify the Project Graph",
"name": "Infer Tasks or Projects",
"path": "/extending-nx/recipes/project-graph-plugins"
}
],
@@ -626,9 +654,16 @@
"description": "",
"file": "shared/recipes/plugins/project-graph-plugins",
"id": "project-graph-plugins",
"name": "Modify the Project Graph",
"name": "Infer Tasks or Projects",
"path": "/extending-nx/recipes/project-graph-plugins"
},
{
"description": "",
"file": "shared/recipes/plugins/publish-plugin",
"id": "publish-plugin",
"name": "Publish a Plugin",
"path": "/extending-nx/recipes/publish-plugin"
},
{
"description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Playwright and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
"file": "generated/packages/angular/documents/nx-devkit-angular-devkit",
@@ -231,6 +231,15 @@ pnpm add [package]
nx g [package]:ng-add
```
{% /tab %}
{% tab label="bun" %}
```shell
bun add [package]
nx g [package]:ng-add
```
{% /tab %}
{% /tabs %}
@@ -86,7 +86,7 @@ The `targetName`, `ciTargetName`, `componentTestingTargetName`, and `open-cypres
### Splitting E2E tasks by file
The `@nx/cypress/plugin` will automatically split your e2e tasks by file. You can read more about this feature [here](/ci/features/split-e2e-tasks).
The `@nx/cypress/plugin` will automatically split your e2e tasks by file. You can read more about the Atomizer feature [here](/ci/features/split-e2e-tasks).
To enable e2e task splitting, make sure there is a `ciWebServerCommand` property set in your `cypress.config.ts` file. It will look something like this:
@@ -35,6 +35,7 @@ It only uses language primitives and immutable objects
- [FileData](../../devkit/documents/FileData)
- [FileMap](../../devkit/documents/FileMap)
- [GeneratorsJson](../../devkit/documents/GeneratorsJson)
- [GraphJson](../../devkit/documents/GraphJson)
- [Hash](../../devkit/documents/Hash)
- [HasherContext](../../devkit/documents/HasherContext)
- [ImplicitJsonSubsetDependency](../../devkit/documents/ImplicitJsonSubsetDependency)
@@ -6,6 +6,10 @@ The rule uses the project graph to collect all the dependencies of your project,
We use the version numbers of the installed packages when checking whether the version specifier in `package.json` is correct. We do this because this is the only version for which we can "guarantee" that things work and were tested. If you specify a range outside of that version, that would mean that you are shipping potentially untested code.
{% callout type="check" title="Keep the Package Manager Lock File Up-to-Date" %}
The `@nx/dependency-checks` rule requires the presence of an up-to-date lock file in the workspace root to detect installed packages and their versions correctly. If the `package.json` file has changes that are not reflected in the lock file, make sure to perform a package installation.
{% /callout %}
## Usage
Library generators from `@nx` packages will configure this rule automatically when you opt-in for bundler/build setup. This rule is intended for publishable/buildable libraries, so it will only run if a `build` target is detected in the configuration (this name can be modified - see [options](#options)).
@@ -1,6 +1,7 @@
# Enforce module boundaries rule
The `@nx/enforce-module-boundaries` ESLint rule enables you to define strict rules for accessing resources between different projects in the repository. Enforcing strict boundaries helps to prevent unplanned cross-dependencies.
The `@nx/enforce-module-boundaries` ESLint rule enables you to define strict rules for accessing resources between
different projects in the repository. Enforcing strict boundaries helps to prevent unplanned cross-dependencies.
## Usage
@@ -28,19 +29,22 @@ You can use the `enforce-module-boundaries` rule by adding it to your ESLint rul
## Options
| Property | Type | Default | Description |
| ---------------------------------- | --------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| allow | _Array<string>_ | _[]_ | List of imports that should be allowed without any checks |
| allowCircularSelfDependency | _boolean_ | _false_ | Disable check for self circular dependency when project imports from itself via alias path |
| banTransitiveDependencies | _boolean_ | _false_ | Ban import of dependencies that were not specified in the root or project's `package.json` |
| checkDynamicDependenciesExceptions | _Array<string>_ | _[]_ | List of imports that should be skipped for `Imports of lazy-loaded libraries forbidden` checks. E.g. `['@myorg/lazy-project/component/*', '@myorg/other-project']` |
| checkNestedExternalImports | _boolean_ | _false_ | Enable to enforce the check for banned external imports in the nested packages. Check [Dependency constraits](#dependency-constraits) for more information |
| enforceBuildableLibDependency | _boolean_ | _false_ | Enable to restrict the buildable libs from importing non-buildable libraries |
| depConstraints | _Array<object>_ | _[]_ | List of dependency constraints between projects |
| Property | Type | Default | Description |
| ---------------------------------- | ------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| allow | _Array<string>_ | _[]_ | List of imports that should be allowed without any checks |
| allowCircularSelfDependency | _boolean_ | _false_ | Disable check for self circular dependency when project imports from itself via alias path |
| banTransitiveDependencies | _boolean_ | _false_ | Ban import of dependencies that were not specified in the root or project's `package.json` |
| ignoredCircularDependencies | _Array<[string, string]>_ | _[]_ | List of project pairs that should be skipped from `Circular dependencies` checks, including the self-circular dependency check. E.g. `['feature-project-a', 'myapp']`. Project name can be replaced by catch all `*` for more generic matches. |
| checkDynamicDependenciesExceptions | _Array<string>_ | _[]_ | List of imports that should be skipped for `Imports of lazy-loaded libraries forbidden` checks. E.g. `['@myorg/lazy-project/component/*', '@myorg/other-project']` |
| checkNestedExternalImports | _boolean_ | _false_ | Enable to enforce the check for banned external imports in the nested packages. Check [Dependency constraits](#dependency-constraits) for more information |
| enforceBuildableLibDependency | _boolean_ | _false_ | Enable to restrict the buildable libs from importing non-buildable libraries |
| depConstraints | _Array<object>_ | _[]_ | List of dependency constraints between projects |
### Dependency constraints
The `depConstraints` is an array of objects representing the constraints defined between source and target projects. A constraint must include `sourceTag` or `allSourceTags`. The constraints are applied with **AND** logical operation - for given `source` project the resulting constraints would be **all** that match its tags.
The `depConstraints` is an array of objects representing the constraints defined between source and target projects. A
constraint must include `sourceTag` or `allSourceTags`. The constraints are applied with **AND** logical operation - for
a given `source` project the resulting constraints would be **all** that match its tags.
| Property | Type | Description |
| ------------------------ | --------------- | ---------------------------------------------------------------------------------- |
@@ -68,6 +68,22 @@
"type": "string",
"description": "Submit on build complete using the submit profile with provided name",
"examples": ["production", "development", "preview"]
},
"message": {
"type": "string",
"description": "A short message describing the build",
"examples": ["My message"]
},
"buildLoggerLevel": {
"type": "string",
"description": "The level of logs to output during the build process.",
"enum": ["trace", "debug", "info", "warn", "error", "fatal"],
"default": "info"
},
"freezeCredentials": {
"type": "boolean",
"description": "Prevent the build from updating credentials in non-interactive mode",
"default": false
}
},
"required": []
@@ -76,7 +76,7 @@
"description": "Adds the specified e2e test runner",
"type": "string",
"enum": ["playwright", "cypress", "detox", "none"],
"default": "playwright"
"default": "none"
},
"standaloneConfig": {
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
@@ -68,7 +68,8 @@ The `@nx/gradle` is configured in the `plugins` array in `nx.json`.
"options": {
"testTargetName": "test",
"classesTargetName": "classes",
"buildTargetName": "build"
"buildTargetName": "build",
"ciTargetName": "test-ci"
}
}
]
@@ -77,6 +78,23 @@ The `@nx/gradle` is configured in the `plugins` array in `nx.json`.
Once a Gradle configuration file has been identified, the targets are created with the name you specify under `testTargetName`, `classesTargetName` or `buildTargetName` in the `nx.json` `plugins` array. The default names for the inferred targets are `test`, `classes` and `build`.
### Splitting E2E Tests
The `@nx/gradle` plugin will automatically split your e2e tasks by file if you provide a `ciTargetName`. You can read more about the Atomizer feature [here](/ci/features/split-e2e-tasks). This will create a target with that name which can be used in CI to run the tests for each file in a distributed fashion.
```json {% fileName="nx.json" highlightLines=[6] %}
{
"plugins": [
{
"plugin": "@nx/gradle",
"options": {
"ciTargetName": "test-ci"
}
}
]
}
```
## View Inferred Tasks
To view inferred tasks for a project, open the [project details view](/features/explore-graph#explore-projects-in-your-workspace) in Nx Console or run `nx show project my-project --web` in the command line.
@@ -70,7 +70,7 @@ within the same workspace. In this case, you can configure the `@nx/jest/plugin`
### Splitting E2E Tests
If Jest is used to run E2E tests, you can enable [splitting the tasks](/ci/features/split-e2e-tasks) by file to get
improved caching, distribution, and retrying flaky tests. Enable this, by providing a `ciTargetName`. This will create a
improved caching, distribution, and retrying flaky tests. Enable this Atomizer feature by providing a `ciTargetName`. This will create a
target with that name which can be used in CI to run the tests for each file in a distributed fashion.
```json {% fileName="nx.json" %}
@@ -61,6 +61,10 @@
"default": false,
"x-priority": "internal"
},
"skipPackageManager": {
"type": "boolean",
"description": "Do not add a `packageManager` entry to the generated package.json file."
},
"debug": {
"type": "boolean",
"description": "Enable Next.js debug build logging"
@@ -121,7 +121,7 @@ Generate a 'src/' directory for Next.js
Type: `string`
Choices: [github, circleci, gitlab, azure, bitbucket-pipelines, skip, yes]
Choices: [github, gitlab, azure, bitbucket-pipelines, circleci, skip, yes]
Which CI provider would you like to use?
@@ -149,6 +149,12 @@ Type: `string`
Use the provided versions for packages instead of the ones calculated by the migrator (e.g., --to="@nx/react@16.0.0,@nx/js@16.0.0")
### verbose
Type: `boolean`
Prints additional information about the commands (e.g., stack traces)
### version
Type: `boolean`
@@ -65,6 +65,24 @@ The `@nx/playwright/plugin` is configured in the `plugins` array in `nx.json`.
The `targetName` and `ciTargetName` options control the name of the inferred Playwright tasks. The default names are `e2e` and `e2e-ci`.
### Splitting E2E Tests
The `@nx/playwright/plugin` will automatically split your e2e tasks by file if you provide a `ciTargetName`. You can read more about the Atomizer feature [here](/ci/features/split-e2e-tasks). This will create a target with that name which can be used in CI to run the tests for each file in a distributed fashion.
```json {% fileName="nx.json" %}
{
"plugins": [
{
"plugin": "@nx/playwright/plugin",
"options": {
"targetName": "e2e",
"ciTargetName": "e2e-ci"
}
}
]
}
```
### Splitting E2E tasks by file
The `@nx/playwright/plugin` will automatically split your e2e tasks by file. You can read more about this feature [here](/ci/features/split-e2e-tasks).
@@ -104,18 +104,7 @@
},
"reporter": {
"type": "string",
"enum": [
"list",
"line",
"dot",
"json",
"junit",
"null",
"github",
"html",
"blob"
],
"description": "Reporter to use, comma-separated, can be 'list', 'line', 'dot', 'json', 'junit', 'null', 'github', 'html', 'blob'. To configure reporter options, use the playwright configuration."
"description": "Common Reporter values to use, comma-separated, 'list', 'line', 'dot', 'json', 'junit', 'null', 'github', 'html', 'blob'. To configure reporter options, use the playwright configuration."
},
"retries": {
"type": "number",
@@ -66,9 +66,7 @@
"e2eProject": {
"type": "string",
"description": "The name of the e2e project.",
"alias": "p",
"$default": { "$source": "projectName" },
"x-prompt": "What is the name of the e2e project?"
"x-prompt": "What is the name of the e2e project? Leave blank to skip e2e tests"
}
},
"required": ["name", "project"],
@@ -31,6 +31,10 @@
"description": "Generate a lockfile (e.g. package-lock.json) that matches the workspace lockfile to ensure package versions match.",
"default": false
},
"skipPackageManager": {
"type": "boolean",
"description": "Do not add a `packageManager` entry to the generated package.json file. Only works in conjunction with `generatePackageJson` option."
},
"sourcemap": {
"type": "boolean",
"description": "Generate source maps for production.",
@@ -158,7 +158,8 @@
"type": "boolean",
"description": "Prevents 'type' field from being added to compiled package.json file. Use this if you are having an issue with this field.",
"default": false
}
},
"sourceMap": { "description": "Output sourcemaps.", "type": "boolean" }
},
"required": ["tsConfig", "main", "outputPath"],
"definitions": {
@@ -50,6 +50,10 @@
"includeDevDependenciesInPackageJson": {
"description": "Include devDependencies in the generated package.json.",
"type": "boolean"
},
"skipPackageManager": {
"type": "boolean",
"description": "Do not add a `packageManager` entry to the generated package.json file. Only works in conjunction with `generatePackageJson` option."
}
},
"definitions": {},
@@ -11,7 +11,7 @@
"properties": {
"configFile": {
"type": "string",
"description": "The path to the local vitest config",
"description": "The path to the local vitest config, relative to the workspace root.",
"x-completion-type": "file",
"x-completion-glob": "@(vitest|vite).config@(.js|.ts)",
"aliases": ["config"]
@@ -49,9 +49,7 @@ The `@nx/webpack` plugin will create a task for any project that has a Webpack c
- `webpack.config.js`
- `webpack.config.ts`
- `webpack.config.mjs`
- `webpack.config.mts`
- `webpack.config.cjs`
- `webpack.config.cts`
### View Inferred Tasks
@@ -239,6 +239,10 @@
"type": "boolean",
"description": "Generates a `package.json` and pruned lock file with the project's `node_module` dependencies populated for installing in a container. If a `package.json` exists in the project's directory, it will be reused with dependencies populated."
},
"skipPackageManager": {
"type": "boolean",
"description": "Do not add a `packageManager` entry to the generated package.json file. Only works in conjunction with `generatePackageJson` option."
},
"transformers": {
"type": "array",
"description": "List of TypeScript Compiler Transfomers Plugins.",
+62 -38
View File
@@ -431,6 +431,12 @@
"name": "Skip Task Caching",
"id": "skipping-cache",
"file": "shared/recipes/running-tasks/skipping-cache"
},
{
"name": "Migrate to Inferred Tasks (Project Crystal)",
"id": "convert-to-inferred",
"tags": ["inferred-tasks", "automate-updating-dependencies"],
"file": "shared/recipes/running-tasks/convert-to-inferred"
}
]
},
@@ -1015,6 +1021,12 @@
"tags": ["nx-release"],
"file": "shared/recipes/nx-release/customize-conventional-commit-types"
},
{
"name": "File Based Versioning (Version Plans)",
"id": "file-based-versioning-version-plans",
"tags": ["nx-release"],
"file": "shared/recipes/nx-release/file-based-versioning-version-plans"
},
{
"name": "Configure Custom Registries",
"id": "configure-custom-registries",
@@ -1056,6 +1068,12 @@
"id": "publish-custom-dist-directory",
"tags": ["nx-release"],
"file": "shared/recipes/nx-release/publish-custom-dist-directory"
},
{
"name": "Build Before Versioning",
"id": "build-before-versioning",
"tags": ["nx-release"],
"file": "shared/recipes/nx-release/build-before-versioning"
}
]
},
@@ -1457,7 +1475,7 @@
"description": "Learn about plugins.",
"itemList": [
{
"name": "Getting Started with Plugins",
"name": "Extending Nx with Plugins",
"id": "getting-started",
"description": "Learn how to extend Nx by creating and releasing your own Nx plugin.",
"file": "shared/plugins/intro"
@@ -1465,19 +1483,19 @@
]
},
{
"name": "5 Min Tutorials",
"name": "Tutorials",
"id": "tutorials",
"description": "Get started with plugins",
"itemList": [
{
"name": "Create a Local Plugin",
"id": "create-plugin",
"file": "shared/plugins/create-plugin"
"name": "Enforce Organizational Best Practices",
"id": "organization-specific-plugin",
"file": "shared/plugins/organization-specific-plugin"
},
{
"name": "Maintain a Published Plugin",
"id": "publish-plugin",
"file": "shared/plugins/maintain-published-plugin"
"name": "Create a Tooling Plugin",
"id": "tooling-plugin",
"file": "shared/plugins/tooling-plugin"
}
]
},
@@ -1486,18 +1504,6 @@
"id": "recipes",
"description": "Focused instructions to complete a specific task",
"itemList": [
{
"name": "Write a Simple Executor",
"id": "local-executors",
"tags": [],
"file": "shared/recipes/plugins/local-executors"
},
{
"name": "Compose Executors",
"id": "compose-executors",
"tags": [],
"file": "shared/recipes/plugins/compose-executors"
},
{
"name": "Write a Simple Generator",
"id": "local-generators",
@@ -1534,6 +1540,18 @@
"tags": ["create-your-own-plugin"],
"file": "shared/recipes/plugins/migration-generators"
},
{
"name": "Write a Simple Executor",
"id": "local-executors",
"tags": [],
"file": "shared/recipes/plugins/local-executors"
},
{
"name": "Compose Executors",
"id": "compose-executors",
"tags": [],
"file": "shared/recipes/plugins/compose-executors"
},
{
"name": "Create a Preset",
"id": "create-preset",
@@ -1547,7 +1565,7 @@
"file": "shared/recipes/plugins/create-install-package"
},
{
"name": "Modify the Project Graph",
"name": "Infer Tasks or Projects",
"id": "project-graph-plugins",
"tags": [
"create-your-own-plugin",
@@ -1555,6 +1573,12 @@
"inferred-tasks"
],
"file": "shared/recipes/plugins/project-graph-plugins"
},
{
"name": "Publish a Plugin",
"id": "publish-plugin",
"tags": ["create-your-own-plugin"],
"file": "shared/recipes/plugins/publish-plugin"
}
]
}
@@ -1629,18 +1653,6 @@
"description": "Learn how to efficiently distribute tasks across machines to take full advantage of parallelization. Nx Agents make this a trivial task.",
"file": "shared/features/distribute-task-execution"
},
{
"name": "Nx Cloud AI",
"id": "nx-cloud-ai",
"description": "Learn how to enable AI features in Nx Cloud, and what features it enables",
"file": "nx-cloud/features/ai-features"
},
{
"name": "Dynamically Allocate Agents",
"description": "Learn how to dynamically allocate agents based on the size of a PR, keeping the balance of speed and cost.",
"id": "dynamic-agents",
"file": "nx-cloud/features/dynamic-agents"
},
{
"name": "Automatically Split E2E Tasks (Atomizer)",
"id": "split-e2e-tasks",
@@ -1652,6 +1664,17 @@
"id": "flaky-tasks",
"description": "Learn how Nx Cloud is able to automatically identify flaky tasks and re-run them for you.",
"file": "nx-cloud/features/flaky-tasks"
},
{
"name": "Dynamically Allocate Agents",
"description": "Learn how to dynamically allocate agents based on the size of a PR, keeping the balance of speed and cost.",
"id": "dynamic-agents",
"file": "nx-cloud/features/dynamic-agents"
},
{
"name": "Explain With AI",
"id": "explain-with-ai",
"file": "nx-cloud/features/explain-with-ai"
}
]
},
@@ -1682,6 +1705,12 @@
"name": "Cache Security",
"id": "cache-security",
"file": "nx-cloud/concepts/cache-security"
},
{
"name": "Nx Cloud AI",
"id": "nx-cloud-ai",
"description": "Learn how to enable AI features in Nx Cloud, and what features it enables",
"file": "nx-cloud/concepts/ai-features"
}
]
},
@@ -1946,11 +1975,6 @@
"name": "CI Execution Failed",
"id": "ci-execution-failed",
"file": "nx-cloud/troubleshooting/ci-execution-failed"
},
{
"name": "Explain With AI",
"id": "explain-with-ai",
"file": "nx-cloud/troubleshooting/explain-with-ai"
}
]
}
+51
View File
@@ -0,0 +1,51 @@
# Nx Cloud AI
Nx Cloud AI offers a suite of features designed to **enhance your development workflow with AI-driven capabilities**. These tools assist in troubleshooting, optimizing resource allocation, and improving your overall development process.
- **[Explain with AI](/ci/features/explain-with-ai)** - This feature uses AI to provide detailed explanations about failed tasks.
- **Automatic Resource Allocation** (Coming Soon) - This upcoming feature will use custom AI/ML models to dynamically allocate resources based on your projects specific needs. It optimizes performance by efficiently assigning Nx Agents to achieve target durations for main and PR branches.
## Enable Nx Cloud AI Features
To enable AI features for your organization, go to your organization's settings on [Nx Cloud](https://cloud.nx.app/orgs?utm_source=nx.dev&utm_campaign=ai) and select the organization where you want to enable AI.
In the **settings** menu, find the "AI Features" section and toggle it to "On".
![enable ai features](/nx-cloud/features/ai-features.png)
Ensure that you **accept the AI terms** to start using the AI features.
{% callout type="info" title="AI Features Availability" %}
AI features are available only for the [Nx Cloud Pro plan](/pricing). If you are on the Hobby plan, you can start a free trial to test AI features in your workspace.
{% /callout %}
### Enable AI Features for Enterprise On-Prem Installations
To enable AI features for enterprise on-prem installations, add the following configuration to your `helm-values.yaml` file:
```yaml
nxApi
deployment:
env:
- name: NX_CLOUD_AI_ENABLED
value: 'true'
frontend
deployment:
env:
- name: OPENAI_SECRET_KEY
valueFrom:
secretKeyRef:
name: open-ai-secrets
key: OPENAI_SECRET_KEY
- name: NX_CLOUD_AI_ENABLED
value: 'true'
```
Ensure your OpenAI secret key is correctly configured to provide the necessary credits for `gpt-3.5-turbo` and `gpt-4`.
### Regional Availability
This feature is not available for the EU cluster in public cloud installations due to regional restrictions. However, on-prem customers in the EU can still use this feature by providing their own OpenAI secret key and enabling the required environment variables.
+2 -2
View File
@@ -251,7 +251,7 @@ If we don't use the `nx affected` command in CI, no matter how our repo is struc
Note that the 50% chance of any project being modified is an arbitrary number. If we had picked a lower chance of being modified all the expected values would decrease as well. Every repository is different, but this illustrates that a flatter structure will help speed up your CI pipeline.
{% disclosure title="The Math Behind the Expected Number of Affected Projects" %}
{% callout title="The Math Behind the Expected Number of Affected Projects" type="deepdive" %}
**Definitions:**
@@ -290,7 +290,7 @@ Note that the 50% chance of any project being modified is an arbitrary number. I
**Expected Number of Affected Projects:**
a(1) + a(2) + a(3) = 0.5 + 0.5 + 0.5 = 1.5
{% /disclosure %}
{% /callout %}
## Reduce Wasted Time with Remote Caching
-37
View File
@@ -1,37 +0,0 @@
# Nx Cloud AI
To use AI in Nx Cloud, you need to enable AI features in your organization settings. This will unlock advanced capabilities designed to enhance your development workflow.
### How to Enable AI Features
1. **Navigate to Organization Settings**:
- Go to your [Nx Cloud dashboard](https://cloud.nx.app/orgs?utm_source=nx.dev&utm_campaign=ai).
- Select your organization from the list.
- Access the settings by clicking on the settings icon.
2. **Enable AI Features**:
- In the settings menu, locate the **AI Features** section.
- Toggle the setting to **On**.
![enable ai features](/nx-cloud/features/ai-features.png)
3. **Accept AI Terms**:
- Once the AI features are enabled, a terms and conditions prompt will appear.
- Review and accept the terms and conditions related to AI usage to proceed.
### AI Driven Capabilities
Once AI features are enabled, you gain access to several powerful tools designed to optimize your development process:
#### Explain with AI
This feature leverages AI to provide detailed explanations and insights about failed tasks. [Learn more about "Explain with AI" here.](/ci/troubleshooting/explain-with-ai)
#### Automatic Resource Allocation (Coming Soon)
This feature leverages custom AI/ML models to dynamically allocate resources based on your projects specific needs. It optimizes performance by efficiently assigning Nx Agents to achieve target durations for main and PR branches.
### Transform Your Workflow
By enabling AI features in Nx Cloud, youre setting your organization up for a more intelligent and efficient development workflow. Stay tuned for the release of these powerful AI driven tools and take your development process to the next level.
+26 -8
View File
@@ -1,12 +1,30 @@
# Dynamically Allocate Agents
The standard way to set up [Nx Agents](/ci/features/distribute-task-execution) is to use this flag:
{% callout type="info" title="Coming soon!" %}
We're cooking something up that will make it even easier to dynamically allocate agents, powered by AI. [Read more &raquo;](/ci/concepts/nx-cloud-ai)
{% /callout %}
```
--distribute-on="8 linux-medium-js"
By default, when you set up [Nx Agents](/ci/features/distribute-task-execution) you specify the number and type of agents to use.
```yaml {% fileName=".github/workflows/main.yaml" highlightLines=[8] %}
...
jobs:
- job: main
displayName: Main Job
...
steps:
...
- run: npx nx-cloud start-ci-run --distribute-on="8 linux-medium-js" --stop-agents-after="e2e-ci"
- ...
```
...which always runs tasks on the same amount of machines, you can also have Nx Cloud scale the number of agents based on the size of your PR. Specify the number and type of agents to use for small, medium and large changesets by creating a yaml file like this:
This works great but may not be the most cost-effective way to run your tasks. The goal is to **balance cost and speed**. For example, you might want to run a small PR on a few agents to save costs, but use many agents for a large PR to get the fastest possible build time.
## Configure Dynamic Agents based on PR size
Instead of using a static configuration of agents (like the one shown above), you can also configure to use a different number and type of agents based on the size of your PR.
Create a file called `dynamic-changesets.yaml` in the `.nx/workflows` directory of your repo.
```yaml {% fileName=".nx/workflows/dynamic-changesets.yaml" %}
distribute-on:
@@ -15,22 +33,22 @@ distribute-on:
large-changeset: 10 linux-medium-js
```
{% callout type="note" title="How is the size of the PR determined?" %}
{% callout type="deepdive" title="How is the size of the PR determined?" %}
To determine the size of the PR, Nx Cloud calculates the relationship between the number of [affected projects](/ci/features/affected) and the total number of projects in the workspace. It then assigns it to one of the three categories: small, medium, or large.
{% /callout %}
You can then reference it in your CI pipeline configuration:
```yaml {% fileName=".github/workflows/main.yaml" %}
```yaml {% fileName=".github/workflows/main.yaml" highlightLines=[8] %}
...
jobs:
- job: main
displayName: Main Job
...
steps:
- checkout
...
- run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml" --stop-agents-after="e2e-ci"
- ...
```
Now PRs that affect a small percentage of the repo will run on 3 agent, mid-size PRs will use 6 agents and large PRs will use 10 agents. This feature helps save costs on the smaller PRs while maintaining the high performance necessary for large PRs.
Now, PRs that affect a small percentage of the repo will run on 3 agents, mid-size PRs will use 6 agents, and large PRs will use 10 agents. This feature helps save costs on smaller PRs while maintaining the high performance necessary for large PRs.

Before

Width:  |  Height:  |  Size: 267 KiB

After

Width:  |  Height:  |  Size: 267 KiB

Before

Width:  |  Height:  |  Size: 376 KiB

After

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

+53
View File
@@ -0,0 +1,53 @@
# Explain with AI (beta)
{% youtube
src="https://youtu.be/g2m9cHp-O-Q"
title="Explain with AI"
/%}
"Explain with AI" helps you understand complex errors more quickly by providing AI-powered error resolution steps. This is made possible by using additional context from Nx targets and metadata, allowing for more accurate and relevant responses.
![explain with ai](/nx-cloud/features/explain-with-ai.avif)
## Enable Explain with AI
To use the "Explain with AI" feature, you need to [enable AI features for your organization](/ci/concepts/nx-cloud-ai#enable-nx-cloud-ai-features). In the **settings** menu, locate the "AI Features" section and toggle it to "On".
![enable ai features](/nx-cloud/features/ai-features.png)
AI features are available only for the [Nx Cloud Pro plan](/pricing). If you are on the Hobby plan, you can start a free trial to test AI features in your workspace.
## Using Explain with AI
{% callout type="check" title="Authentication Required" %}
If you don't see the "Explain with AI" button, ensure you are logged into the application.
{% /callout %}
1. **Access the Task**:
- Navigate to the Nx Cloud dashboard and locate the task that failed.
- Click on the task to open the detailed view.
2. **Initiate AI Explanation**:
- In the task details, find the "Explain with AI" button.
- Click on this button to start the AI analysis.
![explain with ai button](/nx-cloud/features/explain-with-ai-1.png)
3. **Review the Explanation**:
- The AI will analyze the error log with additional context from the project task and provide a detailed explanation of the failure.
- It will also offer suggestions on how to resolve the issue.
![explain response](/nx-cloud/features/explain-with-ai-2.png)
4. **Implement the Suggestions**:
- Review the AI-generated suggestions carefully.
- Apply the recommended changes to your codebase.
5. **Verify the Fix**:
- After making the changes, rerun the task to see if the issue is resolved.
6. **Mark Answer as Not Helpful** (Optional):
- If the suggested changes did not help, click on "Set answer as not helpful." This helps us continuously improve the responses.
+27 -10
View File
@@ -1,27 +1,44 @@
# Identify and Re-run Flaky Tasks
Sometimes there are tasks in CI that can fail or succeed without any related code changes. These tasks are called flaky tasks. Because the cause of the flakiness can be difficult to determine, developers will typically re-run CI in the hopes that another run will cause the task to succeed and allow them to merge their PR. Every time a developer has to do this, it is harming their productivity and the productivity of the company as a whole.
Tasks that fail only sometimes and only in certain environments are called "flaky tasks". They are enourmously 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.
Nx is perfectly positioned to detect which tasks are flaky and automatically re-run the flaky task in a different agent so that developers can have confidence that a failed CI pipeline is a real failure.
Ideally as a developer you don't even notice flaky tasks any more as they're automatically re-run and solved for you.
## Identify Flaky Tasks
## Enable Flaky Task Detection
Nx creates a hash of all the inputs for a task whenever it is run. If Nx ever encounters a task that fails with a particular set of inputs and then succeeds with those same inputs, Nx knows for a fact that the task is flaky. Nx can't know with certainty when the task has been fixed to no longer be flaky, so if a particular task has no flakiness incidents for 2 weeks, the `flaky` flag is removed for that task.
Flaky Task Detection is enabled by default if your workspace is connected to Nx Cloud and leverages [Nx Agents](/ci/features/distribute-task-execution).
To connect your workspace to Nx Cloud run:
```shell
npx nx connect
```
See the [connect to Nx Cloud recipe](/ci/intro/connect-to-nx-cloud) for all the details.
## How Nx Identifies Flaky Tasks
Nx leverages its cache mechanism to identify flaky tasks.
- Nx creates a **hash of all the inputs** for a task whenever it is run.
- If Nx ever encounters a task that fails with a particular set of inputs and then succeeds with those same inputs, Nx **knows for a fact that the task is flaky**.
Nx can't know with certainty when the task has been fixed to no longer be flaky, so if a particular task has **no flakiness incidents for 2 weeks**, the `flaky` flag is removed for that task.
![Flaky tasks in CI](/nx-cloud/features/flaky-tasks-ci.png)
In this image, the `e2e-ci--src/e2e/app.cy.ts` task is a flaky task that has been automatically retried once. There is a `1 retry` indicator to show that it has been retried and, once expanded, you can see tabs that contain the logs for `Attempt 1` and `Attempt 2`. With this UI, you can easily compare the output between a successful and unsuccessful run of a flaky task.
## Automatically Re-run Flaky Tasks
When a flaky task fails in CI with [distributed task execution](/ci/features/distribute-task-execution) enabled, Nx will **automatically send that task to a different agent** and run it again (up to 2 tries in total). Its important to run the task on a different agent to ensure that the agent itself or the other tasks that were run on that agent are not the reason for the flakiness.
## Manually Mark a Task as Flaky or Not Flaky
If you suspect that a task is flaky, but Nx has not confirmed it yet, you can manually mark it as `likely flaky` from the run details screen. Failed tasks that are not flaky will have a button that says `Mark task as likely flaky`.
If you suspect that a task is flaky, but Nx has not confirmed it yet, you can manually **mark it as likely flaky** from the run details screen. Failed tasks that are not flaky will have a button that says **"Mark task as likely flaky"**.
![Mark task as likely flaky button](/nx-cloud/features/mark-task-as-likely-flaky.png)
Once you've resolved the issue that caused a task to be flaky, you can immediately mark the task as not flaky by clicking on `Mark task as no longer flaky` on the same run details screen.
Once you've resolved the issue that caused a task to be flaky, you can immediately mark the task as not flaky by clicking on **"Mark task as no longer flaky"** on the same run details screen.
![Mark task as no longer flaky button](/nx-cloud/features/mark-task-as-no-longer-flaky.png)
## Re-run Flaky Tasks
When a flaky task fails in CI with [distributed task execution](/ci/features/distribute-task-execution) enabled, Nx will automatically send that task to a different agent and run it again (up to 2 tries in total). Its important to run the task on a different agent to ensure that the agent itself or the other tasks that were run on that agent are not the reason for the flakiness.
+77 -36
View File
@@ -5,13 +5,28 @@ src="https://youtu.be/0YxcxIR7QU0"
title="10x Faster e2e Tests!"
width="100%" /%}
In almost every codebase, e2e tests are the largest portion of the CI pipeline. Typically, e2e tests are grouped by application so that whenever an application's code changes, all the e2e tests for that application are run. These large groupings of e2e tests make caching and distribution less effective. Also, because e2e tests deal with a lot of integration code, they are at a much higher risk to be flaky.
End-to-end (e2e) tests are often large, monolithic tasks that can take a considerable amount of time to execute. As a result, teams often push them to a nightly or even weekly build rather than running them for each PR. This approach is suboptimal as it increases the risk of merging problematic PRs.
You could manually address these problems by splitting your e2e tests into smaller tasks, but this requires developer time to maintain and adds additional configuration overhead to your codebase. Or, you could allow Nx to automatically split your e2e tests by file. Doing this will split your large e2e tasks into smaller, atomized tasks.
Manually splitting large e2e test projects can be complex and require ongoing maintenance. Nx's Atomizer solves this by **automatically generating runnable targets for e2e tests for each spec file**. Instead of one large e2e task, you get multiple smaller e2e tasks that can be run individually. This allows for:
## Set up
- parallelization across multiple machines with [Nx Agents](/ci/features/distribute-task-execution)
- faster [flakiness detection & retries](/ci/features/flaky-tasks) by isolating and re-running only the failed tests
To enable atomized tasks, you need to turn on [inferred tasks](/concepts/inferred-tasks#existing-nx-workspaces) for the [@nx/cypress](/nx-api/cypress#splitting-e2e-tasks-by-file), [@nx/playwright](/nx-api/playwright#splitting-e2e-tasks-by-file), [@nx/jest](/nx-api/jest#splitting-e2e-tests) or [@nx/gradle](/nx-api/gradle) plugins. Run this command to set up inferred tasks:
## Enable Automated e2e Task Splitting
### Step 1: Connect to Nx Cloud
To use **automated e2e task splitting**, you need to connect your workspace to Nx Cloud (if you haven't already).
```shell
npx nx connect
```
See the [connect to Nx Cloud recipe](/ci/intro/connect-to-nx-cloud) for all the details.
### Step 2: Add the Appropriate Plugin
Run this command to set up inferred tasks and enable task splitting for each plugin:
{% tabs %}
{% tab label="Cypress" %}
@@ -39,7 +54,17 @@ nx add @nx/jest
This command will register the appropriate plugin in the `plugins` array of `nx.json`.
## Manual Configuration
If you upgraded Nx from an older version, ensure that [inferred tasks](/concepts/inferred-tasks#existing-nx-workspaces) are enabled in `nx.json`:
```json {% fileName="nx.json" %}
{
...
// turned on by default; just make sure it is not set to false
useInferencePlugins: true
}
```
## Update an Existing e2e Project to use Automated Task Splitting
If you are already using the `@nx/cypress`, `@nx/playwright`, or `@nx/jest` plugin, you need to manually add the appropriate configuration to the `plugins` array of `nx.json`. Follow the instructions for the plugin you are using:
@@ -47,15 +72,21 @@ If you are already using the `@nx/cypress`, `@nx/playwright`, or `@nx/jest` plug
- [Configure Playwright Task Splitting](/nx-api/playwright#nxplaywright-configuration)
- [Configure Jest Task Splitting](/nx-api/jest#splitting-e2e-tests)
## Usage
## Verify Automated Task Splitting Works
You can view the available tasks for your project in the project detail view:
Run the following command to open the project detail view for the e2e project:
{% tabs %}
{% tab label="CLI" %}
```shell
nx show project myproject-e2e --web
nx show project my-project-e2e
```
{% project-details title="Project Details View" height="100px" %}
{% /tab %}
{% tab label="Project Detail View" %}
{% project-details title="Project Details View" %}
```json
{
@@ -365,39 +396,49 @@ nx show project myproject-e2e --web
{% /project-details %}
You'll see that there are tasks named `e2e`, `e2e-ci` and a task for each e2e test file.
{% /tab %}
{% /tabs %}
Developers can run all e2e tests locally with the `e2e` target:
If you configured Nx Atomizer properly, you'll see that there are tasks named `e2e`, `e2e-ci` and a task for each e2e test file.
During local development, youll want to continue using `e2e` as it is more efficient on a single machine.
```shell
nx e2e my-project-e2e
```
You can update your CI pipeline to run `e2e-ci`, which will automatically run all the inferred tasks for the individual e2e test files. Run it like this:
The `e2e-ci` task truly shines when configured and run on CI.
```shell
nx e2e-ci my-project-e2e
## Configure Automated Task Splitting on CI
Update your CI pipeline to run `e2e-ci`, which will automatically run all the inferred tasks for the individual e2e test files. Here's an example of a GitHub Actions workflow:
```yaml {% fileName=".github/workflows/ci.yml" highlightLines=[15,25] %}
name: CI
# ...
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
with:
version: 9
- run: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- uses: nrwl/nx-set-shas@v4
- run: pnpm exec nx affected -t lint test build e2e-ci
```
## Benefits
With more granular e2e tasks, all the other features of Nx become more powerful. Let's imagine a scenario where there are 10 spec files in a single e2e project and each spec file takes 3 minutes to run.
### Improved Caching
[Nx's cache](/ci/features/remote-cache) can be used for all the individual e2e tasks that succeeded and only the failed tasks need to be re-run. Without e2e task splitting, a single spec file failing would force you to re-run all the e2e tests for the project, which would take 30 minutes. With e2e task splitting, a single spec file that fails can be re-run in 3 minutes and the other successful spec file results can be retrieved from the cache.
### Better Distribution
[Distributed task execution](/ci/features/distribute-task-execution) allows your e2e tests to be run on multiple machines simultaneously, which reduces the total time of the CI pipeline. Without e2e task splitting, the CI pipeline has to take at least 30 minutes to complete because the one e2e task needs that long to finish. With e2e task splitting, a fully distributed pipeline with 10 agents could finish in 3 minutes.
### More Precise Flaky Task Identification
Nx Agents [automatically re-run failed flaky e2e tests](/ci/features/flaky-tasks) on a separate agent without a developer needing to manually re-run the CI pipeline. Leveraging e2e task splitting, Nx identifies the specific flaky test file - this way you can quickly fix the offending test file. Without e2e splitting, Nx identifies that at least one of the e2e tests are flaky - requiring you to find the flaky test on your own.
## Nx Cloud is Required to Run Atomized Tasks!
Running a group of atomized tasks on a single machine takes longer than running the large e2e task.
Nx Cloud [distributes](/ci/features/distribute-task-execution) the atomized tasks across multiple Nx agents in parallel.
When running locally or if you cannot use Nx Agents, it's better to use the non-atomized target instead (`e2e` in the example above).
Learn more about configuring your [CI provider by following these detailed recipes](/ci/recipes/set-up).
+1 -1
View File
@@ -1,6 +1,6 @@
# Nx CLI and Access Tokens
The permissions and membership define what developers can access on nx.app. They don't affect what happens when you run Nx commands locally or on CI. To manage that, you need to provision access tokens. To do that, go to Workspace Options / Manage Access Tokens.
The permissions and membership define what developers can access on [Nx Cloud](https://nx.app). They don't affect what happens when you run Nx commands locally or on CI. To manage that, you need to provision access tokens. To do that, go to Workspace Options / Manage Access Tokens.
## Types of Access Tokens
+12 -12
View File
@@ -188,9 +188,9 @@ launch-templates:
- name: Restore Node Modules Cache
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/cache/main.yaml'
inputs:
env: 'package-lock.json|yarn.lock|pnpm-lock.yaml'
key: 'package-lock.json|yarn.lock|pnpm-lock.yaml'
paths: 'node_modules'
base_branch: 'main'
base-branch: 'main'
```
## Full Example
@@ -221,17 +221,17 @@ launch-templates:
# the cache step requires configuration via env vars
# https://github.com/nrwl/nx-cloud-workflows/tree/main/workflow-steps/cache#options
inputs:
env: 'package-lock.json|yarn.lock|pnpm-lock.yaml'
key: 'package-lock.json|yarn.lock|pnpm-lock.yaml'
paths: 'node_modules'
base_branch: 'main'
base-branch: 'main'
- name: Restore Browser Binary Cache
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/cache/main.yaml'
inputs:
env: 'package-lock.json|yarn.lock|pnpm-lock.yaml|"browsers"'
key: 'package-lock.json|yarn.lock|pnpm-lock.yaml|"browsers"'
paths: |
'~/.cache/Cypress'
'~/.cache/ms-playwright'
base_branch: 'main'
base-branch: 'main'
- name: Install Node Modules
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-node-modules/main.yaml'
- name: Install Browsers (if needed)
@@ -272,17 +272,17 @@ launch-templates:
- name: Restore Node Modules Cache
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/cache/main.yaml'
inputs:
env: 'package-lock.json|yarn.lock|pnpm-lock.yaml'
key: 'package-lock.json|yarn.lock|pnpm-lock.yaml'
paths: 'node_modules'
base_branch: 'main'
base-branch: 'main'
- name: Restore Browser Binary Cache
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/cache/main.yaml'
inputs:
env: 'package-lock.json|yarn.lock|pnpm-lock.yaml|"browsers"'
key: 'package-lock.json|yarn.lock|pnpm-lock.yaml|"browsers"'
paths: |
'~/.cache/Cypress'
'~/.cache/ms-playwright'
base_branch: 'main'
base-branch: 'main'
- name: Install Node Modules
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-node-modules/main.yaml'
- name: Install Browsers (if needed)
@@ -310,9 +310,9 @@ launch-templates:
- name: Restore Node Modules Cache
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/cache/main.yaml'
inputs:
env: 'package-lock.json|yarn.lock|pnpm-lock.yaml'
key: 'package-lock.json|yarn.lock|pnpm-lock.yaml'
paths: 'node_modules'
base_branch: 'main'
base-branch: 'main'
- name: Install Node Modules
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-node-modules/main.yaml'
- name: Install Rust
@@ -1,78 +0,0 @@
# Explain with AI (beta)
"Explain with AI" in Nx Cloud leverages artificial intelligence to provide detailed explanations and insights for failed task outputs.
This feature helps developers understand complex errors quickly and offers suggestions for improvements, making the debugging process more efficient.
With the power of Nx Cloud, all explanations will be provided with additional context from Nx targets and metadata. This ensures that the AI responses have the correct context related to your failed task. This means that if you're trying to debug failed Gradle tasks, the AI will know to help you specifically with Gradle.
## What You Need to Enable This Feature
To use the "Explain with AI" feature, you need to [enable AI features for your organization](/ci/features/nx-cloud-ai).
- For enterprise on-prem customers, this feature is not enabled by default. You need to explicitly [enable AI features through environment flags](#how-to-enable-ai-features-for-enterprise-onprem-installations).
- For public cloud users, the AI feature is enabled automatically, [except for those in the EU due to regional restrictions](#regional-availability).
- This feature is not available for hobby (free) plans on Nx Cloud.
## How to Use
{% callout type="check" title="Authentication Required" %}
If you don't see the "Explain with AI" button, make sure that you are logged into the application.
{% /callout %}
1. **Access the Task**:
- First, navigate to the Nx Cloud dashboard and locate the task that failed.
- Click on the task to open the detailed view.
2. **Initiate AI Explanation**:
- Within the task details, find the "Explain with AI" button.
- Click on this button to start the AI analysis.
![explain with ai button](/nx-cloud/troubleshooting/explain-with-ai-1.png)
3. **Review the Explanation**:
- The AI will analyze the error log with additional context from the project task and provide a detailed explanation of the failure.
- It will also offer suggestions on how to resolve the issue.
![explain response](/nx-cloud/troubleshooting/explain-with-ai-2.png)
4. **Implement the Suggestions**:
- Go through the AI-generated suggestions carefully.
- Apply the recommended changes to your codebase.
5. **Verify the Fix**:
- After making the changes, rerun the task to see if the issue is resolved.
6. **Mark answer as not helpful** (optional):
- If the suggested changes did not help you, click on "Set answer as not helpful". This allows us to continuously improve the responses.
## How to Enable AI Features for Enterprise On-Prem Installations
To enable AI features for enterprise on-prem installations, add the following configuration to your `helm-values.yaml` file:
```yaml
nxApi
deployment:
env:
- name: NX_CLOUD_AI_ENABLED
value: 'true'
frontend
deployment:
env:
- name: OPENAI_SECRET_KEY
valueFrom:
secretKeyRef:
name: open-ai-secrets
key: OPENAI_SECRET_KEY
- name: NX_CLOUD_AI_ENABLED
value: 'true'
```
Make sure your OpenAI secret key is correctly configured to provide the necessary credits for `gpt-3.5-turbo` and `gpt-4o`.
### Regional Availability
This feature is not available for the EU cluster in public cloud installations due to regional restrictions. However, on-prem customers in the EU can still use this feature by providing their own OpenAI secret key and enabling the required environment variables.
+3 -3
View File
@@ -111,7 +111,7 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: pnpm exec nx-cloud record -- echo Hello World
- run: pnpm exec nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build
- run: pnpm exec nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build e2e-ci
workflows:
version: 2
@@ -224,7 +224,7 @@ The affected command and Nx Replay help speed up the average CI time, but there
The Nx Agents feature
- takes a command (e.g. `run-many -t build lint test e2e-ci`) and splits it into individual tasks which it then distributes across multiple agents
- takes a command (e.g. `nx affected -t build lint test e2e-ci`) and splits it into individual tasks which it then distributes across multiple agents
- distributes tasks by considering the dependencies between them; e.g. if `e2e-ci` depends on `build`, Nx Cloud will make sure that `build` is executed before `e2e-ci`; it does this across machines
- distributes tasks to optimize for CPU processing time and reduce idle time by taking into account historical data about how long each task takes to run
- collects the results and logs of all the tasks and presents them in a single view
@@ -261,7 +261,7 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: pnpm exec nx-cloud record -- echo Hello World
- run: pnpm exec nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build
- run: pnpm exec nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build e2e-ci
workflows:
version: 2
+7 -7
View File
@@ -73,9 +73,9 @@ jobs:
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 8
version: 9
# This enables task distribution via Nx Cloud
# Run this command as early as possible, before dependencies are installed
@@ -94,7 +94,7 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: pnpm exec nx-cloud record -- echo Hello World
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: pnpm exec nx affected -t lint test build
- run: pnpm exec nx affected -t lint test build e2e-ci
```
The [`nx affected` command](/ci/features/affected) will run the specified tasks only for projects that have been affected by a particular PR, which can save a lot of time as repositories grow larger.
@@ -189,7 +189,7 @@ The affected command and Nx Replay help speed up the average CI time, but there
The Nx Agents feature
- takes a command (e.g. `run-many -t build lint test e2e-ci`) and splits it into individual tasks which it then distributes across multiple agents
- takes a command (e.g. `nx affected -t build lint test e2e-ci`) and splits it into individual tasks which it then distributes across multiple agents
- distributes tasks by considering the dependencies between them; e.g. if `e2e-ci` depends on `build`, Nx Cloud will make sure that `build` is executed before `e2e-ci`; it does this across machines
- distributes tasks to optimize for CPU processing time and reduce idle time by taking into account historical data about how long each task takes to run
- collects the results and logs of all the tasks and presents them in a single view
@@ -208,9 +208,9 @@ jobs:
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 8
version: 9
# This enables task distribution via Nx Cloud
# Run this command as early as possible, before dependencies are installed
@@ -229,7 +229,7 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: pnpm exec nx-cloud record -- echo Hello World
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: pnpm exec nx affected -t lint test build
- run: pnpm exec nx affected -t lint test build e2e-ci
```
We recommend you add this line right after you check out the repo, before installing node modules.
+4 -4
View File
@@ -54,11 +54,11 @@ For more information on the different types of inputs and how to configure input
## What is Cached
Nx works on the process level. Regardless of the tools used to build/test/lint/etc.. your project, the results are cached.
Nx cache works on the process level. Regardless of the tools used to build/test/lint/etc.. your project, the results are cached. This includes:
It collects terminal output when running tasks. All the terminal output is cached and then replayed during a cache hit.
Nx can also cache the files generated by a task. The list of files/folders is listed in the `outputs` property of the project's `package.json` or `project.json`:
- **Terminal output:** The terminal output generated when running a task. This includes logs, warnings, and errors.
- **Task artifacts:** The output files of a task defined in the [`outputs` property of your project configuration](/recipes/running-tasks/configure-outputs). For example the build output, test results, or linting reports.
- **Hash:** The hash of the inputs to the computation. The inputs include the source code, runtime values, and command line arguments. Note that the hash is included in the cache, but the actual inputs are not.
{% tabs %}
{% tab label="package.json" %}
+3 -5
View File
@@ -74,15 +74,13 @@ More details about how to override task configuration is available in these reci
## Existing Nx Workspaces
If you have an existing Nx Workspace and upgrade to Nx 18, the migration generator will automatically add `NX_ADD_PLUGINS=false` to your `.env` file. This environment variable allows you to continue to use Nx without inferred tasks. Alternatively, you can set the `useInferencePlugins` property to `false` in `nx.json`.
If you have an existing Nx Workspace and upgrade to the latest Nx version, a migration will automatically set `useInferencePlugins` to `false` in `nx.json`. This property allows you to continue to use Nx without inferred tasks.
We are working on creating migrations for existing workspaces to start switching to inferred tasks, where desired.
When `NX_ADD_PLUGINS` or `useInferencePlugins` is `false`:
When `useInferencePlugins` is `false`:
1. A newly generated project will have all targets defined with executors - not with inferred tasks.
2. Running `nx add @nx/some-plugin` will not create a plugin entry for `@nx/some-plugin` in the `nx.json` file. (So that plugin will not create inferred tasks.)
If your `.env` file is ignored by git, ensure that everyone in your organization sets `NX_ADD_PLUGINS=false`. This could be done by updating a shared `.env` file or setting the environment variable in everyone's `.bashrc` file.
If you want to **migrate** your projects to use inferred tasks, follow the recipe for [migrating to inferred tasks](/recipes/running-tasks/convert-to-inferred).
Even once a repository has fully embraced inferred tasks, `project.json` and executors will still be useful. The `project.json` file is needed to modify inferred task options and to define tasks that can not be inferred. Some executors perform tasks that can not be accomplished by running a tool directly from the command line (i.e. [TypeScript batch mode](/recipes/tips-n-tricks/enable-tsc-batch-mode)).
Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 114 KiB

+1 -1
View File
@@ -23,5 +23,5 @@ For example, plugins can accomplish the following:
{% cards %}
{% card title="Official Plugins" description="The API documentation for Nx Plugins maintained by the Nx core team" type="documentation" url="/nx-api" /%}
{% card title="Community Plugins" description="Browse the plugin registry to discover plugins created by the community" type="documentation" url="/plugin-registry" /%}
{% card title="Build Your Own Plugin" description="Build your own plugin to use internally or share with the community" type="documentation" url="/extending-nx/tutorials/create-plugin" /%}
{% card title="Build Your Own Plugin" description="Build your own plugin to use internally or share with the community" type="documentation" url="/extending-nx/tutorials/organization-specific-plugin" /%}
{% /cards %}
@@ -1,16 +1,16 @@
# Automate Updating Dependencies
{% youtube
src="https://youtu.be/A0FjwsTlZ8A"
title="How Automated Code Migrations Work"
/%}
Keeping your tooling up to date is crucial for the health of your project. Tooling maintenance work can be tedious and time consuming, though. The **Nx migrate** functionality provides a way for you to
- automatically update your **`package.json` dependencies**
- migrate your **configuration files** (e.g. Jest, ESLint, Nx config)
- **adjust your source code** to match the new versions of packages (e.g., migrating across breaking changes)
{% youtube
src="https://www.youtube.com/embed/Ss6MfcXi0jE"
title="How Automated Code Migrations Work"
/%}
To update your workspace, run:
```shell
@@ -1,5 +1,7 @@
# Cache Task Results
{% youtube src="https://youtu.be/o-6jb78uuP0" title="Remote Caching with Nx Replay" /%}
Rebuilding and retesting the same code repeatedly is costly. Nx offers a sophisticated and battle-tested computation caching system that ensures **code is never rebuilt twice**. This:
- drastically **speeds up your task execution times** while developing locally and even more [in CI](/ci/features/remote-cache)
@@ -3,54 +3,95 @@
{% youtube
src="https://youtu.be/XS-exYYP_Gg"
title="Nx Agents Walkthrough"
/%}
/%}
**Nx Agents** let you distribute your CI across many machines with minimal configuration. It also comes with the following features:
Nx Agents is a **distributed task execution system that intelligently allocates tasks across multiple machines**, optimizing your CI pipeline for speed and efficiency. While using [Nx Affected](/ci/features/affected) and [remote caching (Nx Replay)](/ci/features/remote-cache) can significantly speed up your CI pipeline, you might still encounter bottlenecks as your codebase scales. Combining affected runs and remote caching with task distribution is key to maintaining low CI times. Nx Agents handles this distribution efficiently, avoiding the complexity and maintenance required if you were to set it up manually.
- [Dynamically allocate the number and size of agents](/ci/features/dynamic-agents) based on the size of the PR
- [Re-run flaky tasks](/ci/features/flaky-tasks) automatically whenever they fail in CI
- Automatically [split large e2e tasks](/ci/features/split-e2e-tasks) into smaller tasks that can be distributed more efficiently
![Nx Cloud visualization of how tasks are being distributed with Nx Agents](/shared/features/nx-agents-live-chart.avif)
## Making a Distributed CI Pipeline Is Hard
Nx Agents offer several key advantages:
The only way to speed up your CI pipeline while still running all the necessary tasks is to distribute those tasks across multiple machines. Unfortunately, doing distribution right is hard to set up and hard to maintain. These are just some concerns you have to account for:
- Choose how many machines to set up
- Set up each machine so that it is ready to execute tasks
- Ensure that tasks are run in the correct order
- Copy the output of certain tasks to the machines where those outputs are needed
- Shut down machines when there are no more tasks to run
- Shut down all the machines when the whole pipeline hits an error
- Make sure sensitive information is being handled securely on all machines
And each of these concerns will need to be reconsidered whenever the codebase changes. It would actually be best if they were reconsidered for every PR, because small PRs may not need as much distribution as large PRs.
## Nx Agents Make Distributing Tasks Simple
Nx Agents take care of all these concerns with a small initial configuration that does not need to be modified as your codebase changes. Your CI pipeline sends your tasks to be run on agent machines that Nx Cloud creates for you. All you need to do is specify how many agents and the type of agent. Then, when the pipeline is finished, your initial CI pipeline will contain all the logs and artifacts as if the tasks all ran on your main CI machine - but completed in a fraction of the time.
![Distribute Task Execution with Nx Agents](/shared/images/dte/nx-agents-orchestration-diagram.svg)
For a more thorough explanation of how Nx Agents optimizes your CI pipeline, read this [guide to parallelization and distribution in CI](/ci/concepts/parallelization-distribution).
- **Declarative Configuration:** No maintenance is required as your monorepo evolves, thanks to a declarative setup.
- **Efficient Task Replay:** By leveraging [remote caching](/ci/features/remote-cache), tasks can be replayed efficiently across machines, enhancing distribution speed.
- **Intelligent Task Distribution:** Tasks are distributed based on historical run times and dependencies, ensuring correct and optimal execution.
- **Dynamic Resource Allocation:** Agents are [allocated dynamically based on the size of the PR](/ci/features/dynamic-agents), balancing cost and speed.
- **Seamless CI Integration:** Easily adopt Nx Agents with your [existing CI provider](/ci/recipes/set-up), requiring minimal setup changes.
- **Simple Activation:** Enable distribution with just a [single line of code](#enable-nx-agents) in your CI configuration.
## Enable Nx Agents
To enable task distribution with Nx Agents, there are two requirements:
To enable task distribution with Nx Agents, make sure your Nx workspace is connected to Nx Cloud. If you haven't connected your workspace to Nx Cloud yet, run the following command:
1. Enable version control system integration. The integrations currently available are [GitHub](/ci/recipes/source-control-integration/github), [GitLab](/ci/recipes/source-control-integration/gitlab), [Bitbucket](/ci/recipes/source-control-integration/bitbucket) and [Azure DevOps](/ci/recipes/source-control-integration/azure-devops). These integrations can be enabled from your [Nx Cloud dashboard](https://nx.app).
2. Add a single line to your CI pipeline configuration.
Add the `start-ci-run` command to your CI pipeline configuration after checking out the repository and before installing `node_modules`:
```yaml {% fileName=".github/workflows/main.yaml" %}
# After checkout repository
- name: Start CI run
run: 'npx nx-cloud start-ci-run --distribute-on="8 linux-medium-js"'
# Before install node_modules
# Run any nx commands as if running on a single machine
```shell
npx nx connect
```
The `--distribute-on` flag instructs Nx Cloud to distribute tasks across 8 agents of type `linux-medium-js`. `linux-medium-js` is the name of the launch template that will be used to provision the agent. Use on of the [default launch templates](https://github.com/nrwl/nx-cloud-workflows/blob/main/launch-templates/linux.yaml) or create your own [custom launch template](/ci/reference/launch-templates).
Check out the [connect to Nx Cloud recipe](/ci/intro/connect-to-nx-cloud) for more details.
Then, adjust your CI pipeline configuration to **enable task distribution**. If you don't have a CI config yet, you can generate a new one using the following command:
```shell
npx nx g ci-workflow
```
The key line in your CI config is the `start-ci-run` command:
```yaml {% fileName=".github/workflows/ci.yml" highlightLines=[13] %}
name: CI
...
jobs:
main:
runs-on: ubuntu-latest
steps:
...
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build"
# Cache node_modules
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
...
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: pnpm exec nx affected -t lint test build
```
This command tells Nx Cloud to:
- Start a CI run (`npx nx-cloud start-ci-run`)
- Collect all Nx commands that are being issued (e.g., `pnpm exec nx affected -t lint test build`) and
- Distribute them across 3 agents (`3 linux-medium-js`) where `linux-medium-js` is a predefined agent [launch template](/ci/reference/launch-templates).
### Configure Nx Agents on your CI Provider
Every organization manages their CI/CD pipelines differently, so the guides don't cover org-specific aspects of CI/CD (e.g., deployment). They mainly focus on configuring Nx correctly using Nx Agents and [Nx Replay](/ci/features/remote-cache).
- [Azure Pipelines](/ci/recipes/set-up/monorepo-ci-azure)
- [Circle CI](/ci/recipes/set-up/monorepo-ci-circle-ci)
- [GitHub Actions](/ci/recipes/set-up/monorepo-ci-github-actions)
- [Jenkins](/ci/recipes/set-up/monorepo-ci-jenkins)
- [GitLab](/ci/recipes/set-up/monorepo-ci-gitlab)
- [Bitbucket Pipelines](/ci/recipes/set-up/monorepo-ci-bitbucket-pipelines)
## How Nx Agents Work
![Distribute Task Execution with Nx Agents](/shared/images/dte/nx-agents-orchestration-diagram.svg)
_**Nx Agents are declarative**_ in that you only specify the number of agents and the type of agent you want to use. Nx Cloud then picks up the Nx commands that are being issued on your CI and distributes them automatically. This results in **low maintenance and a much more efficient distribution strategy**. A non-declarative approach would be one where you define which tasks or projects get executed on which machine, requiring you to adjust the configuration as your codebase changes.
_**Nx Agents use a task-centric approach**_ to distribution. Current CI systems use VM-centric approaches, where tasks must be predefined for specific machines, often leading to inefficiencies as your codebase grows. Instead of defining which tasks run on which machine upfront, Nx Agents dynamically process tasks based on availability and task dependencies/ordering. Tasks are picked up by agents based on the task's required processing time (from historical data) and task dependency/ordering (from the Nx graph). This results in a faster and resource efficient processing, and is also more resilient to failures since any other agent can pick up work if one agent fails during bootup. Read more [on our blog post](/blog/reliable-ci-a-new-execution-model-fixing-both-flakiness-and-slowness).
_**Nx Agents are cost and resource-efficient**_ as the tasks are automatically distributed - **optimizing for speed while also ensuring resource utilization is high** and idle time is low. You can also [dynamically adjust the number of agents](/ci/features/dynamic-agents) based on the size of the PR, and we're working on [some more AI-powered features](/ci/concepts/nx-cloud-ai) to optimize this even further. In addition, [remote caching](/ci/features/remote-cache) guarantees tasks are not run twice, and artifacts are shared efficiently among agents.
_**Nx Agents are non-invasive**_ in that you don't need to completely overhaul your existing CI configuration or your Nx workspace to use them. You can start using Nx Agents with your existing CI provider by adding the `nx-cloud start-ci-run...` command mentioned previously. In addition, all artifacts and logs are played back to the main job so you can keep processing them as if they were run on the main job. Hence, your existing post-processing steps should still keep working as before.
For a more thorough explanation of how Nx Agents optimize your CI pipeline, read this [guide to parallelization and distribution in CI](/ci/concepts/parallelization-distribution).
## Nx Agents Features
@@ -66,21 +107,10 @@ The `--distribute-on` flag instructs Nx Cloud to distribute tasks across 8 agent
{% /cards %}
## CI/CD Guides
Every organization manages their CI/CD pipelines differently, so the guides don't cover org-specific aspects of
CI/CD (e.g., deployment). They mainly focus on configuring Nx correctly using Nx Agents and [Nx Replay](/ci/features/remote-cache).
- [Azure Pipelines](/ci/recipes/set-up/monorepo-ci-azure)
- [Circle CI](/ci/recipes/set-up/monorepo-ci-circle-ci)
- [GitHub Actions](/ci/recipes/set-up/monorepo-ci-github-actions)
- [Jenkins](/ci/recipes/set-up/monorepo-ci-jenkins)
- [GitLab](/ci/recipes/set-up/monorepo-ci-gitlab)
- [Bitbucket Pipelines](/ci/recipes/set-up/monorepo-ci-bitbucket-pipelines)
Note that only cacheable operations can be distributed because they have to be replayed on the main job.
## Relevant Repositories and Examples
By integrating Nx Agents into your CI pipeline, you can significantly reduce build times, optimize resource use, and maintain a scalable, efficient development workflow.
- [Reliable CI: A New Execution Model Fixing Both Flakiness and Slowness](/blog/reliable-ci-a-new-execution-model-fixing-both-flakiness-and-slowness)
- [Nx: On how to make your CI 16 times faster with a small config change](https://github.com/vsavkin/interstellar)
- ["Lerna & Distributed Task Execution" Example](https://github.com/vsavkin/lerna-dte)
+2
View File
@@ -1,5 +1,7 @@
# Generate Code
{% youtube src="https://youtu.be/hSM6MgWOYr8" title="Generate Code" /%}
Code generators are like automation scripts designed to streamline your workflow. Essentially, they are TypeScript functions that accept parameters and help boost your productivity by:
- Allowing you to **scaffold new projects** or **augment existing projects** with new features, like [adding Storybook support](/nx-api/storybook#generating-storybook-configuration)
Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

+51 -62
View File
@@ -1,87 +1,76 @@
# Use Remote Caching (Nx Replay)
By default Nx [caches task computations locally](/features/cache-task-results). However, to benefit from the cache across your team and in particular on CI, the computation cache can also be distributed across multiple machines.
{% youtube
src="https://youtu.be/NF1__N_snog"
title="Remote Caching with Nx Replay"
/%}
The **Nx Replay** feature of Nx Cloud is a fast, secure and zero-config implementation of remote caching.
Repeatedly rebuilding and retesting the same code is costly — not just in terms of wasted resources, but also in terms of developer time. To solve this, Nx includes a sophisticated computation caching system that ensures **code is never rebuilt twice**, saving you both time and resources.
![Diagram showing Teika sharing his cache with CI, Kimiko and James](/shared/images/dte/distributed-caching.svg)
In this diagram, Teika runs the build once on his machine, then CI, Kimiko and James can use the cached artifact from Teika instead of re-executing the same work.
By default, Nx [caches task computations locally](/features/cache-task-results), but the biggest benefit comes from **sharing this cache across your team and in CI**.
## Setting Up Nx Cloud
- **Zero config** and **secure** by default
- Drastically **speeds up task execution times** during local development, and more critically in CI
- **Saves money on CI/CD costs** by reducing the number of tasks that need to be executed (we observed 30-70% faster CI & half the cost)
To use **Nx Replay** you need to connect your workspace to Nx Cloud. See the [connect to Nx Cloud recipe](/ci/intro/connect-to-nx-cloud).
Nx **restores terminal output, along with the files and artifacts** created from running the task (e.g., your build or dist directory). If you want to learn more about the conceptual model behind Nx's caching, read [How Caching Works](/concepts/how-caching-works).
## See Remote Caching in Action
## Configure Remote Caching
To see the remote cache in action, run:
To use **Nx Replay**, you need to connect your workspace to Nx Cloud (if you haven't already).
```{% command="nx build header && nx reset && nx build header"%}
> nx run header:build
> header@0.0.0 build
> rimraf dist && rollup --config
src/index.tsx → dist...
created dist in 786ms
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
NX Successfully ran target build for project header (2s)
See logs and investigate cache misses at https://cloud.nx.app/runs/k0HDHACpL8
NX Resetting the Nx workspace cache and stopping the Nx Daemon.
This might take a few minutes.
NX Daemon Server - Stopped
NX Successfully reset the Nx workspace.
> nx run header:build [remote cache]
> header@0.0.0 build
> rimraf dist && rollup --config
src/index.tsx → dist...
created dist in 786ms
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
NX Successfully ran target build for project header (664ms)
Nx read the output from the cache instead of running the command for 1 out of 1 tasks.
Nx Cloud made it possible to reuse header: https://nx.app/runs/P0X6ZGTkqZ
```shell
npx nx connect
```
## Benefits of Nx Replay
See the [connect to Nx Cloud recipe](/ci/intro/connect-to-nx-cloud) for all the details.
There are two ways that Nx Replay directly benefits your organization.
## Why use Remote Caching (Nx Replay)?
### 1. Speed Up CI Pipelines for Modified PRs
Nx Replay directly benefits your organization by:
The first time a PR goes through the CI pipeline, the [affected](/ci/features/affected) command provides most of the time savings. The `affected` command compares the PR against the `main` branch and only runs tasks for projects that could have been affected by the code changes. Unfortunately, all the projects affected by the first CI pipeline for a PR will continue to be affected by all future commits to that PR. This is because `affected` compares the current commit with the `main` branch every time.
- **Speeding up CI pipelines:** With Nx Replay, tasks that have already been executed in a PRs initial CI pipeline run can **reuse cached results in subsequent runs**. This reduces the need to re-run unaffected tasks, significantly speeding up the CI process for modified PRs. This benefit complements the [affected command](/ci/features/affected), which optimizes pipelines by only running tasks for projects that could be impacted by code changes.
With Nx Replay enabled, any tasks that were run during the first pipeline and not affected by the second commit would reuse the cached results from the first pipeline instead of re-running the task. This gives subsequent pipeline runs a mechanism similar to affected that will [reduce the wasted time in CI](/ci/concepts/reduce-waste).
- **Boosting local developer efficiency:** Depending on [how cache permissions](/ci/recipes/security/access-tokens) are set for your workspace, developers can reuse cached results from CI on their local machines. As a result, tasks like builds and tests can complete instantly if they were already executed in CI. This accelerates developer workflows without any extra steps required.
### 2. Reuse Cached Results from CI on Developer Machines
- **Enabling Nx Agents:** Nx Replay is crucial for [Nx Agents](/ci/features/distribute-task-execution) to function efficiently. Nx Agents leverage remote caching as a **transport mechanism** for transferring task artifacts between machines as it distributes tasks. When a task depends on another task that may have been executed on a different agent, Nx Replay ensures the necessary artifacts are transferred seamlessly. This allows each agent to execute only its assigned tasks while relying on cached results for dependencies, ensuring tasks run only once and are shared across all agents. [Learn more about Nx Agents](/ci/features/distribute-task-execution).
If a task has been executed in CI, a developer running that same task locally can reuse the task result instead of actually running the task. Here are a couple common scenarios where this happens:
## What gets stored?
1. A developer pulls the latest code from `main` and rebuilds an application. The build finishes instantly and they're ready to start working.
2. A developer checks out someone else's PR branch to help troubleshoot a problem. They run the tests and all the successful tests finish instantly. They can focus their debugging time on the few tests that are still failing.
Nx Cloud stores the following:
The best part about Nx Replay is that developers will experience the benefits of it without needing to remember to use it. Some of their tasks will just finish much faster than they normally do.
- **Terminal output:** The terminal output generated when running a task. This includes logs, warnings, and errors.
- **Task artifacts:** The output files of a task defined in the [`outputs` property of your project configuration](/recipes/running-tasks/configure-outputs). For example, the build output, test results, or linting reports.
- **Hash:** The hash of the inputs to the computation. The inputs include the source code, runtime values, and command line arguments. Note that the hash is included in the cache, but the actual inputs are not.
## Nx Replay Enables Nx Agents
Learn more about [how caching works](/concepts/how-caching-works#what-is-cached).
One more indirect benefit of Nx Replay is that it is critical to the way [Nx Agents](/ci/features/distribute-task-execution) is built. Nx Agents relies heavily on the remote cache in order to ensure that all task artifacts are present on the agent machines where they are needed. Each agent can naively run the dependencies for the tasks it is assigned and rely on Nx Replay to retrieve the cached tasks results for those tasks. Nx Replay ensures that each task will only run on one agent and the results of that task will be shared with every agent that needs them.
## Security in Remote Caching
## Skipping Cloud Cache
Since we work with many large corporations (including banks, insurance companies, and governments), we take security very seriously. Nx Cloud provides several features to ensure your data remains safe and secure:
Similar to how `--skip-nx-cache` will instruct Nx not to use the local cache, passing `--no-cloud` will tell Nx not to use the remote cache from Nx Cloud.
- **Immutability:** Each cache entry is immutable, meaning once an entry is created, it cannot be altered. This ensures that cached results cannot be tampered with by malicious parties, preventing the injection of vulnerabilities into your build process.
- **Access Control via Tokens:** Nx Cloud allows you to [control who can read from and write to the cache](/ci/recipes/security/access-tokens). For example, you can configure these settings to restrict cache write access to your CI pipeline while allowing all developers to only read.
- **End-to-End Encryption:** Nx Cloud supports end-to-end encryption to protect your data. Task artifacts are encrypted before being sent to the remote cache and decrypted when retrieved. This ensures that even if someone gains access to Nx Cloud servers, they cannot view your stored artifacts. For more details, visit the [encryption documentation](/ci/recipes/security/encryption).
- **Nx Enterprise (Self-Hosting and EU Regions):** For organizations with specific compliance or data residency requirements, Nx Enterprise offers the option to self-host Nx Cloud on your own infrastructure. Additionally, you can choose to host in EU regions, ensuring that your data complies with regional data protection laws. This is available to our [Nx Enterprise customers](/enterprise).
- **SOC Certification:** Nx and Nx Cloud are SOC Type 1 and Type 2 certified, providing an additional layer of assurance that your data is handled according to industry-standard security practices. For more details, you can visit our [security page](https://security.nx.app).
### Configure Caching Access
Caching access can be restricted in terms of read/write access. You can configure this in your [Nx Cloud dashboard](https://nx.app). Learn more about it [here](/ci/recipes/security/access-tokens).
## FAQ
### What if the remote cache is offline?
Nx Replay automatically syncs the remote cache to the local cache folder. As such, if the remote cache is not available, it will automatically fall back to the local cache or just run the task if it is not cached.
### Skipping Cloud Cache
To learn more about how to temporarily skip task caching, head over to [our corresponding docs page](/recipes/running-tasks/skipping-cache#skip-remote-caching-from-nx-cloud).
+2
View File
@@ -1,5 +1,7 @@
# Run Tasks
{% youtube src="https://youtu.be/aEdfYiA5U34" title="Run tasks with Nx" /%}
In a monorepo setup, you don't just run tasks for a single project; you might have hundreds to manage. To help with this, Nx provides a powerful task runner that allows you to:
- easily **run multiple targets** for multiple projects **in parallel**
+2 -2
View File
@@ -140,8 +140,8 @@ Try one of these tutorials for a full walkthrough of what to do after you instal
- [Single React App Tutorial](/getting-started/tutorials/react-standalone-tutorial)
- [Single Angular App Tutorial](/getting-started/tutorials/angular-standalone-tutorial)
- [Single Vue App Tutorial](/getting-started/tutorials/vue-standalone-tutorial)
- [React Monorepo Tutorial](/getting-started/tutorials/react-standalone-tutorial)
- [Angular Monorepo Tutorial](/getting-started/tutorials/angular-standalone-tutorial)
- [React Monorepo Tutorial](/getting-started/tutorials/react-monorepo-tutorial)
- [Angular Monorepo Tutorial](/getting-started/tutorials/angular-monorepo-tutorial)
## More Documentation
+1 -1
View File
@@ -9,7 +9,7 @@ Nx is a powerful open-source build system that provides tools and techniques for
- **Cache Locally & Remotely**: With [local](/features/cache-task-results) and [remote caching](/ci/features/remote-cache), Nx prevents unnecessary re-runs of tasks, saving you valuable dev time.
- **Split E2E Tests and Rerun Flaky Tests**: Nx [automatically splits](/ci/features/split-e2e-tasks) large e2e tests to distribute them across VMs. Nx can also automatically [identify and rerun flaky e2e tests](/ci/features/flaky-tasks).
- **Automate Dependency Updates**: if you leverage [Nx plugins](/concepts/nx-plugins) you gain additional features such as [code generation](/features/generate-code) and tools to [automatically upgrade](features/automate-updating-dependencies) your codebase and dependencies.
- **Make it Your Own**: Nx is highly customizable and extensible. Fine-tune it by [creating your own plugins](/extending-nx/intro/getting-started) and optionally [share them with the community](/extending-nx/tutorials/publish-plugin#publish-your-nx-plugin).
- **Make it Your Own**: Nx is highly customizable and extensible. Fine-tune it by [creating a plugin for your organization](/extending-nx/tutorials/organization-specific-plugin) or [creating a tooling plugin](/extending-nx/tutorials/tooling-plugin).
<!-- - **Monorepo and Single Projects**: Nx supports both, monorepos as well as single-project (standalone) workspaces. -->
+80 -6
View File
@@ -23,9 +23,9 @@ This works in CSS files as well.
## Adding SVGs
SVG images can be imported using the method described above.
SVG images can be imported using the method described previously.
Alternatively, you can import SVG images as React components.
Alternatively, you can import SVG images as React components using [SVGR](https://react-svgr.com/).
```typescript
import React from 'react';
@@ -36,14 +36,88 @@ const Header = () => <Logo title="Logo" />;
export default Header;
```
This method of import allow you to work with the SVG the same way you would with any other React component. You can style it using CSS, styled-components, etc. The SVG component accepts a `title` prop, as well as any other props that the `svg` element accepts.
This method of import allow you to work with the SVG the same way you would with any other React component. You can style it using CSS, [styled-components](https://styled-components.com/), [TailwindCSS](https://tailwindcss.com/), etc. The SVG component accepts a `title` prop, as well as any other props that the `svg` element accepts.
Note that if you are using Next.js, you have to opt into this behavior. To import SVGs as React components with Next.js, you need to make sure that `nx.svgr` value is set to `true` in your Next.js application's `next.config.js` file:
{% callout type="note" title="Additional configuration may be required" %}
Note that SVGR is enabled by the `@nx/webpack` plugin by default. For other plugins, you will need to enable it on your own.
{% /callout %}
```javascript
module.exports = withNx({
### SVGR for Next.js
To import SVGs as React components with Next.js, you need to make sure that `nx.svgr` value is set to `true` in your Next.js application's `next.config.js` file:
```javascript {% fileName="next.config.js" highlightLines=[4] %}
// ...
const nextConfig = {
nx: {
svgr: true,
},
};
// ...
module.exports = composePlugins(...plugins)(nextConfig);
```
### SVGR for Vite
To import SVGs as React components with Vite, you need to install the `vite-plugin-svgr` package.
{% tabs %}
{%tab label="npm"%}
```shell
npm add -D vite-plugin-svgr
```
{% /tab %}
{%tab label="yarn"%}
```shell
yarn add -D vite-plugin-svgr
```
{% /tab %}
{%tab label="pnpm"%}
```shell
pnpm add -D vite-plugin-svgr
```
{% /tab %}
{% tab label="bun" %}
```shell
bun add -D vite-plugin-svgr
```
{% /tab %}
{% /tabs %}
Then, configure Vite as follows:
```javascript {% fileName="vite.config.ts" highlightLines=[5, "10-18"]%}
/// <reference types='vitest' />
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
import svgr from 'vite-plugin-svgr';
export default defineConfig({
// ...
plugins: [
svgr({
svgrOptions: {
exportType: 'named',
ref: true,
svgo: false,
titleProp: true,
},
include: '**/*.svg',
}),
react(),
nxViteTsPaths(),
// ...
],
//...
});
```
+9
View File
@@ -231,6 +231,15 @@ pnpm add [package]
nx g [package]:ng-add
```
{% /tab %}
{% tab label="bun" %}
```shell
bun add [package]
nx g [package]:ng-add
```
{% /tab %}
{% /tabs %}
+17 -1
View File
@@ -5,6 +5,8 @@ Visualizing where and when the tasks were executed can help optimize the entire
## How to Profile the Performance of Running Tasks
{% youtube src="https://youtu.be/Esx-P1Zf1-E" title="Performance Profiling Nx Tasks with Chrome Devtools" /%}
1. Prepend `NX_PROFILE=profile.json` before running targets with Nx. For example,
```shell
@@ -20,10 +22,24 @@ NX_PROFILE=profile.json nx affected --target build
3. Click the upload button and open the `profile.json` that was created. (Or drag the file into the window)
4. Expand each group to see the names of the tasks which were run
## Optimizing the Performance of Running Tasks
### Optimizing the Performance of Running Tasks
Now that you have visualized how the tasks were run, you can try tweaking things to make the process faster. Generate profiles after each tweak and compare the results.
1. Are there tasks that you did not expect to be necessary? Sometimes, more tasks are captured by a command than expected. Excluding them could free up workers for other tasks.
2. Try adding more workers. Did the new workers handle tasks while other workers were busy? This will likely result in faster runs.
3. Are a lot of the tasks waiting on a single task to be completed? Splitting that project into smaller projects may allow fewer projects and therefore tasks to depend on a single project/task. This will allow for more room to parallelize the tasks.
## Profiling Nx Commands
{% youtube src="https://youtu.be/olkVyoc2MAQ" title="Performance Profiling Nx" /%}
Nx offloads much of the heavy lifting to the [Nx Daemon](/concepts/nx-daemon), which helps speed up task execution. However, you might still encounter slowdowns, not during the task execution itself, but in the moments leading up to it when invoking tasks through Nx. This can often happen when you're using a large number of [Nx Plugins](/plugin-registry), whether they come from the core team or the community.
To investigate and optimize these slowdowns, you can use the `NX_PERF_LOGGING` [environment variable](/reference/environment-variables). This will give you detailed performance logs and more precise timings, allowing you to pinpoint where the delays occur.
Here's an example of running the `build` of the `admin` project with performance logging enabled:
```shell
NX_PERF_LOGGING=true NX_DAEMON=false npx nx build admin
```
@@ -61,6 +61,7 @@ executor to `@nx/angular:dev-server` as shown below:
...
"targets": {
"build": {
"dependsOn": ["^build"],
"executor": "@nx/angular:webpack-browser",
"outputs": [
"{options.outputPath}"
@@ -91,6 +92,19 @@ executor to `@nx/angular:dev-server` as shown below:
},
```
{% callout type="note" title="Add Executor to Target Defaults" %}
If you'd like to avoid adding `"dependsOn": ["^build"]` to every application in your workspace that uses `@nx/angular:webpack-browser` you can add it to the `"targetDefaults"` section of the `nx.json`:
```json
"targetDefaults": {
"@nx/angular:webpack-browser": {
"dependsOn": ["^build"]
}
}
```
{% /callout %}
## Running and serving incremental builds
To build an application incrementally use the following command:
@@ -51,6 +51,14 @@ yarn add -D tailwindcss@latest postcss@latest autoprefixer@latest
pnpm add -D tailwindcss@latest postcss@latest autoprefixer@latest
```
{% /tab %}
{% tab label="bun" %}
```shell
bun add -D tailwindcss@latest postcss@latest autoprefixer@latest
```
{% /tab %}
{% /tabs %}
@@ -111,7 +111,7 @@ details in a browser window.
nx show project my-workspace --web
```
{% project-details title="Project Details View" height="100px" %}
{% project-details title="Project Details View" %}
```json
{
+1 -1
View File
@@ -110,7 +110,7 @@ details in a browser window.
nx show project my-workspace --web
```
{% project-details title="Project Details View" height="100px" %}
{% project-details title="Project Details View" %}
```json
{

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