9651 Commits

Author SHA1 Message Date
Jason Jean
e724eedc5e
fix(core): record task runs via the queue (#31253)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

Recording task runs does not send via the queue so the daemon could hang
without handling the response properly.

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

Recording task runs sends via the queue and does not hang

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

Fixes #
2025-05-16 12:01:43 -04:00
Nicolas Marien
bd88b0efe4
feat(devkit): allow requiring cts config files (#31103)
When migrating our project to esm, we encountered an issue with the
playright plugin, but more generally with the `loadConfigFile` from the
devkit.
Our configuration is a `.cts` file, but it's not treated as commonjs:
`__dirname` and `__filename` are not available.

![CleanShot 2025-05-07 at 15 31
04@2x](https://github.com/user-attachments/assets/e8299b4e-153b-4cb4-98b7-d806e537ab12)

## Expected Behavior
`.cts` files are interpreted as commonJS files when in a module context.

---------

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2025-05-16 11:58:34 -04:00
Jack Hsu
840f5f445b
fix(core): ensure that global nx works with dot-nx workspace after init (#31249)
This PR fixes an issue with the global `nx` command, where running `nx
init` in a non-JS folder (i.e. using dot-nx setup) results in a
workspace that doesn't work with the global command.

e.g.

```
brew install nx
cd some-java-project
nx init
nx report
```

https://www.loom.com/share/e8dbb2fb7a084300a4dd1e5dff2c0db1

## Current Behavior
`nx report` or any other command fails

## Expected Behavior
`nx` commands should work

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

Fixes #
2025-05-16 10:57:08 -04:00
James Henry
fcd630ddd9
fix(core): remove engines field, improve compatibility documentation (#31245) 2025-05-16 10:00:00 -04:00
pawel-twardziak
c4cb96c2e7
fix(linter): handle the flat config in workspace rule generators (#29253)
Closes #29252

## Current Behavior
See #29252

## Expected Behavior
See #29252

## Related Issue(s)
See #29252

Fixes #
See #29252

---------

Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
2025-05-16 09:39:34 +02:00
Jason Jean
7db44a855a
fix(core): do not set tasks which cannot be interactive to interactive (#31240)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

Some tasks cannot be interactive because of the way they are
implemented. At the moment, those tasks can be set to interactive mode.

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

Tasks which cannot be interactive are not set as interactive

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

Fixes #
2025-05-15 18:16:40 -04:00
Jason Jean
8ff47e0cb0
chore(repo): add debug logging to running tasks service (#31224)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

There are logs for the running task service.

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

Fixes #
2025-05-15 16:57:56 -04:00
Nicholas Cunningham
d3ecffedc1
feat(vite): add ajv dev dependency for vite-plugin-dts (#31107)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
Currently, when we generate a vite library that uses `vite-plugin-dts`
it breaks the project graph and all nx commands fail.
It happens because the wrong version of `ajv` is being hoisted in
`node_modules/ajv` so the expected module path required from
`vite-plugin-dts` is not found.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Nx commands should work out of the box when we generate a library with
vite.

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

Fixes #
2025-05-15 15:44:53 -04:00
Isaac Mann
3873fee587
chore(core): update inputs for rust tasks (#31184)
- Adds `native` inputs to rust tasks
- Adds `rustc --version` runtime input to `native` named input
2025-05-15 13:55:15 -04:00
Colum Ferry
d61683efc6
feat(angular): migrate to angular rspack 21 (#31216)
## Current Behavior
The Angular plugin currently uses Angular Rspack at `^20.7.0`.
The latest release of Angular Rspack is `21.0.0`

## Expected Behavior
Use the latest version of Angular Rspack
2025-05-15 13:13:02 +01:00
Jonathan Cammisuli
81ecb22abe
feat(core): add nx console messaging to TUI (#31148)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
This enables a connection between the Nx TUI app and Nx Console so that
we can send messages to console. This is used to update MCP tools on Nx
Console to assist with LLMs

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

Fixes #
2025-05-14 15:58:30 -04:00
Henry Ing-Simmons
f6d69baf14
chore(core): replace red in console with blue (#29026)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
Red is used as a colour when running multiple processes in the command
line. This causes confusion as red is universally the colour for
danger/errors.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Red should not be a colour in the console and blue should be used
instead.

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

Fixes #19901
2025-05-14 16:08:06 +00:00
Tyler Hendrickson
21bdb35a07
fix(esbuild): update peerDep range (#30402)
## Current Behavior
`esbuild` has a [security
advisory](https://github.com/advisories/GHSA-67mh-4wv8-2f99) for
versions older than 0.25.0. `@nx/esbuild` does not allow versions
greater than 0.19.2 due to the range specified in peer dependencies.

A fix for this was attempted in #30167, but it still does not allow any
versions greater than 0.19.x due to the way [0.x.x releases are
handled](https://github.com/npm/node-semver#caret-ranges-123-025-004).

## Expected Behavior
`@nx/esbuild` allows any version from the current 0.19.2 onwards, not
including a future 1.x.x version. This will allow non-vulnerable
versions of `esbuild` to be used.

## Related Issue(s)
Fixes #30009 
Fixes #30370
2025-05-14 16:00:34 +00:00
Colum Ferry
9aee5b7adf
feat(angular): handle prerender and appshell in covert to rspack (#31210)
## Current Behavior
The `convert-to-rspack` generator does not handle projects that use
Prerendering or App Shell

## Expected Behavior
The generator sets up Prerendering and App Shell

Fixes https://github.com/nrwl/angular-rspack/issues/88
2025-05-14 15:26:41 +01:00
Jonathan Gelin
3be687bf95
fix(module-federation): generalize the check of the remote project specified in the buildTarget (#31211)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 #30808
2025-05-14 15:00:44 +01:00
Emily Xiong
e15e2ed106
fix(gradle): make ci inputs same as test inputs (#31198)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

current ci test target does not contain inputs of test, it just contains
the test source file

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
change the ci targets to contain inputs of test
<img width="903" alt="Screenshot 2025-05-13 at 1 31 22 PM"
src="https://github.com/user-attachments/assets/d73de232-440a-439b-adb8-e22fc3fe3d8a"
/>


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

Fixes #
2025-05-14 10:00:08 -04:00
Jonathan Cammisuli
889dee0854
chore(core): update rust to 2024 edition (#31156)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Updates to 2024 edition to support more features that are coming in
other PRs

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

Fixes #
2025-05-13 18:11:05 -04:00
Jason Jean
3d73fd30a0
fix(core): make running a single task more transparent (#31163)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

Running a single task is in this uncanny framed state and doesn't exit
immediately.

<img width="1317" alt="image"
src="https://github.com/user-attachments/assets/13e7463f-9eb0-48db-95f2-c09e203d494f"
/>

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

Running a single task isn't framed and exits immediately.

This also fixes scrolling in interactive mode based on whether or not
the underlying terminal is in application cursor mode or not.


![image](https://github.com/user-attachments/assets/c32c85e7-edd6-4aba-9a15-bc75cc9ee5ba)


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

Fixes #

---------

Co-authored-by: JamesHenry <james@henry.sc>
2025-05-13 21:09:39 +00:00
Yiheng
cd59a6678e
feat(core): run parallel based on the number of cpu cores (#31011) 2025-05-13 16:19:16 +02:00
Leosvel Pérez Espinosa
e1c0be3d2d
fix(angular): install @angular/build when using vitest test runner (#31169)
## Current Behavior

The application and library generators do not install the
`@angular/build` package when using the `vitest` test runner. This can
cause resolution issues depending on the package manager because the
package is a peer dependency of the `@analogjs/vite-plugin-angular`
package.

## Expected Behavior

The application and library generators should install the
`@angular/build` package when using the `vitest` test runner.

## Related Issue(s)

Fixes #30646
2025-05-13 13:22:49 +02:00
Nicholas Cunningham
f20b2e6a02
fix(nextjs): Update glob for cache output (#31177)
This PR refines the Next.js package plugin’s output glob to exclude the
.next/cache directory. Caching that path via AWS S3 leads to checksum
mismatches when restoring from the remote cache, so it’s now omitted.

related: https://github.com/nrwl/nx/issues/30338
2025-05-12 16:42:07 -04:00
Emily Xiong
5677831b17
fix(gradle): return success false for failed task (#31178)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #
2025-05-12 15:30:59 -04:00
Isaac Mann
07474a4092
Revert "docs(core): publish tutorial kit tutorials (#30973)" (#31179)
This reverts commit 2cb0fa2b55e6a00f35928435332941b4742bf5e3.

Removes the tutorialkit tutorials.
2025-05-12 15:23:41 -04:00
James Henry
07c8b4f41b
fix(core): improve pinned tasks annotation on narrow width (#31175)
This is intended to be a super quick improvement until I can work on
something a bit more substantial.

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

We always try and render `[Pinned output {}]`.

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

We only render `[{}]` on narrow widths.

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

Fixes #
2025-05-12 19:06:14 +00:00
Ian Luca
cbb2619325
fix(core): do not follow symlinks when creating remote cache tarball (#31138)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior

Symlinks in the remote cache tarball are "followed". That modifies the
output of Next.js projects using pnpm, causing a restored cache not to
work in production.

## Expected Behavior

Symlinks are added to the tarball, instead of being followed. I.e. the
cache output is not modified.

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

Should fix #31085.
2025-05-09 20:48:35 -04:00
Jonathan Cammisuli
ce1d6b2e6e
fix(core): change default native logging to "OFF" (#31161)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
"ERROR" is set as the default logging level when using native logging.
This causes issues with the new function of calling the native logger
from the JS side.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
"OFF" is set as the default so that no logs appear on stdout if there
was no explicit opt-in.

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

Fixes #
2025-05-09 23:59:10 +00:00
Craigory Coppola
bf1eec5eca
feat(core): focus single tasks (#31159)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-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 running a single task it is automatically focused, but the tasks
list is visible and the task is not interactive

## Expected Behavior
When running a single task, the tui is minimal without a tasks list and
with interactivity by default

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

Fixes #
2025-05-09 22:44:06 +00:00
Jack Hsu
5aa0c4050f
fix(core): handle npm scope when matching project substring (#31160)
This PR fixes an issue if a JS project uses the same name as the npm
scope.

For example, if you have `@acme/acme` and `@acme/acme-e2e` projects,
then running `nx lint acme` will fail with an error:

```
 NX   Multiple projects matched:

@acme/acme-e2e
@acme/acme
```
## Current Behavior
Nx fails to run the task

## Expected Behavior
Nx should find the project to run the task for (ignoring scope)

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

Fixes #
2025-05-09 18:43:36 -04:00
Jason Jean
b620ea7dc1
fix(core): show all native logs for debug mode (#31154)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

TUI debug mode only shows native logs since the TUI launched.

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

TUI debug mode shows logs even before the TUI launched such as task
hashing logs and more.

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

Fixes #
2025-05-09 20:26:38 +00:00
Jonathan Cammisuli
f5cc2d51b0
fix(core): simplify action dispatch, use mutex locking, and avoid unnecessary clones (#31157)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 are many unwraps that we can avoid by using `parking_lot::mutex`
* There is an unnecessary `task::spawn` to dispatch actions. The channel
is non-blocking and this is wasted cycles
* There are a bunch of clones that are happening with the PtyInstances

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
* Uses `parking_lot::Mutex` and removes `unwraps()`
* Dispatches actions directly without going into tasks
* Uses tuple derefs to avoid clones, and uses 2 instead of 4

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

Fixes #
2025-05-09 15:40:07 -04:00
Jason Jean
0a2553aa2c
chore(core): add debug mode for tui (#31115)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

Debugging the TUI is a chore

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

Debugging the TUI is a little better..

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

Fixes #
2025-05-09 11:57:32 -04:00
Nicholas Cunningham
124eba7557
fix(core): Update React,Vue and Node generators applications for CNW (#31059)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
- Currently, when we create a React, Vue or Node app we add the app name
inside `package.json` under the nx
```
{
  "name": "@myworkspace/acme",
  "version": "0.0.1",
  "private": true,
  "nx": {
    "name": "acme"
  }
}

```

- When we create a publishable library using React/JS generator inside a
ts project references workspace the `--importPath` option.
## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
- Since the original intention is not known we should not automatically
add this to the project's `package.json`
- `importPath` option should not be required when using ts project
references.
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
For workspaces that are not using TS project references the result
remains unchanged.

Fixes #
2025-05-09 08:23:38 -04:00
Jason Jean
8c50b7f3af
fix(core): only cleanup db connection on exit (#31137)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

db connections are cleaned up on SIGTERM, SIGHUP, SIGINT, AND exit. On
SIGTERM, SIGHUP, and SIGINT, the process exits there.. which short
circuits other SIGTERM, SIGHUP, and SIGINT handlers.

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

db connections are only cleaned up when the process actually exits. It
does not exit the process here in response to any signals.

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

Fixes #
2025-05-08 22:35:01 +00:00
Emily Xiong
f339a1ab40
fix(gradle): fix gradle tests (#30879)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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, because it requires to sign locally, so i thought run command
like
`:project-graph:publishToMavenLocal -x
:project-graph:signNxProjectGraphPluginPluginMarkerMavenPublication -x
:project-graph:signPluginMavenPublication -x
:project-graph:publishNxProjectGraphPluginPluginMarkerMavenPublicationToMavenLocal
-x :project-graph:publishPluginMavenPublicationToMavenLocal` would
publish the plugin locally, but it actually does not. it does not throw
an error, but does not do anything at all.
so for e2e tests, it is actually pulling the latest published gradle
plugin from maven rather than test local code, hence the e2e errors.

also, currently project graph build for java version 21, we change it to
java 17 to be used by ocean repo.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
change the command to `./gradlew :project-graph:publishToMavenLocal
-PskipSign=true` and not apply signing when skip sign is true, so this
should be able to publish plugin to local repository.

work with java 17

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

Fixes #
2025-05-08 17:29:10 -04:00
Emily Xiong
468ec023c5
fix(gradle): specify idle timeout for gradle batch runner (#31009)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 idle timeout set for gradle, by default is 3 hours.
when running gradle in DTE, it seems to run into memory issue. Even
through using tooling api, the connection is closed when batch is done,
but i think the gradle daemon is still active in the background. when
running the next batch, it is going to start a new gradle daemon and i
got an error like
```
Starting a Gradle Daemon, 2 busy and 200 stopped Daemons could not be reused, use --status for details
```

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
add idle timeout for 10s.
this inline command will make gradle daemon to stop itself after 10s.


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

Fixes #
2025-05-08 17:26:16 -04:00
Jason Jean
aea60e1a5e
fix(core): handle process killing more robustly (#31131)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

Cleanup is happening on SIGTERM, SIGINT, and SIGHUP signals and on
exit....

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

Cleanup is mostly done on exit.

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

Fixes #
2025-05-08 15:25:33 -04:00
Isaac Mann
b6dc0d9e8e
docs(core): render links in command descriptions (#30832)
Render links as links in command descriptions
- in the terminal, links are listed as text
- on the docs site, links are rendered as markdown links
2025-05-08 13:37:17 -04:00
Jonathan Cammisuli
525bcca0a0
fix(core): replace posix.relative with relative for path resolution (#30783)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the 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 using the new Typescript style repos (using package.json
instead of project.json for typescript projects), we get incorrect paths
when using `resolveImportWithRequire` on Windows. Currently when trying
to find a path, we end up with a path similar to
`../C:\\dev\\nx\\file.ts` which is incorrect.

## Expected Behavior
Changing `posix.relative` to just relative, allows us to get the proper
path on Windows like so: `.\\file.ts`

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

Fixes #

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
2025-05-08 13:49:13 +00:00
Craigory Coppola
98d3354855
fix(core): tui summary should capture more terminal outputs (#31113)
## Current Behavior
Some task outputs are missing in terminal outputs

## Expected Behavior
Task outputs are present

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

Fixes #
2025-05-07 18:37:21 -04:00
Jason Jean
6f9cce78ac
fix(core): tui should not exit when underlying process is cancelled (#31112)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

Entire TUI exits when any process exits with a SIGINT

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

TUI stays alive when a process exits with a SIGINT

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

Fixes #
2025-05-07 20:52:40 +00:00
Jason Jean
0d53604b5a
fix(core): clearer tui colors on light themes (#31095)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

Light themes are not super clear with the new TUI.

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

Light themes are much clearer with the new TUI.

Internal loom shared on slack for full details.

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

Fixes #

---------

Co-authored-by: JamesHenry <james@henry.sc>
2025-05-07 16:29:36 -04:00
James Henry
9b2eed2662
fix(core): resolve excessive CPU consumption via child_process.rs (#31110)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #
2025-05-07 15:05:16 -04:00
Jason Jean
68426f6adb
fix(core): run script should exit the process when kill signals are r… (#31109) 2025-05-07 13:42:27 -04:00
Nicholas Cunningham
3b3b320ff7
fix(core): add keepExistingVersions to jest option to preserve dependency versions (#30652)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
Currently, when we use the jest configuration generator it will forcibly
update the jest version if the package already exist.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Now, the jest version will be preserved unless the option is passed to
update the version.

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

Fixes #
2025-05-07 10:01:10 -06:00
Jason Jean
480a20e3c5
fix(core): explicitly cleanup forked process task runner (#31106)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

Forked process task runner cleanup is not explicitly invoked.

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

Forked process task runner cleanup is explicitly invoked.

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

Fixes #
2025-05-07 11:29:35 -04:00
Leosvel Pérez Espinosa
e6a3d77db3
fix(js): handle ${configDir} in tsconfig files when inferring tasks (#31098)
## Current Behavior

The `${configDir}` template variable in tsconfig files is incorrectly
handled when inferring tasks with the `@nx/js/typescript` plugin.

## Expected Behavior

The `${configDir}` template variable in tsconfig files should be
correctly handled when inferring tasks with the `@nx/js/typescript`
plugin.

## Related Issue(s)

Fixes #30883
2025-05-07 10:15:56 +00:00
Nicolas Beaussart
a944c8cd54
fix(core): fail nx release cli when publish step fails (#31088) 2025-05-06 19:17:10 +00:00
James Henry
71de122579
fix(core): send up and down arrows to pty in interactive mode (#31084) 2025-05-06 15:58:47 +00:00
Colum Ferry
678965da21
feat(rspack): upgrade to version 1.3.8 (#31070)
## Current Behavior
We currently install Rspack at `^1.2`. The latest version of Rspack is
`1.3.8`
Angular Rspack now requires at least `1.3.5`

## Expected Behavior
Rspack installations should use latest version of `1.3.8`
2025-05-06 09:30:01 -04:00
Jason Jean
5cd09f97ff
fix(core): kill tasks run via run-commands (#31045)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

`nx serve-docs nx-dev` in this repo did not cleanup the running server
when cancelled.

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

Tasks run via `run-commands` are cleaned up properly.

`nx serve-docs nx-dev` in this repo does clean up the running server
when cancelled.

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

Fixes #
2025-05-05 13:47:18 -04:00