13462 Commits

Author SHA1 Message Date
Miroslav Jonaš
963a1c5621
chore(repo): fix missing tsconfig paths (#27759)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #
2024-09-04 09:06:19 -04:00
Colum Ferry
ef7b66800a
feat(remix): infer targets for remix vite in @nx/remix/plugin (#27713)
- feat(remix): add createnodesv2
- feat(remix): support vite in the plugin
- feat(remix): support remix vite in plugin
- fix(remix): init should ues addPlugin v2

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

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

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


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Nx should infer targets for remix vite apps

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

Fixes #
2024-09-04 08:44:19 -04:00
Benjamin Cabanes
27a01861c3
feat(nx-dev): add Mike Hartington in the team section (#27755)
It add Mike Hartington to the Nx company team.
2024-09-04 08:41:58 -04:00
Colum Ferry
88f01a9d8d feat(rspack): add module federation support (#416)
* feat(rspack): add withModuleFederation util

* feat(rspack): add module federation required executors

* feat(rspack): add module federation support

* fix(rspack): dev server setup

* fix(rspack): cleanup package entry for module federation

* feat(rspack): migrate to rspack 1.0

* fix(rspack): ensure license plugin is not attempting to read root
2024-09-04 11:37:57 +00:00
Colum Ferry
2854ccaa43 feat(rspack): add module federation support (#416)
* feat(rspack): add withModuleFederation util

* feat(rspack): add module federation required executors

* feat(rspack): add module federation support

* fix(rspack): dev server setup

* fix(rspack): cleanup package entry for module federation

* feat(rspack): migrate to rspack 1.0

* fix(rspack): ensure license plugin is not attempting to read root
2024-09-04 11:37:57 +00:00
Benjamin Cabanes
f39b995b88 fix(nx-dev): change connect to nx cloud link in home page 2024-09-04 00:23:46 +02:00
Miroslav Jonaš
c4c8b0150d
feat(linter): add option to exclude projects from circular deps check (#27504)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #

---------

Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2024-09-03 14:33:41 -04:00
Julián Gómez Sibecas
c30415e892
docs(core): improve typing (#27731)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #

---------

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2024-09-03 18:31:13 +02:00
Louie Weng
3b0fd38066
chore(nx-cloud): add feature flag to nx login (#27698)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 login and logout aliases point toward nx-cloud login and logout
- when you connect a new workspace, by default nxCloudId will be added
to your nx.json

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

- removed documentation and references to nx login and logout aliases
- when you connect a new workspace, by default nxCloudAccessToken will
be added to your nx.json


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

Fixes #
2024-09-03 11:01:21 -04:00
MaxKless
72e3e89999
docs(misc): change 'editors support' to 'editor integration (#27740) 2024-09-03 17:46:29 +03:00
James Henry
71715363bf
fix(release): version plan changelogs should contain authors and refs (#27737) 2024-09-03 17:11:24 +04:00
Rares Matei
d46edc4ff2
docs(nx-cloud): update launch template props (#27735)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #
2024-09-03 08:49:13 -04:00
Victor Berchet
07333a5c4d
fix(misc): fix the URL of the @naxodev/nx-cloudflare plugin (#27723)
The former URL returns a 404
2024-09-03 06:10:42 -04:00
Nicolas Beaussart
9039e5e0a6
fix(core): bump plugin pool attempts to work with slow runtimes (#27726)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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


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

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

```

With the added logging, we can see the following:

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


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

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

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

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

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

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

_Debugged in pair with @AgentEnder_

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

Plugin worker should work and nx should be working with plugin isolation
2024-09-01 15:06:00 -04:00
Mike Hartington
18e5535940
docs(misc): add initial speaker post (#27715)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #
2024-08-30 13:43:31 -04:00
MaxKless
4abcf61748
fix(core): add parallelism to target defaults schema (#27710)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
Parallelism is part of the project schema but not `targetDefaults`. This
means it's highlighted as a warning in `nx.json`

## Expected Behavior
There should be no warning.
2024-08-30 10:28:23 -04:00
Austin Fahsl
4c39ad76bd
fix(release): release plan command should take filters and touched projects into account (#27706) 2024-08-30 17:38:02 +04:00
Isaac Mann
83a387a105
docs(core): create commands landing page (#27660)
Creates a [custom landing page for Nx
commands](https://nx-dev-git-docs-commands-landing-page-nrwl.vercel.app/reference/nx-commands)
2024-08-29 22:43:21 -04:00
Emily Xiong
79b75ad140
fix(detox): fix name with camel case (#27602)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
- when create an app with `--appName <app name in camel case>`, it
currently has an error. it is caused by line:
```
  const { root: appRoot } = readProjectConfiguration(
    host,
    names(options.appProject).fileName
  );
```
it should not convert appProject to fileName, it should just take the
appProject as it is:
```
const { root: appRoot } = readProjectConfiguration(host, options.appProject);
```

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

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

Fixes https://github.com/nrwl/nx/issues/24080
2024-08-29 16:54:39 -04:00
Jack Hsu
ab408ab30c
fix(core): filter branch in preparation for nx import (#27652)
This PR fixes an issue with `nx import` where multiple directories
cannot be imported from the same repo. We now use `git filter-repo` (if
installed) or `git filter-branch` (fallback) to prepare the repo for
import so anything not in the subdirectory will be ignored (i.e. cleaner
history).

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

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

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

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

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

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

Fixes #
2024-08-29 16:38:41 -04:00
Emily Xiong
925672e20b
fix(expo): add cacheVersion to metro.config (#27646)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
expo tends to cache the output if there is no change in metro.config.js
we don't need to explicitly set the args --clear when
https://github.com/expo/expo/issues/30930 is fixed

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

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

Fixes https://github.com/nrwl/nx/issues/27392
2024-08-29 15:36:06 -04:00
Emily Xiong
f64aa9a915
fix(react-native): change hermesCommand to build android (#27641)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes https://github.com/nrwl/nx/issues/27367
2024-08-29 15:34:52 -04:00
Leosvel Pérez Espinosa
3562131820
fix(core): handle file change conflicts between sync generators (#27695)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

When running sync generators in the background (daemon) to cache the
results for when needed, they are isolated from each other (each run
with its own `Tree`). This is done because there's no guarantee which
sync generator will be run together since that would depend on each
specific task graph being run. When a task is run, a task graph is
constructed, and sync generators are collected from it and run/retrieved
from the cache.

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

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

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

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

Fixes #
2024-08-29 13:35:51 -04:00
Isaac Mann
a7b2787069
fix(nx-dev): show first tab if none selected (#27701)
Tabs are not displaying correctly on the second page that is viewed.

Should be able to select the `project.json` tab on `Run Tasks` and then
switch to `Cache Task Results` and have the `Nx >= 17` tab shown.
2024-08-29 13:16:17 -04:00
Benjamin Cabanes
f95059917d
feat(nx-cloud): add 'generate-token' option to connect (#27678)
This update introduces a new 'genreate-token' option to force local
token creation. It ensures tokens are not created for GitHub-based
setups unless explicitly overridden. Adjustments include updated logic
in the generator function and schema to accommodate the new option.
2024-08-29 09:29:58 -04:00
Philip Fulcher
a0cc0a9735 docs(nx-dev): add Explain with AI doc links to blog 2024-08-29 14:38:24 +02:00
Emily Xiong
81acdedb18
fix(expo): fix unable to build expo local for yarn 4 (#26992)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes https://github.com/nrwl/nx/issues/22631
2024-08-29 01:32:01 -04:00
Louie Weng
0ef6892a6e
feat(nx-cloud): remove feature flag for nx login (#27657)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

Enables `nx connect` to use the V2 endpoint from Nx API such that it
creates an `nxCloudId`

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

Fixes #
2024-08-28 15:14:01 -04:00
Jack Hsu
e28de09c40
fix(core): fixes an issue where using "node:test" results in infinite loop (#27685)
This PR fixes an issue with `node:test` not being recognized as a
built-in Node module, and since it is not in `node_modules` with a
resolvable `package.json`, it hits an infinite loop.

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

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

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

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

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

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

Fixes #
2024-08-28 15:08:04 -04:00
Jack Hsu
d1c901df1e
fix(js): respect "watch" option when "runBuildTargetDependencies" is true (#27677)
This PR fixes and issue when `watch: false` and
`runBuildTargetDependencies: true` results in the server process
restarting, but no build happens.

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

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

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

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

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

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

Fixes #20963
2024-08-28 14:09:45 -04:00
Jack Hsu
adcefcc6da
chore(bundling): rename env vars so we do not cause Nx Cloud connection errors (#27681)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #
2024-08-28 12:17:28 -04:00
Jack Hsu
be37c35351
chore(storybook): rename env vars so we do not cause Nx Cloud connection errors (#27680)
The test to ensure we don't bundle secrets/tokens is causing an error
like this:

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

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

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


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

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

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

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

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

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

Fixes #
2024-08-28 11:24:06 -04:00
Leosvel Pérez Espinosa
97fa7f16f9
feat(core): allow disabling registered task sync generators (#27638)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

There's no way to disable sync generators registered in inferred tasks
by a Crystal plugin.

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

There should be a way to disable sync generators registered in inferred
tasks by a Crystal plugin.

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

Fixes #
2024-08-28 10:31:30 -04:00
Jonathan Cammisuli
a0dc0f1710
fix(core): change remoteCache to getRemoteCache (#27673)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
Calling remoteCache directly for the Nx cloud package causes issues with
how nx cloud deals with imports

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
`remoteCache` is now a function call so that the nx cloud package
functions properly

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

Fixes #
2024-08-28 10:25:00 -04:00
Juri
56311ae959 chore(nx-cloud): blog post about the newest Nx Cloud table log view 2024-08-28 15:27:09 +02:00
James Henry
13170da88b
fix(release): programmatic API types should not be any (#27647) 2024-08-27 18:49:34 +00:00
MaxKless
3fbaf7f873
fix(core): make sure env vars specified in run-commands envFile option take priority over other loaded env files (#27583)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
When you specify the `envFile` property on a `nx:run-commands` executor,
values in that file don't override values from other loaded env files
(like `.env` and others that are loaded by the task runner).


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

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

Fixes #
2024-08-27 13:05:47 -04:00
Emily Xiong
6cb0720009
fix(gradle): fix find root for projects (#27651)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #
2024-08-27 12:44:09 -04:00
Colum Ferry
564834462e
fix(vite): plugin should infer ts project correctly for libs (#27649)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
The vite plugin's typecheck target is not using the tsconfig.lib.json
project when running typecheck for libs

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


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

Fixes #27501
2024-08-27 11:08:45 -04:00
James Henry
4fd639b170
feat(core): refactor graph implementation details (#27267)
Co-authored-by: nartc <nartc7789@gmail.com>
2024-08-27 10:01:11 -04:00
Colum Ferry
320d9f223f
fix(testing): application generators should accurately configure e2e projects (#27453)
- feat(devkit): add util for determining the e2e web server info
- feat(vite): add util for determining the e2e web server info
- feat(webpack): add util for determining the e2e web server info
- fix(webpack): allow port override
- fix(devkit): e2e web server info util should handle target defaults
- feat(webpack): export the e2e web server info utils
- fix(vite): rename util
- fix(devkit): util should determine the devTarget for cypress
- fix(react): improve accuracy of e2e project generation

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

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

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

## Current Behavior
<!-- This is the behavior we have today -->
The logic for finding the correct targets and web addresses to use when
setting up e2e projects is flawed and missing some key considerations.


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

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


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

Fixes #
2024-08-27 10:00:43 -04:00
Juri
57f3701372 docs(nx-cloud): improve e2e test splitting feature page 2024-08-27 00:23:32 -07:00
Juri
daf5837a21 feat(nx-dev): add deepdive callout component 2024-08-27 00:23:21 -07:00
Craigory Coppola
61ecd4b4f8
fix(core): negative workspace-root filesets should override positive filesets (#27524) 2024-08-26 18:28:16 -04:00
Jason Jean
036e5fcf3e
fix(gradle): fix child project deps (#27643)
## Current Behavior
<!-- This is the behavior we have today -->

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

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

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

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

Fixes #
2024-08-26 18:17:32 -04:00
Emily Xiong
f02e2fc76e
fix(core): fix --e2eTestRunner for create-nx-workspace with react native (#27543)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
--e2eTestRunner option is not working when create-nx-workspace with
preset react native

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

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

Fixes #
2024-08-26 18:15:26 -04:00
Jason Jean
45e088e066
fix(core): do not stream output when static output style is enabled (#27642)
## Current Behavior
<!-- This is the behavior we have today -->

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

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

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

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

Fixes #
2024-08-26 18:12:12 -04:00
Jason Jean
6fff9b5e81
feat(core): return task results from imperative task runner (#27640)
## Current Behavior
<!-- This is the behavior we have today -->

Imperatively running tasks does not return task results.

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

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

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

Fixes #
2024-08-26 16:54:44 -04:00
Louie Weng
c93f5d6f0d
feat(nx-cloud): alias for login and logout (#27358)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

N/A

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

When running `npx nx login`, a file server should open and take you to
Nx Cloud to create a new personal access token.

When running `npx nx logout`, the user should be prompted with Nx Cloud
URLs of instances that they can revoke personal access tokens to.

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

Fixes #
2024-08-26 14:26:29 -04:00
Jason Jean
f0e419b04f
chore(repo): update pnpm to v9.8 (#27637)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

This repo uses pnpm `9.2.0`

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

This repo uses pnpm `9.8.0`

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

Fixes #
2024-08-26 13:31:07 -04:00