9619 Commits

Author SHA1 Message Date
Matthias Stemmler
659149d87c
fix(bundling): do not normalize tsconfig path for Windows with rollup (#30567)
## Current Behavior
Rollup build fails on Windows with errors like this:
```
[plugin rpt2] error TS6059: File '/foo/bar/baz.ts' is not under 'rootDir' 'C:/foo/bar'. 'rootDir' is expected to contain all source files.
```

This is because since
81fe7bb278
the `tsconfig` path passed to `rollup-plugin-typescript2` is built using
`joinPathFragments`, which removes the drive letter on Windows.

## Expected Behavior
Rollup build should not fail.
2025-06-09 11:31:20 +01:00
Jacob S
5f7d46354e
fix(react): allow for buildTargetWebpack to have an executor of @nx/webpack:webpack or @nx/rspack:rspack (#30253)
closed #30235

## Current Behavior
nxComponentTestingPreset for webpack cannot use rspack as an executor.

## Expected Behavior
nxComponentTestingPreset for webpack can use webpack or rspack as an
executor.

## Related Issue(s)
#30235

Fixes #30235
2025-06-09 11:15:33 +01:00
dpnolte
438457ab12
fix(rspack): must run type check with @nx/rspack:rspack when skipTypeChecking is false (#31027)
<!-- 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
- Create a project that uses @nx/rspack:rspack as build target with
SkipTypeChecking set to false.
- Run build target for project.
- Type check has not been run and will not bail in case of any
typescript errors

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

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
- It should run type checking as documented:
https://nx.dev/nx-api/rspack/executors/rspack#skiptypechecking
I looked at the webpack executor and there it also runs the type check
based on `skipTypeChecking` and not the `typeCheck` alias. So I've
adjusted it accordingly for the rspack executor.

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

Fixes #31026

---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2025-06-09 11:08:01 +01:00
Rui Lima
b38f966707
fix(node): esbuild breaks and does not cleanup (#30469)
<!-- 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 -->
esbuild breaks on function checks and improperly handles dangling
promises, preventing the program to exit successfully.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The program should exit properly and no zombie processes kept running.

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

Fixes #
2025-06-09 10:50:57 +01:00
Paul Bohm
c9021b0e39
fix(vite): NxReporter compatible with Vitest ≥0.29 (#31425)
<!-- 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(vite): must begin with lowercase` -->

## Current Behavior
Running `nx test … --reporter=verbose` (or any additional Vitest
reporter) on
projects that use **Vitest ≥ 0.29** hangs indefinitely at the end of the
run.
`vitest` itself finishes, but the Nx task-runner never receives the
*done*
signal because **`NxReporter` only implements the legacy
`onFinished()` hook**.  
When multiple reporters are configured, Vitest now emits
`onTestRunEnd()` instead of `onFinished()`, so the promise in
`NxReporter`
remains unresolved and the worker process stays alive forever.

## Expected Behavior
`nx test` (and affected `nx run-many --target=test`) exits cleanly on
**all**
Vitest versions, regardless of how many reporters are passed.

* `NxReporter` resolves its internal promise via **either**
  `onTestRunEnd` (Vitest ≥ 0.29) **or** `onFinished` (Vitest ≤ 0.28).
* No functional change in watch-mode.
* No extra timers or fallbacks – just one shared helper.

## Implementation Notes
* Added `onTestRunEnd` method that delegates to a private
`_handleFinished`.
* Re-implemented `onFinished` as a thin delegate to the same helper.
* Original error-detection logic is untouched.

## Related Issue(s)
Closes nrwl/nx#<insert-issue-number-if/when-one-exists>

Co-authored-by: Paul Bohm <{{GITHUB_NOREPLY_EMAIL}}>
2025-06-09 10:50:04 +01:00
Petr Plenkov
ddaf77b109
feat(bundling): use tsconfig.lib.json for rollup.config.ts (#30453)
## Current Behavior

Currently when we're using `rollup.config.ts` rollup is picking up wrong
tsconfig. Because of this not everything works as expected:

- `You are using one of Typescript's compiler options 'declaration',
'declarationMap' or 'composite'. In this case 'outDir' or
'declarationDir' must be specified to generate declaration files.` error
appears , because lib tsconfig.json doesn't have outputDir at all
- even if we add outDir to `tsconfig.base.json` we'll have another error
`[!] (plugin typescript) RollupError: [plugin typescript]
@rollup/plugin-typescript TS6377: Cannot write file
'/workspaces/abapify-docs/dist/tsconfig.tsbuildinfo' because it will
overwrite '.tsbuildinfo' file generated by referenced project
'/workspaces/abapify-docs/packages/abap-to-markdown'`
This happens becase it tries to write all tsbuildinfo files into a root
dist folder.

## Expected Behavior
Using rollup.config.ts should just work in a similar way as js|cjs|mjs
config work.

## Solution

According to docs:

> This option supports the same syntax as the
[--plugin](https://rollupjs.org/command-line-interface/#p-plugin-plugin-plugin)
option i.e., you can specify the option multiple times, you can omit the
@rollup/plugin- prefix and just write typescript and you can specify
plugin options via ={...}.

So it means we can use something like this:
```
rollup -c rollup.config.ts --configPlugin typescript={tsconfig:\'tsconfig.lib.json\'}
```

## Related Issue(s)
Solution is taken from this issue::
https://github.com/rollup/plugins/issues/1713#issuecomment-2201138846
2025-06-09 10:41:49 +01:00
Leosvel Pérez Espinosa
73e2c506bb
docs(angular): update tutorial and docs with angular v20 changes (#31356)
Updates the Angular Monorepo tutorials to reflect the changes in Angular
v20.
2025-06-09 10:27:53 +02:00
Leosvel Pérez Espinosa
2d33862c43
feat(angular): update angular eslint packages to v20 (#31489)
## Current Behavior

The Angular ESLint packages are installed with a v20 beta version.

## Expected Behavior

The Angular ESLint packages should be installed with the stable v20
version.
2025-06-06 23:16:30 +00:00
Jason Jean
635dd06368
fix(core): remove tabs from local workspace plugins section in nx report (#31490)
## Current Behavior

The `nx report` command uses tab characters for indenting local
workspace plugins in its output, which creates inconsistent formatting
compared to other sections like 'Registered Plugins' and 'Community
plugins'.

## Expected Behavior

Local workspace plugins should be formatted consistently with other
plugin sections in the report output, without tab indentation.

## Related Issue(s)

This is a minor formatting improvement for better consistency in the nx
report output. No specific issue was filed for this change.
2025-06-06 18:40:44 -04:00
Leosvel Pérez Espinosa
8941362d1a
fix(core): scope typescript resolution cache correctly when processing the graph (#31455)
## Current Behavior

When using Node.js subpath imports with the same name in different
projects, the Nx graph incorrectly picks up seemingly random
dependencies between projects that shouldn't exist.

This happens because the result of the resolution performed with
TypeScript is cached using the import path as the cache key. The problem
with that is that multiple projects can have the same subpath import
name pointing to internal files of the project, so when the resolution
is made for the first project (say `project1`), the result will be
cached and incorrectly reused for other projects with the same subpath
import name. So, all projects with the same subpath import name would
resolve the dependency to the first project (`project1`).

The same could happen to projects with TS path mappings defined in the
project's tsconfig file. These TS path mappings would only apply to the
project internally and therefore, other unrelated projects could also
define them with the same name pointing to different files.

## Expected Behavior

The Node.js subpath imports should be handled correctly. The TypeScript
resolution result should be cached safely and scoped to the project from
which the import is being done.

## Related Issue(s)

Fixes #31223
2025-06-06 13:18:08 -04:00
Jason Jean
77ff63f356
feat(misc): enhance IDE integration with Nx Console auto-installation and improved logging (#31462)
## Current Behavior

Currently, IDE integration setup requires manual configuration and lacks
streamlined auto-installation capabilities for Nx Console. The logging
system also needs improvement for better developer experience.

## Expected Behavior

With these changes, the IDE integration provides:
- Prompt for automatic Nx Console installation with user preferences
- Enhanced native logger with proper formatting and levels
- Better development documentation for IDE setup
- Updated documentation links to use the new format

## Related Issue(s)

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

This PR implements IDE integration improvements including Nx Console
auto-installation and enhanced logging capabilities.
2025-06-06 17:15:50 +00:00
Leosvel Pérez Espinosa
6613dd29ea
fix(linter): infer lint tasks with inputs using {workspaceRoot} to support nested projects (#31488)
## Current Behavior

When running the `lint` task on a project that contains nested projects,
the task runs over all the files, including the ones inside the nested
projects, but the task cache status is not affected by changes to the
files in nested projects. This only happens when the inputs are defined
with `{projectRoot}/...` (what the `@nx/eslint/plugin` infers). The
`{projectRoot}` token scopes the files inside the project without files
in other nested projects. While the `{workspaceRoot}` token would
include every file and wouldn't scope them to any particular project.

## Expected Behavior

The `@nx/eslint/plugin` should infer `lint` tasks with their inputs
using the `{workspaceRoot}` token to support nested projects. This would
be more aligned with what the tool itself does, which runs over all the
files inside the project root regardless of them being inside nested Nx
projects.

Additionally, the difference in behavior between `{workspaceRoot}` and
`{projectRoot}` should be documented.

## Related Issue(s)

Fixes #31264
2025-06-06 12:52:15 -04:00
Colum Ferry
e73a1411a0
feat(storybook)!: support storybook 9 (#31172)
## Current Behavior
We currently do not have support for Storybook 9, nor any migrations to
help users switch to it.


## Expected Behavior
Support Storybook 9 and add a migration for users to switch to v9

BREAKING CHANGE: Remove deprecated generators:
`@nx/storybook:cypress-project`,
`@nx/react-native:storybook-configuration`, `@nx/react-native:stories`,
`@nx/react-native:component-story`
2025-06-06 12:51:47 -04:00
Jonathan Cammisuli
9c366d39c4
chore(core): fix editor detection tests when running in cursor (#31478)
<!-- 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 tests in the Cursor terminal fails. 

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Running tests in the Cursor terminal should pass. 

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

Fixes #
2025-06-06 12:03:43 -04:00
Paweł Tymczuk
c5146d1b5f
fix(release): changelog filtering logic for the project commits (#31449) 2025-06-06 19:25:54 +04:00
Leosvel Pérez Espinosa
601fecdf0c
feat(angular): support angular v20 (#31369)
Add support for Angular v20.

BREAKING CHANGE: Support for Angular v17 was dropped.

### TODO

- [x] Update Angular packages to the stable v20
- [x] Update `jest-preset-angular` when it releases support for Angular
v20
  - [x] PR: https://github.com/thymikee/jest-preset-angular/pull/3119
- [x] Release:
https://github.com/thymikee/jest-preset-angular/releases/tag/v14.6.0
- [ ] Update Angular ESLint packages to the v20 stable version once
released
  - [ ] PR: https://github.com/angular-eslint/angular-eslint/pull/2448
- [x] Update AnalogJS packages when they are released with support for
Angular v20
  - [x] PR: https://github.com/analogjs/analog/pull/1751
- [x] Release: https://github.com/analogjs/analog/releases/tag/v1.17.0
- [x] Fix for `@analogjs/vitest-angular` peer deps:
https://github.com/analogjs/analog/pull/1754
    - [x] Release:
- [x] Beta:
https://github.com/analogjs/analog/releases/tag/v1.17.1-beta.1
- [x] Stable: https://github.com/analogjs/analog/releases/tag/v1.17.1
- [ ] Update Storybook packages
- [x] PRs: https://github.com/storybookjs/storybook/pull/31602 and
https://github.com/storybookjs/storybook/pull/31611
- [x] Storybook 9 Release:
https://github.com/storybookjs/storybook/releases/tag/v9.0.3
  - [ ] Storybook 8 Release??: PENDING
- [ ] Remaining issue:
https://github.com/storybookjs/storybook/issues/31652
2025-06-06 10:55:26 -04:00
Miguel
fa9290abf4
fix(release): sort groups topologically bottom-up and fix typo to allow multi-level group dependencies (#31374) 2025-06-06 13:05:13 +04:00
Nadav Shatz
1afe6acabe
fix(rspack): Add missing return for rspack composoable plugin (#31372)
This was broken in https://github.com/nrwl/nx/pull/29691

it's missing this return.
2025-06-05 15:04:39 -06:00
Nicholas Cunningham
ae89efb8d1
fix(nextjs): add extension alias support for handling ESM libs (#31323)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
Currently, if you try to import a ESM lib after you generate a Next.js
application it fails to build due to how the module exports `export *
from './lib/lib8446520.js';`.

This has been addressed with webpack and needs to be extended to
Next.js.

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

You should work out of the box and you should be able to import a lib
defined like: `export * from './lib/lib8446520.js';.`

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
This is also related to our webpack and rspack packages. Changes have
also been made to them to ensure consistency across bundlers.

Fixes #30714
2025-06-05 13:54:29 -06:00
Leosvel Pérez Espinosa
93234039c9
fix(core): use ts-node option from tsconfig files when creating transpiler (#31469)
## Current Behavior

When creating a `ts-node` transpiler, only `compilerOptions` are
provided. Because we instruct `ts-node` to skip reading the tsconfig
(this was previously done to avoid some edge cases), other options in
the tsconfig files are lost (e.g. `ts-node` specific options).

This was previously reported at https://github.com/nrwl/nx/issues/21695
and fixed by https://github.com/nrwl/nx/pull/21723, but a rework at a
later point caused a regression.

## Expected Behavior

When creating a `ts-node` transpiler, we should provide
`compilerOptions` and the `ts-node` options.
2025-06-05 14:04:36 -04:00
Colum Ferry
bc01bbaca1
fix(angular): optimize ng-packagr-lite watch mode file writing (#31434)
## Current Behavior

In ng-packagr-lite watch mode, all output files are written to disk on
every incremental build regardless of whether their content actually
changed. This causes downstream watchers (like Vite) to see all files as
"changed" and trigger full rebuilds instead of incremental ones.

## Expected Behavior

Only files with changed content should be written to disk during
incremental builds in watch mode. This allows downstream watchers to
properly detect which files actually changed and perform efficient
incremental rebuilds.

## Related Issue(s)

Fixes #31033

🤖 Generated with [Claude Code](https://claude.ai/code)
2025-06-05 11:07:23 +01:00
Nicholas Cunningham
33bfc51ec2
fix(node): add project name sanitization for Docker commands. (#31461)
This PR improves our Docker support by sanitizing project names for
compatibility with Docker commands and Linux systems.

closes: #31421
2025-06-04 15:18:51 -06:00
Benjamin Cabanes
733122bc9d
docs(nx-dev): update hero section (#31460)
Update tagline.
2025-06-04 15:48:19 -04:00
Caleb Ukle
4f57f01d01
docs(core): move plugin api docs to tech plugin guides (#31402)
# before

plugin api docs where stuck in `api` section which doesn't make sense

# after

move plugin api docs into `guides` section and add redirect for better
discoverability
2025-06-03 13:43:24 -04:00
Leosvel Pérez Espinosa
77b34bd788
fix(angular): generate correct output for buildable libraries on windows (#31437)
## Current Behavior

The `@nx/angular:ng-packagr-lite` executor is generating a wrong output
on Windows.

## Expected Behavior

The `@nx/angular:ng-packagr-lite` executor should generate the correct
output on Windows.

## Related Issue(s)

Fixes #31436
2025-06-03 17:09:41 +02:00
Colum Ferry
34cf5a243f
fix(rspack): ensure nest applications generated correctly #31204 (#31424)
- fix(rspack): choosing nest as framework should not result in error
#31204
- fix(rspack): add deprecation message for application generator
- fix(rspack): ensure application generated projects are added to
excludes

## Current Behavior
Running the `@nx/rspack:application` generator with `--framework=nest`
results in an error due to mix of inferred and executor usage throughout
the generation process.

## Expected Behavior
Running the generator should pass without failure and create a working
project.
Deprecate the generator in favour of using project specific packages
(@nx/react etc)

## Related Issue(s)

Fixes #31204

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Coly010 <Coly010@users.noreply.github.com>
2025-06-03 13:41:17 +00:00
Leosvel Pérez Espinosa
d3faf53c56
fix(core): print installation logs when installing latest version during nx migrate and using --verbose (#31432)
## Current Behavior

By default, `nx migrate` installs the latest version of `nx` in a
temporary directory to run the migration process. When this installation
fails, no helpful information is printed even when running with
`--verbose`; it only prints a generic message that the package manager
install process failed. This doesn't help when debugging/troubleshooting
issues with the installation.

## Expected Behavior

When installing the latest version of `nx` during `nx migrate` fails,
the installation logs should be printed when running with `--verbose`.

## Related Issue(s)

Fixes #
2025-06-03 08:15:15 -04:00
Leosvel Pérez Espinosa
cb930d006a
fix(core): ensure nx init implementation for angular correctly resolves @angular/core (#31430)
## Current Behavior

When running `nx init` in an Angular CLI repo located in a directory
that has an ancestor directory with an Nx installation, it silently
exits when trying to determine the compatibility of the Angular version.
The migration is not performed, and no feedback is given to the user.
This happens because the current implementation will determine that
ancestor directory (outside the workspace root) as the workspace root
(when starting the migration, there's no `nx` in the repo).

## Expected Behavior

Running `nx init` should work correctly, and proper feedback should be
printed to the user if it can't determine the compatibility of the
Angular version. It should correctly resolve the `@angular/core` package
from the Angular CLI workspace root.

## Related Issue(s)

Fixes #31291
2025-06-03 12:55:29 +02:00
Colum Ferry
b97ee099c8
fix(vite): resolve project-specific tsconfig before workspace fallback (#31423)
## Current Behavior

The Nx Vite TsConfig paths plugin incorrectly resolves to workspace root
tsconfig files instead of project-specific ones, causing path aliases
like `@/contexts` to fail resolution.

## Expected Behavior

The plugin should check for project-specific tsconfig files
(`tsconfig.app.json`, `tsconfig.lib.json`, `tsconfig.json`) before
falling back to workspace root configurations.

## Related Issue(s)

Fixes #28945

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Coly010 <Coly010@users.noreply.github.com>
2025-06-03 10:27:44 +01:00
laney
88c51965e6
fix(core): update getTouchedProjectsFromLockFile to handle deleted/moved projects correctly (#31361) 2025-06-02 17:41:13 -04:00
Jason Jean
fc99ded082
fix(core): implement missing --print flag for nx graph command (#31406)
## Current Behavior

The `nx graph --print` flag is documented and shows in CLI help, but
when used, it opens the graph UI in a browser instead of printing the
dependency graph to the console.

## Expected Behavior

With this PR, `nx graph --print` correctly prints the dependency graph
JSON to stdout in the terminal and exits, matching the documented
behavior and CLI help description.

## Related Issue(s)

Fixes #30255

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: FrozenPandaz <FrozenPandaz@users.noreply.github.com>
2025-06-02 21:18:51 +00:00
Nicholas Cunningham
d87f4c2d23
fix(remix): update setup-tailwind generator to correct import statements (#30599)
<!-- 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 two issues when we generate a remix application with ts
solutions:

1. Running the `setup-tailwind` generator with a reference project which
now is commonly with the pattern `@nx/acme` throws an error based on the
schema.
```
Property 'project' does not match the schema.'@nx/acme' should match the pattern '^[a-zA-Z].*$'.
```
2. The `tailwind.css` inside of `root.tsx` causes error with Vite.
```
app/root.tsx (9:7): "default" is not exported by "app/tailwind.css", imported by "app/root.tsx".
```




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

The remix project should be able to be referenced similarly to how we
handle React.
The tailwind import should not throw an error.

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

Fixes #30343
2025-06-02 12:52:43 -06:00
Nicholas Cunningham
80aeb92664
fix(vite): add ajv dependency for non-pnpm package managers (#31413)
This PR updates your `package.json` to add `ajv` as a devDependency to
ensure the correct version is hoisted during module resolution.

For non-pnpm package managers notably (yarn and npm) the hosited version
is outdated and it spawns errors when vite is generating types via
`vite-plugin-dts`.
```shell
 - packages/vite-parent-lib9113241/vite.config.ts: Error: Cannot find module 'ajv/dist/core'
  Require stack:
  - /private/var/folders/tp/bfmjfn9s0hd59bm9z80j3mgm0000gn/T/nx-e2e--29165-pQZxOyX4J3ot/nx/proj2191858/node_modules/ajv-draft-04/dist/index.js
  - /private/var/folders/tp/bfmjfn9s0hd59bm9z80j3mgm0000gn/T/nx-e2e--29165-pQZxOyX4J3ot/nx/proj2191858/node_modules/@rushstack/node-core-library/lib/JsonSchema.js
  - /private/var/folders/tp/bfmjfn9s0hd59bm9z80j3mgm0000gn/T/nx-e2e--29165-pQZxOyX4J3ot/nx/proj2191858/node_modules/@rushstack/node-core-library/lib/index.js
  - /private/var/folders/tp/bfmjfn9s0hd59bm9z80j3mgm0000gn/T/nx-e2e--29165-pQZxOyX4J3ot/nx/proj2191858/node_modules/@microsoft/api-extractor/lib/api/CompilerState.js
```
Here is an example of the failures: 
-  [NPM + MacOS]
https://staging.nx.app/runs/uaJ1pbWHtK/task/e2e-js%3Ae2e-local
-  [PNPM + Linux]
https://staging.nx.app/runs/WRgY8Z6Jlw/task/e2e-js%3Ae2e-local
-  [NPM + Linux]
https://staging.nx.app/runs/Ght82l5Upa/task/e2e-js%3Ae2e-local
2025-06-02 10:51:56 -06:00
Nicholas Cunningham
8fb63e00ce
feat(nest): Update nest version to 11 (#31393)
This PR updates our Nest dependency to version 11.
It also fixes an issue when you generate a Nest app with
`--unitTestRunner=none` it would still generate `.spec` files

closes: #30188
2025-06-02 09:47:01 -06:00
Leosvel Pérez Espinosa
2cf519a654
fix(angular): keep extra target metadata when needed in convert-to-rspack generator (#31309)
## Current Behavior

When converting an Angular project to use Rspack with the
`@nx/angular:convert-to-rspack` generator, some target top-level options
can be lost (e.g. custom `dependsOn`, `outputs`, etc.).

## Expected Behavior

When converting an Angular project to use Rspack with the
`@nx/angular:convert-to-rspack` generator, relevant target top-level
options that wouldn't be inferred need to be kept in the converted
project.
2025-06-02 12:58:41 +02:00
Jason Jean
e4124c1c93
docs(core): improve affected command description to define affected projects (#31404)
<!-- 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 affected` documentation was unclear and did not state what affected
projects actually meant.

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

Adds a clear definition of "affected projects" to the CLI documentation.
Affected projects are projects that have been changed and projects that
depend on the changed projects.

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

Fixes #30712

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2025-05-30 21:25:57 -04:00
Leosvel Pérez Espinosa
7595d8a5e1
fix(js): write typescript plugin cache files atomically (#31390)
## Current Behavior

The `@nx/js/typescript` plugin writes cache files in a non-atomic
fashion, which can result in corrupted or empty files being written.

## Expected Behavior

The `@nx/js/typescript` plugin should write cache files atomically, and
they should not be corrupt. It should also retry a limited amount
attempts to account for temporary file locks.

## Related Issue(s)

Fixes #30239 
Fixes #31187
2025-05-30 16:41:45 -04:00
Johann Wagner
efc9c8d12a
fix(rspack): fix issue with optimization options in rspack config (#31337)
## Current Behavior
rspack.config.ts options related to optimizations are removed if the
mode is not "production". This makes the compile fail for all
non-production builds.

## Expected Behavior
If mode isn't set to "production" configuration related to optimization
should be passed through.

## Related Issue(s)
Fixes #31268 #30292
2025-05-30 11:41:13 -06:00
Terry
e249109615
fix(linter): fix line endings handling in '@nx/eslint:convert-to-flat-config' generator (#31043)
## Current Behavior

When running `nx g @nx/eslint:convert-to-flat-config` on windows, the
ignores path is not handled correctly. After converting, the path will
have the additional `/r`

## Expected Behavior

When running `nx g @nx/eslint:convert-to-flat-config` on windows, the
ignores path should be correct.
2025-05-30 09:45:11 +02:00
Jason Jean
d7106f5ede
fix(core): handle run-commands targets with no commands (#31364)
<!-- 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 hangs when here is a `run-commands` target with no commands.

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

Nx does not hang when there is a `run-commands` target with no commands.

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

Fixes #31345
2025-05-29 09:48:03 -04:00
Jason Jean
2f37cb25a0
fix(core): use next available port when the port for nx graph is in use (#31365)
<!-- 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 -->
Command would fail silently with no error message
## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Rather than erroring, Nx will find the next available port and use that.

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

Fixes #30915
2025-05-29 09:47:49 -04:00
Leosvel Pérez Espinosa
ab97087f2a
feat(angular): update nx init legacy integrated migration for angular to handle angular v17 (#31352)
## Current Behavior

The `nx init` legacy integrated migration for Angular doesn't handle
Angular v17 because it was part of the LTS versions. With the upcoming
Angular v20, that version is no longer part of the LTS, so it needs to
be handled by the legacy migration.

## Expected Behavior

The `nx init` legacy integrated migration for Angular should handle
Angular v17 because it's no longer part of the LTS versions.
2025-05-29 09:47:02 -04:00
Leosvel Pérez Espinosa
fc0aeb5a4b
fix(angular): update tsconfig files generation to better support angular v20 (#31357)
- Remove TS project reference to non-existent `tsconfig.editor.json`
file
- Ensure the `tsconfig.spec.json` file for Jest has the correct
`module`/`moduleResolution` compiler options
2025-05-29 14:33:19 +02:00
James Henry
9ab5d820ab
fix(core): infer codex environment and use default tasks runner (#31359) 2025-05-28 14:12:17 +02:00
Leosvel Pérez Espinosa
c7a9c71c07
fix(linter): handle ng-package.json file with no lib.entryFile in @nx/enforce-module-boundaries rule (#31360)
## Current Behavior

When an `ng-package.json` file of an Angular library secondary entry
point does not specify `lib.entryFile`, the
`@nx/enforce-module-boundaries` rule throws an error. The
`ng-package.json` file of an Angular secondary entry point can be as
simple as `{}`, but it would cause the rule to throw an error.

## Expected Behavior

The `@nx/enforce-module-boundaries` rule should correctly handle an
`ng-package.json` file of an Angular library secondary entry point that
does not specify `lib.entryFile`. The property should [default to
`src/public_api.ts`](22a7ba1979/src/ng-entrypoint.schema.json (L20)).

Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
2025-05-28 09:45:32 +02:00
Brandon Roberts
187b1ee76f
fix(vite): bump @analogjs/vite-plugin-angular to 1.16.x (#31317)
## Current Behavior

AnalogJS installs 1.14.1 for Vitest support

## Expected Behavior

AnalogJS installs 1.16.1 for Vitest support

Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
2025-05-27 17:27:11 +02:00
Miroslav Jonaš
a71a6cab40
fix(core): fix broken nx-cloud url shortening logic (#31283)
Current URL shortening logic is based on the old Nx Cloud version format
- `YYMM.DD.BuildVersion`.

Since, 2025 we changed that format to `YYYY.MM.BuildVersion` which
breaks this logic and causes the connection URL to be just host.

## 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-27 12:01:17 +02:00
Nicholas Cunningham
f1171191dd
fix(webpack): add support for retrieving all transitive non-buildable dependencies (#31343)
This PR improves dependency resolution for Node.js apps using Webpack or
Rspack.

While we already handle direct dependencies for non-buildable libraries,
this update ensures that **transitive dependencies** are also properly
included. This guarantees that all necessary dependencies are bundled
when the main app/library is built.

closes: https://github.com/nrwl/nx/issues/31334
2025-05-27 00:53:45 -06:00
Emily Xiong
4a94841916
fix(gradle): add migration script to check gradle plugin version (#31304)
<!-- 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 migrate @nx/gradle to latest, we don't check the
dev.nx.gradle.project-graph version in build file

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
we should check the project-praph in the build file and make sure it is
correct version

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

Fixes #
2025-05-26 13:59:28 -04:00
Emily Xiong
5537df6411
feat(gradle): exclude dependsOn tasks (#30913)
<!-- 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 gradle task executor will run gradle task as it is. by default,
gradle command will run the tasks itself and its all depends on tasks.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
- add excludeDependsOn in gradle executor schema with default value to
true: this allows gradle command to run tasks without its dependsOn
tasks. this improves performance time
- change project graph plugin (dev.nx.gradle.project-graph) to accept
option atomizer:
```
nxProjectReport {
	atomized = false
}
```
this will disabled atomized targets to be created. check-ci will not
have dependsOn task ci, it will be test instead.
it will not created any ci and ci--* targets, but check-ci will be
created, but dependsOn test:
<img width="605" alt="Screenshot 2025-05-20 at 3 00 39 PM"
src="https://github.com/user-attachments/assets/a2e0ae20-78a1-4848-a063-5825b169c219"
/>

this is what check-ci target looks like with atomized as true:
<img width="917" alt="Screenshot 2025-05-20 at 2 59 34 PM"
src="https://github.com/user-attachments/assets/33c6af0b-3e45-498d-96d0-4f46c54a8159"
/>

- change dependsOn targets to include both project name and task name.
e.g. `spring-boot:checkFormat
`, so when excludeDependsOn is true, it will exclude exact task
- in batch runner, run test runner and build runner as same time

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

Fixes #
2025-05-26 13:59:04 -04:00