Compare commits

...

103 Commits

Author SHA1 Message Date
Jack Hsu ff23fb0c07 fix(react): patch fix for 88f163e9d5 to normalize project name without messing up directory 2024-10-15 14:57:45 -04:00
Jason Jean eccd79311d feat(devkit): bump compatibility to Nx 19 - 21.x (#28243)
BREAKING CHANGE

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

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

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

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

* `@nx/devkit` supports Nx 17 - 20.
* Node 18 - 22 is supported
* `ExecutorContext.projectGraph`, `ExecutorContext.nxJsonConfiguration`,
and `ExecutorContext.projectsConfigurations` is marked as optional
because `ExecutorContext` in some versions of Nx did not have them.
* `ExecutorContext.workspace` is marked as optional because
`ExecutorContext` in some versions of Nx did not have the above
properties which contain the same information.
* `ProjectGraphNode` is deprecated.
* `NxPluginV1.processProjectGraph` was deprecated long ago and there has
been a warning since.
* `appRootPath` has been deprecated for a long time.
* `parseTargetString` had a variant that did not take either the project
graph or the executor context.
* `readNxJson` has a variant which does not take a tree. This was not
clearly deprecated.
* There are handlers to require from `@nx/` instead of `@nrwl`
* Nx tries to get a root install from `@nrwl/cli`

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

* `@nx/devkit` supports Nx 19 - 21.
* Node 20 - 22 is supported
* `ExecutorContext.projectGraph`, `ExecutorContext.nxJsonConfiguration`,
and `ExecutorContext.projectsConfigurations` is marked as required
because `ExecutorContext` in Nx 19+ is guaranteed to have them.
* `ExecutorContext.workspace` is removed because the same information is
available in the above properties
* `ProjectGraphNode` is removed.
* `NxPluginV1` is no more. All plugins should be `NxPluginV2`.
* `workspaceRoot` is the replacement for `appRootPath`. `appRootPath` is
removed.
* `parseTargetString` no longer has a variant that did not take either
the project graph or the executor context.
* `readNxJson` still has a variant which does not take a tree but it's
clearly deprecated to be removed in Nx 21.
* `@nrwl` packages are no more so we don't have to redirect requires
anymore.
* `@nrwl/cli` is no more so Nx shouldn't try to get a root install there
*

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

Fixes #
2024-10-15 13:09:02 -04:00
Jonathan Cammisuli 61920a80ce fix(core): add busy handler for sqlite (#28390)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
When the sql database throws a busy signal, there is no handler in nx to
try the operation again.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
There is a handler to tell sqlite to handle the operation again, and try
up to N times.

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

Fixes #
2024-10-15 11:26:14 -04:00
Jonathan Cammisuli 47df9a420e feat(core): open sqlite databases with SQLITE_OPEN_FULL_MUTEX (#28276)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
The database is currently opened with the following flag:
```
OpenFlags::SQLITE_OPEN_NO_MUTEX,
```

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The database is opened with the following flag:
```
OpenFlags::SQLITE_OPEN_FULL_MUTEX
```

This allows sqlite itself to handle multiple connections to the database
and make all writes serial.

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

Fixes #
2024-10-15 11:23:10 -04:00
Louie Weng 7f31366820 fix(nx-cloud): use create-workspace-v1 endpoint if v2 returns with 404 (#28015)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

By default we connect all workspaces to Nx Cloud via the V2 connect
endpoint.

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

Certain users (on-prem or single tenant) may not have access to the V2
endpoint, and so we should fall back to V1 so as not to prevent new
workspaces from being created.

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

Fixes #

(cherry picked from commit acb19a6439)
2024-10-04 18:42:08 -04:00
Colum Ferry c992d4c0d5 fix(react): host generator should pass normalized name to remote generator (#28295)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 63e0f278b8)
2024-10-04 18:42:07 -04:00
Zachary DeRose 88f163e9d5 fix(core): fixing target groups not merging (#28280)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

<!-- This is the behavior we have today -->
When multiple plugins touch the `project > metadata` (note NOT `project
> target > metadata`), only the last plugin to run has their
`metadata.targetGroups` data present, meaning currently `targetGroups`
is clobbering instead of merging.

<!-- This is the behavior we should expect with the changes in this PR
-->
When multiple plugins write to `metadata.targetGroups`, that data is
merged together, so data written by all plugins is present.

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

Fixes #

(cherry picked from commit 7ff387dcd2)
2024-10-03 15:44:37 -04:00
Jason Jean 2bc0755ffe chore(repo): deactivate heartbeat (#28278)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

Heartbeat seems to be having issues.

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

Heartbeat is disabled.

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

Fixes #

(cherry picked from commit 3375734c0e)
2024-10-03 15:44:37 -04:00
Nicholas Cunningham fe8a09926e fix(nx-dev): fix markdoc table data alignment (#28274)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

Currently, our table heading generated from markdown files `.md` are
positioned `center` while the data `td` are positioned `left`.

It doesn't look uniform and on larger tables, it can be jarring.

Examples:
- https://nx.dev/ci/reference/release-notes#helm-package-compatibility
- https://nx.dev/reference/releases#supported-versions
-
https://nx.dev/blog/reliable-ci-a-new-execution-model-fixing-both-flakiness-and-slowness#problem-in-numbers

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Both heading and data should have the same alignment to be symmetrical.

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

Fixes #

(cherry picked from commit 5be5ad8a74)
2024-10-03 15:44:36 -04:00
Colum Ferry 7a1220c672 fix(angular): ensure @typescript-eslint/utils is used with eslint flat config (#28267)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
Eslint 9 is installed for new angular workspace but v7 of
@typescript-eslint/utils package is being installed and is incompatible

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Esnure v8 of @typescript-eslint/utils is installed

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

Fixes #

---------

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
(cherry picked from commit 874fad03da)
2024-10-03 15:00:04 -04:00
Benjamin Cabanes 6c89a5571a feat(nx-dev): add nx powerpack gcp & azure mentions (#28256)
Co-authored-by: Juri <juri.strumpflohner@gmail.com>
(cherry picked from commit c655b6cf4f)
2024-10-03 09:54:01 -04:00
Jason Jean 569f1ab984 chore(core): expose utility to determine if db cache is enabled (#28262)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

There is a function to determine if the db cache is enabled.

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

Fixes #

(cherry picked from commit 84a5c7a274)
2024-10-03 09:54:00 -04:00
Jason Jean c571710716 fix(core): filter out task dependencies on itself (#28261)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

Tasks can end up depending on themselves if they depend on a dummy task
which ends up depending back on itself. This throws a weird error like:

```
 NX   Could not execute command because the task graph has a circular dependency

devkit:build --> devkit:build-base --> nx:build-base --> nx:build-base
```

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

Tasks cannot depend on themselves. No errors are thrown in those cases.

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

Fixes #

(cherry picked from commit 8c59a7eb40)
2024-10-03 09:53:59 -04:00
Shahar Kazaz 2fbded36a5 fix(js): resolve VerdaccioWarning on the "logs" configuration property (#28234)
fix(js): resolve VerdaccioWarning: The configuration property "logs" has
been deprecated; Replaced with "log"

Currently, the Verdaccio configuration generated by running `nx generate
setup-verdaccio` contains the deprecated `logs` property. I have updated
this property to `log`, thereby removing the VerdaccioWarning that is
displayed when running `nx local-registry`

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

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

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

## Current Behavior
Currently, the Verdaccio configuration generated by running `nx generate
setup-verdaccio` includes the deprecated 'logs' property. When you run
`nx local-registry` Verdaccio displays the following warning:
<img width="1453" alt="image"
src="https://github.com/user-attachments/assets/ccd95587-ec1b-458c-8717-8173a95c1e5d">

## Expected Behavior
Run `nx local-registry` without the warning after using the
`setup-verdaccio` generator.

(cherry picked from commit 69109e48d9)
2024-10-03 09:53:58 -04:00
James Henry cc5e940497 fix(core): add stub for conformance:check, add messaging (#28250)
(cherry picked from commit fe01c61635)
2024-10-03 09:53:57 -04:00
Leosvel Pérez Espinosa e138ebc201 docs(core): document --skip-sync flag for run commands (#28246)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 8821b70815)
2024-10-03 09:53:56 -04:00
Jack Hsu 923242d705 fix(core): allow prompts during nx add (#28247)
This PR allows `nx add` to initialize plugins that have prompts.

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 e9d8d39239)
2024-10-03 09:53:55 -04:00
Jonathan Cammisuli bd192a6125 fix(core): change getCache signature to only accept options (#28248)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
`getCache` has an argument for nxjson. This breaks nx cloud when using
the db cache.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
`getCache` now only has options as an argument, and uses `readNxJson` in
the function body

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

Fixes #

(cherry picked from commit 161a3f1b0b)
2024-10-03 09:53:54 -04:00
Benjamin Cabanes b6c6248ab5 feat(nx-dev): add nx powerpack to pricing page (#28232)
Add Nx Powerpack as included with Nx Cloud Enterprise plan on Pricing page.

(cherry picked from commit 5a411540e7)
2024-10-03 09:53:54 -04:00
Jason Jean b8ac136e30 fix(core): remove axios import from main code loading (#28230)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
`axios` is loaded before tasks are run which causes a 30 ms delay.

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

`axios` is not loaded before tasks are run.

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

Fixes #

(cherry picked from commit 3b278e6755)
2024-10-02 10:29:39 -04:00
Jonathan Cammisuli 952629b857 feat(core): allow circular project dependencies to execute tasks (#28227)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
If there are project dependencies and not all projects contain the same
task target, a circular dependency error is shown.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
If not all circular dependent projects contain the same task target,
allow execution of the target.

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

Fixes #

(cherry picked from commit 3c791c7133)
2024-10-02 10:29:28 -04:00
Andrew Goldis 99ec30a943 fix(testing): add support for playwright --last-failed (#28161)
`--last-failed` allows running only the failed tests from the previous
run.
Example: `playwright test --last-failed`.
[Documentation](https://playwright.dev/docs/test-cli#reference)

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

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

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

## Current Behavior
<!-- This is the behavior we have today -->
Cannot provide `--last-failed` flag to playwright

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Should be able provide `--last-failed` via configuration entry
`lastFailed: boolean`

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

Fixes #28096

(cherry picked from commit c24292abf4)
2024-10-02 10:28:51 -04:00
Nicholas Cunningham 9b6874d693 fix(nx-dev): 404 urls (#27599) 2024-10-01 15:50:20 -04:00
Colum Ferry 6e2e63731f fix(module-federation): additionalShared should check node_modules when applying to support transitive deps #28137 (#28216)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
Transitive deps may not exist on the project graph or be installed in
the root package.json file.
They could require the singleton pattern and should use the
`additionalShared` functionality.

However, the additionalShared will check project graph and root
package.json, erroring if the package cannot be found.

The last resort should be to use `require.resolve` to check the
node_modules folder to find the package.json of the package and select a
version from it.


## 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 #28137
2024-10-01 15:50:19 -04:00
Colum Ferry ccf71fd32b fix(module-federation): exports could be objects and not strings #28129 (#28215)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
Exports defined in `package.json` of packages could be objects rather
than strings such that we could see both:

```json
{
  "exports": {
    ".": {
       "default": "./src/index.js"
    },
    "index": {
       "default": {
           "default": "./src/index.js"
        }
    }
  }
}
```


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The logic currently assumes it can only be a string.
Ensure it checks if an object exists first


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

Fixes #28129
2024-10-01 15:50:18 -04:00
Colum Ferry d297574496 fix(react): setup-ssr generator should infer bundler based on the executor for build #28128 (#28217)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
`@nx/react:setup-ssr` defaults to webpack which causes issues when the
`react` app is already using rspack.



## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Infer bundler based on the `build` target

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

Fixes #28128
2024-10-01 15:50:18 -04:00
Alonmizra bd701e7c05 cleanup(misc): remove redundant return in esbuild.impl.ts (#27632) 2024-10-01 15:50:17 -04:00
Isaac Mann 453b38791e docs(core): update evolving nx post (#28210)
Update the evolving Nx blog post
2024-10-01 15:50:17 -04:00
Colum Ferry b7c97a5023 fix(angular): ensure async webpack configs are awaited #28200 (#28213)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
Custom webpack functions may return a promise that needs to be awaited
before we attempt to do any additional work on it


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Ensure custom webpack functions are awaited. they will no-op for
synchronous functions

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

Fixes #28200
2024-10-01 15:50:16 -04:00
Phillip Barta ff9dc5db9c chore(repo): updated husky to v9.1.5 (#27665) 2024-10-01 15:50:16 -04:00
James Garbutt b2b0272ba3 cleanup(misc): migrate rollup to picocolors (#28186) 2024-10-01 15:50:15 -04:00
James Garbutt 265a7b1078 cleanup(nextjs): migrate to node FS (#28065) 2024-10-01 15:50:15 -04:00
James Garbutt a22a378235 cleanup(react): migrate to picocolors (#28187) 2024-10-01 15:50:14 -04:00
Jason Jean 868032927d fix(core): fix link to powerpack plugins (#28182)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

The link to show a list of powerpack plugins shows all plugins

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

The link to show powerpack plugins shows powerpack plugins

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

Fixes #
2024-10-01 15:50:14 -04:00
Emily Xiong 86af878b84 fix(expo): change force to be an option for yarn (#28115)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
- currently --force is passed into every `expo install` command -> then
the package install command
- but it is not supported in yarn, change it to an option so it would
not get passed in everytime

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

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

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

(cherry picked from commit ff25c8dc14)
2024-09-27 16:23:58 -04:00
Emily Xiong 6a91cebda5 fix(core): fix env override run command (#28156)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

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

(cherry picked from commit caae4cf0ff)
2024-09-27 16:23:57 -04:00
Isaac Mann d50999b7f6 docs(core): powerpack plugin icons (#28180)
- Add icons for powerpack plugins on /nx-api page
- Mention Powerpack requires Nx 19.8+
- Mention free OSS license in activate powerpack recipe

(cherry picked from commit 86a43de09a)
2024-09-27 16:23:57 -04:00
Emily Xiong 6726b82a42 fix(core): move getDetails to top (#28158)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

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

(cherry picked from commit 1a4959f9a7)
2024-09-27 16:23:56 -04:00
Leosvel Pérez Espinosa 7738a01232 fix(js): improve typescript-sync generator messaging (#28162)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 153451f32b)
2024-09-27 16:23:55 -04:00
Emily Xiong d523373a6d fix(storybook): only add @storybook/test-runner to externalDependencies if installed (#28060)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

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

(cherry picked from commit 5724debed6)
2024-09-27 16:23:51 -04:00
MaxKless 0735b65ace fix(core): adjust nx import messaging without relative source dir (#28052)
(cherry picked from commit 6634693f12)
2024-09-27 16:23:51 -04:00
Nicholas Cunningham 33ff88e037 fix(nx-dev): Update Power pack docs to include OSS projects (#28176)
(cherry picked from commit 0f360b8215)
2024-09-27 16:23:50 -04:00
Emily Xiong e0b376a457 fix(core): only stop daemon if enabled (#28146)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

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

(cherry picked from commit 0061b858b2)
2024-09-27 16:23:49 -04:00
Isaac Mann fb98769837 docs(core): fix powerpack purchase link (#28172)
Fix powerpack purchase link

(cherry picked from commit 94932ec0e1)
2024-09-27 16:23:48 -04:00
Isaac Mann 356e674de2 docs(core): fix syntax errors in conformance docs (#28169)
Fix some syntax errors in the conformance docs

(cherry picked from commit e90d2211af)
2024-09-27 16:23:47 -04:00
Jason Jean f2f1419438 fix(core): calculate project dependencies upfront in the schedule (#28152)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

Counting project dependencies during the sort resulted in a lot of
duplicate work.

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

Count project dependencies for all tasks up front.. so that this
information can be easily accessed during the sort.

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

Fixes #

(cherry picked from commit c5cb015276)
2024-09-27 16:23:47 -04:00
Isaac Mann 0a4c6202b9 docs(core): remove closed source github links (#28149)
Updates AWS S3 to Amazon S3
Removes Github links from closed source packages

(cherry picked from commit 198d2af81d)
2024-09-27 16:23:46 -04:00
Isaac Mann 46a9ca47e8 docs(core): powerpack docs edits (#28142)
(cherry picked from commit 3bb493f7a6)
2024-09-27 16:23:45 -04:00
Isaac Mann cf051aa51d docs(core): powerpack landing page typo (#28143)
(cherry picked from commit c4806f1f17)
2024-09-27 16:23:45 -04:00
Isaac Mann bfc4eff080 docs(core): document NX_GRAPH_CREATION (#28111)
Documents the NX_GRAPH_CREATION environment variable

Related to #27244

(cherry picked from commit 154aedefa8)
2024-09-27 16:23:44 -04:00
James Henry a6bc863789 chore(nx-dev): fix import in conformancedoc (#28166)
(cherry picked from commit 266fb09725)
2024-09-27 16:23:43 -04:00
James Henry 3d60dd65fc docs(nx-dev): update conformance docs (#28151)
(cherry picked from commit 81b3fc901e)
2024-09-27 16:23:43 -04:00
Rares Matei d7af0c009c chore(repo): temp disable db cache (#28164)
(cherry picked from commit 2630e7f269)
2024-09-27 16:23:42 -04:00
pralkarz b8ac640412 cleanup(expo): replace fs-extra with node:fs (#28117)
(cherry picked from commit 56eabffb2b)
2024-09-27 16:23:40 -04:00
pralkarz cdeba498e2 cleanup(bundling): replace fs-extra with node:fs (#28113)
(cherry picked from commit 28c12b50bd)
2024-09-27 16:23:39 -04:00
pralkarz ab9cf56868 cleanup(react-native): replace fs-extra with node:fs (#28131)
(cherry picked from commit 151c8380fa)
2024-09-27 16:23:38 -04:00
pralkarz edbc4b2116 cleanup(nx-plugin): replace fs-extra with node:fs (#28133)
(cherry picked from commit 9dfa4dbbef)
2024-09-27 16:23:37 -04:00
Emily Xiong c247067931 fix(core): log error for runTaskInForkedProcess (#28078)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

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

(cherry picked from commit cc428c7782)
2024-09-27 16:23:37 -04:00
Emily Xiong ca0e60c44d fix(graph): add spacing between graph details top (#28055)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

<img width="330" alt="Screenshot 2024-09-23 at 1 26 23 PM"
src="https://github.com/user-attachments/assets/fa62fcb6-a0a5-4684-a162-8003d1156418">
<img width="994" alt="Screenshot 2024-09-23 at 1 26 10 PM"
src="https://github.com/user-attachments/assets/8b2c8949-7aeb-4e9f-9502-14381ad980e4">

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

Fixes #

(cherry picked from commit 741366d878)
2024-09-27 16:23:36 -04:00
Isaac Mann f21e73c322 docs(core): blog and docs edits (#28138)
Copy editing

(cherry picked from commit fb543596a7)
2024-09-27 16:23:35 -04:00
pawel-twardziak 251dc11c8e fix(nx-dev): options of the affected are messed up (#28112)
Closes #27893

## Current Behavior
see #27893

## Expected Behavior
see #27893

## Related Issue(s)
see #27893

Fixes #
- docs for affected

---------

Co-authored-by: Isaac Mann <isaacplmann@gmail.com>
(cherry picked from commit 4ed8e1ea36)
2024-09-27 16:23:34 -04:00
Johanna Pearce 5fc9825131 docs(nx-cloud): update access tokens recipe with new screenshot and link
(cherry picked from commit 621ac786a9)
2024-09-27 16:23:32 -04:00
Isaac Mann eb65611be0 docs(core): better looking powerpack features category page
(cherry picked from commit fb92b68209)
2024-09-27 16:23:31 -04:00
Emily Xiong 0c5921e4a6 fix(core): fix output for 0 task (#28122)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 f2dfe90f3c)
2024-09-27 16:23:30 -04:00
Juri Strumpflohner 950f16a3ff feat(nx-dev): add Powerpack video to the landing page (#28126)
(cherry picked from commit 77a80c05ab)
2024-09-27 16:23:29 -04:00
Juri 285e283be9 docs(core): embed videos for powerpack features
(cherry picked from commit 8f3269d8b1)
2024-09-27 16:23:28 -04:00
Juri b76e84dbb1 fix(nx-dev): adjust powerpack mobile view
(cherry picked from commit fc39beae7a)
2024-09-27 16:23:27 -04:00
Juri Strumpflohner 4a4d43ee9d feat(nx-dev): powerpack landing page (#27963)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #
2024-09-25 20:12:23 -04:00
pralkarz 968cf9041c cleanup(core): replace fs-extra with node:fs (#28019) 2024-09-25 20:12:22 -04:00
Jack Hsu 9e515895a1 fix(js): @nx/js:init ensures tslib is installed if importHelpers is true (#28083)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
Sometimes tslib is missing even though it is needed for typechecks.

## Expected Behavior
tslib is installed when needed. i.e. `importHelpers: true`

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

Fixes #27656
2024-09-25 20:12:22 -04:00
Jack Hsu 25c6f2cf41 fix(linter): add files entry to angular flat config to avoid applying TS rules to JSON files (#28102)
This PR fixes an issue with buildable/publishable Angular libs, where TS
rules are being applied to JSON files.

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

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

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

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

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

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

Fixes #28069

---------

Co-authored-by: James Henry <james@henry.sc>
2024-09-25 20:12:22 -04:00
Craigory Coppola 77d83876ef fix(core): hide no file server process json log (#27626)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

Co-authored-by: James Henry <james@henry.sc>
2024-09-25 20:12:22 -04:00
Louie Weng 3297ee8859 docs(nx-cloud): update reference to start-ci-run and complete-ci-run (#27909)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

Updated references about start-ci-run to include mentions of warnings
that you get if you don't include the `--distribute-on` flag.

Also removed references to the legacy `--stop-all-agents` command in
favor of `--complete-ci-run`.

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

Fixes #
2024-09-25 20:12:22 -04:00
Isaac Mann 6cae9a458b docs(core): powerpack docs (#27904)
-  Activate powerpack recipe
-  Powerpack owners documentation
- [x] Powerpack custom remote cache documentation
- [x] Powerpack conformance documentation

Infrastructure for powerpack docs

- Adds the ability to generate API docs from ocean packages

To generate API documentation for plugins in the ocean repository, run
the `nx documentation` command with the `NX_OCEAN_RELATIVE_PATH`
environment variable set to the relative path to your checked out copy
of the ocean repo.

```
NX_OCEAN_RELATIVE_PATH=../ocean nx documentation
```

This will create generated API documentation in the
`docs/external-generated` folder. This API will be merged into the
normal `docs/generated` documentation when the docs site is built.

Because there are two separate output folders, if someone runs `nx
documentation` without the `NX_OCEAN_RELATIVE_PATH` environment
variable, the ocean documentation will not be overwritten. The ocean
documentation will only be updated or deleted when someone explicitly
chooses to do so.

---------

Co-authored-by: Juri Strumpflohner <juri.strumpflohner@gmail.com>
2024-09-25 20:12:22 -04:00
James Henry e05b4f075e chore(react): disable failing e2e test with rspack module federation (#28100)
(cherry picked from commit 5916c608ef)
2024-09-25 09:52:05 -04:00
Phillip Barta 1b2a55c6da fix(bundling): remove unused babel-plugin-transform-async-to-promises from @nx/rollup (#27669)
(cherry picked from commit 2ae35dd66e)
2024-09-25 09:51:20 -04:00
Leosvel Pérez Espinosa b9b7895d7c fix(linter): ignore dist and use compat helper for eslint-plugin-react-hooks (#28080)
(cherry picked from commit 3c1cac7704)
2024-09-25 09:51:19 -04:00
Isaac Mann 295bb0afdc chore(core): add nixallover to cloud docs owners (#28084)
(cherry picked from commit bf90e5857f)
2024-09-25 09:51:18 -04:00
James Garbutt b563aa3919 cleanup(nextjs): migrate to picocolors (#28064)
(cherry picked from commit 39352a563a)
2024-09-25 09:51:17 -04:00
James Henry cfb444f442 fix(release): add groupPreVersionCommand to schema, improve logging (#28087)
(cherry picked from commit 619dbe7316)
2024-09-25 09:51:17 -04:00
Jason Jean c70dd177c4 fix(core): remove wasi compatibility while db is unsupported in wasi (#28089)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

Users get a `disk i/o` error from connecting to SQL because of a vfs.

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

Not really sure but this might address those errors. Might not. We don't
need this at the moment though because the SQL database is not compiled
for wasi.

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

Fixes #

(cherry picked from commit 6182d20449)
2024-09-25 09:50:42 -04:00
Jason Jean a0ceabe016 fix(core): several powerpack fixes (#28088)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 flag in `nx.json` to enable the db cache
* Typings for powerpack are `any`
* Powerpack errors are not shown in `nx report`
* 9999 workspaces show up when user purchases unlimited license
* There is no indication from caching that license has expired.

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

* There is an `enableDbCache` flag for `nx.json`. It'll probably be
changed soon.
* Typings for powerpack come from the powerpack packages
* Powerpack errors are shown in nx report
* "an unlimited number of workspaces" shows up when user purchases
unlimited license
* There is an indication when licenses expire.

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

Fixes #

(cherry picked from commit 4081901b8d)
2024-09-25 09:50:41 -04:00
Zachary DeRose 5ac5544fea docs(misc): adding 19.8 video embed (#28085)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 fd99bae238)
2024-09-25 09:50:36 -04:00
Jack Hsu 434611a77f fix(core): nx add should show errors (#28079)
`nx add` errors should be surfaced to users.

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

## Current Behavior
Users do not see errors from init generator.

## Expected Behavior
Users see errors from init generator.

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

Fixes #

(cherry picked from commit d1194a9508)
2024-09-25 09:50:35 -04:00
Leosvel Pérez Espinosa 6c03777a03 fix(core): support more structured errors in sync generators (#28075)
(cherry picked from commit 5afece0ed6)
2024-09-25 09:50:28 -04:00
MaxKless d8601c9167 fix(core): set windowsHide: true wherever possible (#28073)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 b73f1e0e00)
2024-09-25 09:50:26 -04:00
Emily Xiong 3877f6a6f6 fix(core): add flag when db is disabled for task history (#28059)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 3e1a87917f)
2024-09-25 09:50:24 -04:00
Jonathan Cammisuli c04a91d6e8 fix(core): sort projects after updating from context (#28024)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
Whenever a file is created in a project, the daemon will insert the
newly created file at the end of the project file map list. This causes
issues with cache determinism because the newly created file is not
sorted. When doing `nx reset`, the file will then be properly sorted
## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Whenever a file is inserted into the project map, sort the changed file
map.
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

(cherry picked from commit 341306a0c0)
2024-09-25 09:50:22 -04:00
Emily Xiong 03e43a0566 fix(core): fix output text for multiple targets (#28043)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 05f16cfbdd)
2024-09-25 09:50:19 -04:00
Jack Hsu 08ade26b61 feat(core): allow prompts from init generators during nx init (#28003)
This PR allows init generators to prompt during `nx init`.

Demo (temporarily adds prompt to vite init):
https://www.loom.com/share/ad40e6f02186478596ea6e1f08dba7a4

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 4fedc409fa)
2024-09-25 09:50:18 -04:00
James Henry a76b176858 fix(release): allow dynamically continuing when current version is unresolvable (#28034)
(cherry picked from commit 5216f7aac4)
2024-09-25 09:50:16 -04:00
James Garbutt d6f223b08d cleanup(expo): migrate to picocolors (#28038)
(cherry picked from commit b717aaf67e)
2024-09-25 09:50:15 -04:00
James Garbutt 8559c0c953 cleanup(core): migrate esbuild to use picocolors (#28033)
(cherry picked from commit 951baee460)
2024-09-25 09:50:14 -04:00
Julián Gómez Sibecas a7148b78b8 docs(core): replace yarn with pnpm (#28027)
(cherry picked from commit 88d339a1a3)
2024-09-25 09:50:12 -04:00
James Garbutt 6c3733395c cleanup(web): migrate to picocolors (#28039)
(cherry picked from commit 246494ae2d)
2024-09-25 09:50:11 -04:00
Julián Gómez Sibecas 0a7dc0cfcb chore(core): nx plugin submission nx-solhint (#28026)
<!--
_[Please make sure you have read the submission guidelines before
posting an
PR](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#submit-pr)_

# Community Plugin Submission

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

## Plugin Requirements

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

i.e.

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

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

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

Example:

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

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

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

# Community Plugin Submission

## nx-solhint

<!--
Describe what your plugin is and what is its goal or issues it
addresses. If you don't provide a description, we will not merge your
PR.
Is it focused on a technology, tooling or behaviour? Does the plugin
provide generators, executors or graph support?
Do you know who is already using the plugin? Mention who is the author
of the plugin.
-->

(cherry picked from commit 0d50b13a25)
2024-09-25 09:50:09 -04:00
Jason Jean d48df88976 fix(core): allow creating a db cache without linking task details (#28023)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

The db cache does not work without task details.

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

The db cache works without task details.

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

Fixes #

(cherry picked from commit a510b3642d)
2024-09-25 09:50:07 -04:00
Jack Hsu c600406dd1 docs(core): add missing .DocSearch-VisuallyHiddenForAccessibility style (#28020)
Add a missing class name causing the icon text to display on screen.

<img width="2033" alt="Screenshot 2024-09-20 at 3 58 36 PM"
src="https://github.com/user-attachments/assets/0a741e04-6467-463f-9e16-058aa495c095">

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 1df8ad7563)
2024-09-25 09:50:05 -04:00
James Henry 5f123e118a chore(misc): add custom lint rule for ensuring pnpm-lock.yaml version (#28010)
(cherry picked from commit 2e33230753)
2024-09-25 09:50:04 -04:00
Zachary DeRose 011b681394 docs(misc): nx 19.8 blog and changelog (#28014)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 53e11788f1)
2024-09-25 09:50:03 -04:00
Juri Strumpflohner da22f90ffa fix(react): vite should be default bundler in app generator (#28013)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 c50acf793a)
2024-09-25 09:50:01 -04:00
James Henry 70bb8ca2cf chore(core): fix snapshots (#28011)
(cherry picked from commit 57fe56edf8)
2024-09-25 09:50:00 -04:00
James Henry adcd9b2b6e fix(linter): do not generate docs.recommended property (#28009)
(cherry picked from commit 00b3dd2fd9)
2024-09-25 09:49:59 -04:00
369 changed files with 9861 additions and 1194 deletions
+5 -1
View File
@@ -91,7 +91,7 @@ jobs:
- checkout
- nx/set-shas:
main-branch-name: 'master'
- run: npx nx-cloud@next start-ci-run --distribute-on="auto linux-medium" --stop-agents-after="e2e"
- run: npx nx-cloud@next start-ci-run --distribute-on="auto linux-medium" --stop-agents-after="e2e" --require-explicit-completion
- run:
command: |
sudo apt-get update
@@ -121,6 +121,10 @@ jobs:
for pid in "${pids[@]}"; do
wait "$pid"
done
- run:
name: End CI Run
command: npx nx-cloud@next complete-ci-run
no_output_timeout: 20m
# -------------------------
# JOBS: Main-MacOS
# -------------------------
+10
View File
@@ -64,6 +64,16 @@
],
"@nx/workspace/valid-command-object": "error"
}
},
{
"files": ["pnpm-lock.yaml"],
"parser": "./tools/eslint-rules/raw-file-parser.js",
"rules": {
"@nx/workspace/ensure-pnpm-lock-version": [
"error",
{ "version": "9.0" }
]
}
}
]
}
+1 -2
View File
@@ -1,3 +1,2 @@
#!/bin/sh
changedFiles="$(git diff-tree -r --name-only --no-commit-id $1 $2)"
node ./scripts/notify-lockfile-changes.js $changedFiles
node ./scripts/notify-lockfile-changes.js $changedFiles
+1 -2
View File
@@ -1,3 +1,2 @@
#!/bin/sh
changedFiles="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
node ./scripts/notify-lockfile-changes.js $changedFiles
node ./scripts/notify-lockfile-changes.js $changedFiles
+3 -5
View File
@@ -1,6 +1,4 @@
#!/usr/bin/env sh
pnpm check-lock-files &&
pnpm check-commit &&
pnpm documentation &&
pnpm check-lock-files
pnpm check-commit
pnpm documentation
pnpm pretty-quick --check
+1 -1
View File
@@ -1 +1 @@
NX_DB_CACHE=true
NX_DB_CACHE=false
+1 -1
View File
@@ -10,7 +10,7 @@ rust-toolchain @nrwl/nx-native-reviewers
# Docs Site + Graph
/docs @nrwl/nx-docs-reviewers
/docs/nx-cloud @StalkAltan @rarmatei @nrwl/nx-docs-reviewers
/docs/nx-cloud @StalkAltan @rarmatei @nixallover @nrwl/nx-docs-reviewers
/graph/** @philipjfulcher @FrozenPandaz @bcabanes @MaxKless @xiongemi
/images @nrwl/nx-docs-reviewers
/nx-dev/** @nrwl/nx-docs-reviewers
+5
View File
@@ -498,5 +498,10 @@
"name": "nx-github-pages",
"description": "A small Nx plugin to make deploying static projects to GitHub Pages easy.",
"url": "https://github.com/agentender/nx-github-pages"
},
{
"name": "nx-solhint",
"description": "Solhint generators and inferred tasks for Nx",
"url": "https://github.com/juliangsibecas/nx-solhint"
}
]
+22
View File
@@ -417,6 +417,28 @@ Embed an Nx Graph visualization that can be panned by the user.
{% /graph %}
````
## Generating API Documentation
To generate API documentation for the codebase and update the menu for the docs on nx.dev, you can run:
```
nx documentation
```
This will happen automatically in a `git push` hook, so you'll be reminded if you forget.
### Generate API Documentation for Ocean Plugins
To generate API documentation for plugins in the ocean repository, run the `nx documentation` command with the `NX_OCEAN_RELATIVE_PATH` environment variable set to the relative path to your checked out copy of the ocean repo.
```
NX_OCEAN_RELATIVE_PATH=../ocean nx documentation
```
This will create generated API documentation in the `docs/external-generated` folder. This API will be merged into the normal `docs/generated` documentation when the docs site is built.
Because there are two separate output folders, if someone runs `nx documentation` without the `NX_OCEAN_RELATIVE_PATH` environment variable, the ocean documentation will not be overwritten. The ocean documentation will only be updated or deleted when someone explicitly chooses to do so.
## Publishing Process
There are multiple versions of the `nx.dev` site.
+1 -1
View File
@@ -119,4 +119,4 @@ In addition, we are actively exploring ways to provide advanced analytics for yo
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
+1 -1
View File
@@ -335,4 +335,4 @@ If the prettier UI and better performance havent convinced you, this surely w
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
+1 -1
View File
@@ -608,4 +608,4 @@ This journey through Qwik and Nx demonstrates how thoughtful architecture and th
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
+1 -1
View File
@@ -18,4 +18,4 @@ Victor and I are excited to announce that Nx has raised another $16M in a Series
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
+1 -1
View File
@@ -495,4 +495,4 @@ If you enjoyed these, [subscribe to our YouTube channel](https://www.youtube.com
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
+1 -1
View File
@@ -284,4 +284,4 @@ Thats all for now folks! Were just starting up a new iteration of developm
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
+1 -1
View File
@@ -621,4 +621,4 @@ Nx is a powerful monorepo tool. Together with Nx and these 2 state management to
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
+1 -1
View File
@@ -312,4 +312,4 @@ This role, in the context of OpenAIs chat models, is the response of the AI.
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
+1 -1
View File
@@ -212,4 +212,4 @@ Thats all for now folks! Were just starting up a new iteration of developm
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
+1 -1
View File
@@ -389,4 +389,4 @@ Exciting stuff! So keep an eye on our channels, and subscribe if you havent a
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
@@ -185,4 +185,4 @@ We just released Project Crystal, so this is just the beginning of it. While we
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
+1 -1
View File
@@ -124,4 +124,4 @@ If you have a task that cant be run on Nx Agents for some reason, you can eas
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
@@ -319,4 +319,4 @@ Here are some example repositories already leveraging Nx release:
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
+1 -1
View File
@@ -145,4 +145,4 @@ Thats all for now folks! Were just starting up a new iteration of developm
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
+1 -1
View File
@@ -215,4 +215,4 @@ Here is how to set up Nx with the Gradle workspace. Hopefully, this gives you a
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
+1 -1
View File
@@ -235,4 +235,4 @@ Zack
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
+1 -1
View File
@@ -56,4 +56,4 @@ This is just the first of a series of AI-powered features that we're going to be
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
+1 -2
View File
@@ -4,7 +4,6 @@ slug: 'nx-19-5-adds-stackblitz-new-features-and-more'
authors: ['Zack DeRose']
cover_image: '/blog/images/2024-08-01/nx-19-5-thumbnail.png'
tags: [nx, release]
pinned: true
---
## Table of Contents
@@ -292,4 +291,4 @@ The [Monorepo World conference](https://monorepo.world) is coming up soon on Oct
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
@@ -91,4 +91,4 @@ can [find more details in our docs](/ci/recipes/security/personal-access-tokens)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
- [Speed up your CI](/nx-cloud)
+114
View File
@@ -0,0 +1,114 @@
---
title: Nx 19.8 Update!!
slug: nx-19-8-update
authors: [Zack DeRose]
tags: [nx, release]
cover_image: /blog/images/2024-09-20/thumbnail.png
youtubeUrl: https://youtu.be/Zgv4LHvwGx0
pinned: true
---
Nx 19.8 is here! This is our last minor release before we get ready to move ahead into Nx v20, which should land in October around the same time as the [Monorepo World Conference](https://monorepo.world/)!
As always, you can find the general details for all Nx releases on our [changelog](/changelog), as well as details on our [Github Releases for the Nx repo](https://github.com/nrwl/nx/releases).
## Table of Contents
In this blog post:
- [Nx Import](#nx-import)
- [Improved Task Scheduling!](#improved-task-scheduling)
- [Project Crystal Comes to Angular](#project-crystal-comes-to-angular)
- [Crystalize Your Entire Workspace In One Command](#crystalize-your-entire-workspace-in-one-command)
- [New Nx Workspaces Create with ESLint v9](#new-nx-workspaces-created-with-eslint-v9)
- [Nx Release Enhancements](#nx-release-enhancements)
- [Migrate to Latest](#migrate-to-latest)
- [Round 2 of Monorepo World Conference Speakers Announced!!](#round-2-of-monorepo-world-conference-speakers-announced)
- [Learn More](#learn-more)
## Nx Import
In Nx 19.8, [`nx import`](/nx-api/nx/documents/import) has now moved from beta support to now generally available!
Nx Import is a new [top-level command of the Nx CLI](/reference/nx-commands) which allows you to import projects along with its git history from some other repository into your current Nx workspace.
Keep an eye out for more on Nx Import on our [YouTube Channel](https://www.youtube.com/@nxdevtools) coming soon, and in the meantime be sure to check [the documentation](/nx-api/nx/documents/import) as this is now fully documented!
## Improved Task Scheduling!
We've added some optimizations to the core of Nx - particularly around Nx's task scheduling. At the core of Nx is a task runner that supports [task dependencies](/features/run-tasks#defining-a-task-pipeline) (configurable for your entire workspace in the `targetDefaults` of your `nx.json` file, and on a per-project basis in your `project.json` files!), as well as the ability to run mulitple tasks in parallel.
With 19.8, nx will leverage historical data of previous runs of tasks to add some prioritization to the scheduling tasks that tend to take longer. This should optimize the total runtime of large batch commands in your workspace!
Read more on [running tasks with Nx](/features/run-tasks)! And checkout [this new optimization on GitHub](https://github.com/nrwl/nx/pull/27783) for more details!
## Project Crystal Comes to Angular
[Project Crystal](/concepts/inferred-tasks) has come to Angular!
Project Crystal allows Nx to _infer_ tasks for projects in your workspace - rather than requiring that they exist in every `project.json` or `angular.json` file of your workspace.
You can now run the command `nx init` in a project created by the Angular CLI, and we will generate `project.json` files for each angular project in your workspace - splitting that data out from the root `angular.json` file created by the Angular CLI.
This decision was made based on our feedback from the Angular community - where there is a strong preference for being able to split out the config.
## Crystalize Your Entire Workspace In One Command
When we initially launched [Project Crystal](/concepts/inferred-tasks), we shipped originally with `convert-to-inferred` generators, which would allow you to convert your workspace one plugin at a time.
With Nx 19.8, we've added a [`infer-targets`](/recipes/running-tasks/convert-to-inferred#migrate-all-plugins) generator, which will automatically detect all available `convert-to-inferred` generators, and run the ones you choose. You may also specify a specific project using the `--project` option of the generator.
## New Nx Workspaces Created with ESLint v9
When creating a new workspace with the command: `npx create-nx-workspace`, those workspaces will now be created with [`eslint`](https://www.npmjs.com/package/eslint) v9, and [`typescript-eslint`](https://www.npmjs.com/package/typescript-eslint) v8 - their most recent versions respectively.
Keep in mind as well that ESLint v8 faces end-of-life on October 5th, meaning only [flat config](https://eslint.org/docs/latest/use/configure/migration-guide) is supported moving forward. Nx users should migrate to this new config format using [our flat config generator](/recipes/tips-n-tricks/flat-config#switching-to-eslints-flat-config-format).
For more on eslint's flat config, and how to use our generator to get to flat config checkout this video:
{% youtube
src="https://www.youtube.com/watch?v=32XH909CZrY"
title="ESLint Config Automation With Nx"
/%}
## Nx Release Enhancements
[`nx release`](/nx-api/nx/documents/release) is a framework/language/platform agnostic solution to versioning, publishing, and changelogs for your monorepo. We've been continuing to invest in Nx Release in 19.8, adding support specifically for [`pnpm publish`](https://pnpm.io/cli/publish) and [Github Enterprise Server](https://github.com/nrwl/nx/pull/26482)!
We also have a new feature from Nx Champion, Jonathan Gelin - which allows you to use `groupPreVersionCommand` in addition to the `preVersionCommand` when using the release groups feature to support [building before versioning](/recipes/nx-release/build-before-versioning).
## Migrate to Latest
{% youtube
src="https://youtu.be/A0FjwsTlZ8A"
title="How Automated Code Migrations Work"
/%}
As always - updating Nx and its plugins is easy as we ship an [automated migration command](/features/automate-updating-dependencies).
```shell
npx nx migrate latest
```
After updating your dependencies, run any necessary migrations.
```shell
npx nx migrate --run-migrations
```
## Round 2 of Monorepo World Conference Speakers Announced!!
[![Monorepo World](/blog/images/2024-08-01/monorepo-world.avif)](https://monorepo.world)
The [Monorepo World conference](https://monorepo.world) is coming up soon on October 7, 2024 at the Computer History museum in Mountain View, California.
[Get your tickets now](https://ti.to/nx-conf/monorepoworld2024), consider [requesting access to the invite-only Enterprise Summit on October 8](https://ti.to/nx-conf/monorepoworld2024), and be sure to check out the [second round of speakers](https://monorepo.world/#speakers-title) that was just published earlier this week!
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](/nx-cloud)
+58
View File
@@ -0,0 +1,58 @@
---
title: Evolving Nx
slug: evolving-nx
authors: [Jeff Cross]
tags: [nx, release]
cover_image: /blog/images/evolving-nx/thumbnail.png
---
Over the years, Nx has grown from a small 20% side project of our consulting business into a tool that empowers millions of developers worldwide and helps Fortune 500 companies ship high-quality software faster. In the last two years, we successfully transformed our consulting business into a product company, where our team can fully focus on evolving Nx and building Nx Cloud to extend Nxs capabilities beyond local development.
This success is in large part thanks to:
- Our commitment to building Nx as MIT-licensed open-source software, supported by the incredible contributions from our vibrant Nx community.
- Close collaboration with our customers, allowing us to understand their needs and continuously improve Nx and Nx Cloud to address their demanding and complex challenges.
When we have new ideas to make Nx better, weve always had two options: it could be in the open source build system, or it could be in the paid cloud product, [Nx Cloud](/nx-cloud). But sometimes, there are important things we want to offer that can solve some gnarly problems for teams but dont require them to spend months convincing their IT department to incorporate yet another cloud service. So, we decided to create a collection of non-cloud-dependent Nx add-ons in a new package called **Nx Powerpack**, which will require paid licenses to use.
## Introducing Nx Powerpack
**[Nx Powerpack](/powerpack)** — our newest product designed to elevate the Nx CLI experience for enterprise environments. Powerpack offers advanced features like self-hosted remote cache storage, code ownership for monorepos, and workspace conformance, seamlessly integrating into sealed systems with strict security requirements. Its also designed for ease of implementation, helping enterprises bypass lengthy procurement processes and quickly access the tools they need.
> If you want to get into the technical details, we wrote a separate blog post diving deeper into the technical details: [Introducing Nx Powerpack](/blog/introducing-nx-powerpack).
Everything in Powerpack is new functionality, not previously free features that were now putting behind a paywall. However, this change coincides with some Nx improvements that will eventually interfere with users who were relying on our original filesystem-based implementation of local caching. Weve completely rewritten Nx's local caching to be faster and more secure, partly by using a local database instead of checking the filesystem for artifact metadata. With this rewrite, any custom remote caches that rely on metadata reflected in the filesystem will not work as of Nx 21. This is why we decided to build an API into Powerpack to be able to connect Nxs cache to different clouds and data sources. Now with Powerpack, teams can use an officially-supported implementation of remote caching, without needing to use Nx Cloud.
Theres a Steve Jobs quote that I think rings true with all of us at Nx:
> "I think money is a wonderful thing because it enables you to do things. It enables you to invest in ideas that don't have a short-term payback." - Steve Jobs
As Nx has grown, weve hired more people to make the product better. Naturally, those people want to do good work and be paid. We all show up for work to build things were passionate about, and solve real pain points for the millions of developers using Nx every day. Money is what enables us to keep doing what we love. So as much as Victor Savkin and I want to just build things and give them away for free, we need to balance our personal passion with whats the best long-term decisions for Nx — the project, the community, and the company.
Like many open source projects, one of the bigger challenges to sustainability in recent years has been larger cloud products who wait for projects to become successful, and then try to capitalize on that success at the expense of the maintainers. To battle this, many open source projects have decided to make their open source licensing more restrictive, or introduce dual licenses, forcing those vendors to work with the maintainers on a fair arrangement. We think weve come up with a better solution for the community by introducing a new package, Powerpack, with a new commercial license, with only new functionality. **Nx itself still has one license: the MIT license.**
![Nx products and their licenses](/blog/images/evolving-nx/nx-products-licenses.avif)
### What about my open-source repo ?
Open source projects can continue to use Nx Cloud for **free** the same way they always have, and they can continue to use Nx with all its features. If you are an open-source maintainer and you want to use Powerpack, you will get a **free license**. Just reach out to us at [powerpack-support@nrwl.io](mailto:powerpack-support@nrwl.io).
## How to Get Nx Powerpack
Powerpack can be easily purchased as a one-off license and is automatically included for all existing enterprise customers. If youre looking to purchase a license, you can [do so on this page](/powerpack).
Are you a startup? If these features make sense for your team but the cost is a concern, reach out to our support team, and well work with you to find a solution that fits.
## Got Questions?
If youre curious to learn more about these changes for Nx and how to get started, [check out our docs](/features/powerpack).
## Learn more
- [Nx Powerpack](/powerpack)
- [Blog: Introducing Nx Powerpack](/blog/introducing-nx-powerpack)
- [Docs: Powerpack features](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
@@ -0,0 +1,256 @@
---
title: Introducing Nx Powerpack
slug: introducing-nx-powerpack
authors: [Juri Strumpflohner]
tags: [nx, release]
cover_image: /blog/images/introducing-powerpack/thumbnail.png
youtubeUrl: https://youtu.be/KZ0nh2lj8zE
---
Today we're introducing our latest product, **Nx Powerpack**, a suite of paid extensions for Nx, specifically designed around common enterprise needs. Now, before anyone draws the wrong conclusions:
- No, were **not going to restrict Nxs license**, lock you in, and then harvest. Nx remains MIT licensed and fully open source.
- No, were **not placing existing features behind a paywall**. Nx Powerpack introduces new features on top of Nx (more about that below).
- Yes, we still **strongly believe in OSS and our community**, and we will keep improving Nx more than ever; if anything, Powerpack will help us fund our OSS work on Nx core and ensure its long-term sustainability.
### What about my open-source repo ?
Open source projects can continue to use Nx Cloud for **free** the same way they always have, and they can continue to use Nx with all its features. If you are an open-source maintainer and you want to use Powerpack, you will get a **free license**. Just reach out to us at [powerpack-support@nrwl.io](mailto:powerpack-support@nrwl.io).
So this leaves us with:
![Nx products and their licenses](/blog/images/evolving-nx/nx-products-licenses.avif)
> But why are we releasing Nx Powerpack under a commercial license? Read all about our strategy, the reasoning behind Powerpack and OSS funding in the **blog post from our CEO, Jeff Cross**: [Evolving Nx](/blog/evolving-nx).
But now to the fun, technical part! Nx Powerpack is a bundle that - in this very first release - comes with three major features:
- [Codeowners for monorepos](#codeowners-for-monorepos)
- [Self-hosted cache storage](#selfhosted-cache-storage)
- [Workspace conformance (beta)](#workspace-conformance-beta)
Lets dive in!
## Get an Nx Powerpack License
All Powerpack features require a dedicated commercial license. You can get one here: [Nx Powerpack](/powerpack).
Once you have your license, run the following command
```shell
npx nx activate-powerpack <your-license>
```
## Codeowners for Monorepos
Setting up Codeowners is highly recommended when designing a monorepo. If youre not familiar, Codeowners is a common feature of VCS providers (such as GitHub, GitLab, Bitbucket, etc.), allowing you to enforce specific code reviewers to approve PRs. This functionality is especially important in a monorepo, where you manage multiple projects with multiple teams. You want to ensure the right people are reviewing the code being submitted.
Heres a simple example of a [GitHub CODEOWNERS definition](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners):
```plain {% fileName=".github/CODEOWNERS" %}
/docs/ @doc-owner
/apps/orders @orders-team
/apps/products @products-team
/libs/orders/** @orders-team
/libs/products/** @products-team
/libs/shared/** @infra-team
```
One of the downsides of how codeowners works on today's VCS providers is that **they are folder-based**. That requires you to map your project paths to your codeowner files and keep maintaining that as you change your monorepo structure. And **this is exactly what we're going to automate**.
In a monorepo you reason based on projects. That's what you pass to your [Nx run commands](/features/run-tasks), what you see on the [project graph](/features/explore-graph) and also where owners should be defined. To get started install the Codeowners Powerpack plugin:
```shell
npx nx add @nx/powerpack-owners
```
This will allow you to define an owners section in your `nx.json` where you can define owners at the project level or even leverage project tags. Here's a small example:
```json {% fileName="nx.json" %}
{
...
"owners": {
"format": "github",
"patterns": [
{
"description": "CI configuration",
"owners": ["@devops"],
"files": [".github/workflows/**"]
},
{
"description": "Order team",
"owners": ["@team-orders"],
"projects": ["tag:scope:orders"]
},
{
"description": "Product team",
"owners": ["@team-products"],
"projects": ["tag:scope:products"]
},
{
"description": "Design team",
"owners": ["@team-design"],
"projects": ["tag:scope:design-system"]
}
]
},
...
}
```
A dedicated `nx sync` command automatically synchronizes these definitions to a `CODEOWNERS` file that matches your VCS provider:
```{% fileName=".github/CODEOWNERS" %}
# CI configuration
.github/workflows/** @devops
# Design team
/libs/shared/ui/angular/form-controls/ @team-design
# Design team
/libs/shared/ui/react/form-controls/ @team-design
# Product team
/libs/products/feat-product-detail/ @team-products
# Order team
/libs/orders/feat-current-orders/ @team-orders
...
```
Read all about how to [configure Codeowners for your project in our docs](/features/powerpack/owners).
## Self-hosted Cache Storage
A continuous effort on our Nx core is to improve speed. Last year, we began **rewriting performance-critical parts of Nx into Rust**, and more core components are being rewritten. As part of this effort, we also changed how we manage local cache, moving from a **file-based to a database-based approach**. In addition to small performance gains from reduced I/O, this opens up many opportunities for improving local cache handling, such as keeping only relevant cache based on usage, more easily controlling maximum cache size, and optimizing task orchestration by running failed tasks earlier.
As part of this new approach we're also going to [deprecate custom task runners](/deprecated/custom-task-runners) in Nx 20. I bring this up because it might affect users that relied on 3rd party tools that hooked into the task runners API.
To fill in on the custom task runner API we're providing a new Powerpack plugin that allows you to use S3 or a network drive as your storing mechanism for your Nx cache.
Here's an example of how to get started with [Amazon S3](https://aws.amazon.com/s3) based remote caching. First add the Powerpack plugin:
```shell
npx nx add @nx/powerpack-s3-cache
```
This will update your `nx.json` to add the new `cache` section.
```json {% fileName="nx.json" %}
{
...
"s3": {
"bucket": "your-s3-bucket-name",
"region": "us-east-1"
}
}
```
To then leverage the S3 powered remote cache on CI, [follow the official AWS documentation](https://github.com/aws-actions/configure-aws-credentials). Here's a short example snippet using OIDC to authenticate with AWS on GitHub Actions:
```yaml {% fileName=".github/workflows/ci.yml" %}
name: CI
...
permissions:
id-token: write
...
env:
NX_DB_CACHE: true
jobs:
main:
runs-on: ubuntu-latest
steps:
...
- name: 'Configure AWS Credentials'
uses: aws-actions/configure-aws-credentials@v4.0.2
with:
role-to-assume: arn:aws:iam::123456789123:role/GhAIBucketUserRole
aws-region: us-east-1
...
- run: pnpm exec nx affected -t lint test build
```
Similarly you can **set up network file based caching** using the `nx add @nx/powerpack-shared-fs-cache` package and by setting the `cacheDirectory` path in your `nx.json`.
Read all about how to [set up S3 or network drive based caching for your Nx workspace in our docs](/features/powerpack/custom-caching).
## Workspace Conformance (Beta)
We're releasing the `@nx/powerpack-conformance` plugin in an early preview. This new package focuses specifically on the maintainability of your monorepo. It allows you to encode your organization's standards so they can be enforced automatically. In this first version, the workspace conformance package ships with:
- [Enforce Module Boundaries](/nx-api/powerpack-conformance#enforce-module-boundaries): Similar to the Nx ESLint [Enforce Module Boundaries rule](https://nx-dev-git-docs-powerpack-nrwl.vercel.app/features/enforce-module-boundaries), but enforces boundaries on every project dependency, not just those created from TypeScript imports or `package.json` dependencies.
- [Ensure Owners](/nx-api/powerpack-conformance#ensure-owners): Requires every project to have an owner defined for the `@nx/powerpack-owners` plugin.
To get started, install the following package:
```shell
npx nx add @nx/powerpack-conformance
```
This allows you to define conformance rules in your `nx.json`. Here is an example:
```json {% fileName="nx.json" %}
{
...
"conformance": {
"rules": [
{
"rule": "@nx/powerpack-conformance/enforce-module-boundaries",
"projects": ["!remix-app-e2e"],
"options": {}
},
{
"rule": "@nx/powerpack-conformance/ensure-owners",
"projects": ["!remix-app-e2e"]
},
{
"rule": "./tools/local-conformance-rule.ts"
}
]
}
}
```
You can also define rules locally, as shown in the example above, which are simple TypeScript files:
```ts
import { createConformanceRule } from '@nx/powerpack-conformance';
const rule = createConformanceRule({
name: 'local-conformance-rule-example',
category: 'security',
reporter: 'project-reporter',
implementation: async (context) => {
return {
severity: 'low',
details: {
violations: [],
},
};
},
});
export default rule;
```
You can then run `nx conformance` to execute the conformance checks:
![Screenshot of the conformance check output](/blog/images/introducing-powerpack/conformance-check.avif)
In this first preview release, you'll only be able to run workspace conformance rules on a single workspace. In future iterations, you **will be able to connect it to your existing Nx Cloud organization**, allowing you to upload conformance rules and run them across connected workspaces.
Read all the details on how to [get started with workspace conformance rules in our docs](/features/powerpack/conformance).
## Learn More
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
Binary file not shown.

After

Width:  |  Height:  |  Size: 645 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 KiB

+17
View File
@@ -0,0 +1,17 @@
# [Nx 19.8 Blogpost](/blog/nx-19-8-update)
{% youtube
src="https://youtu.be/Zgv4LHvwGx0"
title="Nx Console Run UI Form"
width="100%" /%}
## Features
{% cards cols="2" %}
{% card title="Nx Import" type="document" url="/nx-api/nx/documents/import" /%}
{% card title="Improved Task Scheduling" type="document" url="/blog/nx-19-8-update#improved-task-scheduling" /%}
{% card title="Project Crystal Comes to Angular" type="document" url="/blog/nx-19-8-update#project-crystal-comes-to-angular" /%}
{% card title="Crystalize Your Entire Workspace In One Command" type="document" url="/blog/nx-19-8-update#crystalize-your-entire-workspace-in-one-command" /%}
{% card title="New Nx Workspaces Created with ESLint v9" type="document" url="/blog/nx-19-8-update#new-nx-workspaces-created-with-eslint-v9" /%}
{% card title="Nx Release Enhancements" type="document" url="/blog/nx-19-8-update#nx-release-enhancements" /%}
{% /cards %}
@@ -0,0 +1,144 @@
[
{
"description": "A Nx Powerpack plugin which allows users to write and apply rules for your entire workspace that help with consistency, maintainability, reliability and security.",
"documents": [
{
"id": "overview",
"name": "Overview",
"description": "A Nx Powerpack plugin which allows users to write and apply rules for your entire workspace that help with consistency, maintainability, reliability and security.",
"file": "external-generated/packages/powerpack-conformance/documents/overview",
"itemList": [],
"isExternal": false,
"path": "powerpack-conformance/documents/overview",
"tags": [],
"originalFilePath": "shared/packages/powerpack-conformance/powerpack-conformance-plugin"
}
],
"executors": [],
"generators": [],
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "powerpack-conformance",
"packageName": "@nx/powerpack-conformance",
"root": "/libs/nx-packages/powerpack-conformance",
"source": "/libs/nx-packages/powerpack-conformance/src"
},
{
"description": "Package to provide the ability to activate and read licenses for Nx Powerpack.",
"documents": [],
"executors": [],
"generators": [],
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "powerpack-license",
"packageName": "@nx/powerpack-license",
"root": "/libs/nx-packages/powerpack-license",
"source": "/libs/nx-packages/powerpack-license/src"
},
{
"description": "A Nx Powerpack plugin which provides the ability to configure and maintain codeowners for projects in Nx workspaces.",
"documents": [
{
"id": "overview",
"name": "Overview",
"description": "A Nx Powerpack plugin which provides the ability to configure and maintain codeowners for projects in Nx workspaces.",
"file": "external-generated/packages/powerpack-owners/documents/overview",
"itemList": [],
"isExternal": false,
"path": "powerpack-owners/documents/overview",
"tags": [],
"originalFilePath": "shared/packages/powerpack-owners/powerpack-owners-plugin"
}
],
"executors": [],
"generators": [
{
"description": "Initialize Nx Powerpack Owners config",
"file": "external-generated/packages/powerpack-owners/generators/init.json",
"hidden": false,
"name": "init",
"originalFilePath": "/libs/nx-packages/powerpack-owners/src/generators/init/schema.json",
"path": "powerpack-owners/generators/init",
"type": "generator"
},
{
"description": "Sync Nx Powerpack Owners config to a CODEOWNERS file",
"file": "external-generated/packages/powerpack-owners/generators/sync-codeowners-file.json",
"hidden": false,
"name": "sync-codeowners-file",
"originalFilePath": "/libs/nx-packages/powerpack-owners/src/generators/sync-codeowners-file/schema.json",
"path": "powerpack-owners/generators/sync-codeowners-file",
"type": "generator"
}
],
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "powerpack-owners",
"packageName": "@nx/powerpack-owners",
"root": "/libs/nx-packages/powerpack-owners",
"source": "/libs/nx-packages/powerpack-owners/src"
},
{
"description": "A Nx Powerpack plugin which provides a Nx cache which can be self hosted on Amazon S3.",
"documents": [
{
"id": "overview",
"name": "Overview",
"description": "A Nx Powerpack plugin which provides a Nx cache which can be self hosted on Amazon S3.",
"file": "external-generated/packages/powerpack-s3-cache/documents/overview",
"itemList": [],
"isExternal": false,
"path": "powerpack-s3-cache/documents/overview",
"tags": [],
"originalFilePath": "shared/packages/powerpack-s3-cache/powerpack-s3-cache-plugin"
}
],
"executors": [],
"generators": [
{
"description": "Initialize the S3 Cache",
"file": "external-generated/packages/powerpack-s3-cache/generators/init.json",
"hidden": false,
"name": "init",
"originalFilePath": "/libs/nx-packages/powerpack-s3-cache/src/generators/init/schema.json",
"path": "powerpack-s3-cache/generators/init",
"type": "generator"
}
],
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "powerpack-s3-cache",
"packageName": "@nx/powerpack-s3-cache",
"root": "/libs/nx-packages/powerpack-s3-cache",
"source": "/libs/nx-packages/powerpack-s3-cache/src"
},
{
"description": "A Nx Powerpack plugin to enable you to use a shared file system directory",
"documents": [
{
"id": "overview",
"name": "Overview",
"description": "A Nx Powerpack plugin to enable you to use a shared file system directory",
"file": "external-generated/packages/powerpack-shared-fs-cache/documents/overview",
"itemList": [],
"isExternal": false,
"path": "powerpack-shared-fs-cache/documents/overview",
"tags": [],
"originalFilePath": "shared/packages/powerpack-shared-fs-cache/powerpack-shared-fs-cache-plugin"
}
],
"executors": [],
"generators": [
{
"description": "Add the shared fs cache",
"file": "external-generated/packages/powerpack-shared-fs-cache/generators/init.json",
"hidden": false,
"name": "init",
"originalFilePath": "/libs/nx-packages/powerpack-shared-fs-cache/src/generators/init/schema.json",
"path": "powerpack-shared-fs-cache/generators/init",
"type": "generator"
}
],
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "powerpack-shared-fs-cache",
"packageName": "@nx/powerpack-shared-fs-cache",
"root": "/libs/nx-packages/powerpack-shared-fs-cache",
"source": "/libs/nx-packages/powerpack-shared-fs-cache/src"
}
]
@@ -0,0 +1,215 @@
---
title: Overview of the Nx powerpack-conformance Plugin
description: The Nx Powerpack Conformance plugin provides the ability to write and apply rules for your workspace
---
The `@nx/powerpack-conformance` plugin allows [Nx Powerpack](/powerpack) users to write and apply rules for your entire workspace that help with **consistency**, **maintainability**, **reliability** and **security**.
The conformance plugin allows you to encode your own organization's standards so that they can be enforced automatically. Conformance rules can also complement linting tools by enforcing that those tools are configured in the recommended way. The rules are written in TypeScript but can be applied to any language in the codebase or focus entirely on configuration files.
The plugin also provides the following pre-written rules:
- [**Enforce Project Boundaries**](#enforce-project-boundaries): Similar to the Nx [ESLint Enforce Module Boundaries rule](/features/enforce-module-boundaries), but enforces the boundaries on every project dependency, not just those created from TypeScript imports or `package.json` dependencies.
- [**Ensure Owners**](#ensure-owners): Require every project to have an owner defined for the [`@nx/powerpack-owners` plugin](/nx-api/powerpack-owners)
{% callout title="This plugin requires an active Nx Powerpack license" %}
In order to use `@nx/powerpack-conformance`, you need to have an active Powerpack license. If you don't have a license or it has expired, the `nx conformance` command will fail.
{% /callout %}
## Set Up @nx/powerpack-conformance
1. [Activate Powerpack](/recipes/installation/activate-powerpack) if you haven't already
2. Install the package
```shell
nx add @nx/powerpack-conformance
```
3. Configure Conformance Rules
Configure the `@nx/powerpack-conformance` plugin in the `nx.json` file or in individual project configuration files. Consult the [Conformance Configuration Reference](#conformance-configuration-reference) section for more details.
4. Run the `nx conformance` command in CI
Add `nx conformance` to the beginning of the CI process.
{% tabs %}
{% tab label="Without Nx Cloud" %}
```yaml
- name: Enforce all conformance rules
run: npx nx conformance
```
{% /tab %}
{% tab label="Using Nx Cloud" %}
```yaml
- name: Enforce all conformance rules
run: npx nx-cloud record -- npx nx conformance
```
Use `npx nx-cloud record --` to capture the logs for `nx conformance` in the Nx Cloud dashboard.
{% /tab %}
{% /tabs %}
## Conformance Configuration Reference
```jsonc {% fileName="nx.json" %}
{
"conformance": {
"rules": [
{
/**
* Relative path to a local rule implementation or node_module path.
*/
"rule": "@nx/powerpack-conformance/enforce-project-boundaries",
/**
* Rule specific configuration options. (Optional)
*/
"options": {},
/**
* The projects array allows users to opt in or out of violations for specific projects being reported by the current rule.
* The array can contain any valid matchers for findMatchingProjects(), by default the implied value is ["*"]. (Optional)
*/
"projects": ["*"]
}
]
}
}
```
## Provided Conformance Rules
The following rules are provided by Nx along with the `@nx/powerpack-conformance` plugin.
### Enforce Project Boundaries
This rule is similar to the Nx [ESLint Enforce Module Boundaries rule](/features/enforce-module-boundaries), but enforces the boundaries on every project dependency, not just those created from TypeScript imports or `package.json` dependencies.
Set the `rule` property to: `@nx/powerpack-conformance/enforce-project-boundaries`
```json {% fileName="nx.json" %}
{
"conformance": {
"rules": [
{
"rule": "@nx/powerpack-conformance/enforce-project-boundaries",
"options": {
// Optional
// Can be a boolean or an object with an array of buildTargetNames
"requireBuildableDependenciesForBuildableProjects": {
// Defaults to ["build"]
"buildTargetNames": ["build", "compile"]
},
// Optional
"ignoredCircularDependencies": [["projectA", "projectB"]],
// Optional
"depConstraints": [
{
// Must define either `sourceTag` or `allSourceTags`
"sourceTag": "string",
"allSourceTags": ["string"],
// Optional
"onlyDependOnProjectsWithTags": [],
// Optional
"notDependOnProjectsWithTags": []
}
],
// Optional
"checkDynamicDependenciesExceptions": []
}
}
]
}
}
```
#### Options
| Property | Type | Default | Description |
| ------------------------------------------------ | ------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ignoredCircularDependencies | _Array<[string, string]>_ | _[]_ | List of project pairs that should be skipped from `Circular dependencies` checks, including the self-circular dependency check. E.g. `['feature-project-a', 'myapp']`. Project name can be replaced by catch all `*` for more generic matches. |
| checkDynamicDependenciesExceptions | _Array<string>_ | _[]_ | List of imports that should be skipped for `Imports of lazy-loaded libraries forbidden` checks. E.g. `['@myorg/lazy-project/component/*', '@myorg/other-project']` |
| requireBuildableDependenciesForBuildableProjects | _boolean_ | _false_ | Enable to restrict the buildable projects from importing non-buildable libraries |
| depConstraints | _Array<object>_ | _[]_ | List of dependency constraints between projects |
#### Dependency constraints
The `depConstraints` is an array of objects representing the constraints defined between source and target projects. A
constraint must include `sourceTag` or `allSourceTags`. The constraints are applied with **AND** logical operation - for
a given `source` project the resulting constraints would be **all** that match its tags.
| Property | Type | Description |
| ---------------------------- | --------------- | ---------------------------------------------------------------------------------- |
| sourceTag | _string_ | Tag that source project must contain to match the constraint |
| allSourceTags | _Array<string>_ | List of tags the source project must contain to match the constraint |
| onlyDependOnProjectsWithTags | _Array<string>_ | The source **can depend only** on projects that contain at least one of these tags |
| notDependOnProjectsWithTags | _Array<string>_ | The source **can not depend** on projects that contain at least one of these tags |
### Ensure Owners
This rule requires every project to have an owner defined for the [`@nx/powerpack-owners` plugin](/nx-api/powerpack-owners)
Set the `rule` property to: `@nx/powerpack-conformance/ensure-owners`
```json {% fileName="nx.json" %}
{
"conformance": {
"rules": [
{
"rule": "@nx/powerpack-conformance/ensure-owners"
}
]
}
}
```
## Custom Conformance Rules
To write your own conformance rule, specify a relative path to a TypeScript or JavaScript file as the rule name:
```json {% fileName="nx.json" %}
{
"conformance": {
"rules": [
{
"rule": "./tools/local-conformance-rule.ts"
}
]
}
}
```
The rule definition file should look like this:
```ts {% fileName="tools/local-conformance-rule.ts" %}
import { createConformanceRule } from '@nx/powerpack-conformance';
const rule = createConformanceRule({
name: 'local-conformance-rule-example',
category: 'security', // `consistency`, `maintainability`, `reliability` or `security`
reporter: 'project-reporter', // `project-reporter` or `project-files-reporter`
implementation: async (context) => {
const { projectGraph, ruleOptions } = context;
// Your rule logic goes here
return {
severity: 'low', // 'high', 'medium' or 'low'
details: {
violations: [
// Return an empty array if the rule passes
{
sourceProject: 'my-project',
message: 'This is an informative error message.',
},
],
},
};
},
});
export default rule;
```
Note that the severity of the error is defined by the rule author and can be adjusted based on the specific violations that are found.
@@ -0,0 +1,326 @@
---
title: Overview of the Nx powerpack-owners Plugin
description: The Nx Powerpack Owners plugin provides the ability to define code ownership based on projects in addition to files
---
The `@nx/powerpack-owners` plugin extends the CODEOWNERS functionality to allow you to define code ownership based on projects in addition to the standard file-based definitions. It leverages the [`nx sync`](/concepts/sync-generators) command to compile `owners` configuration settings from `nx.json` and project configuration files into valid CODEOWNERS files for [GitHub](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners), [Bitbucket](https://support.atlassian.com/bitbucket-cloud/docs/set-up-and-use-code-owners/) or [GitLab](https://docs.gitlab.com/ee/user/project/codeowners/).
With this plugin, you can specify code ownership using the same project matcher syntax as [`nx run-many`](/nx-api/nx/documents/run-many#examples). This allows you to easily define rules for multiple projects that may not be located in the same directory. Also, the CODEOWNERS rules will not need to be revisited if a project location is changed or a new project is added.
{% callout title="This plugin requires an active Nx Powerpack license" %}
In order to use `@nx/powerpack-owners`, you need to have an active Powerpack license. If you don't have a license or it has expired, the syncing process will stop working and you'll need to manually maintain your CODEOWNERS file.
{% /callout %}
## Set Up @nx/powerpack-owners
1. [Activate Powerpack](/recipes/installation/activate-powerpack) if you haven't already
2. Install the package
```shell
nx add @nx/powerpack-owners
```
3. Configure Ownership
Configure the `@nx/powerpack-owners` plugin in the `nx.json` file or in individual project configuration files. Consult the [Owners Configuration Reference](#owners-configuration-reference) section for more details.
4. Configure the [Sync Generator](/concepts/sync-generators) and CI
The `nx add @nx/powerpack-owners` command should have registered the `@nx/powerpack-owners:sync-codeowners-file` generator as a `globalGenerator` in `nx.json`. You can double check to make sure:
```jsonc {% fileName="nx.json" %}
{
"sync": {
"globalGenerators": ["@nx/powerpack-owners:sync-codeowners-file"]
}
}
```
Add `nx sync:check` to the beginning of the CI process.
```yaml
- name: Ensure the workspace configuration is in sync
run: npx nx sync:check
```
It is also often helpful to add `nx sync` as a git push hook or git commit hook.
## Owners Configuration Reference
{% tabs %}
{% tab label="GitHub" %}
```jsonc {% fileName="nx.json" %}
{
// Can be set to true instead of an object to accept all defaults
"owners": {
// Options are `github`, `bitbucket` or `gitlab`. (Optional) Defaults to `github`
"format": "github",
// (Optional) Default changes based on format: `.github/CODEOWNERS`, `.bitbucket/CODEOWNERS`, `.gitlab/CODEOWNERS`
"outputPath": "CODEOWNERS",
// (Optional)
"patterns": [
{
"description": "A description of the rule",
"owners": ["@joelovesrust"],
// specify either projects or files, not both
// Can be any project specifier that could be used in `nx run-many`
// See https://nx.dev/nx-api/nx/documents/run-many
"projects": ["my-rust-app", "rust-*", "tag:rust"],
// File globs
"files": [".github/workflows/**/*"]
}
]
}
}
```
{% /tab %}
{% tab label="Bitbucket" %}
```jsonc {% fileName="nx.json" %}
{
// Can be set to true instead of an object to accept all defaults
"owners": {
// Options are `github`, `bitbucket` or `gitlab`. (Optional) Defaults to `github`
"format": "bitbucket",
// (Optional) Default changes based on format: `.github/CODEOWNERS`, `.bitbucket/CODEOWNERS`, `.gitlab/CODEOWNERS`
"outputPath": "CODEOWNERS",
// (Optional)
"patterns": [
{
"description": "A description of the rule",
"owners": ["@joelovesrust"],
// specify either projects or files, not both
// Can be any project specifier that could be used in `nx run-many`
// See https://nx.dev/nx-api/nx/documents/run-many
"projects": ["my-rust-app", "rust-*", "tag:rust"],
// File globs
"files": [".github/workflows/**/*"]
}
]
}
}
```
{% /tab %}
{% tab label="GitLab" %}
If you are using GitLab, you can specify CODEOWNERS [sections](https://docs.gitlab.com/ee/user/project/codeowners/#organize-code-owners-by-putting-them-into-sections) which give you a little more control over the PR process.
```jsonc {% fileName="nx.json" %}
{
// Can be set to true instead of an object to accept all defaults
"owners": {
// Options are `github`, `bitbucket` or `gitlab`. (Optional) Defaults to `github`
"format": "gitlab",
// (Optional) Default changes based on format: `.github/CODEOWNERS`, `.bitbucket/CODEOWNERS`, `.gitlab/CODEOWNERS`
"outputPath": "CODEOWNERS",
// (Optional)
"patterns": [
{
"description": "A description of the rule",
"owners": ["@joelovesrust"],
// Specify either `projects` or `files`, not both
// Can be any project specifier that could be used in `nx run-many`
// See https://nx.dev/nx-api/nx/documents/run-many
"projects": ["my-rust-app", "rust-*", "tag:rust"],
// File globs
"files": [".github/workflows/**/*"]
}
],
// (Optional)
"sections": [
{
// Labels the section
"name": "My section",
// (Optional) The owners to use if a pattern does not specify a set of owners
"defaultOwners": ["@cheddar"],
// Specify either `numberOfRequiredApprovals` or `optional`, not both
// (Optional) Require more than one person to approve the PR
"numberOfRequiredApprovals": 2,
// (Optional) Do not require any approvals, just notify the owners
"optional": true,
// Same format as the root patterns
"patterns": []
}
]
}
}
```
```jsonc {% fileName="path/to/project/project.json" %}
{
"owners": {
// Keys are file globs relative to the root of the project
// Owners can be listed as a string array
"**/*": ["@ahmed", "@petra"],
// Owners can be listed as an object with a description
"README.md": {
"description": "Jared is very particular about the README file",
"owners": ["@jared"]
}
}
};
```
{% /tab %}
{% /tabs %}
**Examples:**
{% tabs %}
{% tab label="GitHub" %}
```jsonc {% fileName="nx.json" %}
{
"owners": {
// defaults to "github"
"format": "github",
// defaults to ".github/CODEOWNERS"
"outputPath": "CODEOWNERS",
"patterns": [
{
"description": "Joe should double check all changes to rust code",
"projects": ["tag:rust"],
"owners": ["@joelovesrust"]
},
{
"description": "The Finance team owns these projects",
"projects": ["finance-*"],
"owners": ["@finance-team"]
},
{
"description": "Alice, Bob and Cecil work together on these projects",
"projects": ["admin", "booking", "cart"],
"owners": ["@alice", "@bob", "@cecil"]
},
{
"description": "CI Workflows",
"files": [".github/workflows/**/*"],
"owners": ["@devops"]
}
]
}
}
```
```jsonc {% fileName="packages/my-project/project.json" %}
{
"owners": {
"**/*": ["@ahmed", "@petra"],
"package.json": ["@ahmed"],
"README.md": {
"owners": ["@jared"],
"description": "Jared is very particular about the README file"
}
},
};
```
{% /tab %}
{% tab label="Bitbucket" %}
```jsonc {% fileName="nx.json" %}
{
"owners": {
"format": "bitbucket",
// defaults to ".bitbucket/CODEOWNERS"
"outputPath": "CODEOWNERS",
"patterns": [
{
"description": "Joe should double check all changes to rust code",
"projects": ["tag:rust"],
"owners": ["@joelovesrust"]
},
{
"description": "The Finance team owns these projects",
"projects": ["finance-*"],
"owners": ["@finance-team"]
},
{
"description": "Alice, Bob and Cecil work together on these projects",
"projects": ["admin", "booking", "cart"],
"owners": ["@alice", "@bob", "@cecil"]
},
{
"description": "CI Workflows",
"files": [".github/workflows/**/*"],
"owners": ["@devops"]
}
]
}
}
```
```jsonc {% fileName="packages/my-project/project.json" %}
{
"owners": {
"**/*": ["@ahmed", "@petra"],
"package.json": ["@ahmed"],
"README.md": {
"owners": ["@jared"],
"description": "Jared is very particular about the README file"
}
},
};
```
{% /tab %}
{% tab label="GitLab" %}
```jsonc {% fileName="nx.json" %}
{
"owners": {
"format": "gitlab",
// defaults to ".gitlab/CODEOWNERS"
"outputPath": "CODEOWNERS",
"patterns": [
{
"description": "Joe should double check all changes to rust code",
"projects": ["tag:rust"],
"owners": ["@joelovesrust"]
},
{
"description": "CI Workflows",
"files": [".github/workflows/**/*"],
"owners": ["@devops"]
}
],
"sections": [
{
"name": "Finance",
"defaultOwners": ["@finance-team"],
"numberOfRequiredApprovals": 2,
"patterns": [
{
"description": "The Finance team owns these projects",
"projects": ["finance-*"]
},
{
"description": "Alice, Bob and Cecil work together on these projects",
"projects": ["admin", "booking", "cart"],
"owners": ["@alice", "@bob", "@cecil"]
}
]
}
]
}
}
```
```jsonc {% fileName="packages/my-project/project.json" %}
{
"owners": {
"**/*": ["@ahmed", "@petra"],
"package.json": ["@ahmed"],
"README.md": {
"owners": ["@jared"],
"description": "Jared is very particular about the README file"
}
},
};
```
{% /tab %}
{% /tabs %}
@@ -0,0 +1,21 @@
{
"name": "init",
"factory": "./src/generators/init/init",
"schema": {
"$schema": "http://json-schema.org/schema",
"id": "NxPowerpackOwnersInit",
"title": "Add Powerpack Owners Configuration to the workspace",
"type": "object",
"cli": "nx",
"properties": {},
"additionalProperties": false,
"required": [],
"presets": []
},
"description": "Initialize Nx Powerpack Owners config",
"implementation": "/libs/nx-packages/powerpack-owners/src/generators/init/init.ts",
"aliases": [],
"hidden": false,
"path": "/libs/nx-packages/powerpack-owners/src/generators/init/schema.json",
"type": "generator"
}
@@ -0,0 +1,19 @@
{
"name": "sync-codeowners-file",
"factory": "./src/generators/sync-codeowners-file/generator",
"schema": {
"$schema": "https://json-schema.org/schema",
"$id": "NxPowerpackOwnersSyncCodeownersFileGenerator",
"title": "Nx Powerpack Owners Sync CODEOWNERS File Generator",
"type": "object",
"properties": {},
"required": [],
"presets": []
},
"description": "Sync Nx Powerpack Owners config to a CODEOWNERS file",
"implementation": "/libs/nx-packages/powerpack-owners/src/generators/sync-codeowners-file/generator.ts",
"aliases": [],
"hidden": false,
"path": "/libs/nx-packages/powerpack-owners/src/generators/sync-codeowners-file/schema.json",
"type": "generator"
}
@@ -0,0 +1,98 @@
---
title: Overview of the Nx powerpack-s3-cache Plugin
description: The powerpack-s3-cache Nx plugin enables you to use an Amazon S3 bucket to host your remote cache instead of Nx Cloud
---
The `@nx/powerpack-s3-cache` plugin enables you to use an [Amazon S3](https://aws.amazon.com/s3) bucket instead of Nx Cloud to host your remote cache.
This plugin will enable the remote cache for your Nx workspace, but does not provide any of the other features of Nx Cloud. If you want to leverage [distributed task execution](/ci/features/distribute-task-execution), [re-running flaky tasks](/ci/features/flaky-tasks) or [automatically splitting tasks](/ci/features/split-e2e-tasks), you'll need to [connect to Nx Cloud](/ci/intro/connect-to-nx-cloud) and use [Nx Replay](/ci/features/remote-cache) instead.
{% callout type="warning" title="Potential Cache Poisoning" %}
Using your own Amazon S3 bucket to host the remote cache opens you up to the possibility of [cache poisoning](/troubleshooting/unknown-local-cache). To avoid this, use [Nx Replay](/ci/features/remote-cache).
{% /callout %}
{% callout title="This plugin requires an active Nx Powerpack license" %}
In order to use `@nx/powerpack-s3-cache`, you need to have an active Powerpack license. If you don't have a license or it has expired, your cache will no longer be shared and each machine will use its local cache.
{% /callout %}
## Set Up @nx/powerpack-s3-cache
### 1. Install the Package
1. [Activate Powerpack](/recipes/installation/activate-powerpack) if you haven't already
2. Install the package
```shell
nx add @nx/powerpack-s3-cache
```
### 2. Authenticate with AWS
There are four different ways to authenticate with AWS. They will be attempted in this order:
1. Environment variables
2. INI config files
3. Single sign-on
4. `nx.json` settings
#### Environment Variables
[AWS provides environment variables](https://docs.aws.amazon.com/sdkref/latest/guide/environment-variables.html) that can be used to authenticate:
| **Environment Variable** | **Description** |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `AWS_ACCESS_KEY_ID` | The access key for your AWS account. |
| `AWS_SECRET_ACCESS_KEY` | The secret key for your AWS account. |
| `AWS_SESSION_TOKEN` | The session key for your AWS account. This is only needed when you are using temporary credentials. |
| `AWS_CREDENTIAL_EXPIRATION` | The expiration time of the credentials contained in the environment variables described above. This value must be in a format compatible with the [ISO-8601 standard](https://en.wikipedia.org/wiki/ISO_8601) and is only needed when you are using temporary credentials. |
Both the `AWS_ACCESS_KEY_ID` and the `AWS_SECRET_ACCESS_KEY` environment variables are required to use the environment variable authentication method.
#### INI Config Files
AWS can read your authentication credentials from [shared INI config files](https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html). The files are located at `~/.aws/credentials` and `~/.aws/config`. Both files are expected to be INI formatted with section names corresponding to profiles. Sections in the credentials file are treated as profile names, whereas profile sections in the config file must have the format of `[profile profile-name]`, except for the default profile. Profiles that appear in both files will not be merged, and the version that appears in the credentials file will be given precedence over the profile found in the config file.
#### Single Sign-On
Nx can read the active access token [created after running `aws sso login`](https://docs.aws.amazon.com/sdkref/latest/guide/understanding-sso.html) then request temporary AWS credentials. You can create the `AwsCredentialIdentityProvider` functions using the inline SSO parameters (`ssoStartUrl`, `ssoAccountId`, `ssoRegion`, `ssoRoleName`) or load them from [AWS SDKs and Tools shared configuration and credentials files](https://docs.aws.amazon.com/credref/latest/refdocs/creds-config-files.html). Profiles in the `credentials` file are given precedence over profiles in the `config` file.
#### Credentials in `nx.json` File
Storing your credentials in the `nx.json` file is the least secure of the 4 authentication options, since anyone with read access to your code base will have access to your AWS credentials.
```jsonc {% fileName="nx.json" %}
{
"s3": {
"ssoProfile": "default",
"accessKeyId": "MYACCESSKEYID",
"secretAccessKey": "MYSECRETACCESSKEY"
}
}
```
| **Property** | **Description** |
| ------------------- | ----------------------------------------------------------------------------- |
| **ssoProfile** | The name of the profile to use from your AWS CLI SSO Configuration (optional) |
| **endpoint** | The AWS endpoint URL (optional) |
| **accessKeyId** | AWS Access Key ID (optional) |
| **secretAccessKey** | AWS secret access key (optional) |
### 3. Configure S3 Cache
Regardless of how you manage your AWS authentication, you need to configure your Nx cache in the `nx.json` file. The `bucket` that you specify needs to already exist - Nx doesn't create it for you.
```jsonc {% fileName="nx.json" %}
{
"s3": {
"region": "us-east-1",
"bucket": "my-bucket",
"encryptionKey": "create-your-own-key"
}
}
```
| **Property** | **Description** |
| ----------------- | --------------------------------------------------------------------------------- |
| **region** | The id of the AWS region to use |
| **bucket** | The name of the AWS bucket to use |
| **encryptionKey** | Nx encryption key used to encrypt and decrypt artifacts from the cache (optional) |
@@ -0,0 +1,30 @@
{
"name": "init",
"factory": "./src/generators/init/generator",
"schema": {
"$schema": "https://json-schema.org/schema",
"$id": "Init",
"title": "",
"type": "object",
"properties": {
"region": {
"type": "string",
"description": "The AWS region the bucket is located in",
"x-prompt": "Which AWS region is the bucket located in?"
},
"bucket": {
"type": "string",
"description": "The the name of the S3 Bucket to store the Nx Cache in",
"x-prompt": "What is the name of the S3 Bucket to store the Nx Cache in?"
}
},
"required": ["region", "bucket"],
"presets": []
},
"description": "Initialize the S3 Cache",
"implementation": "/libs/nx-packages/powerpack-s3-cache/src/generators/init/generator.ts",
"aliases": [],
"hidden": false,
"path": "/libs/nx-packages/powerpack-s3-cache/src/generators/init/schema.json",
"type": "generator"
}
@@ -0,0 +1,35 @@
---
title: Overview of the Nx powerpack-shared-fs-cache Plugin
description: The powerpack-shared-fs-cache Nx plugin enables you to use a shared file system directory instead of Nx Cloud to host your remote cache
---
The `@nx/powerpack-shared-fs-cache` plugin enables you to use a shared file system directory instead of Nx Cloud to host your remote cache. You are responsible for the sharing mechanism for the directory, but the plugin ensures that Nx correctly associates task metadata with the file artifacts.
This plugin will enable the remote cache for your Nx workspace, but does not provide any of the other features of Nx Cloud. If you want to leverage [distributed task execution](/ci/features/distribute-task-execution), [re-running flaky tasks](/ci/features/flaky-tasks) or [automatically splitting tasks](/ci/features/split-e2e-tasks), you'll need to [connect to Nx Cloud](/ci/intro/connect-to-nx-cloud) and use [Nx Replay](/ci/features/remote-cache) instead.
{% callout type="warning" title="Potential Cache Poisoning" %}
Using a shared file system folder for the remote cache opens you up to the possibility of [cache poisoning](/troubleshooting/unknown-local-cache). To avoid this, use [Nx Replay](/ci/features/remote-cache).
{% /callout %}
{% callout title="This plugin requires an active Nx Powerpack license" %}
In order to use `@nx/powerpack-shared-fs-cache`, you need to have an active Powerpack license. If you don't have a license or it has expired, your cache will no longer be shared and each machine will use its local cache.
{% /callout %}
## Set Up @nx/powerpack-shared-fs-cache
### 1. Install the Package
1. [Activate Powerpack](/recipes/installation/activate-powerpack) if you haven't already
2. Install the package
```shell
nx add @nx/powerpack-shared-fs-cache
```
### 2. Configure the Cache Directory
The `@nx/powerpack-shared-fs-cache` plugin treats your local cache directory as if it is also a remote cache directory. The local cache directory can be set using `cacheDirectory` in the `nx.json` file or the `NX_CACHE_DIRECTORY` environment variable. The default local cache directory is `.nx/cache`
### 3. Share the Cache Directory
The `@nx/powerpack-shared-fs-cache` plugin does not actually share the cache directory across your organization. You are responsible for enabling the actual sharing mechanism. If you want Nx to handle the sharing, use [Nx Replay](/ci/features/remote-cache) instead. Your shared file system directory might be a directory that is saved and restored by a CI provider or it could be a shared network drive.
@@ -0,0 +1,19 @@
{
"name": "init",
"factory": "./src/generators/init/generator",
"schema": {
"$schema": "https://json-schema.org/schema",
"$id": "Init",
"title": "",
"type": "object",
"properties": {},
"required": [],
"presets": []
},
"description": "Add the shared fs cache",
"implementation": "/libs/nx-packages/powerpack-shared-fs-cache/src/generators/init/generator.ts",
"aliases": [],
"hidden": false,
"path": "/libs/nx-packages/powerpack-shared-fs-cache/src/generators/init/schema.json",
"type": "generator"
}
+24 -26
View File
@@ -85,29 +85,27 @@ Print the task graph to the console:
## Options
| Option | Type | Description |
| ----------- | ------- | ----------------------------------------- |
| ~~`--all`~~ | boolean | **Deprecated:** Use `nx run-many` instead |
|
| `--base` | string | Base of the current branch (usually main). |
| `--batch` | boolean | Run task(s) in batches for executors which support batches. (Default: `false`) |
| `--configuration` | string | This is the configuration to use when performing tasks on projects. |
| `--exclude` | string | Exclude certain projects from being processed. |
| `--excludeTaskDependencies` | boolean | Skips running dependent tasks first. (Default: `false`) |
| `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces. |
| `--graph` | string | Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal. |
| `--head` | string | Latest commit of the current branch (usually HEAD). |
| `--help` | boolean | Show help. |
| `--nxBail` | boolean | Stop command execution after the first failed task. (Default: `false`) |
| `--nxIgnoreCycles` | boolean | Ignore cycles in the task graph. (Default: `false`) |
| `--output-style` | `dynamic`, `static`, `stream`, `stream-without-prefixes` | Defines how Nx emits outputs tasks logs. **dynamic**: use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. **static**: uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. **stream**: nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr. **stream-without-prefixes**: nx prefixes the project name the target is running on, use this option remove the project name prefix from output. |
| `--parallel` | string | Max number of parallel processes [default is 3]. |
| `--runner` | string | This is the name of the tasks runner configured in nx.json. |
| `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache. (Default: `false`) |
| `--targets` | string | Tasks to run for affected projects. |
| `--uncommitted` | boolean | Uncommitted changes. |
| `--untracked` | boolean | Untracked changes. |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces). |
| `--version` | boolean | Show version number. |
| Option | Type | Description |
| --------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ~~`--all`~~ | boolean | **Deprecated:** Use `nx run-many` instead |
| `--base` | string | Base of the current branch (usually main). |
| `--batch` | boolean | Run task(s) in batches for executors which support batches. (Default: `false`) |
| `--configuration` | string | This is the configuration to use when performing tasks on projects. |
| `--exclude` | string | Exclude certain projects from being processed. |
| `--excludeTaskDependencies` | boolean | Skips running dependent tasks first. (Default: `false`) |
| `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces. |
| `--graph` | string | Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal. |
| `--head` | string | Latest commit of the current branch (usually HEAD). |
| `--help` | boolean | Show help. |
| `--nxBail` | boolean | Stop command execution after the first failed task. (Default: `false`) |
| `--nxIgnoreCycles` | boolean | Ignore cycles in the task graph. (Default: `false`) |
| `--output-style` | `dynamic`, `static`, `stream`, `stream-without-prefixes` | Defines how Nx emits outputs tasks logs. **dynamic**: use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. **static**: uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. **stream**: nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr. **stream-without-prefixes**: nx prefixes the project name the target is running on, use this option remove the project name prefix from output. |
| `--parallel` | string | Max number of parallel processes [default is 3]. |
| `--runner` | string | This is the name of the tasks runner configured in nx.json. |
| `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache. (Default: `false`) |
| `--skipSync` | boolean | Skips running the sync generators associated with the tasks. (Default: `false`) |
| `--targets` | string | Tasks to run for affected projects. |
| `--uncommitted` | boolean | Uncommitted changes. |
| `--untracked` | boolean | Untracked changes. |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces). |
| `--version` | boolean | Show version number. |
+1
View File
@@ -128,6 +128,7 @@ nx release publish
| `--registry` | string | The registry to publish to. |
| `--runner` | string | This is the name of the tasks runner configured in nx.json. |
| `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache. (Default: `false`) |
| `--skipSync` | boolean | Skips running the sync generators associated with the tasks. (Default: `false`) |
| `--tag` | string | The distribution tag to apply to the published package. |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces). |
| `--version` | boolean | Show version number. |
+1
View File
@@ -107,6 +107,7 @@ Print the task graph to the console:
| `--projects` | string | Projects to run. (comma/space delimited project names and/or patterns). |
| `--runner` | string | This is the name of the tasks runner configured in nx.json. |
| `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache. (Default: `false`) |
| `--skipSync` | boolean | Skips running the sync generators associated with the tasks. (Default: `false`) |
| `--targets` | string | Tasks to run for affected projects. |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces). |
| `--version` | boolean | Show version number. |
+1
View File
@@ -81,5 +81,6 @@ Run's a target named build:test for the myapp project. Note the quotes around th
| `--project` | string | Target project. |
| `--runner` | string | This is the name of the tasks runner configured in nx.json. |
| `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache. (Default: `false`) |
| `--skipSync` | boolean | Skips running the sync generators associated with the tasks. (Default: `false`) |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces). |
| `--version` | boolean | Show version number. |
@@ -23,6 +23,7 @@ Nx.json configuration
- [cli](../../devkit/documents/NxJsonConfiguration#cli): Object
- [defaultBase](../../devkit/documents/NxJsonConfiguration#defaultbase): string
- [defaultProject](../../devkit/documents/NxJsonConfiguration#defaultproject): string
- [enableDbCache](../../devkit/documents/NxJsonConfiguration#enabledbcache): boolean
- [extends](../../devkit/documents/NxJsonConfiguration#extends): string
- [generators](../../devkit/documents/NxJsonConfiguration#generators): Object
- [implicitDependencies](../../devkit/documents/NxJsonConfiguration#implicitdependencies): ImplicitDependencyEntry<T>
@@ -98,6 +99,14 @@ will be used. Convenient for small workspaces with one main application.
---
### enableDbCache
`Optional` **enableDbCache**: `boolean`
Enable the new experimental db based cache
---
### extends
`Optional` **extends**: `string`
+13
View File
@@ -21,6 +21,7 @@ use ProjectsConfigurations or NxJsonConfiguration
- [cli](../../devkit/documents/Workspace#cli): Object
- [defaultBase](../../devkit/documents/Workspace#defaultbase): string
- [defaultProject](../../devkit/documents/Workspace#defaultproject): string
- [enableDbCache](../../devkit/documents/Workspace#enabledbcache): boolean
- [extends](../../devkit/documents/Workspace#extends): string
- [generators](../../devkit/documents/Workspace#generators): Object
- [implicitDependencies](../../devkit/documents/Workspace#implicitdependencies): ImplicitDependencyEntry<string[] | "\*">
@@ -118,6 +119,18 @@ will be used. Convenient for small workspaces with one main application.
---
### enableDbCache
`Optional` **enableDbCache**: `boolean`
Enable the new experimental db based cache
#### Inherited from
[NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration).[enableDbCache](../../devkit/documents/NxJsonConfiguration#enabledbcache)
---
### extends
`Optional` **extends**: `string`
+301
View File
@@ -323,6 +323,39 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Powerpack Features",
"path": "/features/powerpack",
"id": "powerpack",
"isExternal": false,
"children": [
{
"name": "Run Language-Agnostic Conformance Rules",
"path": "/features/powerpack/conformance",
"id": "conformance",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Define Code Ownership at the Project Level",
"path": "/features/powerpack/owners",
"id": "owners",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Self-Host the Remote Cache",
"path": "/features/powerpack/custom-caching",
"id": "custom-caching",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"disableCollapsible": false
},
{
"name": "CI Features",
"path": "/features/ci-features",
@@ -439,6 +472,63 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Powerpack Features",
"path": "/features/powerpack",
"id": "powerpack",
"isExternal": false,
"children": [
{
"name": "Run Language-Agnostic Conformance Rules",
"path": "/features/powerpack/conformance",
"id": "conformance",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Define Code Ownership at the Project Level",
"path": "/features/powerpack/owners",
"id": "owners",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Self-Host the Remote Cache",
"path": "/features/powerpack/custom-caching",
"id": "custom-caching",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"disableCollapsible": false
},
{
"name": "Run Language-Agnostic Conformance Rules",
"path": "/features/powerpack/conformance",
"id": "conformance",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Define Code Ownership at the Project Level",
"path": "/features/powerpack/owners",
"id": "owners",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Self-Host the Remote Cache",
"path": "/features/powerpack/custom-caching",
"id": "custom-caching",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "CI Features",
"path": "/features/ci-features",
@@ -1081,6 +1171,14 @@
"id": "installation",
"isExternal": false,
"children": [
{
"name": "Activate Powerpack",
"path": "/recipes/installation/activate-powerpack",
"id": "activate-powerpack",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Install Nx in a Non-Javascript Repo",
"path": "/recipes/installation/install-non-javascript",
@@ -2095,6 +2193,14 @@
"id": "installation",
"isExternal": false,
"children": [
{
"name": "Activate Powerpack",
"path": "/recipes/installation/activate-powerpack",
"id": "activate-powerpack",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Install Nx in a Non-Javascript Repo",
"path": "/recipes/installation/install-non-javascript",
@@ -2114,6 +2220,14 @@
],
"disableCollapsible": false
},
{
"name": "Activate Powerpack",
"path": "/recipes/installation/activate-powerpack",
"id": "activate-powerpack",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Install Nx in a Non-Javascript Repo",
"path": "/recipes/installation/install-non-javascript",
@@ -4762,6 +4876,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Custom Task Runners",
"path": "/deprecated/custom-task-runners",
"id": "custom-task-runners",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Workspace Executors",
"path": "/deprecated/workspace-executors",
@@ -4861,6 +4983,14 @@
"children": [],
"disableCollapsible": false
},
{
"name": "Custom Task Runners",
"path": "/deprecated/custom-task-runners",
"id": "custom-task-runners",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Workspace Executors",
"path": "/deprecated/workspace-executors",
@@ -10407,6 +10537,177 @@
],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "powerpack-conformance",
"path": "/nx-api/powerpack-conformance",
"name": "powerpack-conformance",
"children": [
{
"id": "documents",
"path": "/nx-api/powerpack-conformance/documents",
"name": "documents",
"children": [
{
"name": "Overview",
"path": "/nx-api/powerpack-conformance/documents/overview",
"id": "overview",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"isExternal": false,
"disableCollapsible": false
}
],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "powerpack-license",
"path": "/nx-api/powerpack-license",
"name": "powerpack-license",
"children": [],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "powerpack-owners",
"path": "/nx-api/powerpack-owners",
"name": "powerpack-owners",
"children": [
{
"id": "documents",
"path": "/nx-api/powerpack-owners/documents",
"name": "documents",
"children": [
{
"name": "Overview",
"path": "/nx-api/powerpack-owners/documents/overview",
"id": "overview",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "generators",
"path": "/nx-api/powerpack-owners/generators",
"name": "generators",
"children": [
{
"id": "init",
"path": "/nx-api/powerpack-owners/generators/init",
"name": "init",
"children": [],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "sync-codeowners-file",
"path": "/nx-api/powerpack-owners/generators/sync-codeowners-file",
"name": "sync-codeowners-file",
"children": [],
"isExternal": false,
"disableCollapsible": false
}
],
"isExternal": false,
"disableCollapsible": false
}
],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "powerpack-s3-cache",
"path": "/nx-api/powerpack-s3-cache",
"name": "powerpack-s3-cache",
"children": [
{
"id": "documents",
"path": "/nx-api/powerpack-s3-cache/documents",
"name": "documents",
"children": [
{
"name": "Overview",
"path": "/nx-api/powerpack-s3-cache/documents/overview",
"id": "overview",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "generators",
"path": "/nx-api/powerpack-s3-cache/generators",
"name": "generators",
"children": [
{
"id": "init",
"path": "/nx-api/powerpack-s3-cache/generators/init",
"name": "init",
"children": [],
"isExternal": false,
"disableCollapsible": false
}
],
"isExternal": false,
"disableCollapsible": false
}
],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "powerpack-shared-fs-cache",
"path": "/nx-api/powerpack-shared-fs-cache",
"name": "powerpack-shared-fs-cache",
"children": [
{
"id": "documents",
"path": "/nx-api/powerpack-shared-fs-cache/documents",
"name": "documents",
"children": [
{
"name": "Overview",
"path": "/nx-api/powerpack-shared-fs-cache/documents/overview",
"id": "overview",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "generators",
"path": "/nx-api/powerpack-shared-fs-cache/generators",
"name": "generators",
"children": [
{
"id": "init",
"path": "/nx-api/powerpack-shared-fs-cache/generators/init",
"name": "init",
"children": [],
"isExternal": false,
"disableCollapsible": false
}
],
"isExternal": false,
"disableCollapsible": false
}
],
"isExternal": false,
"disableCollapsible": false
}
]
}
+147
View File
@@ -3499,5 +3499,152 @@
}
},
"path": "/nx-api/workspace"
},
"powerpack-conformance": {
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "powerpack-conformance",
"packageName": "@nx/powerpack-conformance",
"description": "A Nx Powerpack plugin which allows users to write and apply rules for your entire workspace that help with consistency, maintainability, reliability and security.",
"documents": {
"/nx-api/powerpack-conformance/documents/overview": {
"id": "overview",
"name": "Overview",
"description": "A Nx Powerpack plugin which allows users to write and apply rules for your entire workspace that help with consistency, maintainability, reliability and security.",
"file": "external-generated/packages/powerpack-conformance/documents/overview",
"itemList": [],
"isExternal": false,
"path": "/nx-api/powerpack-conformance/documents/overview",
"tags": [],
"originalFilePath": "shared/packages/powerpack-conformance/powerpack-conformance-plugin"
}
},
"root": "/libs/nx-packages/powerpack-conformance",
"source": "/libs/nx-packages/powerpack-conformance/src",
"executors": {},
"generators": {},
"path": "/nx-api/powerpack-conformance"
},
"powerpack-license": {
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "powerpack-license",
"packageName": "@nx/powerpack-license",
"description": "Package to provide the ability to activate and read licenses for Nx Powerpack.",
"documents": {},
"root": "/libs/nx-packages/powerpack-license",
"source": "/libs/nx-packages/powerpack-license/src",
"executors": {},
"generators": {},
"path": "/nx-api/powerpack-license"
},
"powerpack-owners": {
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "powerpack-owners",
"packageName": "@nx/powerpack-owners",
"description": "A Nx Powerpack plugin which provides the ability to configure and maintain codeowners for projects in Nx workspaces.",
"documents": {
"/nx-api/powerpack-owners/documents/overview": {
"id": "overview",
"name": "Overview",
"description": "A Nx Powerpack plugin which provides the ability to configure and maintain codeowners for projects in Nx workspaces.",
"file": "external-generated/packages/powerpack-owners/documents/overview",
"itemList": [],
"isExternal": false,
"path": "/nx-api/powerpack-owners/documents/overview",
"tags": [],
"originalFilePath": "shared/packages/powerpack-owners/powerpack-owners-plugin"
}
},
"root": "/libs/nx-packages/powerpack-owners",
"source": "/libs/nx-packages/powerpack-owners/src",
"executors": {},
"generators": {
"/nx-api/powerpack-owners/generators/init": {
"description": "Initialize Nx Powerpack Owners config",
"file": "external-generated/packages/powerpack-owners/generators/init.json",
"hidden": false,
"name": "init",
"originalFilePath": "/libs/nx-packages/powerpack-owners/src/generators/init/schema.json",
"path": "/nx-api/powerpack-owners/generators/init",
"type": "generator"
},
"/nx-api/powerpack-owners/generators/sync-codeowners-file": {
"description": "Sync Nx Powerpack Owners config to a CODEOWNERS file",
"file": "external-generated/packages/powerpack-owners/generators/sync-codeowners-file.json",
"hidden": false,
"name": "sync-codeowners-file",
"originalFilePath": "/libs/nx-packages/powerpack-owners/src/generators/sync-codeowners-file/schema.json",
"path": "/nx-api/powerpack-owners/generators/sync-codeowners-file",
"type": "generator"
}
},
"path": "/nx-api/powerpack-owners"
},
"powerpack-s3-cache": {
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "powerpack-s3-cache",
"packageName": "@nx/powerpack-s3-cache",
"description": "A Nx Powerpack plugin which provides a Nx cache which can be self hosted on Amazon S3.",
"documents": {
"/nx-api/powerpack-s3-cache/documents/overview": {
"id": "overview",
"name": "Overview",
"description": "A Nx Powerpack plugin which provides a Nx cache which can be self hosted on Amazon S3.",
"file": "external-generated/packages/powerpack-s3-cache/documents/overview",
"itemList": [],
"isExternal": false,
"path": "/nx-api/powerpack-s3-cache/documents/overview",
"tags": [],
"originalFilePath": "shared/packages/powerpack-s3-cache/powerpack-s3-cache-plugin"
}
},
"root": "/libs/nx-packages/powerpack-s3-cache",
"source": "/libs/nx-packages/powerpack-s3-cache/src",
"executors": {},
"generators": {
"/nx-api/powerpack-s3-cache/generators/init": {
"description": "Initialize the S3 Cache",
"file": "external-generated/packages/powerpack-s3-cache/generators/init.json",
"hidden": false,
"name": "init",
"originalFilePath": "/libs/nx-packages/powerpack-s3-cache/src/generators/init/schema.json",
"path": "/nx-api/powerpack-s3-cache/generators/init",
"type": "generator"
}
},
"path": "/nx-api/powerpack-s3-cache"
},
"powerpack-shared-fs-cache": {
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "powerpack-shared-fs-cache",
"packageName": "@nx/powerpack-shared-fs-cache",
"description": "A Nx Powerpack plugin to enable you to use a shared file system directory",
"documents": {
"/nx-api/powerpack-shared-fs-cache/documents/overview": {
"id": "overview",
"name": "Overview",
"description": "A Nx Powerpack plugin to enable you to use a shared file system directory",
"file": "external-generated/packages/powerpack-shared-fs-cache/documents/overview",
"itemList": [],
"isExternal": false,
"path": "/nx-api/powerpack-shared-fs-cache/documents/overview",
"tags": [],
"originalFilePath": "shared/packages/powerpack-shared-fs-cache/powerpack-shared-fs-cache-plugin"
}
},
"root": "/libs/nx-packages/powerpack-shared-fs-cache",
"source": "/libs/nx-packages/powerpack-shared-fs-cache/src",
"executors": {},
"generators": {
"/nx-api/powerpack-shared-fs-cache/generators/init": {
"description": "Add the shared fs cache",
"file": "external-generated/packages/powerpack-shared-fs-cache/generators/init.json",
"hidden": false,
"name": "init",
"originalFilePath": "/libs/nx-packages/powerpack-shared-fs-cache/src/generators/init/schema.json",
"path": "/nx-api/powerpack-shared-fs-cache/generators/init",
"type": "generator"
}
},
"path": "/nx-api/powerpack-shared-fs-cache"
}
}
+178
View File
@@ -438,6 +438,51 @@
"path": "/features/manage-releases",
"tags": ["nx-release"]
},
{
"id": "powerpack",
"name": "Powerpack Features",
"description": "Nx Powerpack is a suite of paid extensions for the Nx CLI specifically designed for enterprises.",
"mediaImage": "",
"file": "shared/features/powerpack/index",
"itemList": [
{
"id": "conformance",
"name": "Run Language-Agnostic Conformance Rules",
"description": "Write and apply rules for your Nx workspace",
"mediaImage": "",
"file": "shared/features/powerpack/conformance",
"itemList": [],
"isExternal": false,
"path": "/features/powerpack/conformance",
"tags": ["conformance"]
},
{
"id": "owners",
"name": "Define Code Ownership at the Project Level",
"description": "Configure and maintain code owners for projects in an Nx workspace",
"mediaImage": "",
"file": "shared/features/powerpack/owners",
"itemList": [],
"isExternal": false,
"path": "/features/powerpack/owners",
"tags": ["owners"]
},
{
"id": "custom-caching",
"name": "Self-Host the Remote Cache",
"description": "Host the remote cache without using Nx Cloud",
"mediaImage": "",
"file": "shared/features/powerpack/custom-caching",
"itemList": [],
"isExternal": false,
"path": "/features/powerpack/custom-caching",
"tags": ["custom-caching"]
}
],
"isExternal": false,
"path": "/features/powerpack",
"tags": []
},
{
"id": "ci-features",
"name": "CI Features",
@@ -598,6 +643,84 @@
"path": "/features/manage-releases",
"tags": ["nx-release"]
},
"/features/powerpack": {
"id": "powerpack",
"name": "Powerpack Features",
"description": "Nx Powerpack is a suite of paid extensions for the Nx CLI specifically designed for enterprises.",
"mediaImage": "",
"file": "shared/features/powerpack/index",
"itemList": [
{
"id": "conformance",
"name": "Run Language-Agnostic Conformance Rules",
"description": "Write and apply rules for your Nx workspace",
"mediaImage": "",
"file": "shared/features/powerpack/conformance",
"itemList": [],
"isExternal": false,
"path": "/features/powerpack/conformance",
"tags": ["conformance"]
},
{
"id": "owners",
"name": "Define Code Ownership at the Project Level",
"description": "Configure and maintain code owners for projects in an Nx workspace",
"mediaImage": "",
"file": "shared/features/powerpack/owners",
"itemList": [],
"isExternal": false,
"path": "/features/powerpack/owners",
"tags": ["owners"]
},
{
"id": "custom-caching",
"name": "Self-Host the Remote Cache",
"description": "Host the remote cache without using Nx Cloud",
"mediaImage": "",
"file": "shared/features/powerpack/custom-caching",
"itemList": [],
"isExternal": false,
"path": "/features/powerpack/custom-caching",
"tags": ["custom-caching"]
}
],
"isExternal": false,
"path": "/features/powerpack",
"tags": []
},
"/features/powerpack/conformance": {
"id": "conformance",
"name": "Run Language-Agnostic Conformance Rules",
"description": "Write and apply rules for your Nx workspace",
"mediaImage": "",
"file": "shared/features/powerpack/conformance",
"itemList": [],
"isExternal": false,
"path": "/features/powerpack/conformance",
"tags": ["conformance"]
},
"/features/powerpack/owners": {
"id": "owners",
"name": "Define Code Ownership at the Project Level",
"description": "Configure and maintain code owners for projects in an Nx workspace",
"mediaImage": "",
"file": "shared/features/powerpack/owners",
"itemList": [],
"isExternal": false,
"path": "/features/powerpack/owners",
"tags": ["owners"]
},
"/features/powerpack/custom-caching": {
"id": "custom-caching",
"name": "Self-Host the Remote Cache",
"description": "Host the remote cache without using Nx Cloud",
"mediaImage": "",
"file": "shared/features/powerpack/custom-caching",
"itemList": [],
"isExternal": false,
"path": "/features/powerpack/custom-caching",
"tags": ["custom-caching"]
},
"/features/ci-features": {
"id": "ci-features",
"name": "CI Features",
@@ -1476,6 +1599,17 @@
"mediaImage": "",
"file": "",
"itemList": [
{
"id": "activate-powerpack",
"name": "Activate Powerpack",
"description": "",
"mediaImage": "",
"file": "shared/recipes/installation/activate-powerpack",
"itemList": [],
"isExternal": false,
"path": "/recipes/installation/activate-powerpack",
"tags": ["installation"]
},
{
"id": "install-non-javascript",
"name": "Install Nx in a Non-Javascript Repo",
@@ -2864,6 +2998,17 @@
"mediaImage": "",
"file": "",
"itemList": [
{
"id": "activate-powerpack",
"name": "Activate Powerpack",
"description": "",
"mediaImage": "",
"file": "shared/recipes/installation/activate-powerpack",
"itemList": [],
"isExternal": false,
"path": "/recipes/installation/activate-powerpack",
"tags": ["installation"]
},
{
"id": "install-non-javascript",
"name": "Install Nx in a Non-Javascript Repo",
@@ -2891,6 +3036,17 @@
"path": "/recipes/installation",
"tags": []
},
"/recipes/installation/activate-powerpack": {
"id": "activate-powerpack",
"name": "Activate Powerpack",
"description": "",
"mediaImage": "",
"file": "shared/recipes/installation/activate-powerpack",
"itemList": [],
"isExternal": false,
"path": "/recipes/installation/activate-powerpack",
"tags": ["installation"]
},
"/recipes/installation/install-non-javascript": {
"id": "install-non-javascript",
"name": "Install Nx in a Non-Javascript Repo",
@@ -6521,6 +6677,17 @@
"path": "/deprecated/workspace-generators",
"tags": []
},
{
"id": "custom-task-runners",
"name": "Custom Task Runners",
"description": "",
"mediaImage": "",
"file": "shared/deprecated/custom-task-runners",
"itemList": [],
"isExternal": false,
"path": "/deprecated/custom-task-runners",
"tags": []
},
{
"id": "workspace-executors",
"name": "Workspace Executors",
@@ -6658,6 +6825,17 @@
"path": "/deprecated/workspace-generators",
"tags": []
},
"/deprecated/custom-task-runners": {
"id": "custom-task-runners",
"name": "Custom Task Runners",
"description": "",
"mediaImage": "",
"file": "shared/deprecated/custom-task-runners",
"itemList": [],
"isExternal": false,
"path": "/deprecated/custom-task-runners",
"tags": []
},
"/deprecated/workspace-executors": {
"id": "workspace-executors",
"name": "Workspace Executors",
+34
View File
@@ -575,6 +575,33 @@
"path": "/nx-api/nx/documents/release"
}
],
"conformance": [
{
"description": "Write and apply rules for your Nx workspace",
"file": "shared/features/powerpack/conformance",
"id": "conformance",
"name": "Run Language-Agnostic Conformance Rules",
"path": "/features/powerpack/conformance"
}
],
"owners": [
{
"description": "Configure and maintain code owners for projects in an Nx workspace",
"file": "shared/features/powerpack/owners",
"id": "owners",
"name": "Define Code Ownership at the Project Level",
"path": "/features/powerpack/owners"
}
],
"custom-caching": [
{
"description": "Host the remote cache without using Nx Cloud",
"file": "shared/features/powerpack/custom-caching",
"id": "custom-caching",
"name": "Self-Host the Remote Cache",
"path": "/features/powerpack/custom-caching"
}
],
"intro": [
{
"description": "",
@@ -821,6 +848,13 @@
}
],
"installation": [
{
"description": "",
"file": "shared/recipes/installation/activate-powerpack",
"id": "activate-powerpack",
"name": "Activate Powerpack",
"path": "/recipes/installation/activate-powerpack"
},
{
"description": "",
"file": "shared/recipes/installation/install-non-javascript",
@@ -27,6 +27,11 @@
"type": "boolean",
"description": "Automatically update any invalid package versions",
"default": false
},
"force": {
"type": "boolean",
"description": "Force the installation of a package, even if it is already installed",
"default": false
}
},
"presets": []
@@ -85,29 +85,27 @@ Print the task graph to the console:
## Options
| Option | Type | Description |
| ----------- | ------- | ----------------------------------------- |
| ~~`--all`~~ | boolean | **Deprecated:** Use `nx run-many` instead |
|
| `--base` | string | Base of the current branch (usually main). |
| `--batch` | boolean | Run task(s) in batches for executors which support batches. (Default: `false`) |
| `--configuration` | string | This is the configuration to use when performing tasks on projects. |
| `--exclude` | string | Exclude certain projects from being processed. |
| `--excludeTaskDependencies` | boolean | Skips running dependent tasks first. (Default: `false`) |
| `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces. |
| `--graph` | string | Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal. |
| `--head` | string | Latest commit of the current branch (usually HEAD). |
| `--help` | boolean | Show help. |
| `--nxBail` | boolean | Stop command execution after the first failed task. (Default: `false`) |
| `--nxIgnoreCycles` | boolean | Ignore cycles in the task graph. (Default: `false`) |
| `--output-style` | `dynamic`, `static`, `stream`, `stream-without-prefixes` | Defines how Nx emits outputs tasks logs. **dynamic**: use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. **static**: uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. **stream**: nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr. **stream-without-prefixes**: nx prefixes the project name the target is running on, use this option remove the project name prefix from output. |
| `--parallel` | string | Max number of parallel processes [default is 3]. |
| `--runner` | string | This is the name of the tasks runner configured in nx.json. |
| `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache. (Default: `false`) |
| `--targets` | string | Tasks to run for affected projects. |
| `--uncommitted` | boolean | Uncommitted changes. |
| `--untracked` | boolean | Untracked changes. |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces). |
| `--version` | boolean | Show version number. |
| Option | Type | Description |
| --------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ~~`--all`~~ | boolean | **Deprecated:** Use `nx run-many` instead |
| `--base` | string | Base of the current branch (usually main). |
| `--batch` | boolean | Run task(s) in batches for executors which support batches. (Default: `false`) |
| `--configuration` | string | This is the configuration to use when performing tasks on projects. |
| `--exclude` | string | Exclude certain projects from being processed. |
| `--excludeTaskDependencies` | boolean | Skips running dependent tasks first. (Default: `false`) |
| `--files` | string | Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces. |
| `--graph` | string | Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. Pass "stdout" to print the results to the terminal. |
| `--head` | string | Latest commit of the current branch (usually HEAD). |
| `--help` | boolean | Show help. |
| `--nxBail` | boolean | Stop command execution after the first failed task. (Default: `false`) |
| `--nxIgnoreCycles` | boolean | Ignore cycles in the task graph. (Default: `false`) |
| `--output-style` | `dynamic`, `static`, `stream`, `stream-without-prefixes` | Defines how Nx emits outputs tasks logs. **dynamic**: use dynamic output life cycle, previous content is overwritten or modified as new outputs are added, display minimal logs by default, always show errors. This output format is recommended on your local development environments. **static**: uses static output life cycle, no previous content is rewritten or modified as new outputs are added. This output format is recommened for CI environments. **stream**: nx by default logs output to an internal output stream, enable this option to stream logs to stdout / stderr. **stream-without-prefixes**: nx prefixes the project name the target is running on, use this option remove the project name prefix from output. |
| `--parallel` | string | Max number of parallel processes [default is 3]. |
| `--runner` | string | This is the name of the tasks runner configured in nx.json. |
| `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache. (Default: `false`) |
| `--skipSync` | boolean | Skips running the sync generators associated with the tasks. (Default: `false`) |
| `--targets` | string | Tasks to run for affected projects. |
| `--uncommitted` | boolean | Uncommitted changes. |
| `--untracked` | boolean | Untracked changes. |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces). |
| `--version` | boolean | Show version number. |
@@ -128,6 +128,7 @@ nx release publish
| `--registry` | string | The registry to publish to. |
| `--runner` | string | This is the name of the tasks runner configured in nx.json. |
| `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache. (Default: `false`) |
| `--skipSync` | boolean | Skips running the sync generators associated with the tasks. (Default: `false`) |
| `--tag` | string | The distribution tag to apply to the published package. |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces). |
| `--version` | boolean | Show version number. |
@@ -107,6 +107,7 @@ Print the task graph to the console:
| `--projects` | string | Projects to run. (comma/space delimited project names and/or patterns). |
| `--runner` | string | This is the name of the tasks runner configured in nx.json. |
| `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache. (Default: `false`) |
| `--skipSync` | boolean | Skips running the sync generators associated with the tasks. (Default: `false`) |
| `--targets` | string | Tasks to run for affected projects. |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces). |
| `--version` | boolean | Show version number. |
@@ -81,5 +81,6 @@ Run's a target named build:test for the myapp project. Note the quotes around th
| `--project` | string | Target project. |
| `--runner` | string | This is the name of the tasks runner configured in nx.json. |
| `--skipNxCache` | boolean | Rerun the tasks even when the results are available in the cache. (Default: `false`) |
| `--skipSync` | boolean | Skips running the sync generators associated with the tasks. (Default: `false`) |
| `--verbose` | boolean | Prints additional information about the commands (e.g., stack traces). |
| `--version` | boolean | Show version number. |
@@ -24,6 +24,10 @@
"type": "boolean",
"description": "Run tests with Playwright Inspector. Shortcut for 'PWDEBUG=1' environment variable and '--timeout=0',--max-failures=1 --headed --workers=1' options"
},
"lastFailed": {
"type": "boolean",
"description": "Run only the tests that failed in the last run"
},
"forbidOnly": {
"type": "boolean",
"description": "Fail if test.only is called"
@@ -181,7 +181,7 @@
"type": "string",
"enum": ["vite", "webpack", "rspack"],
"x-prompt": "Which bundler do you want to use to build the application?",
"default": "webpack",
"default": "vite",
"x-priority": "important"
},
"minimal": {
+92
View File
@@ -131,6 +131,35 @@
"tags": ["nx-release"],
"file": "shared/features/manage-releases"
},
{
"name": "Powerpack Features",
"id": "powerpack",
"description": "Nx Powerpack is a suite of paid extensions for the Nx CLI specifically designed for enterprises.",
"file": "shared/features/powerpack/index",
"itemList": [
{
"name": "Run Language-Agnostic Conformance Rules",
"description": "Write and apply rules for your Nx workspace",
"id": "conformance",
"tags": ["conformance"],
"file": "shared/features/powerpack/conformance"
},
{
"name": "Define Code Ownership at the Project Level",
"description": "Configure and maintain code owners for projects in an Nx workspace",
"id": "owners",
"tags": ["owners"],
"file": "shared/features/powerpack/owners"
},
{
"name": "Self-Host the Remote Cache",
"description": "Host the remote cache without using Nx Cloud",
"id": "custom-caching",
"tags": ["custom-caching"],
"file": "shared/features/powerpack/custom-caching"
}
]
},
{
"name": "CI Features",
"id": "ci-features",
@@ -354,6 +383,12 @@
"id": "installation",
"description": "Installing Nx",
"itemList": [
{
"name": "Activate Powerpack",
"id": "activate-powerpack",
"tags": ["installation"],
"file": "shared/recipes/installation/activate-powerpack"
},
{
"name": "Install Nx in a Non-Javascript Repo",
"id": "install-non-javascript",
@@ -1364,6 +1399,11 @@
"id": "workspace-generators",
"file": "shared/deprecated/workspace-generators"
},
{
"name": "Custom Task Runners",
"id": "custom-task-runners",
"file": "shared/deprecated/custom-task-runners"
},
{
"name": "Workspace Executors",
"id": "workspace-executors",
@@ -2558,6 +2598,58 @@
}
]
},
{
"name": "powerpack-owners",
"id": "powerpack-owners",
"description": "powerpack-owners package.",
"itemList": [
{
"name": "Overview",
"id": "overview",
"path": "/nx-api/powerpack-owners",
"file": "shared/packages/powerpack-owners/powerpack-owners-plugin"
}
]
},
{
"name": "powerpack-conformance",
"id": "powerpack-conformance",
"description": "powerpack-conformance package.",
"itemList": [
{
"name": "Overview",
"id": "overview",
"path": "/nx-api/powerpack-conformance",
"file": "shared/packages/powerpack-conformance/powerpack-conformance-plugin"
}
]
},
{
"name": "powerpack-s3-cache",
"id": "powerpack-s3-cache",
"description": "powerpack-s3-cache package.",
"itemList": [
{
"name": "Overview",
"id": "overview",
"path": "/nx-api/powerpack-s3-cache",
"file": "shared/packages/powerpack-s3-cache/powerpack-s3-cache-plugin"
}
]
},
{
"name": "powerpack-shared-fs-cache",
"id": "powerpack-shared-fs-cache",
"description": "powerpack-shared-fs-cache package.",
"itemList": [
{
"name": "Overview",
"id": "overview",
"path": "/nx-api/powerpack-shared-fs-cache",
"file": "shared/packages/powerpack-shared-fs-cache/powerpack-shared-fs-cache-plugin"
}
]
},
{
"name": "gradle",
"id": "gradle",
+1 -1
View File
@@ -46,7 +46,7 @@ In order to guarantee that cache poisoning will never affect your end users, [sk
### Do Not Manually Share Your Local Cache
Nx implicitly trusts the local cache which is stored by default in the `.nx/cache` folder. You can change the location of that folder in the `nx.json` file, so it could be tempting to place it on a network drive and easily share your cache with everyone on the company network. However, by doing this you've voided the guarantee of immutability from your cache. If someone has direct access to the cached files, they could directly poison the cache. Nx will automatically detect if a cache entry has been created in your local cache using a different machine and warn you with an [Unknown Local Cache Error](/troubleshooting/unknown-local-cache). Instead, use Nx Cloud [remote caching](/ci/features/remote-cache).
Nx implicitly trusts the local cache which is stored by default in the `.nx/cache` folder. You can change the location of that folder in the `nx.json` file, so it could be tempting to place it on a network drive and easily share your cache with everyone on the company network. However, by doing this you've voided the guarantee of immutability from your cache. If someone has direct access to the cached files, they could directly poison the cache. Nx will automatically detect if a cache entry has been created in your local cache using a different machine and warn you with an [Unknown Local Cache Error](/troubleshooting/unknown-local-cache). Instead, use Nx Cloud [remote caching](/ci/features/remote-cache). If you want share your local cache anyway, you can [activate Nx Powerpack](/recipes/installation/activate-powerpack) and use the [`@nx/powerpack-shared-fs-cache`](/nx-api/powerpack-shared-fs-cache) plugin.
### Configure End to End Encryption
Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

+2 -2
View File
@@ -1,8 +1,8 @@
# Nx CLI and CI Access Tokens
The permissions and membership define what developers can access on nx.app but they don't affect what happens when you run Nx commands in CI. To manage that, you need to provision CI access tokens in your workspace settings, under the `CI access tokens` tab.
The permissions and membership define what developers can access on nx.app but they don't affect what happens when you run Nx commands in CI. To manage that, you need to provision CI access tokens in your workspace settings, under the `Access Control` tab.
![CI Access Tokens Settings Page](/nx-cloud/recipes/ci-access-tokens-settings.avif)
![Access Control Settings Page](/nx-cloud/recipes/access-control-settings.avif)
## Access Types
Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

+8 -13
View File
@@ -80,14 +80,13 @@ You can configure your CI run by passing the following flags:
### --distribute-on
Tells Nx Cloud how many agents to use (and what launch templates to use) to distribute tasks. E.g.,
By default, `npx nx-cloud start-ci-run` is intended for use with [Nx Agents](/ci/features/distribute-task-execution) and expects `--distribute-on` to be configured. It will output a warning if this flag is not set. If you are running a distributed execution with a legacy setup without Nx Agents, you can pass `--distribute-on=manual` to disable this warning.
This command tells Nx Cloud how many agents to use (and what launch templates to use) to distribute tasks. E.g.,
`npx nx-cloud start-ci-run --distribute-on="8 linux-medium-js"` will distribute CI using 8 agents that are initialized
using the `linux-medium-js` launch template.
You can use different types of launch templates as follows:
`npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js, 3 linux-large-js"`.
You can also define the configuration in a file and reference it as follows:
You can also [define the configuration in a file](/ci/features/dynamic-agents) and reference it as follows:
`npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"`.
```yaml {% fileName=".nx/workflows/dynamic-changesets.yaml" %}
@@ -105,16 +104,12 @@ Nx Cloud side. You can disable this by passing `--require-explicit-completion`.
### --stop-agents-after
By default, Nx Cloud won't terminate any agents until you invoke `npx nx-cloud stop-all-agents` because Nx Cloud
doesn't know if you will need agents to run another command. This can result in agents being idle at the end of a CI
run.
You can fix it by telling Nx Cloud that it can terminate agents after it sees a certain
You can tell Nx Cloud to terminate agents after it sees a certain
target: `npx nx-cloud start-ci-run --stop-agents-after=e2e`.
The target name for `--stop-agents-after` should be the last target run within your pipeline. If not, Nx Cloud will end the CI pipeline execution, preventing the subsequent commands from running.
Incorrect example:
#### Incorrect example:
```yaml
- run: npx nx-cloud start-ci-run --stop-agents-after=build
@@ -125,7 +120,7 @@ Incorrect example:
If build tasks are all cached, then all build tasks will complete immediately causing lint and test tasks to fail with an error saying the CI pipeline execution has already been completed. Instead you should re-order your targets to make sure the build target is last.
Corrected example:
#### Corrected example:
```yaml
- run: npx nx-cloud start-ci-run --stop-agents-after=build
@@ -162,7 +157,7 @@ functionality of that machine. In case of unexpected issues on Nx Agents, try fa
Note: none of the values passed to Nx Agents are stored by Nx Cloud.
## Enabling/Disabling Distribution
### Enabling/Disabling Distribution
Invoking `npx nx-cloud start-ci-run` will tell Nx to distribute by default. You can enable/disable distribution for
individual commands as follows:
@@ -16,7 +16,7 @@ This behavior can be disabled by setting the [--require-explicit-completion](/ci
### A command was issued to stop all Nx Cloud agents
Nx Cloud provides two commands to forcibly stop agents, [stop-all-agents and complete-ci-run](/ci/reference/nx-cloud-cli#npx-nxcloud-stopallagents).
Nx Cloud provides two commands to forcibly stop agents, [stop-all-agents and complete-ci-run](/ci/reference/nx-cloud-cli#npx-nxcloud-stopallagents). The two command options are functionally equivalent, but the `complete-ci-run` command is preferred.
Once these commands are invoked, the current CI Pipeline Execution is closed and can no longer receive new work.
@@ -8,7 +8,7 @@ When you serve your host application via `nx serve host`, the Nx `module-federat
{% callout type="note" title="Using Module Federation with SSR?" %}
The same technique outlined below also applies to the `module-federation-ssr-dev-server`.
This is important to know when it comes to deploying your SSR Module Federation application as it indicates that you can place the build artifacts from the `remotes` onto something like an AWS S3 Bucket and your `host` will be able to find these files correctly.
This is important to know when it comes to deploying your SSR Module Federation application as it indicates that you can place the build artifacts from the `remotes` onto something like an Amazon S3 Bucket and your `host` will be able to find these files correctly.
{% /callout %}
The executor does the following:
@@ -31,7 +31,7 @@ If you prefer diagrams, the one below outlines the above steps.
Previously, when using shared workspace libraries as part of your Module Federation application, there was a chance that the workspace library would be provided by one of the `static remotes`. This would cause issues where changes to those shared libraries would not be reflected in the locally served application.
To combat this issue, we developed the `NxRuntimeLibraryControlPlugin`. This is a [Runtime Plugin]() that will ensure that workspace libraries are only shared via any active `dev remote`. This means that any changes to the shared library will be picked up by `webpack-dev-server` and, as such, reflected in the locally served application.
To combat this issue, we developed the `NxRuntimeLibraryControlPlugin`. This is a _Runtime Plugin_ that will ensure that workspace libraries are only shared via any active `dev remote`. This means that any changes to the shared library will be picked up by `webpack-dev-server` and, as such, reflected in the locally served application.
This plugin is enabled by default, however, you can turn it off in your `module-federation.config` file:
@@ -0,0 +1,12 @@
# tasksRunnerOptions
As of Nx 20, the `tasksRunnerOptions` property in `nx.json` is deprecated. This property was used to register custom task runners. `tasksRunnerOptions` and custom task runners will cease to function in Nx 21. In Nx 20, the local cache metadata and project graph are stored in a database, rather than using the file system. (Cache artifacts are still stored on the file system.) This has two benefits:
1. Cache reads and writes are faster.
2. The local cache is more secure since other processes with access to the file system can no longer read or modify the cache.
For most organizations, this feature is a net positive. If you are currently using a custom task runner, you are most likely using it to define your own custom [remote cache](/ci/features/remote-cache) storage location. You have several options moving forward:
1. Use [Nx Cloud](/nx-cloud) for your remote cache
2. Use an [Nx Powerpack](/powerpack) plugin to store your remote cache on an [Amazon S3 bucket](/nx-api/powerpack-s3-cache) or a [network drive](/nx-api/powerpack-shared-fs-cache)
3. Use the deprecated custom task runner feature until Nx 21
@@ -0,0 +1,80 @@
# Run Language-Agnostic Conformance Rules
{% youtube src="https://youtu.be/6wg23sLveTQ" title="Nx Powerpack workspace conformance" /%}
The [`@nx/powerpack-conformance`](/nx-api/powerpack-conformance) plugin allows [Nx Powerpack](/powerpack) users to write and apply rules for your entire workspace that help with **consistency**, **maintainability**, **reliability** and **security**. Powerpack is available for Nx version 19.8 and higher.
The conformance plugin allows you to **encode your own organization's standards** so that they can be enforced automatically. Conformance rules can also **complement linting tools** by enforcing that those tools are configured in the recommended way. The rules are written in TypeScript but can be **applied to any language in the codebase** or focus entirely on configuration files.
The plugin also provides the following pre-written rules:
- **Enforce Project Boundaries**: Similar to the Nx [ESLint Enforce Module Boundaries rule](/features/enforce-module-boundaries), but enforces the boundaries on every project dependency, not just those created from TypeScript imports or `package.json` dependencies.
- **Ensure Owners**: Require every project to have an owner defined for the [`@nx/powerpack-owners` plugin](/nx-api/powerpack-owners)
## Setup
The `@nx/powerpack-conformance` plugin requires an Nx Powerpack license to function. [Activating Powerpack](/recipes/installation/activate-powerpack) is a simple process.
{% call-to-action title="Buy a Powerpack License" icon="nx" description="Unlock all the features of Nx" url="https://cloud.nx.app/powerpack/purchase" /%}
Then, add the Conformance plugin to your workspace.
{% link-card title="Conformance" type="Nx Plugin" url="/nx-api/powerpack-conformance" icon="CheckBadgeIcon" /%}
## Configure Conformance Rules
Conformance rules are configured in the `conformance` property of the `nx.json` file. You can use the pre-defined rules or reference [your own custom rule](/nx-api/powerpack-conformance#custom-conformance-rules). See the [plugin documentation](/nx-api/powerpack-conformance) for more details.
```jsonc {% fileName="nx.json" %}
{
"conformance": {
"rules": [
{
"rule": "@nx/powerpack-conformance/enforce-project-boundaries",
"options": {
"depConstraints": [
{
"sourceTag": "scope:shared",
"onlyDependOnProjectsWithTags": ["scope:shared"]
}
]
}
},
{
"rule": "@nx/powerpack-conformance/ensure-owners",
"projects": ["!experimental-app"]
},
{
"rule": "./tools/local-conformance-rule.ts"
}
]
}
}
```
## Enforce Rules with the `nx conformance` Command
The `@nx/powerpack-conformance` plugin enables the `nx conformance` command which checks all the configured rules. This command should be added to the beginning of your CI process so that the conformance rules are enforced for every PR.
{% tabs %}
{% tab label="Without Nx Cloud" %}
```yaml
- name: Enforce all conformance rules
run: npx nx conformance
```
{% /tab %}
{% tab label="Using Nx Cloud" %}
```yaml
- name: Enforce all conformance rules
run: npx nx-cloud record -- npx nx conformance
```
Use `npx nx-cloud record --` to capture the logs for `nx conformance` in the Nx Cloud dashboard.
{% /tab %}
{% /tabs %}
If there is not a valid Powerpack license in the workspace, the `nx conformance` command will fail without checking any rules.
@@ -0,0 +1,33 @@
# Self-Host the Remote Cache
{% youtube src="https://youtu.be/vRGAa5SuiTM" title="Nx Powerpack self-hosted cache storage" /%}
The recommended way to enable the [remote cache](/ci/features/remote-cache) is to use Nx Replay and have Nx Cloud share the task cache across your organization. For those organizations that are unable to use Nx Cloud, Nx offers official plugins that are enabled by [Nx Powerpack](/powerpack) to self-host the remote cache in a fast and secure manner. Powerpack is available for Nx version 19.8 and higher. The recommended ways to host the remote cache are, in order of preference:
1. [Nx Replay](/ci/features/remote-cache): Cache is hosted on Nx Cloud servers or on-premise with an [Nx Enterprise](/enterprise) contract
2. [@nx/powerpack-s3-cache](/nx-api/powerpack-s3-cache): Cache is on a self-hosted Amazon S3 bucket
3. [@nx/powerpack-shared-fs-cache](/nx-api/powerpack-shared-fs-cache): Cache is self-hosted on a shared file system location
The options range from fully opting in to Nx's management of the remote cache to fully managing the configuration and security of your own remote cache.
## Setup
The `@nx/powerpack-s3-cache` and `@nx/powerpack-shared-fs-cache` plugins require an Nx Powerpack license to function. [Activating Powerpack](/recipes/installation/activate-powerpack) is a simple process.
{% call-to-action title="Buy a Powerpack License" icon="nx" description="Unlock all the features of the Nx CLI" url="https://cloud.nx.app/powerpack/purchase" /%}
Then, choose the appropriate cache plugin for your situation.
{% cards cols="2" lgCols="2" mdCols="2" smCols="2" %}
{% link-card title="Amazon S3 Bucket Remote Cache" type="Nx Plugin" url="/nx-api/powerpack-s3-cache" icon="AwsIcon" /%}
{% link-card title="Shared Network Drive Remote Cache" type="Nx Plugin" url="/nx-api/powerpack-shared-fs-cache" icon="ServerIcon" /%}
{% /cards %}
## Switch to Nx Cloud
These custom remote cache storage solutions only provide the remote cache functionality of Nx Cloud. If you want to leverage [distributed task execution](/ci/features/distribute-task-execution), [re-running flaky tasks](/ci/features/flaky-tasks) or [automatically splitting tasks](/ci/features/split-e2e-tasks), you'll need to [connect to Nx Cloud](/ci/intro/connect-to-nx-cloud) and use Nx Cloud's remote cache solution instead.
{% call-to-action title="Connect to Nx Cloud" icon="nxcloud" description="Enable task distribution and Atomizer" url="/ci/intro/connect-to-nx-cloud" /%}
+13
View File
@@ -0,0 +1,13 @@
# Powerpack Features
Nx PowerPack is a suite of paid extensions for the Nx CLI specifically designed for enterprises. Powerpack is available for Nx version 19.8 and higher.
The following features are available after you [activate a Powerpack license](/recipes/installation/activate-powerpack):
{% cards cols="2" lgCols="3" mdCols="3" smCols="2" %}
{% link-card title="Conformance" type="Powerpack Feature" url="/features/powerpack/conformance" icon="CheckBadgeIcon" /%}
{% link-card title="Owners" type="Powerpack Feature" url="/features/powerpack/owners" icon="UserGroupIcon" /%}
{% link-card title="Self-Hosted Remote Cache" type="Powerpack Feature" url="/features/powerpack/custom-caching" icon="AwsIcon" /%}
{% /cards %}
+89
View File
@@ -0,0 +1,89 @@
# Define Code Ownership at the Project Level
{% youtube src="https://youtu.be/mor6urvw-L0" title="Nx Powerpack Codeowners" /%}
This plugin provides [Nx Powerpack](/powerpack) users the ability to configure and maintain code owners for projects in an Nx workspace. Powerpack is available for Nx version 19.8 and higher.
The atomic unit of code in an Nx workspace is a project. Tasks, module boundaries and the Nx graph all train us to conceptualize the workspace as a collection of projects. The CODEOWNERS file, however, requires you to switch from a project mental model to a more low-level definition based on the folder structure of your workspace. The `@nx/powerpack-owners` plugin enables you to stay in the mental model that your workspace is a collection of projects as you define the ownership rules for your workspace. Nx will take care of compiling the project ownership rules into file-based ownership rules that [GitHub](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners), [Bitbucket](https://support.atlassian.com/bitbucket-cloud/docs/set-up-and-use-code-owners/) or [GitLab](https://docs.gitlab.com/ee/user/project/codeowners/) can understand in the CODEOWNERS file.
## Setup
The `@nx/powerpack-owners` plugin requires an Nx Powerpack license to function. [Activating Powerpack](/recipes/installation/activate-powerpack) is a simple process.
{% call-to-action title="Buy a Powerpack License" icon="nx" description="Unlock all the features of Nx" url="https://cloud.nx.app/powerpack/purchase" /%}
Then, add the Owners plugin to your workspace.
{% link-card title="Owners" type="Nx Plugin" url="/nx-api/powerpack-owners" icon="UserGroupIcon" /%}
## Project or File-based Configuration
The ownership configuration is defined in the `nx.json` file or in individual project configuration files. Nx then uses a [sync generator](/concepts/sync-generators) to automatically compile those settings into a valid CODEOWNERS file for GitHub, Bitbucket or GitLab. See the [plugin documentation](/nx-api/powerpack-owners) for more details.
{% cards smCols="2" mdCols="2" lgCols="2" %}
**Define Project Owners**
**Nx Generates the CODEOWNERS file**
```json {% fileName="nx.json" %}
{
"owners": {
"format": "github",
"patterns": [
{
"description": "Joe's Rust projects",
"projects": ["tag:rust"],
"owners": ["@joelovesrust"]
},
{
"description": "Finance projects",
"projects": ["finance-*"],
"owners": ["@finance-team"]
},
{
"description": "Alphabet soup",
"projects": ["admin", "books", "cart"],
"owners": ["@alice", "@bob", "@cecil"]
},
{
"description": "CI Workflows",
"files": [".github/workflows/**/*"],
"owners": ["@devops"]
}
]
}
}
```
```yaml {% fileName=".github/CODEOWNERS" %}
# Joe's Rust projects
/packages/rust-api @joelovesrust
/packages/experimental-rust @joelovesrust
# Finance projects
/packages/finance-ui @finance-team
/packages/finance-data @finance-team
# Alphabet soup
/packages/admin @alice @bob @cecil
/packages/books @alice @bob @cecil
/packages/cart @alice @bob @cecil
# CI Workflows
.github/workflows/**/* @devops
/packages/my-project/ @ahmed @petra
/packages/my-project/package.json @ahmed
```
```json {% fileName="packages/my-project/project.json" %}
{
"owners": {
"**/*": ["@ahmed", "@petra"],
"package.json": ["@ahmed"]
},
};
```
{% /cards %}
+25 -26
View File
@@ -1,6 +1,6 @@
# Unknown Local Cache Error
This document will explain why the following error happens and how to address it.
This document will explain why the following errors happen and how to address them.
```
NX Invalid Cache Directory for Task "myapp:build"
@@ -11,6 +11,14 @@ If your machine ID has changed since the artifact was cached, run "nx reset" to
Read about the error and how to address it here: https://nx.dev/troubleshooting/unknown-local-cache
```
```
NX Unrecognized Cache Artifacts
Nx found unrecognized artifacts in the cache directory and will not be able to use them.
Nx can only restore artifacts it has metadata about.
Read about this warning and how to address it here: https://nx.dev/troubleshooting/unknown-local-cache
```
## Nx Tracks Cache Source
Nx can cache tasks, which can drastically speed up your CI and local builds. However, this comes with the potential risk
@@ -19,24 +27,24 @@ executes a task that matches the hash of the tainted artifact, they could retrie
the outcome of the task. Nx and Nx Cloud contain several safeguards to minimize the likelihood of cache poisoning or, in
the case of Nx Cloud, completely prevent it.
The error above is one such safeguard.
The errors above are some of these safeguards.
Nx trusts the local cache. If you executed a task and stored the corresponding cached artifact on your machine, you can
safely restore it on the same machine without worrying about cache poisoning. After all, in order to tamper with the
cache artifact, the actor would need access to the machine itself.
However, when artifacts in the local cache are created by a different machine, we cannot make such assumption. By
default, Nx will refuse to use such artifacts and will throw the "Invalid Cache Directory" error.
default, Nx will refuse to use such artifacts and will throw the "Invalid Cache Directory" error or "Unrecognized Cache Artifacts" error.
## Your MachineId Has Changed
Upgrading your computer's hardware may alter its Machine ID, yielding the error above. To fix it execute `nx reset` to
Upgrading your computer's hardware may alter its Machine ID, yielding one of the errors above. To fix it execute `nx reset` to
remove all the cache directories created under the previous Machine ID. After doing so, you should no longer see the
error.
## You Share Cache with Another Machine Using a Network Drive
You can prefix any Nx command with `NX_REJECT_UNKNOWN_LOCAL_CACHE=0` to ignore the error (
You can prefix any Nx command with `NX_REJECT_UNKNOWN_LOCAL_CACHE=0` to ignore the errors (
e.g., `NX_REJECT_UNKNOWN_LOCAL_CACHE=0 nx run-many -t build test`). This is similar to
setting `NODE_TLS_REJECT_UNAUTHORIZED=0` to ignore any errors stemming form self-signed certificates. Even though it
will make it work, this approach is discouraged.
@@ -46,25 +54,9 @@ access to all the previously created Nx cache artifacts. Hence, it is plausible
single task hash - to be accessed without leaving any trace. This is feasible due to the network drive's capability to
allow overwrites.
Instead of sharing the network drive, we highly recommend you to implement the `RemoteCache` interface.
## How Nx Replay Makes Sure Sharing Cache is Safe
## Implementing Remote Cache Interface
This is the interface:
```typescript
interface RemoteCache {
retrieve(hash: string, cachePath: string);
store(hash: string, cachePath: string);
}
```
> You will need to wrap the default tasks runner to provide the remote cache implementation.
## How Nx Cloud Makes Sure Sharing Cache is Safe
The Nx Cloud runner provides an implementation of `RemoteCache` which does the following things making sharing the cache safe:
[Nx Replay](/ci/features/remote-cache), the Nx Cloud hosted remote cache, does the following things to make sharing the cache safe:
1. **Immutable Artifacts:** Nx Cloud allows you to create and store new artifacts without the ability to override the
existing ones. This prevents any possibility of poisoning an existing artifact. This is achieved by managing the
@@ -81,6 +73,13 @@ The Nx Cloud runner provides an implementation of `RemoteCache` which does the f
an access token gets compromised it can be easily removed, in turn deleting all the cache artifacts that were created
using it.
Nx Cloud is not the only remote cache you can use. If you are using a different remote cache or using your
own implementation, we would highly recommend ensuring that the same safety mechanisms as Nx Cloud have been put in
place.
Nx Replay is not the only remote cache you can use. You can also use one of the [Powerpack self-hosted remote cache plugins](/features/powerpack/custom-caching). These plugins offer the performance benefits of a remote cache, but do not have the same security guarantees as Nx Replay.
## Self-Hosted Remote Cache
If you can't use Nx Replay, Nx provides plugins that enable you to [self-host the remote cache](/features/powerpack/custom-caching). These plugins are available as part of the [Nx Powerpack](/powerpack), which you can unlock by [activating your license](/recipes/installation/activate-powerpack). There are plugins to self-host your remote cache in the following locations:
- [Amazon S3 Bucket](/nx-api/powerpack-s3-cache)
- [Shared File System](/nx-api/powerpack-shared-fs-cache)
These plugins will ensure that the task metadata and project graph information are correctly associated with the file artifacts in your cache.
@@ -0,0 +1,215 @@
---
title: Overview of the Nx powerpack-conformance Plugin
description: The Nx Powerpack Conformance plugin provides the ability to write and apply rules for your workspace
---
The `@nx/powerpack-conformance` plugin allows [Nx Powerpack](/powerpack) users to write and apply rules for your entire workspace that help with **consistency**, **maintainability**, **reliability** and **security**.
The conformance plugin allows you to encode your own organization's standards so that they can be enforced automatically. Conformance rules can also complement linting tools by enforcing that those tools are configured in the recommended way. The rules are written in TypeScript but can be applied to any language in the codebase or focus entirely on configuration files.
The plugin also provides the following pre-written rules:
- [**Enforce Project Boundaries**](#enforce-project-boundaries): Similar to the Nx [ESLint Enforce Module Boundaries rule](/features/enforce-module-boundaries), but enforces the boundaries on every project dependency, not just those created from TypeScript imports or `package.json` dependencies.
- [**Ensure Owners**](#ensure-owners): Require every project to have an owner defined for the [`@nx/powerpack-owners` plugin](/nx-api/powerpack-owners)
{% callout title="This plugin requires an active Nx Powerpack license" %}
In order to use `@nx/powerpack-conformance`, you need to have an active Powerpack license. If you don't have a license or it has expired, the `nx conformance` command will fail.
{% /callout %}
## Set Up @nx/powerpack-conformance
1. [Activate Powerpack](/recipes/installation/activate-powerpack) if you haven't already
2. Install the package
```shell
nx add @nx/powerpack-conformance
```
3. Configure Conformance Rules
Configure the `@nx/powerpack-conformance` plugin in the `nx.json` file or in individual project configuration files. Consult the [Conformance Configuration Reference](#conformance-configuration-reference) section for more details.
4. Run the `nx conformance` command in CI
Add `nx conformance` to the beginning of the CI process.
{% tabs %}
{% tab label="Without Nx Cloud" %}
```yaml
- name: Enforce all conformance rules
run: npx nx conformance
```
{% /tab %}
{% tab label="Using Nx Cloud" %}
```yaml
- name: Enforce all conformance rules
run: npx nx-cloud record -- npx nx conformance
```
Use `npx nx-cloud record --` to capture the logs for `nx conformance` in the Nx Cloud dashboard.
{% /tab %}
{% /tabs %}
## Conformance Configuration Reference
```jsonc {% fileName="nx.json" %}
{
"conformance": {
"rules": [
{
/**
* Relative path to a local rule implementation or node_module path.
*/
"rule": "@nx/powerpack-conformance/enforce-project-boundaries",
/**
* Rule specific configuration options. (Optional)
*/
"options": {},
/**
* The projects array allows users to opt in or out of violations for specific projects being reported by the current rule.
* The array can contain any valid matchers for findMatchingProjects(), by default the implied value is ["*"]. (Optional)
*/
"projects": ["*"]
}
]
}
}
```
## Provided Conformance Rules
The following rules are provided by Nx along with the `@nx/powerpack-conformance` plugin.
### Enforce Project Boundaries
This rule is similar to the Nx [ESLint Enforce Module Boundaries rule](/features/enforce-module-boundaries), but enforces the boundaries on every project dependency, not just those created from TypeScript imports or `package.json` dependencies.
Set the `rule` property to: `@nx/powerpack-conformance/enforce-project-boundaries`
```json {% fileName="nx.json" %}
{
"conformance": {
"rules": [
{
"rule": "@nx/powerpack-conformance/enforce-project-boundaries",
"options": {
// Optional
// Can be a boolean or an object with an array of buildTargetNames
"requireBuildableDependenciesForBuildableProjects": {
// Defaults to ["build"]
"buildTargetNames": ["build", "compile"]
},
// Optional
"ignoredCircularDependencies": [["projectA", "projectB"]],
// Optional
"depConstraints": [
{
// Must define either `sourceTag` or `allSourceTags`
"sourceTag": "string",
"allSourceTags": ["string"],
// Optional
"onlyDependOnProjectsWithTags": [],
// Optional
"notDependOnProjectsWithTags": []
}
],
// Optional
"checkDynamicDependenciesExceptions": []
}
}
]
}
}
```
#### Options
| Property | Type | Default | Description |
| ------------------------------------------------ | ------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ignoredCircularDependencies | _Array<[string, string]>_ | _[]_ | List of project pairs that should be skipped from `Circular dependencies` checks, including the self-circular dependency check. E.g. `['feature-project-a', 'myapp']`. Project name can be replaced by catch all `*` for more generic matches. |
| checkDynamicDependenciesExceptions | _Array<string>_ | _[]_ | List of imports that should be skipped for `Imports of lazy-loaded libraries forbidden` checks. E.g. `['@myorg/lazy-project/component/*', '@myorg/other-project']` |
| requireBuildableDependenciesForBuildableProjects | _boolean_ | _false_ | Enable to restrict the buildable projects from importing non-buildable libraries |
| depConstraints | _Array<object>_ | _[]_ | List of dependency constraints between projects |
#### Dependency constraints
The `depConstraints` is an array of objects representing the constraints defined between source and target projects. A
constraint must include `sourceTag` or `allSourceTags`. The constraints are applied with **AND** logical operation - for
a given `source` project the resulting constraints would be **all** that match its tags.
| Property | Type | Description |
| ---------------------------- | --------------- | ---------------------------------------------------------------------------------- |
| sourceTag | _string_ | Tag that source project must contain to match the constraint |
| allSourceTags | _Array<string>_ | List of tags the source project must contain to match the constraint |
| onlyDependOnProjectsWithTags | _Array<string>_ | The source **can depend only** on projects that contain at least one of these tags |
| notDependOnProjectsWithTags | _Array<string>_ | The source **can not depend** on projects that contain at least one of these tags |
### Ensure Owners
This rule requires every project to have an owner defined for the [`@nx/powerpack-owners` plugin](/nx-api/powerpack-owners)
Set the `rule` property to: `@nx/powerpack-conformance/ensure-owners`
```json {% fileName="nx.json" %}
{
"conformance": {
"rules": [
{
"rule": "@nx/powerpack-conformance/ensure-owners"
}
]
}
}
```
## Custom Conformance Rules
To write your own conformance rule, specify a relative path to a TypeScript or JavaScript file as the rule name:
```json {% fileName="nx.json" %}
{
"conformance": {
"rules": [
{
"rule": "./tools/local-conformance-rule.ts"
}
]
}
}
```
The rule definition file should look like this:
```ts {% fileName="tools/local-conformance-rule.ts" %}
import { createConformanceRule } from '@nx/powerpack-conformance';
const rule = createConformanceRule({
name: 'local-conformance-rule-example',
category: 'security', // `consistency`, `maintainability`, `reliability` or `security`
reporter: 'project-reporter', // `project-reporter` or `project-files-reporter`
implementation: async (context) => {
const { projectGraph, ruleOptions } = context;
// Your rule logic goes here
return {
severity: 'low', // 'high', 'medium' or 'low'
details: {
violations: [
// Return an empty array if the rule passes
{
sourceProject: 'my-project',
message: 'This is an informative error message.',
},
],
},
};
},
});
export default rule;
```
Note that the severity of the error is defined by the rule author and can be adjusted based on the specific violations that are found.
@@ -0,0 +1,326 @@
---
title: Overview of the Nx powerpack-owners Plugin
description: The Nx Powerpack Owners plugin provides the ability to define code ownership based on projects in addition to files
---
The `@nx/powerpack-owners` plugin extends the CODEOWNERS functionality to allow you to define code ownership based on projects in addition to the standard file-based definitions. It leverages the [`nx sync`](/concepts/sync-generators) command to compile `owners` configuration settings from `nx.json` and project configuration files into valid CODEOWNERS files for [GitHub](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners), [Bitbucket](https://support.atlassian.com/bitbucket-cloud/docs/set-up-and-use-code-owners/) or [GitLab](https://docs.gitlab.com/ee/user/project/codeowners/).
With this plugin, you can specify code ownership using the same project matcher syntax as [`nx run-many`](/nx-api/nx/documents/run-many#examples). This allows you to easily define rules for multiple projects that may not be located in the same directory. Also, the CODEOWNERS rules will not need to be revisited if a project location is changed or a new project is added.
{% callout title="This plugin requires an active Nx Powerpack license" %}
In order to use `@nx/powerpack-owners`, you need to have an active Powerpack license. If you don't have a license or it has expired, the syncing process will stop working and you'll need to manually maintain your CODEOWNERS file.
{% /callout %}
## Set Up @nx/powerpack-owners
1. [Activate Powerpack](/recipes/installation/activate-powerpack) if you haven't already
2. Install the package
```shell
nx add @nx/powerpack-owners
```
3. Configure Ownership
Configure the `@nx/powerpack-owners` plugin in the `nx.json` file or in individual project configuration files. Consult the [Owners Configuration Reference](#owners-configuration-reference) section for more details.
4. Configure the [Sync Generator](/concepts/sync-generators) and CI
The `nx add @nx/powerpack-owners` command should have registered the `@nx/powerpack-owners:sync-codeowners-file` generator as a `globalGenerator` in `nx.json`. You can double check to make sure:
```jsonc {% fileName="nx.json" %}
{
"sync": {
"globalGenerators": ["@nx/powerpack-owners:sync-codeowners-file"]
}
}
```
Add `nx sync:check` to the beginning of the CI process.
```yaml
- name: Ensure the workspace configuration is in sync
run: npx nx sync:check
```
It is also often helpful to add `nx sync` as a git push hook or git commit hook.
## Owners Configuration Reference
{% tabs %}
{% tab label="GitHub" %}
```jsonc {% fileName="nx.json" %}
{
// Can be set to true instead of an object to accept all defaults
"owners": {
// Options are `github`, `bitbucket` or `gitlab`. (Optional) Defaults to `github`
"format": "github",
// (Optional) Default changes based on format: `.github/CODEOWNERS`, `.bitbucket/CODEOWNERS`, `.gitlab/CODEOWNERS`
"outputPath": "CODEOWNERS",
// (Optional)
"patterns": [
{
"description": "A description of the rule",
"owners": ["@joelovesrust"],
// specify either projects or files, not both
// Can be any project specifier that could be used in `nx run-many`
// See https://nx.dev/nx-api/nx/documents/run-many
"projects": ["my-rust-app", "rust-*", "tag:rust"],
// File globs
"files": [".github/workflows/**/*"]
}
]
}
}
```
{% /tab %}
{% tab label="Bitbucket" %}
```jsonc {% fileName="nx.json" %}
{
// Can be set to true instead of an object to accept all defaults
"owners": {
// Options are `github`, `bitbucket` or `gitlab`. (Optional) Defaults to `github`
"format": "bitbucket",
// (Optional) Default changes based on format: `.github/CODEOWNERS`, `.bitbucket/CODEOWNERS`, `.gitlab/CODEOWNERS`
"outputPath": "CODEOWNERS",
// (Optional)
"patterns": [
{
"description": "A description of the rule",
"owners": ["@joelovesrust"],
// specify either projects or files, not both
// Can be any project specifier that could be used in `nx run-many`
// See https://nx.dev/nx-api/nx/documents/run-many
"projects": ["my-rust-app", "rust-*", "tag:rust"],
// File globs
"files": [".github/workflows/**/*"]
}
]
}
}
```
{% /tab %}
{% tab label="GitLab" %}
If you are using GitLab, you can specify CODEOWNERS [sections](https://docs.gitlab.com/ee/user/project/codeowners/#organize-code-owners-by-putting-them-into-sections) which give you a little more control over the PR process.
```jsonc {% fileName="nx.json" %}
{
// Can be set to true instead of an object to accept all defaults
"owners": {
// Options are `github`, `bitbucket` or `gitlab`. (Optional) Defaults to `github`
"format": "gitlab",
// (Optional) Default changes based on format: `.github/CODEOWNERS`, `.bitbucket/CODEOWNERS`, `.gitlab/CODEOWNERS`
"outputPath": "CODEOWNERS",
// (Optional)
"patterns": [
{
"description": "A description of the rule",
"owners": ["@joelovesrust"],
// Specify either `projects` or `files`, not both
// Can be any project specifier that could be used in `nx run-many`
// See https://nx.dev/nx-api/nx/documents/run-many
"projects": ["my-rust-app", "rust-*", "tag:rust"],
// File globs
"files": [".github/workflows/**/*"]
}
],
// (Optional)
"sections": [
{
// Labels the section
"name": "My section",
// (Optional) The owners to use if a pattern does not specify a set of owners
"defaultOwners": ["@cheddar"],
// Specify either `numberOfRequiredApprovals` or `optional`, not both
// (Optional) Require more than one person to approve the PR
"numberOfRequiredApprovals": 2,
// (Optional) Do not require any approvals, just notify the owners
"optional": true,
// Same format as the root patterns
"patterns": []
}
]
}
}
```
```jsonc {% fileName="path/to/project/project.json" %}
{
"owners": {
// Keys are file globs relative to the root of the project
// Owners can be listed as a string array
"**/*": ["@ahmed", "@petra"],
// Owners can be listed as an object with a description
"README.md": {
"description": "Jared is very particular about the README file",
"owners": ["@jared"]
}
}
};
```
{% /tab %}
{% /tabs %}
**Examples:**
{% tabs %}
{% tab label="GitHub" %}
```jsonc {% fileName="nx.json" %}
{
"owners": {
// defaults to "github"
"format": "github",
// defaults to ".github/CODEOWNERS"
"outputPath": "CODEOWNERS",
"patterns": [
{
"description": "Joe should double check all changes to rust code",
"projects": ["tag:rust"],
"owners": ["@joelovesrust"]
},
{
"description": "The Finance team owns these projects",
"projects": ["finance-*"],
"owners": ["@finance-team"]
},
{
"description": "Alice, Bob and Cecil work together on these projects",
"projects": ["admin", "booking", "cart"],
"owners": ["@alice", "@bob", "@cecil"]
},
{
"description": "CI Workflows",
"files": [".github/workflows/**/*"],
"owners": ["@devops"]
}
]
}
}
```
```jsonc {% fileName="packages/my-project/project.json" %}
{
"owners": {
"**/*": ["@ahmed", "@petra"],
"package.json": ["@ahmed"],
"README.md": {
"owners": ["@jared"],
"description": "Jared is very particular about the README file"
}
},
};
```
{% /tab %}
{% tab label="Bitbucket" %}
```jsonc {% fileName="nx.json" %}
{
"owners": {
"format": "bitbucket",
// defaults to ".bitbucket/CODEOWNERS"
"outputPath": "CODEOWNERS",
"patterns": [
{
"description": "Joe should double check all changes to rust code",
"projects": ["tag:rust"],
"owners": ["@joelovesrust"]
},
{
"description": "The Finance team owns these projects",
"projects": ["finance-*"],
"owners": ["@finance-team"]
},
{
"description": "Alice, Bob and Cecil work together on these projects",
"projects": ["admin", "booking", "cart"],
"owners": ["@alice", "@bob", "@cecil"]
},
{
"description": "CI Workflows",
"files": [".github/workflows/**/*"],
"owners": ["@devops"]
}
]
}
}
```
```jsonc {% fileName="packages/my-project/project.json" %}
{
"owners": {
"**/*": ["@ahmed", "@petra"],
"package.json": ["@ahmed"],
"README.md": {
"owners": ["@jared"],
"description": "Jared is very particular about the README file"
}
},
};
```
{% /tab %}
{% tab label="GitLab" %}
```jsonc {% fileName="nx.json" %}
{
"owners": {
"format": "gitlab",
// defaults to ".gitlab/CODEOWNERS"
"outputPath": "CODEOWNERS",
"patterns": [
{
"description": "Joe should double check all changes to rust code",
"projects": ["tag:rust"],
"owners": ["@joelovesrust"]
},
{
"description": "CI Workflows",
"files": [".github/workflows/**/*"],
"owners": ["@devops"]
}
],
"sections": [
{
"name": "Finance",
"defaultOwners": ["@finance-team"],
"numberOfRequiredApprovals": 2,
"patterns": [
{
"description": "The Finance team owns these projects",
"projects": ["finance-*"]
},
{
"description": "Alice, Bob and Cecil work together on these projects",
"projects": ["admin", "booking", "cart"],
"owners": ["@alice", "@bob", "@cecil"]
}
]
}
]
}
}
```
```jsonc {% fileName="packages/my-project/project.json" %}
{
"owners": {
"**/*": ["@ahmed", "@petra"],
"package.json": ["@ahmed"],
"README.md": {
"owners": ["@jared"],
"description": "Jared is very particular about the README file"
}
},
};
```
{% /tab %}
{% /tabs %}
@@ -0,0 +1,98 @@
---
title: Overview of the Nx powerpack-s3-cache Plugin
description: The powerpack-s3-cache Nx plugin enables you to use an Amazon S3 bucket to host your remote cache instead of Nx Cloud
---
The `@nx/powerpack-s3-cache` plugin enables you to use an [Amazon S3](https://aws.amazon.com/s3) bucket instead of Nx Cloud to host your remote cache.
This plugin will enable the remote cache for your Nx workspace, but does not provide any of the other features of Nx Cloud. If you want to leverage [distributed task execution](/ci/features/distribute-task-execution), [re-running flaky tasks](/ci/features/flaky-tasks) or [automatically splitting tasks](/ci/features/split-e2e-tasks), you'll need to [connect to Nx Cloud](/ci/intro/connect-to-nx-cloud) and use [Nx Replay](/ci/features/remote-cache) instead.
{% callout type="warning" title="Potential Cache Poisoning" %}
Using your own Amazon S3 bucket to host the remote cache opens you up to the possibility of [cache poisoning](/troubleshooting/unknown-local-cache). To avoid this, use [Nx Replay](/ci/features/remote-cache).
{% /callout %}
{% callout title="This plugin requires an active Nx Powerpack license" %}
In order to use `@nx/powerpack-s3-cache`, you need to have an active Powerpack license. If you don't have a license or it has expired, your cache will no longer be shared and each machine will use its local cache.
{% /callout %}
## Set Up @nx/powerpack-s3-cache
### 1. Install the Package
1. [Activate Powerpack](/recipes/installation/activate-powerpack) if you haven't already
2. Install the package
```shell
nx add @nx/powerpack-s3-cache
```
### 2. Authenticate with AWS
There are four different ways to authenticate with AWS. They will be attempted in this order:
1. Environment variables
2. INI config files
3. Single sign-on
4. `nx.json` settings
#### Environment Variables
[AWS provides environment variables](https://docs.aws.amazon.com/sdkref/latest/guide/environment-variables.html) that can be used to authenticate:
| **Environment Variable** | **Description** |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `AWS_ACCESS_KEY_ID` | The access key for your AWS account. |
| `AWS_SECRET_ACCESS_KEY` | The secret key for your AWS account. |
| `AWS_SESSION_TOKEN` | The session key for your AWS account. This is only needed when you are using temporary credentials. |
| `AWS_CREDENTIAL_EXPIRATION` | The expiration time of the credentials contained in the environment variables described above. This value must be in a format compatible with the [ISO-8601 standard](https://en.wikipedia.org/wiki/ISO_8601) and is only needed when you are using temporary credentials. |
Both the `AWS_ACCESS_KEY_ID` and the `AWS_SECRET_ACCESS_KEY` environment variables are required to use the environment variable authentication method.
#### INI Config Files
AWS can read your authentication credentials from [shared INI config files](https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html). The files are located at `~/.aws/credentials` and `~/.aws/config`. Both files are expected to be INI formatted with section names corresponding to profiles. Sections in the credentials file are treated as profile names, whereas profile sections in the config file must have the format of `[profile profile-name]`, except for the default profile. Profiles that appear in both files will not be merged, and the version that appears in the credentials file will be given precedence over the profile found in the config file.
#### Single Sign-On
Nx can read the active access token [created after running `aws sso login`](https://docs.aws.amazon.com/sdkref/latest/guide/understanding-sso.html) then request temporary AWS credentials. You can create the `AwsCredentialIdentityProvider` functions using the inline SSO parameters (`ssoStartUrl`, `ssoAccountId`, `ssoRegion`, `ssoRoleName`) or load them from [AWS SDKs and Tools shared configuration and credentials files](https://docs.aws.amazon.com/credref/latest/refdocs/creds-config-files.html). Profiles in the `credentials` file are given precedence over profiles in the `config` file.
#### Credentials in `nx.json` File
Storing your credentials in the `nx.json` file is the least secure of the 4 authentication options, since anyone with read access to your code base will have access to your AWS credentials.
```jsonc {% fileName="nx.json" %}
{
"s3": {
"ssoProfile": "default",
"accessKeyId": "MYACCESSKEYID",
"secretAccessKey": "MYSECRETACCESSKEY"
}
}
```
| **Property** | **Description** |
| ------------------- | ----------------------------------------------------------------------------- |
| **ssoProfile** | The name of the profile to use from your AWS CLI SSO Configuration (optional) |
| **endpoint** | The AWS endpoint URL (optional) |
| **accessKeyId** | AWS Access Key ID (optional) |
| **secretAccessKey** | AWS secret access key (optional) |
### 3. Configure S3 Cache
Regardless of how you manage your AWS authentication, you need to configure your Nx cache in the `nx.json` file. The `bucket` that you specify needs to already exist - Nx doesn't create it for you.
```jsonc {% fileName="nx.json" %}
{
"s3": {
"region": "us-east-1",
"bucket": "my-bucket",
"encryptionKey": "create-your-own-key"
}
}
```
| **Property** | **Description** |
| ----------------- | --------------------------------------------------------------------------------- |
| **region** | The id of the AWS region to use |
| **bucket** | The name of the AWS bucket to use |
| **encryptionKey** | Nx encryption key used to encrypt and decrypt artifacts from the cache (optional) |
@@ -0,0 +1,35 @@
---
title: Overview of the Nx powerpack-shared-fs-cache Plugin
description: The powerpack-shared-fs-cache Nx plugin enables you to use a shared file system directory instead of Nx Cloud to host your remote cache
---
The `@nx/powerpack-shared-fs-cache` plugin enables you to use a shared file system directory instead of Nx Cloud to host your remote cache. You are responsible for the sharing mechanism for the directory, but the plugin ensures that Nx correctly associates task metadata with the file artifacts.
This plugin will enable the remote cache for your Nx workspace, but does not provide any of the other features of Nx Cloud. If you want to leverage [distributed task execution](/ci/features/distribute-task-execution), [re-running flaky tasks](/ci/features/flaky-tasks) or [automatically splitting tasks](/ci/features/split-e2e-tasks), you'll need to [connect to Nx Cloud](/ci/intro/connect-to-nx-cloud) and use [Nx Replay](/ci/features/remote-cache) instead.
{% callout type="warning" title="Potential Cache Poisoning" %}
Using a shared file system folder for the remote cache opens you up to the possibility of [cache poisoning](/troubleshooting/unknown-local-cache). To avoid this, use [Nx Replay](/ci/features/remote-cache).
{% /callout %}
{% callout title="This plugin requires an active Nx Powerpack license" %}
In order to use `@nx/powerpack-shared-fs-cache`, you need to have an active Powerpack license. If you don't have a license or it has expired, your cache will no longer be shared and each machine will use its local cache.
{% /callout %}
## Set Up @nx/powerpack-shared-fs-cache
### 1. Install the Package
1. [Activate Powerpack](/recipes/installation/activate-powerpack) if you haven't already
2. Install the package
```shell
nx add @nx/powerpack-shared-fs-cache
```
### 2. Configure the Cache Directory
The `@nx/powerpack-shared-fs-cache` plugin treats your local cache directory as if it is also a remote cache directory. The local cache directory can be set using `cacheDirectory` in the `nx.json` file or the `NX_CACHE_DIRECTORY` environment variable. The default local cache directory is `.nx/cache`
### 3. Share the Cache Directory
The `@nx/powerpack-shared-fs-cache` plugin does not actually share the cache directory across your organization. You are responsible for enabling the actual sharing mechanism. If you want Nx to handle the sharing, use [Nx Replay](/ci/features/remote-cache) instead. Your shared file system directory might be a directory that is saved and restored by a CI provider or it could be a shared network drive.
+1 -1
View File
@@ -2,7 +2,7 @@
Nx Plugins can be used to easily integrate a tool or framework into an Nx repository. If there is no plugin available for your favorite tool or framework, you can write your own.
In this tutorial, we'll create a plugin that helps to integrate the [Astro]() framework. `Astro` is a JavaScript web framework optimized for building fast, content-driven websites. We'll call our plugin `nx-astro`.
In this tutorial, we'll create a plugin that helps to integrate the _Astro_ framework. `Astro` is a JavaScript web framework optimized for building fast, content-driven websites. We'll call our plugin `nx-astro`.
To create a plugin in a brand new repository, use the `create-nx-plugin` command:
@@ -0,0 +1,42 @@
# Activate Powerpack
Nx Powerpack unlocks features of Nx that are particularly useful for larger organizations. Powerpack is available for Nx version 19.8 and higher. The features include the ability to:
- [Run language-agnostic conformance rules](/features/powerpack/conformance)
- [Define code ownership at the project level](/features/powerpack/owners)
- [Change the remote cache storage location](/features/powerpack/custom-caching)
Activating Powerpack is a two step process.
## 1. Purchase a License
You'll need to [purchase a license](https://cloud.nx.app/powerpack/purchase) online. The license is a seat-based license. If you have an open-source repository, reach out to [powerpack-support@nrwl.io](mailto:powerpack-support@nrwl.io) for a free license.
{% call-to-action title="Buy a Powerpack License" icon="nx" description="Unlock all the features of Nx" url="https://cloud.nx.app/powerpack/purchase" /%}
Once you've completed the purchase, you will receive a license key.
## 2. Register the License Key
{% tabs %}
{% tab label="Closed Source Repository" %}
To register the license key in your repository, run the `nx activate-powerpack` command.
```shell
nx activate-powerpack YOUR_LICENSE_KEY
```
The license will be saved in your repository and should be committed so that every developer has access to the Powerpack features.
{% /tab %}
{% tab label="Open Source Repository" %}
Register the license key as an environment variable that is not committed to the repository.
```{% fileName=".env" %}
NX_POWERPACK_LICENSE=YOUR_LICENSE_KEY
```
{% /tab %}
{% /tabs %}
@@ -39,8 +39,8 @@ Once those criteria are met, you can submit your plugin by following the steps b
- Fork the [Nx repo](https://github.com/nrwl/nx/fork) (if you haven't already)
- Update the [`community/approved-plugins.json` file](https://github.com/nrwl/nx/blob/master/community/approved-plugins.json) with a new entry for your plugin that includes name, url and description
- Use the following commit message template: `chore(core): nx plugin submission [PLUGIN_NAME]`
- push your changes, and run `yarn submit-plugin`
- push your changes, and run `pnpm submit-plugin`
> The `yarn submit-plugin` command automatically opens the GitHub pull request process with the correct template.
> The `pnpm submit-plugin` command automatically opens the GitHub pull request process with the correct template.
We will then verify the plugin, offer suggestions or merge the pull request!
@@ -2,29 +2,8 @@
By default the cache is stored locally in `.nx/cache`. Cache results are stored for a week before they get deleted. You can customize the cache location in the `nx.json` file:
{% tabs %}
{% tab label="Nx >= 17" %}
```json {% fileName="nx.json"%}
{
"cacheDirectory": "/tmp/mycache"
}
```
{% /tab %}
{% tab label="Nx < 17" %}
```json {% fileName="nx.json"%}
{
"tasksRunnerOptions": {
"default": {
"options": {
"cacheDirectory": "/tmp/mycache"
}
}
}
}
```
{% /tab %}
{% /tabs %}
@@ -36,12 +36,13 @@ The following environment variables are ones that you can set to change the beha
Nx will set the following environment variables so they can be accessible within the process even outside of executors and generators.
| Property | Type | Description |
| ---------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------- |
| NX_TASK_TARGET_PROJECT | string | Set to the project name of the task being run. Use this to tell which project is being run. |
| NX_TASK_TARGET_TARGET | string | Set to the target name of the task being run. Use this to tell which target of the project is being run. |
| NX_TASK_TARGET_CONFIGURATION | string | Set to the configuration name of the task being run. Use this to tell which configuration of the target is being run. |
| NX_DRY_RUN | boolean | Set to `true` during dry runs of generators. Use this to avoid side effects during generators. |
| NX_INTERACTIVE | boolean | Set to `false` when running generators with `--interactive=false`. Use this to prevent prompting during generators |
| Property | Type | Description |
| ---------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| NX_TASK_TARGET_PROJECT | string | Set to the project name of the task being run. Use this to tell which project is being run. |
| NX_TASK_TARGET_TARGET | string | Set to the target name of the task being run. Use this to tell which target of the project is being run. |
| NX_TASK_TARGET_CONFIGURATION | string | Set to the configuration name of the task being run. Use this to tell which configuration of the target is being run. |
| NX_GRAPH_CREATION | boolean | Set to `true` during the graph creation process. Use this to have inference plugins run different code during graph creation versus during task execution |
| NX_DRY_RUN | boolean | Set to `true` during dry runs of generators. Use this to avoid side effects during generators. |
| NX_INTERACTIVE | boolean | Set to `false` when running generators with `--interactive=false`. Use this to prevent prompting during generators |
[Nx Cloud Environment Variables](/ci/reference/env-vars) are listed on a dedicated page.
+26
View File
@@ -21,6 +21,10 @@
- [Automate Updating Dependencies](/features/automate-updating-dependencies)
- [Enforce Module Boundaries](/features/enforce-module-boundaries)
- [Manage Releases](/features/manage-releases)
- [Powerpack Features](/features/powerpack)
- [Run Language-Agnostic Conformance Rules](/features/powerpack/conformance)
- [Define Code Ownership at the Project Level](/features/powerpack/owners)
- [Self-Host the Remote Cache](/features/powerpack/custom-caching)
- [CI Features](/features/ci-features)
- [Concepts](/concepts)
- [Mental Model](/concepts/mental-model)
@@ -51,6 +55,7 @@
- [Folder Structure](/concepts/decisions/folder-structure)
- [Recipes](/recipes)
- [Installation](/recipes/installation)
- [Activate Powerpack](/recipes/installation/activate-powerpack)
- [Install Nx in a Non-Javascript Repo](/recipes/installation/install-non-javascript)
- [Update Your Global Nx Installation](/recipes/installation/update-global-installation)
- [Tasks & Caching](/recipes/running-tasks)
@@ -219,6 +224,7 @@
- [workspace.json](/deprecated/workspace-json)
- [As Provided vs. Derived](/deprecated/as-provided-vs-derived)
- [Workspace Generators](/deprecated/workspace-generators)
- [Custom Task Runners](/deprecated/custom-task-runners)
- [Workspace Executors](/deprecated/workspace-executors)
- [runtimeCacheInputs](/deprecated/runtime-cache-inputs)
- [cacheableOperations](/deprecated/cacheable-operations)
@@ -756,3 +762,23 @@
- [npm-package](/nx-api/workspace/generators/npm-package)
- [ci-workflow](/nx-api/workspace/generators/ci-workflow)
- [infer-targets](/nx-api/workspace/generators/infer-targets)
- [powerpack-conformance](/nx-api/powerpack-conformance)
- [documents](/nx-api/powerpack-conformance/documents)
- [Overview](/nx-api/powerpack-conformance/documents/overview)
- [powerpack-license](/nx-api/powerpack-license)
- [powerpack-owners](/nx-api/powerpack-owners)
- [documents](/nx-api/powerpack-owners/documents)
- [Overview](/nx-api/powerpack-owners/documents/overview)
- [generators](/nx-api/powerpack-owners/generators)
- [init](/nx-api/powerpack-owners/generators/init)
- [sync-codeowners-file](/nx-api/powerpack-owners/generators/sync-codeowners-file)
- [powerpack-s3-cache](/nx-api/powerpack-s3-cache)
- [documents](/nx-api/powerpack-s3-cache/documents)
- [Overview](/nx-api/powerpack-s3-cache/documents/overview)
- [generators](/nx-api/powerpack-s3-cache/generators)
- [init](/nx-api/powerpack-s3-cache/generators/init)
- [powerpack-shared-fs-cache](/nx-api/powerpack-shared-fs-cache)
- [documents](/nx-api/powerpack-shared-fs-cache/documents)
- [Overview](/nx-api/powerpack-shared-fs-cache/documents/overview)
- [generators](/nx-api/powerpack-shared-fs-cache/generators)
- [init](/nx-api/powerpack-shared-fs-cache/generators/init)
+3
View File
@@ -499,6 +499,9 @@ describe('Angular Projects', () => {
`Building entry point '@${proj}/${lib}/${entryPoint}'`
);
expect(buildOutput).toContain('Successfully ran target build');
expect(() => runCLI(`lint ${lib} --fix`)).not.toThrow();
expect(() => runCLI(`lint ${childLib} --fix`)).not.toThrow();
});
it('should support generating projects with --project-name-and-root-format=derived', () => {
+15 -15
View File
@@ -494,7 +494,9 @@ describe('Linter', () => {
it('should report dependency check issues', () => {
const rootPackageJson = readJson('package.json');
const nxVersion = rootPackageJson.devDependencies.nx;
const tslibVersion = rootPackageJson.dependencies['tslib'];
const tslibVersion =
rootPackageJson.dependencies['tslib'] ||
rootPackageJson.devDependencies['tslib'];
let out = runCLI(`lint ${mylib}`, {
silenceError: true,
@@ -535,20 +537,18 @@ describe('Linter', () => {
`Successfully ran target lint for project ${mylib}`
);
const packageJson = readJson(`libs/${mylib}/package.json`);
expect(packageJson).toMatchInlineSnapshot(`
{
"dependencies": {
"@nx/devkit": "${nxVersion}",
"tslib": "${tslibVersion}",
},
"main": "./src/index.js",
"name": "@proj/${mylib}",
"private": true,
"type": "commonjs",
"typings": "./src/index.d.ts",
"version": "0.0.1",
}
`);
expect(packageJson).toMatchObject({
dependencies: {
'@nx/devkit': nxVersion,
tslib: tslibVersion,
},
main: './src/index.js',
name: `@proj/${mylib}`,
private: true,
type: 'commonjs',
typings: './src/index.d.ts',
version: '0.0.1',
});
// intentionally set the invalid version
updateJson(`libs/${mylib}/package.json`, (json) => {
+2 -2
View File
@@ -146,14 +146,14 @@ describe('@nx/expo (legacy)', () => {
it('should install', async () => {
// run install command
let installResults = await runCLIAsync(
`install ${appName} --no-interactive`
`install ${appName} --no-interactive --force`
);
expect(installResults.combinedOutput).toContain(
'Successfully ran target install'
);
installResults = await runCLIAsync(
`install ${appName} --packages=@react-native-async-storage/async-storage,react-native-image-picker --no-interactive`
`install ${appName} --force --packages=@react-native-async-storage/async-storage,react-native-image-picker --no-interactive`
);
expect(installResults.combinedOutput).toContain(
'Successfully ran target install'
+2 -2
View File
@@ -117,14 +117,14 @@ describe('@nx/expo', () => {
it('should install', async () => {
// run install command
let installResults = await runCLIAsync(
`install ${appName} --no-interactive`
`install ${appName} --force --no-interactive`
);
expect(installResults.combinedOutput).toContain(
'Successfully ran target install'
);
installResults = await runCLIAsync(
`install ${appName} --packages=@react-native-async-storage/async-storage,react-native-image-picker --no-interactive`
`install ${appName} --force --packages=@react-native-async-storage/async-storage,react-native-image-picker --no-interactive`
);
expect(installResults.combinedOutput).toContain(
'Successfully ran target install'
@@ -413,7 +413,8 @@ describe('React Rspack Module Federation', () => {
}, 600_000);
});
it('should should support generating host and remote apps with the new name and root format', async () => {
// TODO(Coly010): investigate this failure
xit('should support generating host and remote apps with the new name and root format', async () => {
const shell = uniq('shell');
const remote = uniq('remote');
+3 -1
View File
@@ -106,7 +106,9 @@ describe('nx release pre-version command', () => {
// command should succeed because the pre-version command will build the package
const result4 = runCLI(`release patch -d -g ${groupName} --first-release`);
expect(result4).toContain('NX Executing pre-version command');
expect(result4).toContain(
`NX Executing release group pre-version command for "${groupName}"`
);
updateJson(`nx.json`, (json) => {
json.release = {
+1
View File
@@ -273,6 +273,7 @@ export function runCommandUntil(
...opts.env,
FORCE_COLOR: 'false',
},
windowsHide: true,
});
return new Promise((res, rej) => {
let output = '';
+11 -5
View File
@@ -62,11 +62,17 @@ export default async function (globalConfig: Config.ConfigGlobals) {
function getPublishedVersion(): Promise<string | undefined> {
return new Promise((resolve) => {
// Resolve the published nx version from verdaccio
exec('npm view nx@latest version', (error, stdout, stderr) => {
if (error) {
return resolve(undefined);
exec(
'npm view nx@latest version',
{
windowsHide: true,
},
(error, stdout, stderr) => {
if (error) {
return resolve(undefined);
}
return resolve(stdout.trim());
}
return resolve(stdout.trim());
});
);
});
}
@@ -106,16 +106,16 @@ export const ProjectDetails = ({
</p>
) : null}
{projectData.tags && projectData.tags.length ? (
<TagList tags={projectData.tags} />
<TagList className="mb-2" tags={projectData.tags} />
) : null}
{projectData.root ? (
<p>
<p className="mb-2">
<span className="font-medium">Root:</span>
<span className="font-mono"> {projectData.root.trim()}</span>
</p>
) : null}
{projectData.projectType ?? typeToProjectType[project.type] ? (
<p>
<p className="mb-2">
<span className="font-medium">Type:</span>
<span className="ml-2 font-mono capitalize">
{projectData.projectType ?? typeToProjectType[project.type]}
@@ -1,11 +1,13 @@
import React, { useState, useRef, useEffect } from 'react';
import { Pill } from '../pill';
import { twMerge } from 'tailwind-merge';
interface TagListProps {
tags: string[];
className: string;
}
export function TagList({ tags }: TagListProps) {
export function TagList({ tags, className }: TagListProps) {
const [isExpanded, _setIsExpanded] = useState(false);
const [isOverflowing, setIsOverflowing] = useState(false);
const tagsContainerRef = useRef<HTMLSpanElement>(null);
@@ -34,7 +36,7 @@ export function TagList({ tags }: TagListProps) {
}, [tagsContainerRef]);
return (
<div className="relative max-w-full">
<div className={twMerge('relative max-w-full', className)}>
<p className="flex min-w-0 font-medium leading-loose">
<span className="inline-block">Tags:</span>
@@ -11,6 +11,7 @@ import { SchemaViewModel } from './get-schema-view-model';
import { SchemaEditor } from './schema-editor';
import { SchemaViewer } from './schema-viewer';
import { Heading2, Heading3 } from './ui/headings';
import { cx } from '@nx/nx-dev/ui-primitives';
function pathCleaner(path: string): string {
return path.split('?')[0];
@@ -156,29 +157,38 @@ export function Content({
<Link
href={schemaViewModel.packageUrl}
title="See package information"
className="relative inline-flex items-center rounded-l-md border border-slate-200 bg-white px-4 py-2 text-xs font-medium text-slate-600 focus-within:ring-blue-500 hover:bg-slate-50 focus:z-10 focus:outline-none focus:ring-1 dark:border-slate-700 dark:bg-slate-800/60 dark:text-slate-400 dark:focus-within:ring-sky-500 dark:hover:bg-slate-800"
className={cx(
'relative inline-flex items-center rounded-l-md border border-slate-200 bg-white px-4 py-2 text-xs font-medium text-slate-600 focus-within:ring-blue-500 hover:bg-slate-50 focus:z-10 focus:outline-none focus:ring-1 dark:border-slate-700 dark:bg-slate-800/60 dark:text-slate-400 dark:focus-within:ring-sky-500 dark:hover:bg-slate-800',
schemaViewModel.packageName.startsWith('@nx/powerpack')
? 'rounded-md'
: 'rounded-l-md'
)}
>
{schemaViewModel.packageName}
</Link>
<Link
href={schemaViewModel.schemaGithubUrl}
target="_blank"
rel="noreferrer"
title="See this schema on GitHub"
className="relative -ml-px inline-flex items-center rounded-r-md border border-slate-200 bg-white px-4 py-2 text-xs font-medium text-slate-600 focus-within:ring-blue-500 hover:bg-slate-50 focus:z-10 focus:outline-none focus:ring-1 dark:border-slate-700 dark:bg-slate-800/60 dark:text-slate-400 dark:focus-within:ring-sky-500 dark:hover:bg-slate-800"
>
<svg
className="mr-2 h-4 w-4"
viewBox="0 0 16 16"
fill="currentColor"
{schemaViewModel.packageName.startsWith(
'@nx/powerpack'
) ? undefined : (
<Link
href={schemaViewModel.schemaGithubUrl}
target="_blank"
rel="noreferrer"
title="See this schema on GitHub"
className="relative -ml-px inline-flex items-center rounded-r-md border border-slate-200 bg-white px-4 py-2 text-xs font-medium text-slate-600 focus-within:ring-blue-500 hover:bg-slate-50 focus:z-10 focus:outline-none focus:ring-1 dark:border-slate-700 dark:bg-slate-800/60 dark:text-slate-400 dark:focus-within:ring-sky-500 dark:hover:bg-slate-800"
>
<path
fillRule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"
></path>
</svg>
See schema
</Link>
<svg
className="mr-2 h-4 w-4"
viewBox="0 0 16 16"
fill="currentColor"
>
<path
fillRule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"
></path>
</svg>
See schema
</Link>
)}
</div>
</div>
@@ -25,24 +25,30 @@ export function TopSchemaLayout({
Rescope @nrwl to @nx
</Link>
</div>
<div className="relative z-0 inline-flex flex-shrink-0">
<a
href={url}
target="_blank"
rel="noreferrer"
aria-hidden="true"
title="See package on GitHub"
className="relative inline-flex items-center rounded-md border border-slate-200 bg-slate-50 px-4 py-2 text-xs font-medium dark:border-slate-700 dark:bg-slate-800/60"
>
<svg className="mr-2 h-4 w-4" viewBox="0 0 16 16" fill="currentColor">
<path
fillRule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"
></path>
</svg>
{name}
</a>
</div>
{name.startsWith('@nx/powerpack') ? undefined : (
<div className="relative z-0 inline-flex flex-shrink-0">
<a
href={url}
target="_blank"
rel="noreferrer"
aria-hidden="true"
title="See package on GitHub"
className="relative inline-flex items-center rounded-md border border-slate-200 bg-slate-50 px-4 py-2 text-xs font-medium dark:border-slate-700 dark:bg-slate-800/60"
>
<svg
className="mr-2 h-4 w-4"
viewBox="0 0 16 16"
fill="currentColor"
>
<path
fillRule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"
></path>
</svg>
{name}
</a>
</div>
)}
</div>
);
}
@@ -2,6 +2,10 @@
@apply overflow-hidden !important;
}
.DocSearch-VisuallyHiddenForAccessibility {
visibility: hidden;
}
body .DocSearch-Container {
@apply fixed left-0 top-0 z-[50] flex h-screen w-screen cursor-auto flex-col bg-black/10 p-4 backdrop-blur-sm sm:p-6 md:p-[10vh] lg:p-[12vh] dark:bg-white/10;
}

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