Compare commits

...

44 Commits

Author SHA1 Message Date
Benjamin Cabanes 03f907c82e feat(nx-dev): update home page (#26893)
Add new sections and update information about Nx.

---------

Co-authored-by: Juri <juri.strumpflohner@gmail.com>
(cherry picked from commit 85d310a8c2)
2024-07-16 18:30:13 -04:00
Craigory Coppola a2855bcd04 fix(core): running just 'nx' should show help (#26871)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
Running `nx` errors

## Expected Behavior
`nx` show's help

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

Fixes #

(cherry picked from commit facfc147f8)
2024-07-16 18:29:26 -04:00
Jack Hsu ad2021efd2 feat(core): ci-workflow adds workflow file to sharedGlobal inputs (#26948)
When we generate the workflow file, users should also add the new
workflow file to the `sharedGlobals` named input, otherwise changes may
land without verifying that all tasks are successful.

This is already called out in the CI tutorials, and doing it
automatically improves the DX.

## 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 1a9429643f)
2024-07-16 18:28:51 -04:00
Jack Hsu 338f040541 fix(rollup): always generate package.json when using @nx/rollup:rollup (#26940)
Prior to Nx 19.4, the `@nx/rollup:rollup` executor generates
`package.json` outside of the actual Rollup build. Nx 19.4 changed this
to be a proper Rollup plugin in order to support inferred targets
better. This led to a slight regression, where projects that override
`plugins` array in their `rollup.config.js` file will also remove the
`generatePackageJson` plugin.

This PR brings the behavior back, so the `package.json` file is _always_
generated regardless of how the `plugins` array is customized.

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

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 34da542ce6)
2024-07-16 18:28:51 -04:00
Philip Fulcher 596f643f27 chore: migrate links to blog (#26892)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
Blog links point to Medium and dev.to blogs
## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Blog links point to internal blog
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

(cherry picked from commit 46497356ce)
2024-07-16 18:28:50 -04:00
Gunter Chou 2b3101f0dd fix(linter): Correctly collect lintable files for project in @nx/eslint plugin (#26638)
(cherry picked from commit a41a8d68cf)
2024-07-16 18:28:49 -04:00
Jason Jean 8e92b21dde fix(core): do not mutate target defaults (#26941)
## Current Behavior
<!-- This is the behavior we have today -->

Target defaults is mutated when the target is normalized. Subsequent
targets are normalized with the mutated version yielding the incorrect
projects configuration.

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

Target defaults is not mutated and all targets are correct.

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

Fixes #

(cherry picked from commit f3fa705b82)
2024-07-16 18:28:34 -04:00
Nicholas Cunningham cfe163c362 fix(nx-dev): Update Next.js version (#26912)
Fix nx-dev hmr not working.

(cherry picked from commit 6f50d9f4c3)
2024-07-16 18:28:22 -04:00
Jason Jean 3ebf3053d0 chore(repo): update freebsd publish to run on ubuntu and use latest f… (#26924)
…reebsd to fix issue

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

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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's an issue with running `npm` when building on freebsd

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

There are no issues building on freebsd

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

Fixes #

(cherry picked from commit 37f0ccaa20)
2024-07-12 16:32:32 -04:00
Nicholas Cunningham 7113dc52ad feat(nx-dev): Add more OSS logos (#26922)
(cherry picked from commit f2e1f0fad9)
2024-07-12 16:32:32 -04:00
Emily Xiong df9985019d chore(core): add check to run macos tests if packages changed (#26894)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 638647d77c)
2024-07-12 16:32:18 -04:00
Jason Jean 1917809369 fix(misc): add more ab testing for setting up ci and nx cloud (#26907)
## Current Behavior

There is AB testing

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

There is more AB testing

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

Fixes #

(cherry picked from commit adacd983b7)
2024-07-12 16:31:20 -04:00
Jonathan Cammisuli c31a9a1a43 docs(core): add documentation for "Explain With AI" (#26656)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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: Caleb Ukle <caleb@nrwl.io>
(cherry picked from commit 26c3d21f1e)
2024-07-12 16:31:19 -04:00
Nicholas Cunningham 0cf96e324c feat(nx-dev): add customers & company pages (#26813)
Co-authored-by: Juri <juri.strumpflohner@gmail.com>
(cherry picked from commit 82831bcee6)
2024-07-12 16:31:17 -04:00
Craigory Coppola 0a50a8570e fix(core): report should work if project graph errors (#26858)
(cherry picked from commit 0b0db782f7)
2024-07-12 16:31:16 -04:00
Craigory Coppola fd84d68700 feat(core): avoid forking process for nx:noop (#26869)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-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 we run a task with executor nx:noop we still fork a process for
that executor to run.

## Expected Behavior
`nx:noop` is a fixed executor which never does anything. We can skip
forking the process.

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

Fixes #

(cherry picked from commit b3d2d957a2)
2024-07-12 16:31:15 -04:00
Jason Jean 4a6fe77397 fix(misc): properly set the value of the bitbucket option for ci work… (#26890)
(cherry picked from commit 1cb4f65210)
2024-07-12 16:31:14 -04:00
Craigory Coppola 51abbf253a fix(core): load isolated plugins in parallel (#26874)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
Plugins are not loading in parallel correctly

## Expected Behavior
Plugins should load in parallel

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

Fixes #

(cherry picked from commit a6fde9ba95)
2024-07-12 16:31:14 -04:00
Rares Matei e3ebcc84fe docs(nx-cloud): bitbucket data center docs (#26862)
- Adds docs for the new bitbucket data center integration + auth
- Refactors some of the other integration docs to be consistent with
each other and link to the Helm repo where possible

(cherry picked from commit 550de60446)
2024-07-12 16:31:11 -04:00
Leosvel Pérez Espinosa b38df202b7 feat(js): add createNodesV2 for typescript plugin (#26788)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

There is no implementation for the `CreateNodesV2` API.

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

There should be an implementation for the `CreateNodesV2` API.

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

Fixes #

(cherry picked from commit e31b1689c4)
2024-07-12 16:31:10 -04:00
Jasper McCulloch 0b5cbb0026 fix(vite): Only attempt to amend test object if one exists (#26822)
Test object is assigned using optional chaining but previously did not
check that any value had actually been assigned which would cause the
`getStart` call to fail resulting in a failed migration.

## Current Behavior
Migration fails if no matching test object is found.

## Expected Behavior
Migration should not fail.

## Related Issue(s)
I haven't opened an issue, just the PR. I can open an issue if required
for tracking.

(cherry picked from commit 8fd38cba9a)
2024-07-12 16:31:09 -04:00
Leosvel Pérez Espinosa cbaad028c6 fix(vue): bump vue-tsc version to 2.x.x (#26867)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

Building a newly created Nuxt workspace/application fails with:

```bash
Nuxt Build Error: Cannot find module '@volar/typescript/lib/node/proxyCreateProgram'
```

This can be seen in current CI runs like the following:
https://staging.nx.app/runs/bszKddEenc/task/e2e-nuxt%3Ae2e-ci--src%2Fnuxt.test.ts.

This is happening because the `vite-plugin-checker` (used by Nuxt)
requires `vue-tsc@>=2.0.0`, but the `@nx/vue` plugin installs
`vue-tsc@^1.8.8`.

```bash
└─┬ nuxt 3.12.3
  └─┬ @nuxt/vite-builder 3.12.3
    └─┬ vite-plugin-checker 0.7.1
      └── ✕ unmet peer vue-tsc@>=2.0.0: found 1.8.27
```

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

Newly created Nuxt workspaces/applications should build successfully.

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

Fixes #

(cherry picked from commit 73858a094e)
2024-07-12 16:31:09 -04:00
Jason Jean 76f145aff0 fix(misc): adjust nx cloud ab test (#26866)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

![image](https://github.com/nrwl/nx/assets/8104246/98c3b475-d213-4e81-8c80-4010714ad4f7)

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

![image](https://github.com/nrwl/nx/assets/8104246/2a67ae6b-2718-45f3-adfe-2dcc88c8ecbd)

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

Fixes #

(cherry picked from commit 92e09d9322)
2024-07-08 18:57:38 -04:00
Pavlo e2eda2cd5e feat(core): add support for wildcards in dependsOn (#19611)
Now it is possible to define targets like this:

```
{
  "targets": {
    "build-css": {},
    "build-js": {},
    "test": {
      "dependsOn": ["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` -->

## Current Behavior
No support for wildcard target dependencies.

## Expected Behavior
This PR is an example of what I described here:
https://github.com/nrwl/nx/issues/19414.

## Related Issue(s)
Closes #19414

---------

Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>
(cherry picked from commit 3e0d2de468)
2024-07-08 18:57:37 -04:00
Ben Snyder 8462387245 feat(linter): support eslint.config.cjs and *.cjs extension with flat config (#26637)
(cherry picked from commit 81fe13250a)
2024-07-08 18:57:36 -04:00
Craigory Coppola 95f851c4e3 fix(core): ensure better create nodes error messaging (#26811)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
We see a stack trace pointing to where the aggregate create nodes error
is thrown rather than the messaging about the individual errors

<img width="911" alt="image"
src="https://github.com/nrwl/nx/assets/6933928/61907d8c-bb77-4a39-b55f-42fa38c0ed19">

## Expected Behavior
The message is shown

<img width="946" alt="image"
src="https://github.com/nrwl/nx/assets/6933928/f79f5aeb-e5b2-4ff1-9cbc-a7f10e8f910e">

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

Fixes #

(cherry picked from commit 3cbe2abc25)
2024-07-08 18:57:36 -04:00
Emily Xiong 3493ef7618 fix(gradle): fix gradle exclude src/test (#26741)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 4ae16b361f)
2024-07-05 16:10:28 -04:00
Jonathan Gelin 4eae2d20bd fix(nx-plugin): tslib is not set as a dependency when using create-package generator (#22429)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

## Current Behavior
The linting failed on clean `create-nx-plugin` generation:

![image](https://github.com/nrwl/nx/assets/954509/80bfbaeb-0994-48d9-a6dc-20f8f723a95d)

## Expected Behavior
After a clean generation, build, test, and lint should be successful

Co-authored-by: Emily Xiong <xiongemi@gmail.com>
(cherry picked from commit 23ce6af2cc)
2024-07-05 16:10:27 -04:00
Naymi 49da9b19f4 fix(core): recursive resolve deps on create command graph (#22989)
## introductory
<img width="620" alt="image"
src="https://github.com/nrwl/nx/assets/21343944/1ef5e2a2-0f65-4fde-aa7d-b52152af59a7">

## Current Behavior

```shell
nx exec --projects=my-node-app -- pwd
TypeError: graph.dependencies[id] is not iterable
    at _findCycle (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/tasks-runner/task-graph-utils.js:8:39)
    at _findCycle (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/tasks-runner/task-graph-utils.js:11:23)
    at findCycle (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/tasks-runner/task-graph-utils.js:23:23)
    at createCommandGraph (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/commands-runner/create-command-graph.js:25:52)
    at getCommandProjects (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/commands-runner/get-command-projects.js:7:72)
    at runScriptAsNxTarget (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/command-line/exec/exec.js:60:73)
    at Object.nxExecCommand (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/command-line/exec/exec.js:44:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.handler (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/command-line/exec/command-object.js:11:13)

```

## Expected Behavior

```shell
nx exec --projects=my-node-app -- pwd
/tmp/nx-nest-workspace/my-node-lib-2
/tmp/nx-nest-workspace/my-node-lib
/tmp/nx-nest-workspace/apps/my-node-app
```

Fixes https://github.com/nrwl/nx/issues/22994
Added function that resolves dependencies recursively

Co-authored-by: afedorov <afedorov@rvision.ru>
(cherry picked from commit e15479b691)
2024-07-05 14:52:36 -04:00
Jack Hsu c8c42958e3 docs(nx-cloud): update onboarding flow to use "nx connect" (#26842)
The new Nx Cloud onboarding flow is to run `nx connect` and follow the
prompts. There's no need to explain beyond that in the docs since the
flow is prone to changes in nx.app.

(cherry picked from commit 2baf672b61)
2024-07-05 14:52:35 -04:00
Jack Hsu 8947560166 docs(misc): disable prefetch on page load for links (#26837)
This PR changes `<Link>` to use `prefetch={false}` in the following
components:

1. Header
2. Sidebar
3. Docs header
4. Markdown content

This means that prefetch happens on hover of the link rather than page
load, and will reduce the amount of edge requests made from the app.

## 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 c7878533ed)
2024-07-05 14:52:34 -04:00
Jack Hsu 7dc54ff536 feat(react-native): update react-native-svg to 15.3.0 (#26827)
There's a bug in 15.2.0 so this PR updates the version. See:
https://github.com/software-mansion/react-native-svg/issues/2241#issuecomment-2115255421

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 7caf9017f0)
2024-07-05 14:52:33 -04:00
Emily Xiong 8c84ab1aa8 feat(graph): add copy button for entire target configuration (#26284)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
<img width="540" alt="Screenshot 2024-07-03 at 5 29 12 PM"
src="https://github.com/nrwl/nx/assets/16211801/bed98c56-3bd5-4170-893b-cefe5fe292f9">

<img width="1195" alt="Screenshot 2024-07-03 at 5 29 03 PM"
src="https://github.com/nrwl/nx/assets/16211801/544a4c4e-299f-40fc-a767-215d9c758dd8">

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

Fixes #

(cherry picked from commit 311710e56c)
2024-07-05 14:52:33 -04:00
MaxKless 892c98fe9b fix(core): ignore errors from cleanupNativeFileCache (revert to previous behaviour) (#26806)
(cherry picked from commit e09bad9363)
2024-07-05 14:52:32 -04:00
Nicholas Cunningham ae38180934 fix(node): Enable e2e test (#23508)
Re-enables e2e tests for node

Docker changes to be merged first: https://github.com/nrwl/nx/pull/26365

(cherry picked from commit 295c4229db)
2024-07-05 14:52:31 -04:00
Juri Strumpflohner d4b1a7e774 feat(nx-dev): update next to fix img fetchpriority error (#26766)
## Current Behavior

`fetchpriority` attribute error in Next image loading cmp.

<img width="1260" alt="image"
src="https://github.com/nrwl/nx/assets/542458/9ba9f539-e0ad-4fe1-9a6a-64db856fd25c">

## Expected Behavior

Upgrading patch version of next fixes it.

//Edit: some context:
https://github.com/vercel/next.js/issues/65161#issuecomment-2087899325

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

Fixes #

(cherry picked from commit 929a57c127)
2024-07-05 14:52:31 -04:00
Juri Strumpflohner 3ea1ecd1b2 fix(nx-dev): plugin-registry menu (#26767)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 on https://nx.dev/plugin-registry the side-bar menu doesn't open on
mobile.

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

Should obviously open. Also adjusted the top-level header menu
"Documentation" -> "Docs" (just sounds better)

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

Fixes #

(cherry picked from commit 6ce107d6e1)
2024-07-05 14:52:30 -04:00
Jason Jean e4ae1e7b01 fix(core): always inherit output from plugins (#26797)
(cherry picked from commit 28939dd982)
2024-07-05 14:52:29 -04:00
Jack Hsu 314c2fdf88 fix(core): register swc transpiler once per compilerOptions (#26807)
Apply the same patch for `@swc-node/register` that we did for `ts-node`.
This prevent errors during graph construction.

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 #26798

(cherry picked from commit 8cf96cc5b2)
2024-07-05 14:52:28 -04:00
Isaac Mann 9f118e846d docs(core): react standalone tutorial (#26304)
Update the react standalone tutorial to start from `npm create vite --
--template=react-ts`

(cherry picked from commit 65c3e560e2)
2024-07-05 14:52:28 -04:00
EugeneKruglei a6d74286a9 fix(core): cannot read properties of undefined (reading 'options') (#26721)
(cherry picked from commit 6e84cbfac0)
2024-07-05 14:52:26 -04:00
Isaac Mann 23add04f18 docs(core): sync top menu features with sidebar (#26814)
- Syncs top menu features drop down names with sidebar
- Moves Setup enterprise feature under Enterprise -> On Premise
- Collapse concepts section in CI tab

(cherry picked from commit 7cd35e0ca1)
2024-07-05 14:52:25 -04:00
Isaac Mann 8dc97c3ba8 docs(core): vue cli tutorial (#26451)
Update the Vue standalone tutorial to start from a Vue CLI generated
project

(cherry picked from commit fa3c5c42cd)
2024-07-05 14:52:24 -04:00
Leosvel Pérez Espinosa ec37b1e5e8 fix(js): normalize excluded paths to task inputs correctly in typescript plugin (#26801)
(cherry picked from commit adb81afa91)
2024-07-05 14:52:23 -04:00
458 changed files with 14178 additions and 6296 deletions
+6 -1
View File
@@ -158,7 +158,12 @@ jobs:
- run:
name: Run E2E Tests for macOS
command: |
pnpm nx affected -t e2e-macos-ci --parallel=1 --base=$NX_BASE --head=$NX_HEAD
HAS_CHANGED=$(node ./scripts/check-react-native-changes.js $NX_BASE $NX_HEAD);
if $HAS_CHANGED; then
pnpm nx affected -t e2e-macos-ci --parallel=1 --base=$NX_BASE --head=$NX_HEAD
else
echo "Skip E2E tests for macOS as there are no changes in React Native projects."
fi
no_output_timeout: 45m
# -------------------------
+4 -6
View File
@@ -287,7 +287,7 @@ jobs:
build-freebsd:
needs: [resolve-required-data]
if: ${{ github.repository_owner == 'nrwl' }}
runs-on: macos-13-large
runs-on: ubuntu-latest
name: Build FreeBSD
timeout-minutes: 45
steps:
@@ -300,7 +300,7 @@ jobs:
- name: Build
id: build
if: ${{ github.event_name != 'schedule' && !github.event.inputs.pr }}
uses: cross-platform-actions/action@v0.22.0
uses: cross-platform-actions/action@v0.25.0
env:
DEBUG: napi:*
RUSTUP_IO_THREADS: 1
@@ -308,14 +308,14 @@ jobs:
PLAYWRIGHT_BROWSERS_PATH: 0
with:
operating_system: freebsd
version: '13.2'
version: '14.0'
architecture: x86-64
environment_variables: DEBUG RUSTUP_IO_THREADS CI NX_PREFER_TS_NODE PLAYWRIGHT_BROWSERS_PATH
shell: bash
run: |
env
whoami
sudo pkg install -y -f node libnghttp2 npm git
sudo pkg install -y -f node libnghttp2 www/npm git
sudo npm install --location=global --ignore-scripts pnpm@8.15.7
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain stable
@@ -331,8 +331,6 @@ jobs:
whoami
env
freebsd-version
mkdir -p /Users/runner/work/_temp/_github_workflow
echo "{}" > /Users/runner/work/_temp/_github_workflow/event.json
pnpm install --frozen-lockfile --ignore-scripts
pnpm nx run-many --verbose --outputStyle stream --target=build-native -- --target=x86_64-unknown-freebsd
pnpm nx reset
+1 -1
View File
@@ -29,7 +29,7 @@ A few links to help you get started:
- [Nx.Dev: Core Tutorials](https://nx.dev/getting-started/intro)
- [Recipe: Adding Nx to an Existing Monorepo](https://nx.dev/recipes/adopting-nx/adding-to-monorepo)
- [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
- [Blog Posts About Nx](https://nx.dev/blog)
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="./images/nx-courses-and-videos.svg"
width="100%" alt="Nx - Smart Monorepos · Fast CI"></a></p>
+8
View File
@@ -183,6 +183,14 @@ To display a terminal command, use:
```
````
You can also add a title to the shell as follows:
````
```shell {% title="Build the app" %}
npx nx build
```
````
#### Terminal Output
You can display your terminal output with a dedicated component the same way you would show code.
+2 -2
View File
@@ -183,7 +183,7 @@ Weve been working hard at reducing and simplifying all the configuration requ
At Nx Conf in New York City, we unveiled the next big step for Nx: **Nx Workflows**.
If you missed it, Simon Critchley walks you through in his [Nx Conf](https://dev.to/nx/nx-conf-2023-recap-53ep) talk:
If you missed it, Simon Critchley walks you through in his [Nx Conf](/blog/nx-conf-2023-recap) talk:
{% youtube src="https://www.youtube.com/embed/JG1FWfZFByM?si=7_NzxJP8nA7RbFhl" /%}
@@ -231,7 +231,7 @@ In Nx 17, we removed any remaining traces of `tslint` from our linter package, s
As we solidify this command, we intend to bring robust support for various versioning and publishing strategies, as well as built-in support for publishing packages or modules to a variety of languages, registries, and platforms.
For more [checkout our API docs](/nx-api/nx/documents/release), and be sure to catch James Henrys announcement of this new command at [Nx Conf](https://dev.to/nx/nx-conf-2023-recap-53ep):
For more [checkout our API docs](/nx-api/nx/documents/release), and be sure to catch James Henrys announcement of this new command at [Nx Conf](/blog/nx-conf-2023-recap):
{% youtube src="https://www.youtube.com/embed/p5qW5-2nKqI?si=FzpGMJwPVINc1hgL" /%}
+3 -3
View File
@@ -95,7 +95,7 @@ Nx Console has evolved from an experimental side project of the Nx team to a cor
![](/blog/images/2023-12-28/bodyimg2.webp)
This year we not only added a lot of new features to Nx Console, but also rewrote its [internals](https://blog.nrwl.io/nx-console-gets-lit-ca339743ff4f) which paved the way to expand Nx Console to other code editors: **JetBrains IDEs.**
This year we not only added a lot of new features to Nx Console, but also rewrote its [internals](/blog/nx-console-gets-lit) which paved the way to expand Nx Console to other code editors: **JetBrains IDEs.**
Yes, this means you can now use the latest Nx Console directly in your [Webstorm IDE](https://www.jetbrains.com/webstorm/). Read the [announcement blog post](https://blog.nrwl.io/expanding-nx-console-to-jetbrains-ides-8a5b80fff2d7) for all the details or go ahead and install Nx Console if you didnt already:
@@ -329,7 +329,7 @@ You can also browse them in the [nx-recipes](https://github.com/nrwl/nx-recipes)
{% tweet url="https://twitter.com/juristr/status/1726977598218199302" /%}
And obviously, we jumped on the AI train as well. A couple of months ago, we added the [Nx Assistant](/ai-chat). A ChatGPT-powered interface trained on our docs. [Katerina](https://twitter.com/psybercity) wrote about it [on our blog](https://blog.nrwl.io/nx-docs-ai-assistant-433d238e45d4). The AI chat allows to interactively ask questions about Nx and will give you relevant answers from our docs (including linking to the sources).
And obviously, we jumped on the AI train as well. A couple of months ago, we added the [Nx Assistant](/ai-chat). A ChatGPT-powered interface trained on our docs. [Katerina](https://twitter.com/psybercity) wrote about it [on our blog](/blog/nx-docs-ai-assistant). The AI chat allows to interactively ask questions about Nx and will give you relevant answers from our docs (including linking to the sources).
## New Tagline: Smart Monorepos — Fast CI
@@ -349,7 +349,7 @@ We did it again! The second in-person Nx Conf was a resounding success, this tim
![](/blog/images/2023-12-28/bodyimg9.webp)
Theres not much to say. Check out some of the amazing talks. I did a [Nx Conf 2023 recap blog post](https://dev.to/nx/nx-conf-2023-recap-53ep).
Theres not much to say. Check out some of the amazing talks. I did a [Nx Conf 2023 recap blog post](/blog/nx-conf-2023-recap).
## Looking ahead — 2024
+4 -4
View File
@@ -2,10 +2,10 @@
We were so excited about the features in Nx 18 that we created a whole [Launch Nx Week](/launch-nx) to share our excitement with you. During the launch week, we made the following announcements:
- [Project Crystal](https://blog.nrwl.io/what-if-nx-plugins-were-more-like-vscode-extensions-dcdad140ae09?source=friends_link&sk=ade76fe8d50d44aafb4d4d89ab882e24&__hstc=221401095.5d21139e33f975ecef01c1783a7523db.1673975383152.1708023233215.1708026196201.468&__hssc=221401095.2.1708026196201&__hsfp=589919331) allows you to use inferred tasks
- A new [`@nx/nuxt`](https://blog.nrwl.io/introducing-nx-nuxt-enhanced-nuxt-js-support-in-nx-01eac78034fc?source=friends_link&sk=91582cdbd0719dc23375338ad92afa9b&__hstc=221401095.5d21139e33f975ecef01c1783a7523db.1673975383152.1708023233215.1708026196201.468&__hssc=221401095.2.1708026196201&__hsfp=589919331) plugin is available
- [Nx Agents](https://blog.nrwl.io/fast-effortless-ci-67812514ffb4?source=friends_link&sk=89e1b5c0388dda077e64a2eab5495d95&__hstc=221401095.5d21139e33f975ecef01c1783a7523db.1673975383152.1708023233215.1708026196201.468&__hssc=221401095.2.1708026196201&__hsfp=589919331) are publicly available
- [`nx release`](https://blog.nrwl.io/versioning-and-releasing-packages-in-a-monorepo-45ee194378d1?source=friends_link&sk=934e4c5321774c8a9f88433e0dea578b&__hstc=221401095.5d21139e33f975ecef01c1783a7523db.1673975383152.1708023233215.1708026196201.468&__hssc=221401095.2.1708026196201&__hsfp=589919331) is out of beta
- [Project Crystal](/blog/what-if-nx-plugins-were-more-like-vscode-extensions) allows you to use inferred tasks
- A new [`@nx/nuxt`](/blog/introducing-nx-nuxt-enhanced-nuxt-js-support-in-nx) plugin is available
- [Nx Agents](/blog/fast-effortless-ci) are publicly available
- [`nx release`](/blog/versioning-and-releasing-packages-in-a-monorepo) is out of beta
{% youtube
src="https://youtu.be/Ed1ZCNqWF1Q"
+2 -2
View File
@@ -121,9 +121,9 @@ Generate a 'src/' directory for Next.js
Type: `string`
Choices: [yes, github, circleci, skip]
Choices: [github, circleci, gitlab, azure, bitbucket-pipelines, skip, yes]
Do you want Nx Cloud to make your CI fast?
Which CI provider would you like to use?
### packageManager
+167 -68
View File
@@ -28,6 +28,17 @@
"path": "/ci/intro/why-nx-cloud",
"tags": []
},
{
"id": "connect-to-cloud",
"name": "Connect Nx Cloud",
"description": "",
"mediaImage": "",
"file": "nx-cloud/intro/connect-to-cloud",
"itemList": [],
"isExternal": false,
"path": "/ci/intro/connect-to-cloud",
"tags": []
},
{
"id": "tutorials",
"name": "Tutorials",
@@ -89,6 +100,17 @@
"path": "/ci/intro/why-nx-cloud",
"tags": []
},
"/ci/intro/connect-to-cloud": {
"id": "connect-to-cloud",
"name": "Connect Nx Cloud",
"description": "",
"mediaImage": "",
"file": "nx-cloud/intro/connect-to-cloud",
"itemList": [],
"isExternal": false,
"path": "/ci/intro/connect-to-cloud",
"tags": []
},
"/ci/intro/tutorials": {
"id": "tutorials",
"name": "Tutorials",
@@ -185,6 +207,17 @@
"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",
@@ -217,17 +250,6 @@
"isExternal": false,
"path": "/ci/features/flaky-tasks",
"tags": []
},
{
"id": "on-premise",
"name": "Set up Nx Cloud On-Premise",
"description": "Set up Nx Cloud on machines that you control",
"mediaImage": "",
"file": "nx-cloud/features/nx-enterprise-on-prem",
"itemList": [],
"isExternal": false,
"path": "/ci/features/on-premise",
"tags": ["on-premise"]
}
],
"isExternal": false,
@@ -267,6 +289,17 @@
"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",
@@ -300,17 +333,6 @@
"path": "/ci/features/flaky-tasks",
"tags": []
},
"/ci/features/on-premise": {
"id": "on-premise",
"name": "Set up Nx Cloud On-Premise",
"description": "Set up Nx Cloud on machines that you control",
"mediaImage": "",
"file": "nx-cloud/features/nx-enterprise-on-prem",
"itemList": [],
"isExternal": false,
"path": "/ci/features/on-premise",
"tags": ["on-premise"]
},
"/ci/concepts": {
"id": "concepts",
"name": "Concepts",
@@ -425,17 +447,6 @@
"mediaImage": "",
"file": "",
"itemList": [
{
"id": "connect-to-cloud",
"name": "Connect Nx Cloud",
"description": "",
"mediaImage": "",
"file": "nx-cloud/recipes/connect-to-cloud",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/set-up/connect-to-cloud",
"tags": []
},
{
"id": "monorepo-ci-azure",
"name": "Setting up Azure Pipelines",
@@ -571,14 +582,14 @@
"tags": []
},
{
"id": "bitbucket-cloud",
"name": "Enable Bitbucket Cloud PR Integration",
"id": "bitbucket",
"name": "Enable Bitbucket PR Integration",
"description": "",
"mediaImage": "",
"file": "nx-cloud/set-up/bitbucket-cloud",
"file": "nx-cloud/set-up/bitbucket",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/source-control-integration/bitbucket-cloud",
"path": "/ci/recipes/source-control-integration/bitbucket",
"tags": []
},
{
@@ -622,6 +633,17 @@
"mediaImage": "",
"file": "",
"itemList": [
{
"id": "on-premise",
"name": "Set up Nx Cloud On-Premise",
"description": "Set up Nx Cloud on machines that you control",
"mediaImage": "",
"file": "nx-cloud/features/nx-enterprise-on-prem",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/enterprise/on-premise/on-premise",
"tags": ["on-premise"]
},
{
"id": "auth-single-admin",
"name": "Authenticate with a Single Admin",
@@ -677,6 +699,17 @@
"path": "/ci/recipes/enterprise/on-premise/auth-bitbucket",
"tags": []
},
{
"id": "auth-bitbucket-data-center",
"name": "Authenticate with BitBucket Data Center",
"description": "",
"mediaImage": "",
"file": "nx-cloud/enterprise/on-premise/auth-bitbucket-data-center",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/enterprise/on-premise/auth-bitbucket-data-center",
"tags": []
},
{
"id": "auth-saml",
"name": "Authenticate via SAML",
@@ -855,17 +888,6 @@
"mediaImage": "",
"file": "",
"itemList": [
{
"id": "connect-to-cloud",
"name": "Connect Nx Cloud",
"description": "",
"mediaImage": "",
"file": "nx-cloud/recipes/connect-to-cloud",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/set-up/connect-to-cloud",
"tags": []
},
{
"id": "monorepo-ci-azure",
"name": "Setting up Azure Pipelines",
@@ -937,17 +959,6 @@
"path": "/ci/recipes/set-up",
"tags": ["distribute-task-execution"]
},
"/ci/recipes/set-up/connect-to-cloud": {
"id": "connect-to-cloud",
"name": "Connect Nx Cloud",
"description": "",
"mediaImage": "",
"file": "nx-cloud/recipes/connect-to-cloud",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/set-up/connect-to-cloud",
"tags": []
},
"/ci/recipes/set-up/monorepo-ci-azure": {
"id": "monorepo-ci-azure",
"name": "Setting up Azure Pipelines",
@@ -1111,14 +1122,14 @@
"tags": []
},
{
"id": "bitbucket-cloud",
"name": "Enable Bitbucket Cloud PR Integration",
"id": "bitbucket",
"name": "Enable Bitbucket PR Integration",
"description": "",
"mediaImage": "",
"file": "nx-cloud/set-up/bitbucket-cloud",
"file": "nx-cloud/set-up/bitbucket",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/source-control-integration/bitbucket-cloud",
"path": "/ci/recipes/source-control-integration/bitbucket",
"tags": []
},
{
@@ -1159,15 +1170,15 @@
"path": "/ci/recipes/source-control-integration/github",
"tags": []
},
"/ci/recipes/source-control-integration/bitbucket-cloud": {
"id": "bitbucket-cloud",
"name": "Enable Bitbucket Cloud PR Integration",
"/ci/recipes/source-control-integration/bitbucket": {
"id": "bitbucket",
"name": "Enable Bitbucket PR Integration",
"description": "",
"mediaImage": "",
"file": "nx-cloud/set-up/bitbucket-cloud",
"file": "nx-cloud/set-up/bitbucket",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/source-control-integration/bitbucket-cloud",
"path": "/ci/recipes/source-control-integration/bitbucket",
"tags": []
},
"/ci/recipes/source-control-integration/gitlab": {
@@ -1206,6 +1217,17 @@
"mediaImage": "",
"file": "",
"itemList": [
{
"id": "on-premise",
"name": "Set up Nx Cloud On-Premise",
"description": "Set up Nx Cloud on machines that you control",
"mediaImage": "",
"file": "nx-cloud/features/nx-enterprise-on-prem",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/enterprise/on-premise/on-premise",
"tags": ["on-premise"]
},
{
"id": "auth-single-admin",
"name": "Authenticate with a Single Admin",
@@ -1261,6 +1283,17 @@
"path": "/ci/recipes/enterprise/on-premise/auth-bitbucket",
"tags": []
},
{
"id": "auth-bitbucket-data-center",
"name": "Authenticate with BitBucket Data Center",
"description": "",
"mediaImage": "",
"file": "nx-cloud/enterprise/on-premise/auth-bitbucket-data-center",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/enterprise/on-premise/auth-bitbucket-data-center",
"tags": []
},
{
"id": "auth-saml",
"name": "Authenticate via SAML",
@@ -1400,6 +1433,17 @@
"mediaImage": "",
"file": "",
"itemList": [
{
"id": "on-premise",
"name": "Set up Nx Cloud On-Premise",
"description": "Set up Nx Cloud on machines that you control",
"mediaImage": "",
"file": "nx-cloud/features/nx-enterprise-on-prem",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/enterprise/on-premise/on-premise",
"tags": ["on-premise"]
},
{
"id": "auth-single-admin",
"name": "Authenticate with a Single Admin",
@@ -1455,6 +1499,17 @@
"path": "/ci/recipes/enterprise/on-premise/auth-bitbucket",
"tags": []
},
{
"id": "auth-bitbucket-data-center",
"name": "Authenticate with BitBucket Data Center",
"description": "",
"mediaImage": "",
"file": "nx-cloud/enterprise/on-premise/auth-bitbucket-data-center",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/enterprise/on-premise/auth-bitbucket-data-center",
"tags": []
},
{
"id": "auth-saml",
"name": "Authenticate via SAML",
@@ -1504,6 +1559,17 @@
"path": "/ci/recipes/enterprise/on-premise",
"tags": []
},
"/ci/recipes/enterprise/on-premise/on-premise": {
"id": "on-premise",
"name": "Set up Nx Cloud On-Premise",
"description": "Set up Nx Cloud on machines that you control",
"mediaImage": "",
"file": "nx-cloud/features/nx-enterprise-on-prem",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/enterprise/on-premise/on-premise",
"tags": ["on-premise"]
},
"/ci/recipes/enterprise/on-premise/auth-single-admin": {
"id": "auth-single-admin",
"name": "Authenticate with a Single Admin",
@@ -1559,6 +1625,17 @@
"path": "/ci/recipes/enterprise/on-premise/auth-bitbucket",
"tags": []
},
"/ci/recipes/enterprise/on-premise/auth-bitbucket-data-center": {
"id": "auth-bitbucket-data-center",
"name": "Authenticate with BitBucket Data Center",
"description": "",
"mediaImage": "",
"file": "nx-cloud/enterprise/on-premise/auth-bitbucket-data-center",
"itemList": [],
"isExternal": false,
"path": "/ci/recipes/enterprise/on-premise/auth-bitbucket-data-center",
"tags": []
},
"/ci/recipes/enterprise/on-premise/auth-saml": {
"id": "auth-saml",
"name": "Authenticate via SAML",
@@ -1964,6 +2041,17 @@
"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,
@@ -1980,5 +2068,16 @@
"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": []
}
}
+123 -75
View File
@@ -284,7 +284,7 @@
"disableCollapsible": false
},
{
"name": "Explore your Workspace",
"name": "Explore Your Workspace",
"path": "/features/explore-graph",
"id": "explore-graph",
"isExternal": false,
@@ -376,14 +376,6 @@
"isExternal": true,
"children": [],
"disableCollapsible": false
},
{
"name": "Set up Nx Cloud On-Premise",
"path": "/ci/features/on-premise",
"id": "on-premise",
"isExternal": true,
"children": [],
"disableCollapsible": false
}
],
"disableCollapsible": false
@@ -408,7 +400,7 @@
"disableCollapsible": false
},
{
"name": "Explore your Workspace",
"name": "Explore Your Workspace",
"path": "/features/explore-graph",
"id": "explore-graph",
"isExternal": false,
@@ -500,14 +492,6 @@
"isExternal": true,
"children": [],
"disableCollapsible": false
},
{
"name": "Set up Nx Cloud On-Premise",
"path": "/ci/features/on-premise",
"id": "on-premise",
"isExternal": true,
"children": [],
"disableCollapsible": false
}
],
"disableCollapsible": false
@@ -560,14 +544,6 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Set up Nx Cloud On-Premise",
"path": "/ci/features/on-premise",
"id": "on-premise",
"isExternal": true,
"children": [],
"disableCollapsible": false
},
{
"name": "Concepts",
"path": "/concepts",
@@ -5169,6 +5145,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Connect Nx Cloud",
"path": "/ci/intro/connect-to-cloud",
"id": "connect-to-cloud",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Tutorials",
"path": "/ci/intro/tutorials",
@@ -5213,6 +5197,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Connect Nx Cloud",
"path": "/ci/intro/connect-to-cloud",
"id": "connect-to-cloud",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Tutorials",
"path": "/ci/intro/tutorials",
@@ -5284,6 +5276,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Nx Cloud AI",
"path": "/ci/features/nx-cloud-ai",
"id": "nx-cloud-ai",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Dynamically Allocate Agents",
"path": "/ci/features/dynamic-agents",
@@ -5307,14 +5307,6 @@
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Set up Nx Cloud On-Premise",
"path": "/ci/features/on-premise",
"id": "on-premise",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"disableCollapsible": false
@@ -5343,6 +5335,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Nx Cloud AI",
"path": "/ci/features/nx-cloud-ai",
"id": "nx-cloud-ai",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Dynamically Allocate Agents",
"path": "/ci/features/dynamic-agents",
@@ -5367,14 +5367,6 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Set up Nx Cloud On-Premise",
"path": "/ci/features/on-premise",
"id": "on-premise",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Concepts",
"path": "/ci/concepts",
@@ -5460,14 +5452,6 @@
"id": "set-up",
"isExternal": false,
"children": [
{
"name": "Connect Nx Cloud",
"path": "/ci/recipes/set-up/connect-to-cloud",
"id": "connect-to-cloud",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Setting up Azure Pipelines",
"path": "/ci/recipes/set-up/monorepo-ci-azure",
@@ -5567,9 +5551,9 @@
"disableCollapsible": false
},
{
"name": "Enable Bitbucket Cloud PR Integration",
"path": "/ci/recipes/source-control-integration/bitbucket-cloud",
"id": "bitbucket-cloud",
"name": "Enable Bitbucket PR Integration",
"path": "/ci/recipes/source-control-integration/bitbucket",
"id": "bitbucket",
"isExternal": false,
"children": [],
"disableCollapsible": false
@@ -5605,6 +5589,14 @@
"id": "on-premise",
"isExternal": false,
"children": [
{
"name": "Set up Nx Cloud On-Premise",
"path": "/ci/recipes/enterprise/on-premise/on-premise",
"id": "on-premise",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Authenticate with a Single Admin",
"path": "/ci/recipes/enterprise/on-premise/auth-single-admin",
@@ -5645,6 +5637,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Authenticate with BitBucket Data Center",
"path": "/ci/recipes/enterprise/on-premise/auth-bitbucket-data-center",
"id": "auth-bitbucket-data-center",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Authenticate via SAML",
"path": "/ci/recipes/enterprise/on-premise/auth-saml",
@@ -5774,14 +5774,6 @@
"id": "set-up",
"isExternal": false,
"children": [
{
"name": "Connect Nx Cloud",
"path": "/ci/recipes/set-up/connect-to-cloud",
"id": "connect-to-cloud",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Setting up Azure Pipelines",
"path": "/ci/recipes/set-up/monorepo-ci-azure",
@@ -5833,14 +5825,6 @@
],
"disableCollapsible": false
},
{
"name": "Connect Nx Cloud",
"path": "/ci/recipes/set-up/connect-to-cloud",
"id": "connect-to-cloud",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Setting up Azure Pipelines",
"path": "/ci/recipes/set-up/monorepo-ci-azure",
@@ -5961,9 +5945,9 @@
"disableCollapsible": false
},
{
"name": "Enable Bitbucket Cloud PR Integration",
"path": "/ci/recipes/source-control-integration/bitbucket-cloud",
"id": "bitbucket-cloud",
"name": "Enable Bitbucket PR Integration",
"path": "/ci/recipes/source-control-integration/bitbucket",
"id": "bitbucket",
"isExternal": false,
"children": [],
"disableCollapsible": false
@@ -5996,9 +5980,9 @@
"disableCollapsible": false
},
{
"name": "Enable Bitbucket Cloud PR Integration",
"path": "/ci/recipes/source-control-integration/bitbucket-cloud",
"id": "bitbucket-cloud",
"name": "Enable Bitbucket PR Integration",
"path": "/ci/recipes/source-control-integration/bitbucket",
"id": "bitbucket",
"isExternal": false,
"children": [],
"disableCollapsible": false
@@ -6031,6 +6015,14 @@
"id": "on-premise",
"isExternal": false,
"children": [
{
"name": "Set up Nx Cloud On-Premise",
"path": "/ci/recipes/enterprise/on-premise/on-premise",
"id": "on-premise",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Authenticate with a Single Admin",
"path": "/ci/recipes/enterprise/on-premise/auth-single-admin",
@@ -6071,6 +6063,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Authenticate with BitBucket Data Center",
"path": "/ci/recipes/enterprise/on-premise/auth-bitbucket-data-center",
"id": "auth-bitbucket-data-center",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Authenticate via SAML",
"path": "/ci/recipes/enterprise/on-premise/auth-saml",
@@ -6172,6 +6172,14 @@
"id": "on-premise",
"isExternal": false,
"children": [
{
"name": "Set up Nx Cloud On-Premise",
"path": "/ci/recipes/enterprise/on-premise/on-premise",
"id": "on-premise",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Authenticate with a Single Admin",
"path": "/ci/recipes/enterprise/on-premise/auth-single-admin",
@@ -6212,6 +6220,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Authenticate with BitBucket Data Center",
"path": "/ci/recipes/enterprise/on-premise/auth-bitbucket-data-center",
"id": "auth-bitbucket-data-center",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Authenticate via SAML",
"path": "/ci/recipes/enterprise/on-premise/auth-saml",
@@ -6247,6 +6263,14 @@
],
"disableCollapsible": false
},
{
"name": "Set up Nx Cloud On-Premise",
"path": "/ci/recipes/enterprise/on-premise/on-premise",
"id": "on-premise",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Authenticate with a Single Admin",
"path": "/ci/recipes/enterprise/on-premise/auth-single-admin",
@@ -6287,6 +6311,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Authenticate with BitBucket Data Center",
"path": "/ci/recipes/enterprise/on-premise/auth-bitbucket-data-center",
"id": "auth-bitbucket-data-center",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Authenticate via SAML",
"path": "/ci/recipes/enterprise/on-premise/auth-saml",
@@ -6583,6 +6615,14 @@
"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
@@ -6594,6 +6634,14 @@
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Explain With AI",
"path": "/ci/troubleshooting/explain-with-ai",
"id": "explain-with-ai",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
]
},
+2 -35
View File
@@ -385,7 +385,7 @@
},
{
"id": "explore-graph",
"name": "Explore your Workspace",
"name": "Explore Your Workspace",
"description": "",
"mediaImage": "",
"file": "shared/features/explore-graph",
@@ -510,17 +510,6 @@
"isExternal": true,
"path": "/ci/features/flaky-tasks",
"tags": []
},
{
"id": "on-premise",
"name": "Set up Nx Cloud On-Premise",
"description": "Set up Nx Cloud on machines that you control",
"mediaImage": "",
"file": "",
"itemList": [],
"isExternal": true,
"path": "/ci/features/on-premise",
"tags": []
}
],
"isExternal": false,
@@ -556,7 +545,7 @@
},
"/features/explore-graph": {
"id": "explore-graph",
"name": "Explore your Workspace",
"name": "Explore Your Workspace",
"description": "",
"mediaImage": "",
"file": "shared/features/explore-graph",
@@ -681,17 +670,6 @@
"isExternal": true,
"path": "/ci/features/flaky-tasks",
"tags": []
},
{
"id": "on-premise",
"name": "Set up Nx Cloud On-Premise",
"description": "Set up Nx Cloud on machines that you control",
"mediaImage": "",
"file": "",
"itemList": [],
"isExternal": true,
"path": "/ci/features/on-premise",
"tags": []
}
],
"isExternal": false,
@@ -764,17 +742,6 @@
"path": "/ci/features/flaky-tasks",
"tags": []
},
"/ci/features/on-premise": {
"id": "on-premise",
"name": "Set up Nx Cloud On-Premise",
"description": "Set up Nx Cloud on machines that you control",
"mediaImage": "",
"file": "",
"itemList": [],
"isExternal": true,
"path": "/ci/features/on-premise",
"tags": []
},
"/concepts": {
"id": "concepts",
"name": "Concepts",
+2 -2
View File
@@ -248,7 +248,7 @@
"description": "",
"file": "shared/features/explore-graph",
"id": "explore-graph",
"name": "Explore your Workspace",
"name": "Explore Your Workspace",
"path": "/features/explore-graph"
},
{
@@ -1134,7 +1134,7 @@
"file": "nx-cloud/features/nx-enterprise-on-prem",
"id": "on-premise",
"name": "Set up Nx Cloud On-Premise",
"path": "/ci/features/on-premise"
"path": "/ci/recipes/enterprise/on-premise/on-premise"
}
],
"docker": [
@@ -121,9 +121,9 @@ Generate a 'src/' directory for Next.js
Type: `string`
Choices: [yes, github, circleci, skip]
Choices: [github, circleci, gitlab, azure, bitbucket-pipelines, skip, yes]
Do you want Nx Cloud to make your CI fast?
Which CI provider would you like to use?
### packageManager
+32 -24
View File
@@ -99,7 +99,7 @@
"file": "shared/features/cache-task-results"
},
{
"name": "Explore your Workspace",
"name": "Explore Your Workspace",
"id": "explore-graph",
"tags": ["explore-graph"],
"file": "shared/features/explore-graph"
@@ -179,14 +179,6 @@
"file": "",
"path": "/ci/features/flaky-tasks",
"isExternal": true
},
{
"name": "Set up Nx Cloud On-Premise",
"id": "on-premise",
"description": "Set up Nx Cloud on machines that you control",
"file": "",
"path": "/ci/features/on-premise",
"isExternal": true
}
]
}
@@ -1572,6 +1564,11 @@
"id": "why-nx-cloud",
"file": "nx-cloud/intro/why-nx-cloud"
},
{
"name": "Connect Nx Cloud",
"id": "connect-to-cloud",
"file": "nx-cloud/intro/connect-to-cloud"
},
{
"name": "Tutorials",
"id": "tutorials",
@@ -1616,6 +1613,12 @@
"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.",
@@ -1633,13 +1636,6 @@
"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": "Set up Nx Cloud On-Premise",
"description": "Set up Nx Cloud on machines that you control",
"id": "on-premise",
"tags": ["on-premise"],
"file": "nx-cloud/features/nx-enterprise-on-prem"
}
]
},
@@ -1684,11 +1680,6 @@
"description": "Learn how to set up Nx Cloud for your workspace.",
"tags": ["distribute-task-execution"],
"itemList": [
{
"name": "Connect Nx Cloud",
"id": "connect-to-cloud",
"file": "nx-cloud/recipes/connect-to-cloud"
},
{
"name": "Setting up Azure Pipelines",
"id": "monorepo-ci-azure",
@@ -1754,9 +1745,9 @@
"file": "nx-cloud/set-up/github"
},
{
"name": "Enable Bitbucket Cloud PR Integration",
"id": "bitbucket-cloud",
"file": "nx-cloud/set-up/bitbucket-cloud"
"name": "Enable Bitbucket PR Integration",
"id": "bitbucket",
"file": "nx-cloud/set-up/bitbucket"
},
{
"name": "Enable GitLab MR Integration",
@@ -1780,6 +1771,13 @@
"id": "on-premise",
"description": "Manage an on-premise installation of Nx Cloud",
"itemList": [
{
"name": "Set up Nx Cloud On-Premise",
"description": "Set up Nx Cloud on machines that you control",
"id": "on-premise",
"tags": ["on-premise"],
"file": "nx-cloud/features/nx-enterprise-on-prem"
},
{
"name": "Authenticate with a Single Admin",
"id": "auth-single-admin",
@@ -1805,6 +1803,11 @@
"id": "auth-bitbucket",
"file": "nx-cloud/enterprise/on-premise/auth-bitbucket"
},
{
"name": "Authenticate with BitBucket Data Center",
"id": "auth-bitbucket-data-center",
"file": "nx-cloud/enterprise/on-premise/auth-bitbucket-data-center"
},
{
"name": "Authenticate via SAML",
"id": "auth-saml",
@@ -1932,6 +1935,11 @@
"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"
}
]
}
@@ -2,15 +2,7 @@
## Troubleshooting and Verbose Logging
To help troubleshoot installations, add the following env variables when starting the container:
```
-e NX_VERBOSE_LOGGING=true
-e NX_API_LOG_LEVEL=DEBUG
-e NX_MONGO_LOG_LEVEL=DEBUG
```
or if using helm set `verboseLogging` to `'true'`:
To help troubleshoot installations set `verboseLogging` to `'true'`:
```yaml
image:
@@ -30,10 +22,6 @@ source [MongoDB Kubernetes Operator](https://github.com/mongodb/mongodb-kubernet
your own deployment of MongoDB. See [the Nx Cloud Kubernetes example](https://github.com/nrwl/nxcloud-k8s-setup) for
more information.
### Using CosmosDB
If you are deploying to Azure, you might have access to CosmosDB. See here for more information.
### Using Mongo Atlas
[Mongo Atlas](https://mongodb.com/) is a great option for deploying MongoDB.
@@ -116,6 +116,7 @@ nxCloudAppURL: 'https://nx-cloud.on.my-domain.ca' # make sure no backslash is at
# we do not support self-hosted bitbucket instances
#bitbucket:
# apiUrl: '' (if using Data Center/on-prem)
# auth:
# enabled: false
@@ -0,0 +1,23 @@
# BitBucket Data Center Auth
This page is for configuring auth via BitBucket Data Center (on-prem). If you are using BitBucket Cloud please refer to the docs [here](/ci/recipes/enterprise/on-premise/auth-bitbucket).
Before creating your container, your Bitbucket Data Center admin will need to create an "Application Link".
## Creating an Application Link
Your BitBucket installation admin will need to navigate to their installation settings:
![Step 1](/nx-cloud/enterprise/on-premise/images/bitbucket_onprem_1.png)
Then "Application Links":
![Step 2](/nx-cloud/enterprise/on-premise/images/bitbucket_onprem_2.png)
And create a new link using the settings below (make sure the callback URL is pointed to your BitBucket installation):
![Step 3](/nx-cloud/enterprise/on-premise/images/bitbucket_onprem_3.png)
## Connect your Nx Cloud installation to your new app
It's now time to enable auth on NxCloud. Refer to the [auth guide](https://github.com/nrwl/nx-cloud-helm/blob/main/AUTH-GUIDE.md) here for instructions on configuring your Helm values file.
@@ -1,8 +1,8 @@
# BitBucket Auth
# BitBucket Cloud Auth
Nx Private Cloud currently only support **public** BitBucket auth. On-prem installation of BitBucket Server are currently not supported.
This page is only for BitBucket Cloud (bitbucket.org). If you have an on-premise version of BitBucket Data Center please refer to the docs [here](/ci/recipes/enterprise/on-premise/auth-bitbucket-data-center).
Before creating your container, you'll need to create a BitBucket "OAuth consumer" for your organisation.
First, you'll need to create a BitBucket "OAuth consumer" for your organisation.
## Creating a BitBucket OAuth consumer
@@ -45,11 +45,4 @@ Once you create, keep a note of the Key and the Secret:
## Connect your Nx Cloud installation to your new app
Provide the following env variables to the `nx-cloud-frontend` container:
- `BITBUCKET_APP_ID`
- `BITBUCKET_APP_SECRET`
{% callout title="Helm Chart Environment Variables" %}
If you are using our Helm chart, you can find all the information you need about env variables in [the Helm chart repository](https://github.com/nrwl/nx-cloud-helm/blob/main/AUTH-GUIDE.md).
{% /callout %}
It's now time to enable auth on NxCloud. Refer to the [auth guide](https://github.com/nrwl/nx-cloud-helm/blob/main/AUTH-GUIDE.md) here for instructions on configuring your Helm values file.
@@ -41,49 +41,4 @@ And then generate a new client secret, and save it somewhere secure (we'll use i
## Configure Nx Cloud Installation
### Using Helm:
```yaml
image:
tag: 'latest'
nxCloudAppURL: 'https://nx-cloud.myorg.com'
github:
auth:
enabled: true
secret:
name: 'cloudsecret'
nxCloudMongoServerEndpoint: 'NX_CLOUD_MONGO_SERVER_ENDPOINT'
githubAuthClientId: 'GITHUB_AUTH_CLIENT_ID'
githubAuthClientSecret: 'GITHUB_AUTH_CLIENT_SECRET'
```
Note that the secret must contain `GITHUB_AUTH_CLIENT_ID` and `GITHUB_AUTH_CLIENT_SECRET` (
see [Nx Cloud Helm Charts](https://github.com/nrwl/nx-cloud-helm) for more context).
### Not using Helm:
Provide the following env variables to the `nx-cloud-frontend` container:
- `GITHUB_AUTH_CLIENT_ID`
- `GITHUB_AUTH_CLIENT_SECRET`
{% callout title="Helm Chart Environment Variables" %}
If you are using our Helm chart, you can find all the information you need about env variables in [the Helm chart repository](https://github.com/nrwl/nx-cloud-helm/blob/main/AUTH-GUIDE.md).
{% /callout %}
## GitHub Enterprise
If you are running a self-hosted version of GitHub (Enterprise Server), you will need to configure one additional
environment variable:
`GITHUB_API_URL=https://custom-github-instance.com`
This will point all auth endpoints to your GitHub server (rather the public one).
{% callout type="check" title="Good to know!" %}
The above environment variable, also helps with setting up the GitHub app integration, so you can have Nx Cloud build
stats directly on your pull request. See full set up instructions [here](/ci/recipes/source-control-integration/github).
{% /callout %}
It's now time to enable auth on NxCloud. Refer to the [auth guide](https://github.com/nrwl/nx-cloud-helm/blob/main/AUTH-GUIDE.md) here for instructions on configuring your Helm values file.
@@ -37,19 +37,4 @@ Once you create, keep a note of the Client ID and the Secret:
## Connect your Nx Cloud installation to your new app
Provide the following env variables to the `nx-cloud-frontend` container:
- `GITLAB_APP_ID`
- `GITLAB_APP_SECRET`
{% callout title="Helm Chart Environment Variables" %}
If you are using our Helm chart, you can find all the information you need about env variables in [the Helm chart repository](https://github.com/nrwl/nx-cloud-helm/blob/main/AUTH-GUIDE.md).
{% /callout %}
## Self-hosted GitLab
If you are running a self-hosted version of GitLab, you will need to configure one additional environment variable:
`GITLAB_API_URL=https://custom-gitlab-instance.com`
This will point all the auth endpoints to your GitLab server (rather the public one).
It's now time to enable auth on NxCloud. Refer to the [auth guide](https://github.com/nrwl/nx-cloud-helm/blob/main/AUTH-GUIDE.md) here for instructions on configuring your Helm values file.
@@ -130,30 +130,6 @@ if you are interested.
![Okta 10](/nx-cloud/enterprise/on-premise/images/saml/okta_10.png)
12. Then add these two env vars to your secrets (see [Helm config](#helm-config) below):
1. `SAML_CERT=<your-cert-string-from-above>`
2. `SAML_ENTRY_POINT=<your-login-url-from-above>`
## Helm config
If you are using [Helm to deploy Nx Cloud](https://github.com/nrwl/nx-cloud-helm) you
will need to configure the below two values, as well as make the `SAML_CERT` and `SAML_ENTRY_POINT`
env vars as secrets:
```yaml
# helm-values.yml
addonUnlockKey: '<your-unlock-key>'
saml:
enabled: true
# secrets.yml
apiVersion: v1
kind: Secret
metadata:
name: nxcloudsecret
type: Opaque
stringData:
SAML_CERT: '-----BEGIN CERTIFICATE-----\nblablablabla\n-----END CERTIFICATE-----\n'
SAML_ENTRY_POINT: 'https://some-oktaurl.com/sso/saml'
```
It's now time to enable auth on NxCloud. Refer to the [auth guide](https://github.com/nrwl/nx-cloud-helm/blob/main/AUTH-GUIDE.md) here for instructions on configuring your Helm values file.
@@ -36,6 +36,7 @@ For instructions on how to set up third-party auth providers, please refer to th
- [GitHub Auth](/ci/recipes/enterprise/on-premise/auth-github)
- [GitLab Auth](/ci/recipes/enterprise/on-premise/auth-gitlab)
- [BitBucket Auth](/ci/recipes/enterprise/on-premise/auth-bitbucket)
- [BitBucket Data Center Auth](/ci/recipes/enterprise/on-premise/auth-bitbucket-data-center)
- [SAML Auth](/ci/recipes/enterprise/on-premise/auth-saml)
## Inviting users
Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

+37
View File
@@ -0,0 +1,37 @@
# 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.
Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

+4
View File
@@ -14,6 +14,10 @@ Implementing an efficient CI setup for monorepos - while crucial - can be challe
[Create an account on Nx Cloud](https://cloud.nx.app) and connect your repository.
```shell
npx nx connect
```
## Learn about Nx on CI
{% cards cols="2" lgCols="4" mdCols="4" smCols="2" %}
+44
View File
@@ -0,0 +1,44 @@
# Connect to Nx Cloud
Nx Cloud directly integrates with your existing CI setup.
![Nx Cloud Overview](/shared/images/nx-cloud/nx-cloud-overview.webp)
In a nutshell, here's how this works:
**Step 1: Connect your workspace to Nx Cloud**
This can be done by signing up on [nx.app](https://nx.app) and then connecting to your git repository.
```shell
npx nx connect
```
**Step 2: Your CI script triggers Nx Cloud**
```yml
- name: Start CI run
run: 'npx nx-cloud start-ci-run --distribute-on="8 linux-medium-js"'
```
Let us generate the workflow file for you, if you don't already have one.
```shell
npx nx g ci-workflow
```
Or, check out our [recipes for the various CI providers](/ci/recipes/set-up).
**Step 3: Run your Nx commands as usual**
```yml
- run: npx nx-cloud record -- nx format:check
- run: npx nx affected -t lint test build
- run: npx nx affected -t e2e-ci --parallel 1
```
All these commands are automatically picked up by Nx Cloud, split up into smaller tasks and distributed across the specified number of machines.
**Step 4: All results are played back automatically**
Nx Cloud automatically plays back all results to your CI system, as if distribution never happened. You can continue doing post-processing on the results, like uploading test reports, deploying artifacts etc.
+4 -34
View File
@@ -5,7 +5,7 @@ src="https://youtu.be/4VI-q943J3o"
title="Fast CI for monorepos"
width="100%" /%}
If CI feels challenging to you, **it might not be your fault**. It's a fundamental issue with how the current, traditional CI execution model works. Nx Cloud adopts a new **task-based** CI model which allows you to overcome both the slowness and unreliability of the current VM-based CI model. _(Dive deeper into the task based CI execution model [in this blog post](https://blog.nrwl.io/reliable-ci-a-new-execution-model-fixing-both-flakiness-and-slowness-6849fd4b4037))_
If CI feels challenging to you, **it might not be your fault**. It's a fundamental issue with how the current, traditional CI execution model works. Nx Cloud adopts a new **task-based** CI model which allows you to overcome both the slowness and unreliability of the current VM-based CI model. _(Dive deeper into the task based CI execution model [in this blog post](/blog/reliable-ci-a-new-execution-model-fixing-both-flakiness-and-slowness))_
Nx Cloud addresses critical aspects of CI/CD, including:
@@ -21,43 +21,13 @@ All this is possible because Nx Cloud directly integrates with Nx and has knowle
Read more about individual features of Nx Cloud in the [features section](/ci/features).
## How does Nx Cloud integrate into my existing CI setup
## Integrate Nx Cloud into my CI setup
Nx Cloud directly integrates with your existing CI setup.
![Nx Cloud Overview](/shared/images/nx-cloud/nx-cloud-overview.webp)
In a nutshell, here's how this works:
**Step 1: Connect your workspace to Nx Cloud**
This can be done by signing up on [nx.app](https://nx.app) and then connecting to your git repository. Read more about all the details [on this doc page](/ci/recipes/set-up/connect-to-cloud).
**Step 2: Your CI script triggers Nx Cloud**
```yml
- name: Start CI run
run: 'npx nx-cloud start-ci-run --distribute-on="8 linux-medium-js"'
```
Check out our [recipes for the various CI providers](/ci/recipes/set-up).
**Step 3: Run your Nx command as usual**
```yml
- run: npx nx-cloud record -- nx format:check
- run: npx nx affected -t lint test build e2e-ci
```
All these commands are automatically picked up by Nx Cloud, split up into smaller tasks and distributed across the specified number of machines.
**Step 4: All results are played back automatically**
Nx Cloud automatically plays back all results to your CI system, as if distribution never happened. You can continue doing post-processing on the results, like uploading test reports, deploying artifacts etc.
Ready to experience fast CI? Read the [connect to Nx Cloud](/ci/intro/connect-to-cloud) page for more details.
## Learn more
- [Blog post: Reliable CI: A new execution model fixing both flakiness and slowness](https://blog.nrwl.io/reliable-ci-a-new-execution-model-fixing-both-flakiness-and-slowness-6849fd4b4037?source=friends_link&sk=6747bb77c92772a5f885a61127cb5c0b)
- [Blog post: Reliable CI: A new execution model fixing both flakiness and slowness](/blog/reliable-ci-a-new-execution-model-fixing-both-flakiness-and-slowness)
- [Live stream: Unlock the secret of fast CI - Hands-on session](https://www.youtube.com/live/rkLKaqLeDa0)
- [Webinar: Nx Agents Walkthrough: Effortlessly Fast CI Built for Monorepos](https://go.nx.dev/march-webinar?utm_source=nx_cloud&utm_medium=nxdocs&utm_campaign=nx_agents&utm_id=devrel)
- [Youtube: 10x Faster e2e Tests](https://www.youtube.com/watch?v=0YxcxIR7QU0)
-33
View File
@@ -1,33 +0,0 @@
# Connect to Nx Cloud
Create an account on [nx.app](https://nx.app). There are several ways to connect your repository to Nx Cloud.
#### Connect Directly Through GitHub
If your repository is hosted on GitHub, we recommend you create an Nx Cloud organization based on your GitHub organization.
![Connect Your VCS Account](/nx-cloud/tutorial/connect-vcs-account.png)
After that, connect you repository.
![Connect Your Repository](/nx-cloud/tutorial/connect-repository.png)
This will send a pull request to your repository that will add the `nxCloudAccessToken` property to `nx.json`.
![Nx Cloud Setup PR](/nx-cloud/tutorial/nx-cloud-setup-pr.png)
This wires up all the CI for you and configures access. Folks who can see your repository can see your workspace on nx.app.
## Manually Connect Your Workspace
If your repository is hosted on a different source control provider, you can also connect to Nx Cloud manually. You'll need to add a source control integration later to enable [Nx Agents](/ci/features/distribute-task-execution).
Run the following command in your repository:
```shell
pnpm nx connect
```
Click the link in the terminal to claim your workspace on [nx.app](https://nx.app).
The command generates an `nxCloudAccessToken` property inside of `nx.json`. This is a read-only token that should be committed to the repository.
+1 -1
View File
@@ -22,5 +22,5 @@ Data is encrypted both at rest and in transit.
- Every communication with the Nx Cloud API is encrypted in transit, including fetching/storing artifacts.
- When using Nx Public Cloud, the stored metadata is encrypted.
- When using Nx Public Cloud and e2e encryption, stored artifacts are encrypted.
- When using the on-prem version of Nx Cloud, the stored metadata is encrypted if you run MongoDB yourself with encryption on (or if you, for instance, use CosmosDB)
- When using the on-prem version of Nx Cloud, the stored metadata is encrypted if you run MongoDB yourself with encryption on
- When using the on-prem version of Nx Cloud, stored artifacts are encrypted using e2e encryption.
+2 -2
View File
@@ -286,7 +286,7 @@ This is one of our biggest Nx Cloud On-Prem releases. It also marks a change in
A few months ago we announced a complete re-design of the Nx Cloud UI! It's faster, easier to use and pleasant to look at! We're now bringing this to On-Prem users as well:
You can read more about it in our [announcement blog post](https://blog.nrwl.io/nx-cloud-3-0-faster-more-efficient-modernized-36ac5ae33b86).
You can read more about it in our [announcement blog post](/blog/nx-cloud-3-0-faster-more-efficient-modernized).
##### Pricing updates
@@ -310,7 +310,7 @@ We completely re-wrote our Task Distribution engine, which should result in much
We've also added a new internal task queueing system, which should further improve the performance of DTE. While this is an implementation detail which will be automatically enabled in future releases, you can test it out today by setting [`enableMessageQueue: true`](https://github.com/nrwl/nx-cloud-helm/blob/main/charts/nx-cloud/values.yaml#L18) in your Helm config.
You can read more about the recent DTE improvements in our [Nx Cloud 3.0 blog post](https://blog.nrwl.io/nx-cloud-3-0-faster-more-efficient-modernized-36ac5ae33b86).
You can read more about the recent DTE improvements in our [Nx Cloud 3.0 blog post](/blog/nx-cloud-3-0-faster-more-efficient-modernized).
##### Misc updates
Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

-35
View File
@@ -1,35 +0,0 @@
# Enable Bitbucket Cloud PR Integration
## Get Started
The Nx Cloud + Bitbucket Cloud Integration lets you access the result of every run—with all its logs and build insights—straight from your PR.
## Connecting Your Workspace
![Access VCS Setup](/nx-cloud/set-up/access-vcs-setup.webp)
Once on the VCS Integrations setup page, select "Bitbucket". You will be prompted to enter the name of your workspace and its repository slug.
Identifying your workspace name and repository slug can be done by looking at the URL from Bitbucket.
```
https://bitbucket.org/[workspace]/[repository-slug]/src/main/
```
For example, the url `https://bitbucket.org/nrwl/large-monorepo/src/main/` has a workspace name of "nrwl", and a repository slug of "large-monorepo".
![Add Bitbucket Cloud Repository](/nx-cloud/set-up/add-bitbucket-cloud-repository.webp)
### Configuring Authentication
#### Using an App Password
To use an app password for authentication, one must be generated with proper permissions. The minimum required permissions are write access to PRs.
![Create App Password](/nx-cloud/set-up/minimal-bitbucket-cloud-app-password.webp)
Once the app password is created, verify the username is correct, paste the value, and then click "Connect". This will verify that Nx Cloud can connect to your repo. Upon a successful test, your configuration is saved, and setup is complete.
{% callout type="note" title="Use the correct username" %}
Make sure that you are using your Bitbucket username, found on the [account settings](https://bitbucket.org/account/settings/) screen, and not your email address.
{% /callout %}
Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

+46
View File
@@ -0,0 +1,46 @@
# Enable Bitbucket Integration
## Get Started
The Nx Cloud + Bitbucket Integration lets you access the result of every run—with all its logs and build insights—straight from your PR.
### Allow NxCloud to authenticate to your BitBucket repository
#### Using an App Password
If you are using BitBucket Cloud (bitbucket.org) and are not self-hosting it, you can enable an ["app password" for authentication](https://support.atlassian.com/bitbucket-cloud/docs/create-an-app-password).
The minimum required permissions are write access to PRs:
![Create App Password](/nx-cloud/set-up/minimal-bitbucket-cloud-app-password.webp)
Once the app password is created, save it in a secure location and then head back to your workspace settings on NxCloud and let's set up a BitBucket integration:
![Access VCS Setup](/nx-cloud/set-up/access-vcs-setup.webp)
1. Fill-in all the required fields for selecting your Bitbucket repository
2. Username is found on the [account settings](https://bitbucket.org/account/settings/) screen (it is not your email address)
3. Paste your app password created earlier into the Access Token box
4. That's it!
#### Using an HTTP Access Tokens
If you are using BitBucket Data Center (on-prem) you need to enable ["HTTP Access Tokens" for authentication](https://confluence.atlassian.com/bitbucketserver/http-access-tokens-939515499.html).
{% callout type="note" title="User linked access tokens" %}
Due to the type of APIs NxCloud needs to call, we need to create an access [**at the user level**](https://confluence.atlassian.com/bitbucketserver/http-access-tokens-939515499.html). Repo level access tokens will not work.
{% /callout %}
The minimum required permissions are write access to the repository:
![Create an HTTP Access Token](/nx-cloud/set-up/bitbucket-data-center-access-token.png)
Once the token is created, save it in a secure location and then head back to your workspace settings on NxCloud and let's set up a BitBucket integration:
![Access VCS Setup](/nx-cloud/set-up/access-vcs-setup.webp)
1. Fill-in all the required fields for selecting your Bitbucket repository
2. Username is found on the [account settings](https://your-bitbucket-instance.com/profile) screen (it is not your email address)
3. Paste your access token created earlier into the Access Token box
4. Make sure you give NxCloud the URL of your BitBucket instance (this can be in the simple form of `https://your-bitbucket-instance.com`)
5. That's it!
Binary file not shown.

After

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

@@ -0,0 +1,78 @@
# 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.
@@ -37,7 +37,7 @@ For a more thorough explanation of how Nx Agents optimizes your CI pipeline, rea
To enable task distribution with Nx Agents, there are two requirements:
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-cloud) and [Azure DevOps](/ci/recipes/source-control-integration/azure-devops). These integrations can be enabled from your [Nx Cloud dashboard](https://nx.app).
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`:
+1 -1
View File
@@ -10,7 +10,7 @@ In this diagram, Teika runs the build once on his machine, then CI, Kimiko and J
## Setting Up Nx Cloud
To use **Nx Replay** you need to connect your workspace to Nx Cloud. See the [connect to Nx Cloud recipe](/ci/recipes/set-up/connect-to-cloud).
To use **Nx Replay** you need to connect your workspace to Nx Cloud. See the [connect to Nx Cloud recipe](/ci/intro/connect-to-cloud).
## See Remote Caching in Action
+24 -22
View File
@@ -17,10 +17,32 @@ Find out more about [why you should use Nx](/getting-started/why-nx) or browse o
## Try Nx Yourself!
```shell
npx create-nx-workspace@latest
{% side-by-side %}
```shell {% title="Create a new workspace" %}
npx create-nx-workspace
```
```shell {% title="Add Nx to an existing workspace" %}
npx nx init
```
{% /side-by-side %}
Also, here are some recipes that give you more details based on the technology stack you're using:
{% cards cols="2" mdCols="4" smCols="2" moreLink="/recipes/adopting-nx" %}
{% link-card title="Add to Existing Monorepo" appearance="small" url="/recipes/adopting-nx/adding-to-monorepo" icon="pnpm" /%}
{% link-card title="Add to Any Project" appearance="small" url="/recipes/adopting-nx/adding-to-existing-project" icon="nx" /%}
{% link-card title="Migrate from Angular CLI" appearance="small" url="/recipes/angular/migration/angular" icon="angular" /%}
{% /cards %}
{% /tab %}
{% /tabs %}
## Learn Nx
{% cards cols="2" lgCols="4" mdCols="4" smCols="2" %}
@@ -57,26 +79,6 @@ npx create-nx-workspace@latest
{% /cards %}
## Have an Existing Project? Add Nx to it!
If you have an existing project and want to adopt Nx or migrate to Nx just run the following command which guides you through the migration process:
```shell
npx nx@latest init
```
Alternatively, here are some recipes that give you more details based on the technology stack you're using:
{% cards cols="2" mdCols="4" smCols="2" moreLink="/recipes/adopting-nx" %}
{% link-card title="Add to Existing Monorepo" appearance="small" url="/recipes/adopting-nx/adding-to-monorepo" icon="pnpm" /%}
{% link-card title="Add to Any Project" appearance="small" url="/recipes/adopting-nx/adding-to-existing-project" icon="nx" /%}
{% link-card title="Migrate from Angular CLI" appearance="small" url="/recipes/angular/migration/angular" icon="angular" /%}
{% /cards %}
## Pick Your Stack!
{% cards cols="3" lgCols="8" mdCols="6" smCols="5" moreLink="/showcase/example-repos" %}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 458 KiB

+7 -4
View File
@@ -16,7 +16,7 @@
- [Features](/features)
- [Run Tasks](/features/run-tasks)
- [Cache Task Results](/features/cache-task-results)
- [Explore your Workspace](/features/explore-graph)
- [Explore Your Workspace](/features/explore-graph)
- [Generate Code](/features/generate-code)
- [Automate Updating Dependencies](/features/automate-updating-dependencies)
- [Enforce Module Boundaries](/features/enforce-module-boundaries)
@@ -245,6 +245,7 @@
- [Intro](/ci/intro)
- [CI with Nx](/ci/intro/ci-with-nx)
- [Why Nx Cloud?](/ci/intro/why-nx-cloud)
- [Connect Nx Cloud](/ci/intro/connect-to-cloud)
- [Tutorials](/ci/intro/tutorials)
- [Circle CI with Nx](/ci/intro/tutorials/circle)
- [GitHub Actions with Nx](/ci/intro/tutorials/github-actions)
@@ -252,10 +253,10 @@
- [Run Only Tasks Affected by a PR](/ci/features/affected)
- [Use Remote Caching (Nx Replay)](/ci/features/remote-cache)
- [Distribute Task Execution (Nx Agents)](/ci/features/distribute-task-execution)
- [Nx Cloud AI](/ci/features/nx-cloud-ai)
- [Dynamically Allocate Agents](/ci/features/dynamic-agents)
- [Automatically Split E2E Tasks (Atomizer)](/ci/features/split-e2e-tasks)
- [Identify and Re-run Flaky Tasks](/ci/features/flaky-tasks)
- [Set up Nx Cloud On-Premise](/ci/features/on-premise)
- [Concepts](/ci/concepts)
- [The Building Blocks of Fast CI](/ci/concepts/building-blocks-fast-ci)
- [Reduce Wasted Time in CI](/ci/concepts/reduce-waste)
@@ -263,7 +264,6 @@
- [Cache Security](/ci/concepts/cache-security)
- [Recipes](/ci/recipes)
- [Set Up CI](/ci/recipes/set-up)
- [Connect Nx Cloud](/ci/recipes/set-up/connect-to-cloud)
- [Setting up Azure Pipelines](/ci/recipes/set-up/monorepo-ci-azure)
- [Setting up CircleCI](/ci/recipes/set-up/monorepo-ci-circle-ci)
- [Setting up GitHub Actions](/ci/recipes/set-up/monorepo-ci-github-actions)
@@ -276,16 +276,18 @@
- [Enable End to End Encryption](/ci/recipes/security/encryption)
- [Source Control Integration](/ci/recipes/source-control-integration)
- [Enable GitHub PR Integration](/ci/recipes/source-control-integration/github)
- [Enable Bitbucket Cloud PR Integration](/ci/recipes/source-control-integration/bitbucket-cloud)
- [Enable Bitbucket PR Integration](/ci/recipes/source-control-integration/bitbucket)
- [Enable GitLab MR Integration](/ci/recipes/source-control-integration/gitlab)
- [Enable Azure DevOps PR Integration](/ci/recipes/source-control-integration/azure-devops)
- [Enterprise](/ci/recipes/enterprise)
- [On-Premise](/ci/recipes/enterprise/on-premise)
- [Set up Nx Cloud On-Premise](/ci/recipes/enterprise/on-premise/on-premise)
- [Authenticate with a Single Admin](/ci/recipes/enterprise/on-premise/auth-single-admin)
- [Authenticate with GitHub](/ci/recipes/enterprise/on-premise/auth-github)
- [On-Prem VM Setup](/ci/recipes/enterprise/on-premise/ami-setup)
- [Authenticate with GitLab](/ci/recipes/enterprise/on-premise/auth-gitlab)
- [Authenticate with BitBucket](/ci/recipes/enterprise/on-premise/auth-bitbucket)
- [Authenticate with BitBucket Data Center](/ci/recipes/enterprise/on-premise/auth-bitbucket-data-center)
- [Authenticate via SAML](/ci/recipes/enterprise/on-premise/auth-saml)
- [Authenticate via SAML on Managed Version](/ci/recipes/enterprise/on-premise/auth-saml-managed)
- [Advanced Configuration](/ci/recipes/enterprise/on-premise/advanced-config)
@@ -309,6 +311,7 @@
- [Release Notes](/ci/reference/release-notes)
- [Troubleshooting](/ci/troubleshooting)
- [CI Execution Failed](/ci/troubleshooting/ci-execution-failed)
- [Explain With AI](/ci/troubleshooting/explain-with-ai)
- Nx-api
- [angular](/nx-api/angular)
+1 -1
View File
@@ -1307,5 +1307,5 @@ Also, make sure you
- [Join the Official Nx Discord Server](https://go.nx.dev/community) to ask questions and find out the latest news about Nx.
- [Follow Nx on Twitter](https://twitter.com/nxdevtools) to stay up to date with Nx news
- [Read our Nx blog](https://blog.nrwl.io/)
- [Read our Nx blog](/blog)
- [Subscribe to our Youtube channel](https://www.youtube.com/@nxdevtools) for demos and Nx insights
+1 -1
View File
@@ -1114,5 +1114,5 @@ Also, make sure you
- [Join the Official Nx Discord Server](https://go.nx.dev/community) to ask questions and find out the latest news about Nx.
- [Follow Nx on Twitter](https://twitter.com/nxdevtools) to stay up to date with Nx news
- [Read our Nx blog](https://blog.nrwl.io/)
- [Read our Nx blog](/blog)
- [Subscribe to our Youtube channel](https://www.youtube.com/@nxdevtools) for demos and Nx insights
+1 -1
View File
@@ -343,5 +343,5 @@ Connect with the rest of the Nx community with these resources:
- [Join the Official Nx Discord Server](https://go.nx.dev/community) to ask questions and find out the latest news about
Nx.
- [Follow Nx on Twitter](https://twitter.com/nxdevtools) to stay up to date with Nx news
- [Read our Nx blog](https://blog.nrwl.io/)
- [Read our Nx blog](/blog)
- [Subscribe to our Youtube channel](https://www.youtube.com/@nxdevtools) for demos and Nx insights
+1 -1
View File
@@ -444,5 +444,5 @@ Connect with the rest of the Nx community with these resources:
- [Join the Official Nx Discord Server](https://go.nx.dev/community) to ask questions and find out the latest news about Nx.
- [Follow Nx on Twitter](https://twitter.com/nxdevtools) to stay up to date with Nx news
- [Read our Nx blog](https://blog.nrwl.io/)
- [Read our Nx blog](/blog)
- [Subscribe to our Youtube channel](https://www.youtube.com/@nxdevtools) for demos and Nx insights
+3 -5
View File
@@ -509,7 +509,7 @@ export default App;
Serving your app (`nx serve react-store`) and then navigating to `/products` should give you the following result:
![products route](/shared/images/tutorial-react-standalone/react-tutorial-products-route.png)
![products route](/shared/tutorials/react-tutorial-products-route.png)
Let's apply the same for our `orders` library.
@@ -1026,9 +1026,7 @@ NX Ran target lint for 7 projects (2s)
- nx run products:lint
```
If you have the ESLint plugin installed in your IDE you should immediately see an error:
![ESLint module boundary error](/shared/images/tutorial-react-standalone/react-standalone-module-boundaries.png)
If you have the ESLint plugin installed in your IDE you should also immediately see an error.
Learn more about how to [enforce module boundaries](/features/enforce-module-boundaries).
@@ -1106,5 +1104,5 @@ Also, make sure you
- [Join the Official Nx Discord Server](https://go.nx.dev/community) to ask questions and find out the latest news about Nx.
- [Follow Nx on Twitter](https://twitter.com/nxdevtools) to stay up to date with Nx news
- [Read our Nx blog](https://blog.nrwl.io/)
- [Read our Nx blog](/blog)
- [Subscribe to our Youtube channel](https://www.youtube.com/@nxdevtools) for demos and Nx insights
@@ -0,0 +1,248 @@
{
"project": {
"name": "react-app",
"type": "lib",
"data": {
"root": ".",
"targets": {
"vite:build": {
"options": {
"cwd": ".",
"command": "vite build"
},
"cache": true,
"dependsOn": ["^vite:build"],
"inputs": [
"default",
"^default",
{
"externalDependencies": ["vite"]
}
],
"outputs": ["{projectRoot}/dist"],
"executor": "nx:run-commands",
"configurations": {}
},
"build": {
"executor": "nx:run-script",
"metadata": {
"scriptContent": "nx vite:build",
"runCommand": "npm run build"
},
"cache": true,
"dependsOn": ["typecheck"],
"options": {
"script": "build"
},
"configurations": {}
}
},
"sourceRoot": ".",
"name": "react-app",
"projectType": "library",
"metadata": {
"targetGroups": {
"NPM Scripts": ["build"]
}
},
"implicitDependencies": [],
"tags": []
}
},
"sourceMap": {
"root": ["package.json", "nx/core/package-json-workspaces"],
"targets": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:build": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:build.options": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:build.cache": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:build.dependsOn": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:build.inputs": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:build.outputs": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:build.executor": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:build.options.cwd": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:build.options.command": ["vite.config.ts", "@nx/vite/plugin"],
"targets.serve": ["vite.config.ts", "@nx/vite/plugin"],
"targets.serve.options": ["vite.config.ts", "@nx/vite/plugin"],
"targets.serve.executor": ["vite.config.ts", "@nx/vite/plugin"],
"targets.serve.options.cwd": ["vite.config.ts", "@nx/vite/plugin"],
"targets.serve.options.command": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:preview": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:preview.options": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:preview.executor": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:preview.options.cwd": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:preview.options.command": [
"vite.config.ts",
"@nx/vite/plugin"
],
"targets.serve-static": ["vite.config.ts", "@nx/vite/plugin"],
"targets.serve-static.executor": ["vite.config.ts", "@nx/vite/plugin"],
"targets.serve-static.options": ["vite.config.ts", "@nx/vite/plugin"],
"targets.serve-static.options.buildTarget": [
"vite.config.ts",
"@nx/vite/plugin"
],
"targets.serve-static.options.spa": ["vite.config.ts", "@nx/vite/plugin"],
"targets.eslint:lint": [".eslintrc.cjs", "@nx/eslint/plugin"],
"targets.eslint:lint.cache": [".eslintrc.cjs", "@nx/eslint/plugin"],
"targets.eslint:lint.options": [".eslintrc.cjs", "@nx/eslint/plugin"],
"targets.eslint:lint.inputs": [".eslintrc.cjs", "@nx/eslint/plugin"],
"targets.eslint:lint.outputs": [".eslintrc.cjs", "@nx/eslint/plugin"],
"targets.eslint:lint.executor": [".eslintrc.cjs", "@nx/eslint/plugin"],
"targets.eslint:lint.options.cwd": [".eslintrc.cjs", "@nx/eslint/plugin"],
"targets.eslint:lint.options.command": [
".eslintrc.cjs",
"@nx/eslint/plugin"
],
"targets.typecheck": ["package.json", "nx/core/package-json-workspaces"],
"targets.typecheck.executor": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.typecheck.options": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.typecheck.metadata": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.typecheck.cache": ["nx.json", "nx/core/target-defaults"],
"targets.typecheck.options.script": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.typecheck.metadata.scriptContent": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.typecheck.metadata.runCommand": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build": ["package.json", "nx/core/package-json-workspaces"],
"targets.build.executor": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build.options": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build.metadata": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build.cache": ["nx.json", "nx/core/target-defaults"],
"targets.build.options.script": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build.metadata.scriptContent": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build.metadata.runCommand": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.lint": ["package.json", "nx/core/package-json-workspaces"],
"targets.lint.executor": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.lint.options": ["package.json", "nx/core/package-json-workspaces"],
"targets.lint.metadata": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.lint.cache": ["nx.json", "nx/core/target-defaults"],
"targets.lint.options.script": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.lint.metadata.scriptContent": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.lint.metadata.runCommand": [
"package.json",
"nx/core/package-json-workspaces"
],
"sourceRoot": ["package.json", "nx/core/package-json-workspaces"],
"name": ["package.json", "nx/core/package-json-workspaces"],
"projectType": ["package.json", "nx/core/package-json-workspaces"],
"metadata.targetGroups": [
"package.json",
"nx/core/package-json-workspaces"
],
"metadata.targetGroups.NPM Scripts": [
"package.json",
"nx/core/package-json-workspaces"
],
"metadata.targetGroups.NPM Scripts.0": [
"package.json",
"nx/core/package-json-workspaces"
],
"metadata.targetGroups.NPM Scripts.1": [
"package.json",
"nx/core/package-json-workspaces"
],
"metadata.targetGroups.NPM Scripts.2": [
"package.json",
"nx/core/package-json-workspaces"
],
"metadata.targetGroups.NPM Scripts.3": [
"package.json",
"nx/core/package-json-workspaces"
],
"metadata.targetGroups.NPM Scripts.4": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.dev": ["package.json", "nx/core/package-json-workspaces"],
"targets.dev.executor": ["package.json", "nx/core/package-json-workspaces"],
"targets.dev.options": ["package.json", "nx/core/package-json-workspaces"],
"targets.dev.metadata": ["package.json", "nx/core/package-json-workspaces"],
"targets.dev.options.script": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.dev.metadata.scriptContent": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.dev.metadata.runCommand": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build.dependsOn": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.preview": ["package.json", "nx/core/package-json-workspaces"],
"targets.preview.executor": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.preview.options": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.preview.metadata": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.preview.options.script": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.preview.metadata.scriptContent": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.preview.metadata.runCommand": [
"package.json",
"nx/core/package-json-workspaces"
]
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 166 KiB

+186
View File
@@ -0,0 +1,186 @@
{
"project": {
"name": "vue-app",
"type": "lib",
"data": {
"root": ".",
"targets": {
"vite:build": {
"options": {
"cwd": ".",
"command": "vite build"
},
"cache": true,
"dependsOn": ["^vite:build"],
"inputs": [
"default",
"^default",
{
"externalDependencies": ["vite"]
}
],
"outputs": ["{projectRoot}/dist"],
"executor": "nx:run-commands",
"configurations": {}
},
"build-only": {
"executor": "nx:run-script",
"metadata": {
"scriptContent": "nx vite:build",
"runCommand": "npm run build-only"
},
"outputs": ["{projectRoot}/dist"],
"cache": true,
"options": {
"script": "build-only"
},
"configurations": {}
},
"build": {
"executor": "nx:run-script",
"metadata": {
"scriptContent": "nx exec -- echo 'Ran type-check and build-only'",
"runCommand": "npm run build"
},
"dependsOn": [
"type-check",
{
"target": "build-only",
"params": "forward"
}
],
"options": {
"script": "build"
},
"configurations": {}
}
},
"sourceRoot": ".",
"name": "vue-app",
"projectType": "library",
"metadata": {
"targetGroups": {
"NPM Scripts": ["build", "build-only"]
}
},
"implicitDependencies": [],
"tags": []
}
},
"sourceMap": {
"root": ["package.json", "nx/core/package-json-workspaces"],
"targets": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:build": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:build.options": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:build.cache": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:build.dependsOn": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:build.inputs": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:build.outputs": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:build.executor": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:build.options.cwd": ["vite.config.ts", "@nx/vite/plugin"],
"targets.vite:build.options.command": ["vite.config.ts", "@nx/vite/plugin"],
"targets.build-only": ["package.json", "nx/core/package-json-workspaces"],
"targets.build-only.executor": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build-only.options": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build-only.metadata": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build-only.outputs": ["nx.json", "nx/core/target-defaults"],
"targets.build-only.cache": ["nx.json", "nx/core/target-defaults"],
"targets.build-only.options.script": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build-only.metadata.scriptContent": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build-only.metadata.runCommand": [
"package.json",
"nx/core/package-json-workspaces"
],
"sourceRoot": ["package.json", "nx/core/package-json-workspaces"],
"name": ["package.json", "nx/core/package-json-workspaces"],
"projectType": ["package.json", "nx/core/package-json-workspaces"],
"metadata.targetGroups": [
"package.json",
"nx/core/package-json-workspaces"
],
"metadata.targetGroups.NPM Scripts": [
"package.json",
"nx/core/package-json-workspaces"
],
"metadata.targetGroups.NPM Scripts.0": [
"package.json",
"nx/core/package-json-workspaces"
],
"metadata.targetGroups.NPM Scripts.1": [
"package.json",
"nx/core/package-json-workspaces"
],
"metadata.targetGroups.NPM Scripts.2": [
"package.json",
"nx/core/package-json-workspaces"
],
"metadata.targetGroups.NPM Scripts.3": [
"package.json",
"nx/core/package-json-workspaces"
],
"metadata.targetGroups.NPM Scripts.4": [
"package.json",
"nx/core/package-json-workspaces"
],
"metadata.targetGroups.NPM Scripts.5": [
"package.json",
"nx/core/package-json-workspaces"
],
"metadata.targetGroups.NPM Scripts.6": [
"package.json",
"nx/core/package-json-workspaces"
],
"metadata.targetGroups.NPM Scripts.7": [
"package.json",
"nx/core/package-json-workspaces"
],
"metadata.targetGroups.NPM Scripts.8": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build": ["package.json", "nx/core/package-json-workspaces"],
"targets.build.executor": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build.metadata": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build.dependsOn": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build.options": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build.options.script": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build.metadata.scriptContent": [
"package.json",
"nx/core/package-json-workspaces"
],
"targets.build.metadata.runCommand": [
"package.json",
"nx/core/package-json-workspaces"
]
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

File diff suppressed because it is too large Load Diff
@@ -0,0 +1,29 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Node Applications + webpack should generate a Dockerfile 1`] = `
"# This file is generated by Nx.
#
# Build the docker image with \`npx nx docker-build docker-express-app\`.
# Tip: Modify "docker-build" options in project.json to change docker build args.
#
# Run the container with \`docker run -p 3000:3000 -t docker-express-app\`.
FROM docker.io/node:lts-alpine
ENV HOST=0.0.0.0
ENV PORT=3000
WORKDIR /app
RUN addgroup --system docker-express-app && \\
adduser --system -G docker-express-app docker-express-app
COPY dist/apps/docker-express-app docker-express-app/
RUN chown -R docker-express-app:docker-express-app .
# You can remove this install step if you build with \`--bundle\` option.
# The bundled output will include external dependencies.
RUN npm --prefix docker-express-app --omit=dev -f install
CMD [ "node", "docker-express-app" ]
"
`;
+87 -61
View File
@@ -2,6 +2,7 @@ import {
checkFilesDoNotExist,
checkFilesExist,
cleanupProject,
getSelectedPackageManager,
killPort,
newProject,
promisifiedTreeKill,
@@ -14,11 +15,19 @@ import {
} from '@nx/e2e/utils';
import { join } from 'path';
xdescribe('Node Applications + webpack', () => {
describe('Node Applications + webpack', () => {
let proj: string;
const selectedPm = getSelectedPackageManager();
// TODO(nicholas): Look into how this can work with npm instead of forcing pnpm.
beforeAll(() => {
proj = newProject({
packages: ['@nx/node'],
// npm has resolution for ajv some packages require ajv6 and some require ajv8 and npm resolves it to ajv6 (Error: Cannot find module 'ajv/dist/compile/codegen')
// - ajv@6 (fork-ts-checker-webpack-plugin, terser-webpack-plugin, webpack)
// - ajv@8 (babel-loader)
// Solution is to use pnpm or run fix it via npm ex.(npm dedupe --force)
packageManager: selectedPm === 'npm' ? 'pnpm' : selectedPm,
});
});
@@ -47,10 +56,10 @@ xdescribe('Node Applications + webpack', () => {
}
}
async function runE2eTests(appName: string) {
process.env.PORT = '5000';
async function runE2eTests(appName: string, port: number = 5000) {
process.env.PORT = `${port}`;
const childProcess = await runCommandUntil(`serve ${appName}`, (output) => {
return output.includes('http://localhost:5000');
return output.includes(`http://localhost:${port}`);
});
const result = runCLI(`e2e ${appName}-e2e --verbose`);
expect(result).toContain('Setting up...');
@@ -58,13 +67,11 @@ xdescribe('Node Applications + webpack', () => {
expect(result).toContain('Successfully ran target e2e');
await promisifiedTreeKill(childProcess.pid, 'SIGKILL');
await killPort(5000);
await killPort(port);
process.env.PORT = '';
}
// Disabled due to flakiness of ajv disabled (Error: Cannot find module 'ajv/dist/compile/codegen')
// TODO: (nicholas) Re-enable when the flakiness is resolved
xit('should generate an app using webpack', async () => {
describe('frameworks', () => {
const testLib1 = uniq('test1');
const testLib2 = uniq('test2');
const expressApp = uniq('expressapp');
@@ -72,79 +79,98 @@ xdescribe('Node Applications + webpack', () => {
const koaApp = uniq('koaapp');
const nestApp = uniq('nest');
runCLI(`generate @nx/node:lib ${testLib1}`);
runCLI(`generate @nx/node:lib ${testLib2} --importPath=@acme/test2`);
runCLI(
`generate @nx/node:app ${expressApp} --framework=express --no-interactive`
);
runCLI(
`generate @nx/node:app ${fastifyApp} --framework=fastify --no-interactive`
);
runCLI(`generate @nx/node:app ${koaApp} --framework=koa --no-interactive`);
runCLI(
`generate @nx/node:app ${nestApp} --framework=nest --bundler=webpack --no-interactive`
);
beforeAll(() => {
runCLI(`generate @nx/node:lib ${testLib1}`);
runCLI(`generate @nx/node:lib ${testLib2} --importPath=@acme/test2`);
runCLI(
`generate @nx/node:app ${expressApp} --framework=express --port=7000 --no-interactive`
);
runCLI(
`generate @nx/node:app ${fastifyApp} --framework=fastify --port=7001 --no-interactive`
);
runCLI(
`generate @nx/node:app ${koaApp} --framework=koa --port=7002 --no-interactive`
);
runCLI(
`generate @nx/node:app ${nestApp} --framework=nest --port=7003 --bundler=webpack --no-interactive`
);
// Use esbuild by default
checkFilesDoNotExist(`apps/${expressApp}/webpack.config.js`);
checkFilesDoNotExist(`apps/${fastifyApp}/webpack.config.js`);
checkFilesDoNotExist(`apps/${koaApp}/webpack.config.js`);
addLibImport(expressApp, testLib1);
addLibImport(expressApp, testLib2, '@acme/test2');
addLibImport(fastifyApp, testLib1);
addLibImport(fastifyApp, testLib2, '@acme/test2');
addLibImport(koaApp, testLib1);
addLibImport(koaApp, testLib2, '@acme/test2');
// Uses only webpack
checkFilesExist(`apps/${nestApp}/webpack.config.js`);
addLibImport(nestApp, testLib1);
addLibImport(nestApp, testLib2, '@acme/test2');
});
expect(() => runCLI(`lint ${expressApp}`)).not.toThrow();
expect(() => runCLI(`lint ${fastifyApp}`)).not.toThrow();
expect(() => runCLI(`lint ${koaApp}`)).not.toThrow();
expect(() => runCLI(`lint ${nestApp}`)).not.toThrow();
it('should generate an app defaults using webpack or esbuild', async () => {
// Use esbuild by default
checkFilesDoNotExist(`apps/${expressApp}/webpack.config.js`);
checkFilesDoNotExist(`apps/${fastifyApp}/webpack.config.js`);
checkFilesDoNotExist(`apps/${koaApp}/webpack.config.js`);
expect(() => runCLI(`lint ${expressApp}-e2e`)).not.toThrow();
expect(() => runCLI(`lint ${fastifyApp}-e2e`)).not.toThrow();
expect(() => runCLI(`lint ${koaApp}-e2e`)).not.toThrow();
expect(() => runCLI(`lint ${nestApp}-e2e`)).not.toThrow();
// Uses only webpack
checkFilesExist(`apps/${nestApp}/webpack.config.js`);
// Only Fastify generates with unit tests since it supports them without additional libraries.
expect(() => runCLI(`test ${fastifyApp}`)).not.toThrow();
expect(() => runCLI(`lint ${expressApp}`)).not.toThrow();
expect(() => runCLI(`lint ${fastifyApp}`)).not.toThrow();
expect(() => runCLI(`lint ${koaApp}`)).not.toThrow();
expect(() => runCLI(`lint ${nestApp}`)).not.toThrow();
// https://github.com/nrwl/nx/issues/16601
const nestMainContent = readFile(`apps/${nestApp}/src/main.ts`);
updateFile(
`apps/${nestApp}/src/main.ts`,
`
expect(() => runCLI(`lint ${expressApp}-e2e`)).not.toThrow();
expect(() => runCLI(`lint ${fastifyApp}-e2e`)).not.toThrow();
expect(() => runCLI(`lint ${koaApp}-e2e`)).not.toThrow();
expect(() => runCLI(`lint ${nestApp}-e2e`)).not.toThrow();
// Only Fastify generates with unit tests since it supports them without additional libraries.
expect(() => runCLI(`test ${fastifyApp}`)).not.toThrow();
// https://github.com/nrwl/nx/issues/16601
const nestMainContent = readFile(`apps/${nestApp}/src/main.ts`);
updateFile(
`apps/${nestApp}/src/main.ts`,
`
${nestMainContent}
// Make sure this is not replaced during build time
console.log('env: ' + process.env['NODE_ENV']);
`
);
runCLI(`build ${nestApp}`);
expect(readFile(`dist/apps/${nestApp}/main.js`)).toContain(
`'env: ' + process.env['NODE_ENV']`
);
);
runCLI(`build ${nestApp}`);
expect(readFile(`dist/apps/${nestApp}/main.js`)).toContain(
`'env: ' + process.env['NODE_ENV']`
);
}, 300_000);
addLibImport(expressApp, testLib1);
addLibImport(expressApp, testLib2, '@acme/test2');
addLibImport(fastifyApp, testLib1);
addLibImport(fastifyApp, testLib2, '@acme/test2');
addLibImport(koaApp, testLib1);
addLibImport(koaApp, testLib2, '@acme/test2');
it('should e2e test express app', async () => {
await runE2eTests(expressApp, 7000);
});
addLibImport(nestApp, testLib1);
addLibImport(nestApp, testLib2, '@acme/test2');
it('should e2e test fastify app', async () => {
await runE2eTests(fastifyApp, 7001);
});
await runE2eTests(expressApp);
await runE2eTests(fastifyApp);
await runE2eTests(koaApp);
await runE2eTests(nestApp);
}, 900_000);
it('should e2e test koa app', async () => {
await runE2eTests(koaApp, 7002);
});
it('should e2e test nest app', async () => {
await runE2eTests(nestApp, 7003);
});
});
it('should generate a Dockerfile', async () => {
const expressApp = uniq('expressapp');
const expressApp = 'docker-express-app'; // needs to be consistent for the Dockerfile snapshot
runCLI(
`generate @nx/node:app ${expressApp} --framework=express --docker --no-interactive`
`generate @nx/node:app ${expressApp} --framework=express --docker --no-interactive`
);
checkFilesExist(`apps/${expressApp}/Dockerfile`);
const dockerFile = readFile(`apps/${expressApp}/Dockerfile`);
expect(dockerFile).toMatchSnapshot();
}, 300_000);
it('should support waitUntilTargets for serve target', async () => {
+6
View File
@@ -334,6 +334,12 @@ describe('Nx Commands', () => {
}
}, 300000);
});
it('should show help if no command provided', () => {
const output = runCLI('', { silenceError: true });
expect(output).toContain('Smart Monorepos · Fast CI');
expect(output).toContain('Commands:');
});
});
// TODO(colum): Change the fetcher to allow incremental migrations over multiple versions, allowing for beforeAll
+21
View File
@@ -198,4 +198,25 @@ describe('Rollup Plugin', () => {
checkFilesExist(`dist/test/index.js`);
});
it('should always generate package.json even if the plugin is removed from rollup config file (Nx < 19.4 behavior)', () => {
const jsLib = uniq('jslib');
runCLI(`generate @nx/js:lib ${jsLib} --bundler rollup --verbose`);
updateFile(
`libs/${jsLib}/rollup.config.js`,
`module.exports = (config) => ({
...config,
// Filter out the plugin, but the @nx/rollup:rollup executor should add it back
plugins: config.plugins.filter((p) => p.name !== 'rollup-plugin-nx-generate-package-json'),
})`
);
updateJson(join('libs', jsLib, 'project.json'), (config) => {
config.targets.build.options.rollupConfig = `libs/${jsLib}/rollup.config.js`;
return config;
});
expect(() => runCLI(`build ${jsLib}`)).not.toThrow();
checkFilesExist(`dist/libs/${jsLib}/package.json`);
});
});
+12 -35
View File
@@ -1,13 +1,8 @@
import {
ClipboardDocumentCheckIcon,
ClipboardDocumentIcon,
} from '@heroicons/react/24/outline';
// @ts-ignore
import { CopyToClipboard } from 'react-copy-to-clipboard';
// @ts-ignore
import SyntaxHighlighter, { createElement } from 'react-syntax-highlighter';
import { JSX, ReactNode, useEffect, useMemo, useState } from 'react';
import { JSX, ReactNode, useMemo } from 'react';
import { twMerge } from 'tailwind-merge';
import { CopyToClipboardButton } from '@nx/graph/ui-components';
export function JsonCodeBlockPreTag({
children,
@@ -30,45 +25,27 @@ export function JsonCodeBlockPreTag({
export interface JsonCodeBlockProps {
data: any;
renderSource: (propertyName: string) => ReactNode;
copyTooltipText: string;
}
export function JsonCodeBlock(props: JsonCodeBlockProps): JSX.Element {
const [copied, setCopied] = useState(false);
const jsonString = useMemo(
() => JSON.stringify(props.data, null, 2),
[props.data]
);
useEffect(() => {
if (!copied) return;
const t = setTimeout(() => {
setCopied(false);
}, 3000);
return () => clearTimeout(t);
}, [copied]);
return (
<div className="code-block group relative w-full">
<div className="absolute right-0 top-0 z-10 flex">
<CopyToClipboard
<CopyToClipboardButton
text={jsonString}
onCopy={() => {
setCopied(true);
}}
>
<button
type="button"
className={twMerge(
'not-prose flex',
'border border-slate-200 bg-slate-50/50 p-2 dark:border-slate-700 dark:bg-slate-800/60',
'opacity-0 transition-opacity group-hover:opacity-100'
)}
>
{copied ? (
<ClipboardDocumentCheckIcon className="h-5 w-5 text-blue-500 dark:text-sky-500" />
) : (
<ClipboardDocumentIcon className="h-5 w-5" />
)}
</button>
</CopyToClipboard>
tooltipAlignment="right"
tooltipText={props.copyTooltipText}
className={twMerge(
'not-prose flex',
'border border-slate-200 bg-slate-50/50 p-2 dark:border-slate-700 dark:bg-slate-800/60',
'opacity-0 transition-opacity group-hover:opacity-100'
)}
/>
</div>
<SyntaxHighlighter
language="json"
+1
View File
@@ -1,3 +1,4 @@
export * from './lib/copy-to-clipboard-button';
export * from './lib/debounced-text-input';
export * from './lib/tag';
export * from './lib/dropdown';
@@ -0,0 +1,20 @@
import type { Meta, StoryObj } from '@storybook/react';
import {
CopyToClipboardButton,
CopyToClipboardButtonProps,
} from './copy-to-clipboard-button';
const meta: Meta<typeof CopyToClipboardButton> = {
component: CopyToClipboardButton,
title: 'CopyToClipboardButton',
};
export default meta;
type Story = StoryObj<typeof CopyToClipboardButton>;
export const Simple: Story = {
args: {
text: 'Hello, world!',
tooltipAlignment: 'left',
} as CopyToClipboardButtonProps,
};
@@ -0,0 +1,61 @@
// @ts-ignore
import { CopyToClipboard } from 'react-copy-to-clipboard';
import { JSX, ReactNode, useEffect, useState } from 'react';
import {
ClipboardDocumentCheckIcon,
ClipboardDocumentIcon,
} from '@heroicons/react/24/outline';
export interface CopyToClipboardButtonProps {
text: string;
tooltipText?: string;
tooltipAlignment?: 'left' | 'right';
className?: string;
children?: ReactNode;
}
export function CopyToClipboardButton({
text,
tooltipAlignment,
tooltipText,
className,
children,
}: CopyToClipboardButtonProps) {
const [copied, setCopied] = useState(false);
useEffect(() => {
if (!copied) return;
const t = setTimeout(() => {
setCopied(false);
}, 3000);
return () => clearTimeout(t);
}, [copied]);
return (
<CopyToClipboard
text={text}
onCopy={() => {
setCopied(true);
}}
>
<button
type="button"
data-tooltip={tooltipText ? tooltipText : false}
data-tooltip-align-right={tooltipAlignment === 'right'}
data-tooltip-align-left={tooltipAlignment === 'left'}
className={className}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
}}
>
{copied ? (
<ClipboardDocumentCheckIcon className="inline h-5 w-5 text-blue-500 dark:text-sky-500" />
) : (
<ClipboardDocumentIcon className="inline h-5 w-5" />
)}
{children}
</button>
</CopyToClipboard>
);
}
@@ -1,17 +0,0 @@
import type { Meta, StoryObj } from '@storybook/react';
import { CopyToClipboard } from './copy-to-clipboard';
const meta: Meta<typeof CopyToClipboard> = {
component: CopyToClipboard,
title: 'CopyToClipboard',
};
export default meta;
type Story = StoryObj<typeof CopyToClipboard>;
export const Simple: Story = {
args: {
onCopy: () => {},
tooltipAlignment: 'left',
},
};
@@ -1,36 +0,0 @@
import { ClipboardIcon } from '@heroicons/react/24/outline';
import { JSX, useEffect, useState } from 'react';
interface CopyToClipboardProps {
onCopy: () => void;
tooltipAlignment?: 'left' | 'right';
}
export function CopyToClipboard(props: CopyToClipboardProps): JSX.Element {
const [copied, setCopied] = useState(false);
useEffect(() => {
if (copied) {
const timeout = setTimeout(() => {
setCopied(false);
}, 3000);
return () => clearTimeout(timeout);
}
});
return (
<span
data-tooltip="Copy to clipboard"
data-tooltip-align-right={props.tooltipAlignment === 'right'}
>
<ClipboardIcon
className={`inline h-4 w-5 !cursor-pointer ${
copied ? 'text-sky-500' : ''
}`}
onClick={(e) => {
e.stopPropagation();
setCopied(true);
props.onCopy();
}}
></ClipboardIcon>
</span>
);
}
@@ -1,5 +1,3 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
/* eslint-disable @nx/enforce-module-boundaries */
// nx-ignore-next-line
import type { ProjectGraphProjectNode } from '@nx/devkit';
@@ -71,7 +69,7 @@ export const ProjectDetails = ({
>
<div
className={twMerge(
`flex items-center justify-between`,
`flex flex-wrap items-center justify-between`,
isCompact ? `gap-1` : `mb-4 gap-2`
)}
>
@@ -90,17 +88,15 @@ export const ProjectDetails = ({
className="h-6 w-6"
/>
</div>
<span>
{onViewInProjectGraph && viewInProjectGraphPosition === 'top' && (
<ViewInProjectGraphButton
callback={() =>
onViewInProjectGraph({ projectName: project.name })
}
/>
)}{' '}
</span>
{onViewInProjectGraph && viewInProjectGraphPosition === 'top' && (
<ViewInProjectGraphButton
callback={() =>
onViewInProjectGraph({ projectName: project.name })
}
/>
)}
</div>
<div className="flex justify-between py-2">
<div className="flex flex-wrap justify-between py-2">
<div>
{projectData.metadata?.description ? (
<p className="mb-2 text-sm capitalize text-gray-500 dark:text-slate-400">
@@ -133,16 +129,14 @@ export const ProjectDetails = ({
) : null}
</div>
<div className="self-end">
<span>
{onViewInProjectGraph &&
viewInProjectGraphPosition === 'bottom' && (
<ViewInProjectGraphButton
callback={() =>
onViewInProjectGraph({ projectName: project.name })
}
/>
)}{' '}
</span>
{onViewInProjectGraph &&
viewInProjectGraphPosition === 'bottom' && (
<ViewInProjectGraphButton
callback={() =>
onViewInProjectGraph({ projectName: project.name })
}
/>
)}
</div>
</div>
</header>
@@ -1,6 +1,7 @@
/* eslint-disable @nx/enforce-module-boundaries */
// nx-ignore-next-line
import type { TargetConfiguration } from '@nx/devkit';
import { CopyToClipboardButton } from '@nx/graph/ui-components';
import {
ChevronDownIcon,
ChevronUpIcon,
@@ -17,7 +18,6 @@ import { twMerge } from 'tailwind-merge';
import { Pill } from '../pill';
import { TargetTechnologies } from '../target-technologies/target-technologies';
import { SourceInfo } from '../source-info/source-info';
import { CopyToClipboard } from '../copy-to-clipboard/copy-to-clipboard';
import { getDisplayHeaderFromTargetConfiguration } from '../utils/get-display-header-from-target-configuration';
import { TargetExecutor } from '../target-executor/target-executor';
@@ -53,10 +53,6 @@ export const TargetConfigurationDetailsHeader = ({
onViewInTaskGraph,
onNxConnect,
}: TargetConfigurationDetailsHeaderProps) => {
const handleCopyClick = async (copyText: string) => {
await window.navigator.clipboard.writeText(copyText);
};
if (!collapsable) {
// when collapsable is false, isCollasped should be false
isCollasped = false;
@@ -156,6 +152,12 @@ export const TargetConfigurationDetailsHeader = ({
</div>
</div>
<div className="flex items-center gap-2">
<CopyToClipboardButton
text={JSON.stringify(targetConfiguration, null, 2)}
tooltipText={!isCollasped ? 'Copy Target' : undefined}
tooltipAlignment="right"
className="rounded-md bg-inherit p-1 text-sm text-slate-600 ring-1 ring-inset ring-slate-400/40 hover:bg-slate-200 dark:text-slate-300 dark:ring-slate-400/30 dark:hover:bg-slate-700/60"
/>
{onViewInTaskGraph && (
<button
className="rounded-md bg-inherit p-1 text-sm text-slate-600 ring-1 ring-inset ring-slate-400/40 hover:bg-slate-200 dark:text-slate-300 dark:ring-slate-400/30 dark:hover:bg-slate-700/60"
@@ -194,21 +196,22 @@ export const TargetConfigurationDetailsHeader = ({
</div>
{!isCollasped && (
<div className="ml-5 mt-2 text-sm">
<SourceInfo
data={sourceMap[`targets.${targetName}`]}
propertyKey={`targets.${targetName}`}
color="text-gray-500 dark:text-slate-400"
/>
<div className="flex">
<SourceInfo
data={sourceMap[`targets.${targetName}`]}
propertyKey={`targets.${targetName}`}
color="text-gray-500 dark:text-slate-400"
/>
</div>
{targetName !== 'nx-release-publish' && (
<div className="mt-2 text-right">
<code className="ml-4 rounded bg-gray-100 px-2 py-1 font-mono text-gray-800 dark:bg-gray-700 dark:text-gray-300">
nx run {projectName}:{targetName}
</code>
<span>
<CopyToClipboard
onCopy={() =>
handleCopyClick(`nx run ${projectName}:${targetName}`)
}
<CopyToClipboardButton
text={`nx run ${projectName}:${targetName}`}
tooltipText="Copy Command"
tooltipAlignment="right"
/>
</span>
@@ -1,12 +1,11 @@
/* eslint-disable @nx/enforce-module-boundaries */
// nx-ignore-next-line
import type { TargetConfiguration } from '@nx/devkit';
import { JsonCodeBlock } from '@nx/graph/ui-code-block';
import { CopyToClipboardButton } from '@nx/graph/ui-components';
import { useCallback, useContext, useEffect, useState } from 'react';
import { FadingCollapsible } from './fading-collapsible';
import { TargetConfigurationProperty } from './target-configuration-property';
import { CopyToClipboard } from '../copy-to-clipboard/copy-to-clipboard';
import { PropertyInfoTooltip, Tooltip } from '@nx/graph/ui-tooltips';
import { TooltipTriggerText } from './tooltip-trigger-text';
import { Pill } from '../pill';
@@ -53,10 +52,6 @@ export default function TargetConfigurationDetails({
const [collapsed, setCollapsed] = useState(true);
const { expandedTargets, toggleTarget } = useContext(ExpandedTargetsContext);
const handleCopyClick = async (copyText: string) => {
await window.navigator.clipboard.writeText(copyText);
};
const handleCollapseToggle = useCallback(() => {
if (toggleTarget) {
toggleTarget(targetName);
@@ -110,10 +105,7 @@ export default function TargetConfigurationDetails({
<div className="p-4 text-base">
<div className="group mb-4">
<h4 className="mb-4">
<TargetExecutorTitle
{...displayHeader}
handleCopyClick={handleCopyClick}
/>
<TargetExecutorTitle {...displayHeader} />
</h4>
<p className="pl-5 font-mono">
<TargetExecutor {...displayHeader} link={link}>
@@ -131,10 +123,7 @@ export default function TargetConfigurationDetails({
{script && (
<div className="group mb-4">
<h4 className="mb-4">
<TargetExecutorTitle
script={script}
handleCopyClick={handleCopyClick}
/>
<TargetExecutorTitle script={script} />
</h4>
<p className="pl-5 font-mono">
<TargetExecutor script={script} link={link}>
@@ -164,6 +153,7 @@ export default function TargetConfigurationDetails({
<FadingCollapsible>
<JsonCodeBlock
data={options}
copyTooltipText="Copy Options"
renderSource={(propertyName: string) => (
<TargetSourceInfo
className="flex min-w-0 pl-4"
@@ -198,14 +188,11 @@ export default function TargetConfigurationDetails({
</span>
</Tooltip>
<span className="mb-1 ml-2 hidden group-hover:inline">
<CopyToClipboard
onCopy={() =>
handleCopyClick(
`"inputs": ${JSON.stringify(
targetConfiguration.inputs
)}`
)
}
<CopyToClipboardButton
text={`"inputs": ${JSON.stringify(
targetConfiguration.inputs
)}`}
tooltipText="Copy Inputs"
/>
</span>
</h4>
@@ -239,14 +226,11 @@ export default function TargetConfigurationDetails({
</span>
</Tooltip>
<span className="mb-1 ml-2 hidden group-hover:inline">
<CopyToClipboard
onCopy={() =>
handleCopyClick(
`"outputs": ${JSON.stringify(
targetConfiguration.outputs
)}`
)
}
<CopyToClipboardButton
text={`"outputs": ${JSON.stringify(
targetConfiguration.outputs
)}`}
tooltipText="Copy Outputs"
/>
</span>
</h4>
@@ -279,15 +263,12 @@ export default function TargetConfigurationDetails({
<TooltipTriggerText>Depends On</TooltipTriggerText>
</span>
</Tooltip>
<span className="inline pl-4 opacity-0 transition-opacity duration-150 ease-in-out group-hover/line:opacity-100">
<CopyToClipboard
onCopy={() =>
handleCopyClick(
`"dependsOn": ${JSON.stringify(
targetConfiguration.dependsOn
)}`
)
}
<span className="mb-1 ml-2 hidden group-hover:inline">
<CopyToClipboardButton
text={`"dependsOn": ${JSON.stringify(
targetConfiguration.dependsOn
)}`}
tooltipText="Copy Depends On"
/>
</span>
</h4>
@@ -336,6 +317,7 @@ export default function TargetConfigurationDetails({
<FadingCollapsible>
<JsonCodeBlock
data={targetConfiguration.configurations}
copyTooltipText="Copy Configurations"
renderSource={(propertyName: string) => (
<TargetSourceInfo
className="flex min-w-0 pl-4"
@@ -1,29 +1,26 @@
import { PropertyInfoTooltip, Tooltip } from '@nx/graph/ui-tooltips';
import { CopyToClipboard } from '../copy-to-clipboard/copy-to-clipboard';
import { CopyToClipboardButton } from '@nx/graph/ui-components';
import { TooltipTriggerText } from '../target-configuration-details/tooltip-trigger-text';
export function TargetExecutorTitle({
commands,
command,
script,
handleCopyClick,
executor,
}: {
handleCopyClick: (copyText: string) => void;
commands?: string[];
command?: string;
script?: string;
executor?: string;
}) {
if (commands && commands.length) {
return (
<span className="font-medium">
Commands
<span className="mb-1 ml-2 hidden group-hover:inline">
<CopyToClipboard
onCopy={() =>
handleCopyClick(
`"commands": [${commands.map((c) => `"${c}"`).join(', ')}]`
)
}
<CopyToClipboardButton
text={`"commands": [${commands.map((c) => `"${c}"`).join(', ')}]`}
tooltipText="Copy Commands"
/>
</span>
</span>
@@ -34,8 +31,9 @@ export function TargetExecutorTitle({
<span className="font-medium">
Command
<span className="mb-1 ml-2 hidden group-hover:inline">
<CopyToClipboard
onCopy={() => handleCopyClick(`"command": "${command}"`)}
<CopyToClipboardButton
text={`"command": "${command}"`}
tooltipText="Copy Command"
/>
</span>
</span>
@@ -46,7 +44,7 @@ export function TargetExecutorTitle({
<span className="font-medium">
Script
<span className="mb-1 ml-2 hidden group-hover:inline">
<CopyToClipboard onCopy={() => handleCopyClick(script)} />
<CopyToClipboardButton text={script} tooltipText="Copy Script" />
</span>
</span>
);
@@ -58,6 +56,12 @@ export function TargetExecutorTitle({
>
<span className="font-medium">
<TooltipTriggerText>Executor</TooltipTriggerText>
<span className="mb-1 ml-2 hidden group-hover:inline">
<CopyToClipboardButton
text={executor ?? ''}
tooltipText="Copy Executor"
/>
</span>
</span>
</Tooltip>
);
@@ -95,7 +95,8 @@ export function getBasicNxCloudSection(items: MenuItem[]): MenuSection {
.map((m) => {
return {
...m,
disableCollapsible: !m.id.endsWith('tutorial'),
disableCollapsible:
!m.id.endsWith('tutorial') && !m.id.endsWith('concepts'),
};
}),
};
@@ -54,6 +54,7 @@ function CategoryBox({ category }: { category: RelatedDocumentsCategory }) {
<Link
href={d.path}
className="flex flex-grow items-center justify-between no-underline hover:text-sky-600 hover:underline dark:hover:text-sky-400"
prefetch={false}
>
<span>{d.name}</span>
<ArrowRightIcon className="h-4 w-4 text-slate-500 dark:text-slate-400" />
@@ -93,6 +93,7 @@ export function TableOfContents({
'pl-6': item.level === 3,
}
)}
prefetch={false}
>
{item.level === 1 ? 'Overview' : item.title}
</Link>
@@ -129,6 +129,7 @@ export function Content({
className="relative mx-4 inline-flex rounded-md border border-green-100 bg-green-50 px-4 py-2 text-xs font-medium text-green-600 dark:border-green-900 dark:bg-green-900/30 dark:text-green-400"
href="/recipes/other/rescope"
title="Nx 16 package name changes"
prefetch={false}
>
Rescope @nrwl to @nx
</Link>
@@ -20,7 +20,11 @@ function Hit({
hit: InternalDocSearchHit | StoredDocSearchHit;
children: ReactNode;
}): JSX.Element {
return <Link href={hit.url}>{children}</Link>;
return (
<Link href={hit.url} prefetch={false}>
{children}
</Link>
);
}
export function AlgoliaSearch({
@@ -32,7 +32,7 @@ const pages: Array<{ title: string; path: string }> = [
},
{
title: 'Running Nx Cloud Enterprise',
path: '/ci/features/on-premise',
path: '/ci/recipes/enterprise/on-premise/on-premise',
},
{
title: 'Auth (Basic)',
@@ -51,9 +51,13 @@ const pages: Array<{ title: string; path: string }> = [
path: '/ci/recipes/enterprise/on-premise/ami-setup',
},
{
title: 'BitBucket Auth',
title: 'BitBucket Cloud Auth',
path: '/ci/recipes/enterprise/on-premise/auth-bitbucket',
},
{
title: 'BitBucket Data Center Auth',
path: '/ci/recipes/enterprise/on-premise/auth-bitbucket-data-center',
},
{
title: 'SAML Auth',
path: '/ci/recipes/enterprise/on-premise/auth-saml',
+5 -1
View File
@@ -240,7 +240,11 @@ export default function Changelog(props: ChangeLogProps): JSX.Element {
</h1>
<p className="mt-4">
All the Nx goodies in one page, sorted by release. See our{' '}
<Link className="underline" href="/reference/releases">
<Link
className="underline"
href="/reference/releases"
prefetch={false}
>
release page
</Link>{' '}
for information about the release cycle and LTS policy.
+3 -3
View File
@@ -49,12 +49,12 @@ export default function Community(): JSX.Element {
<div className="mx-auto max-w-7xl items-stretch px-4 py-12 sm:grid sm:grid-cols-1 sm:gap-8 sm:px-6 md:grid-cols-3 lg:px-8 lg:py-16">
<div className="md:col-span-2">
<header>
<SectionHeading as="h1" variant="title" id="champions">
<SectionHeading as="h1" variant="subtitle" id="champions">
Get to know our
</SectionHeading>
<SectionHeading
as="p"
variant="display"
variant="title"
id="nx-champions"
className="mt-4"
>
@@ -81,7 +81,7 @@ export default function Community(): JSX.Element {
</div>
</div>
</div>
<div className="mt-6 flex h-full w-full flex-col items-start items-stretch gap-6 md:mt-0">
<div className="mt-6 flex h-full w-full flex-col items-stretch gap-6 md:mt-0">
{champions3.map((data) => (
<ChampionCard key={data.name} data={data} />
))}
+46
View File
@@ -0,0 +1,46 @@
import { useRouter } from 'next/router';
import { NextSeo } from 'next-seo';
import { CoFounders, Hero, TheTeam, Layout } from '@nx/nx-dev/ui-company';
export function Company(): JSX.Element {
const router = useRouter();
return (
<>
<NextSeo
title="Who we are"
description="We create build tools to solve problems for developers, startups and large enterprises."
openGraph={{
url: 'https://nx.dev' + router.asPath,
title: 'Company',
description:
'We create build tools to solve problems for developers, startups and large enterprises.',
images: [
{
url: 'https://nx.dev/socials/nx-media.png',
width: 800,
height: 421,
alt: 'Nx: Smart Monorepos · Fast CI',
type: 'image/jpeg',
},
],
siteName: 'NxDev',
type: 'website',
}}
/>
<Layout>
<div>
<Hero />
</div>
<div className="mt-32 lg:mt-56">
<CoFounders />
</div>
<div className="mt-32 lg:mt-56">
<TheTeam />
</div>
</Layout>
</>
);
}
export default Company;
+55
View File
@@ -0,0 +1,55 @@
import { CallToAction, DefaultLayout } from '@nx/nx-dev/ui-common';
import { NextSeo } from 'next-seo';
import { useRouter } from 'next/router';
import {
EnterpriseCustomers,
Hero,
OssProjects,
} from '@nx/nx-dev/ui-customers';
export function Customers(): JSX.Element {
const router = useRouter();
return (
<>
<NextSeo
title="Our customers"
description="Our customers are spread across the USA, Canada, UK, and Europe."
openGraph={{
url: 'https://nx.dev' + router.asPath,
title: 'Customers',
description:
'Our customers are spread across the USA, Canada, UK, and Europe.',
images: [
{
url: 'https://nx.dev/socials/nx-media.png',
width: 800,
height: 421,
alt: 'Nx: Smart Monorepos · Fast CI',
type: 'image/jpeg',
},
],
siteName: 'NxDev',
type: 'website',
}}
/>
<DefaultLayout>
<div>
<Hero />
</div>
<div className="mt-16 lg:mt-16">
<EnterpriseCustomers />
</div>
<div className="mt-16 lg:mt-32">
<OssProjects />
</div>
<div className="mt-32 lg:mt-56">
<CallToAction />
</div>
</DefaultLayout>
</>
);
}
export default Customers;
+34 -42
View File
@@ -1,18 +1,14 @@
import { AnnouncementBanner, Footer, Header } from '@nx/nx-dev/ui-common';
import {
ExtensibleAndIntegrated,
GettingStarted,
Hero,
ImproveWorstCiCase,
Migrate,
MigrationsAndCodeGeneration,
MonorepoStyles,
Newsletter,
NxStatistics,
NxWithCi,
Testimonials,
} from '@nx/nx-dev/ui-home';
import { CallToAction, DefaultLayout } from '@nx/nx-dev/ui-common';
import { NextSeo } from 'next-seo';
import {
CiForMonorepos,
Hero,
SmarterToolsForMonorepos,
Statistics,
TeamAndCommunity,
TrustedBy,
WorkBetterAchieveMoreShipQuicker,
} from '@nx/nx-dev/ui-home';
export default function Index(): JSX.Element {
return (
@@ -39,35 +35,31 @@ export default function Index(): JSX.Element {
}}
/>
<h1 className="sr-only">Next generation monorepo tool</h1>
<AnnouncementBanner />
<Header />
<main id="main" role="main">
<div className="w-full">
{/*HERO COMPONENT*/}
<Hero />
{/*NX CI*/}
<NxWithCi />
{/*NX STATISTICS*/}
<NxStatistics />
{/*MONOREPO STYLES*/}
<MonorepoStyles />
{/*WORST CASE CI TIMES*/}
<ImproveWorstCiCase />
{/*EXTENSIBLE & INTEGRATED*/}
<ExtensibleAndIntegrated />
{/*MIGRATE*/}
<Migrate />
{/*AFFECTED & CODE GENERATION*/}
<MigrationsAndCodeGeneration />
{/*GETTING STARTED*/}
<GettingStarted />
{/*TESTIMONIALS*/}
<Testimonials />
{/*NEWSLETTER*/}
<Newsletter />
{/*<AnnouncementBanner />*/}
<DefaultLayout isHome>
<Hero />
<div className="mt-16 lg:-mt-32">
<Statistics />
</div>
</main>
<Footer />
<div className="mt-32 lg:mt-56">
<TrustedBy />
</div>
<div className="mt-32 lg:mt-56">
<CiForMonorepos />
</div>
<div className="mt-32 lg:mt-56">
<WorkBetterAchieveMoreShipQuicker />
</div>
<div className="mt-32 lg:mt-56">
<SmarterToolsForMonorepos />
</div>
<div className="mt-32 lg:mt-56">
<TeamAndCommunity />
</div>
<div className="mt-32 lg:mt-56">
<CallToAction />
</div>
</DefaultLayout>
</>
);
}
+6 -1
View File
@@ -114,7 +114,11 @@ export default function Packages({
<p>
In version 16, we have rescoped our packages to{' '}
<code>@nx/*</code> from <code>@nrwl/*</code>.{' '}
<Link href="/recipes/other/rescope" className="underline">
<Link
href="/recipes/other/rescope"
className="underline"
prefetch={false}
>
Read more about the rescope
</Link>
</p>
@@ -129,6 +133,7 @@ export default function Packages({
key={'ref-' + pkg.name}
href={pkg.path}
className="group relative flex items-center gap-3 rounded-md border border-slate-200 bg-slate-50/40 p-4 text-sm capitalize shadow-sm transition hover:bg-slate-50 dark:border-slate-800/40 dark:bg-slate-800/60 dark:hover:bg-slate-800"
prefetch={false}
>
<img
className="h-5 w-5 object-cover opacity-75 dark:invert"
+19 -14
View File
@@ -1,10 +1,14 @@
import { getBasicPluginsSection } from '@nx/nx-dev/data-access-menu';
import { Menu } from '@nx/nx-dev/models-menu';
import { Breadcrumbs, DocumentationHeader, Footer } from '@nx/nx-dev/ui-common';
import { getBasicNxSection } from '@nx/nx-dev/data-access-menu';
import { MenuItem } from '@nx/nx-dev/models-menu';
import {
Breadcrumbs,
DocumentationHeader,
Footer,
SidebarContainer,
} from '@nx/nx-dev/ui-common';
import { PluginDirectory } from '@nx/nx-dev/ui-community';
import { NextSeo } from 'next-seo';
import { useRouter } from 'next/router';
import { useRef } from 'react';
import { menusApi } from '../lib/menus.api';
import { useNavToggle } from '../lib/navigation-toggle.effect';
import { nxPackagesApi } from '../lib/packages.api';
@@ -20,7 +24,7 @@ interface PluginInfo {
}
interface BrowseProps {
pluginList: PluginInfo[];
// segments: string[];
menu: MenuItem[];
}
export async function getStaticProps(): Promise<{ props: BrowseProps }> {
@@ -56,7 +60,7 @@ export async function getStaticProps(): Promise<{ props: BrowseProps }> {
isOfficial: false,
})),
],
// segments,
menu: menusApi.getMenu('nx', ''),
},
};
}
@@ -64,14 +68,9 @@ export async function getStaticProps(): Promise<{ props: BrowseProps }> {
export default function Browse(props: BrowseProps): JSX.Element {
const router = useRouter();
const { toggleNav, navIsOpen } = useNavToggle();
const wrapperElement = useRef(null);
const vm: {
menu: Menu;
} = {
menu: {
sections: [getBasicPluginsSection(menusApi.getMenu('extending-nx', ''))],
},
const menu = {
sections: [getBasicNxSection(props.menu)],
};
return (
@@ -106,8 +105,14 @@ export default function Browse(props: BrowseProps): JSX.Element {
role="main"
className="flex h-full flex-1 overflow-y-hidden"
>
<div className="hidden">
<SidebarContainer
menu={menu}
navIsOpen={navIsOpen}
toggleNav={toggleNav}
/>
</div>
<div
ref={wrapperElement}
id="wrapper"
data-testid="wrapper"
className="relative flex flex-grow flex-col items-stretch justify-start overflow-y-scroll"
+87
View File
@@ -0,0 +1,87 @@
import { ShaderGradient, ShaderGradientCanvas } from 'shadergradient';
export default function Shader(): JSX.Element {
return (
<>
<div className="absolute left-0 top-0 z-10 h-screen w-screen overflow-hidden bg-white text-gray-50">
{/*COTTON CANDY*/}
{/*<ShaderGradientCanvas
pointerEvents="none"
eventPrefix="client"
fov={45}
pixelDensity={1}
className="pointer-events-none"
>
<ShaderGradient
brightness={4}
cDistance={5}
color1="#ebedff"
color2="#f3f2f8"
color3="#dbf8ff"
frameRate={10}
grain="off"
lightType="3d"
positionX={0}
positionY={1.8}
positionZ={0}
range="enabled"
rangeEnd={40}
rangeStart={0}
reflection={0.1}
rotationX={0}
rotationY={0}
rotationZ={-90}
shader="defaults"
type="waterPlane"
uDensity={1}
uFrequency={5.5}
uSpeed={0.3}
uStrength={3}
uTime={0.2}
/>
</ShaderGradientCanvas>*/}
{/*UNIVERSE*/}
<ShaderGradientCanvas
pointerEvents="none"
eventPrefix="client"
fov={45}
pixelDensity={1}
className="pointer-events-none"
>
<ShaderGradient
brightness={4}
cAzimuthAngle={180}
cameraZoom={1}
cDistance={4}
cPolarAngle={115}
color1="#5606FF"
color2="#FE8989"
color3="#000000"
frameRate={10}
grain="off"
lightType="3d"
positionX={-0.5}
positionY={0.1}
positionZ={0}
range="enabled"
rangeEnd={40}
rangeStart={0}
reflection={0.1}
rotationX={0}
rotationY={0}
rotationZ={235}
shader="defaults"
type="waterPlane"
uAmplitude={0}
uDensity={1.1}
uFrequency={5.5}
uSpeed={0.1}
uStrength={2.4}
uTime={0.2}
/>
</ShaderGradientCanvas>
</div>
</>
);
}
+16
View File
@@ -43,6 +43,7 @@ const tips: NewYearTip[] = [
<Link
href="/getting-started/intro"
className="text-slate-900 underline dark:text-slate-100"
prefetch={false}
>
Intro to Nx
</Link>
@@ -78,6 +79,7 @@ const tips: NewYearTip[] = [
<Link
href="/concepts/integrated-vs-package-based"
className="text-slate-900 underline dark:text-slate-100"
prefetch={false}
>
Types of Repos Guide
</Link>
@@ -109,6 +111,7 @@ const tips: NewYearTip[] = [
<Link
href="/ci/features/distribute-task-execution"
className="text-slate-900 underline dark:text-slate-100"
prefetch={false}
>
Nx Agents
</Link>
@@ -120,6 +123,7 @@ const tips: NewYearTip[] = [
<Link
href="/ci/intro/ci-with-nx"
className="text-slate-900 underline dark:text-slate-100"
prefetch={false}
>
CI with Nx
</Link>
@@ -153,6 +157,7 @@ const tips: NewYearTip[] = [
<Link
href="/recipes/adopting-nx/adding-to-existing-project"
className="text-slate-900 underline dark:text-slate-100"
prefetch={false}
>
Add Nx to an Existing Project
</Link>
@@ -187,6 +192,7 @@ const tips: NewYearTip[] = [
<Link
href="/concepts/module-federation/micro-frontend-architecture"
className="text-slate-900 underline dark:text-slate-100"
prefetch={false}
>
Micro Frontends with Nx
</Link>
@@ -211,18 +217,21 @@ const tips: NewYearTip[] = [
<Link
href="/getting-started/tutorials/react-standalone-tutorial"
className="m-4 w-20"
prefetch={false}
>
{frameworkIcons.react.image}
</Link>
<Link
href="/getting-started/tutorials/angular-standalone-tutorial"
className="m-4 w-20"
prefetch={false}
>
{frameworkIcons.angular.image}
</Link>
<Link
href="/getting-started/tutorials/vue-standalone-tutorial"
className="m-4 w-20"
prefetch={false}
>
{frameworkIcons.vue.image}
</Link>
@@ -232,6 +241,7 @@ const tips: NewYearTip[] = [
<Link
href="/showcase/example-repos"
className="text-slate-900 underline dark:text-slate-100"
prefetch={false}
>
Nx with your Favorite Tech
</Link>
@@ -266,6 +276,7 @@ const tips: NewYearTip[] = [
<Link
href="/extending-nx/recipes/create-install-package"
className="text-slate-900 underline dark:text-slate-100"
prefetch={false}
>
Build Your Own CLI
</Link>
@@ -304,6 +315,7 @@ const tips: NewYearTip[] = [
<Link
href="https://go.nx.dev/nx-agents-ea"
className="text-slate-900 underline dark:text-slate-100"
prefetch={false}
>
Sign up now for early access.
</Link>
@@ -313,6 +325,7 @@ const tips: NewYearTip[] = [
<Link
href="/ci/features/distribute-task-execution"
className="text-slate-900 underline dark:text-slate-100"
prefetch={false}
>
Nx Agents
</Link>
@@ -347,6 +360,7 @@ const tips: NewYearTip[] = [
<Link
href="/recipes/tips-n-tricks/standalone-to-integrated"
className="text-slate-900 underline dark:text-slate-100"
prefetch={false}
>
convert a standalone app repo to a monorepo
</Link>
@@ -378,6 +392,7 @@ const tips: NewYearTip[] = [
<Link
href="https://blog.nrwl.io/evergreen-tooling-more-than-just-codemods-fc68f32ce605"
className="text-slate-900 underline dark:text-slate-100"
prefetch={false}
>
Evergreen Tooling
</Link>
@@ -388,6 +403,7 @@ const tips: NewYearTip[] = [
<Link
href="/features/automate-updating-dependencies"
className="text-slate-900 underline dark:text-slate-100"
prefetch={false}
>
Automate Updating Dependencies
</Link>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

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