9369 Commits

Author SHA1 Message Date
FrozenPandaz
87badb0486 chore(core): regen native typings 2025-04-15 09:23:45 -04:00
James Henry
6541751aab feat(core): add the experimental Terminal UI for tasks (#30565) 2025-04-15 09:23:45 -04:00
Colum Ferry
5f26c6811e feat(module-federation): add continuous tasks support to react rspack (#30644)
## Current Behavior
Continuous tasks are not set up for React Rspack Module Federation
Remote projects.
This is important because `--dev-remotes` is no longer supported with
Crystal Module Federation usage.

## Expected Behavior
Add Continuous Tasks support for React Rspack Module Federation Remote
Projects.
This replaces the need for `nx serve shell --dev-remotes=remote1`.

Instead, the command is simply `nx serve remote1` and continuous tasks
means that the `shell:serve` task is executed correctly.
2025-04-15 09:23:45 -04:00
Jason Jean
c5fb467118 feat(core): share continuous tasks (#29901)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

<!-- 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>
2025-04-15 09:23:45 -04:00
Jason Jean
dee4906f5e chore(repo): fix unit tests (#30431)
<!-- 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 -->

Unit tests are broken after rebase

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

Unit tests are passing

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

Fixes #
2025-04-15 09:23:45 -04:00
Colum Ferry
0d38ec4454 feat(node): generate new apps with continuous: true (#30148)
## Current Behavior
Node applications rely on the `@nx/js:node` executor to handle serving. 
Unfortunately, it can not be determined if existing usage of the
executor is used for a continuous or finite task.

## Expected Behavior
Generate new node applications with `continuous: true` for their serve
targets
2025-04-15 09:23:45 -04:00
Colum Ferry
f5e124972a feat(storybook): infer continuous tasks for storybook serve and serve-static (#30069)
## Current Behavior
The `@nx/storybook/plugin` does not set `continuous:true` for serve-like
targets.

## Expected Behavior
The plugin should correctly set `continuous: true` for `serve` and
`serve-static`.
2025-04-15 09:23:45 -04:00
Colum Ferry
7989e39461 feat(vite): infer continuous tasks for dev (#30043)
## Current Behavior
The `dev`, `serve`, `preview` and `serve-static` targets inferred by the
`@nx/vite/plugin` do not infer `continuous:true` indicating to Nx that
these tasks are continuous.


## Expected Behavior
Infer `continuous: true` for the serve-like targets for Vite.
2025-04-15 09:23:45 -04:00
Colum Ferry
63282bc070 feat(webpack): add continuous inference support (#29974)
## Current Behavior
Webpack Inference Plugin does not currently infer `continuous` for
`serve, preview, serve-static` targets.

## Expected Behavior
Webpack Inference Plugin correctly infers `continuous: true`
2025-04-15 09:23:45 -04:00
Colum Ferry
9fc7ffdaf3 feat(rspack): add continous inference support (#29973)
## Current Behavior
Rspack and Rsbuild Inference Plugins do not infer `continuous` for serve
tasks.

## Expected Behavior
Correctly infer `continuous` true.
2025-04-15 09:23:45 -04:00
Colum Ferry
2cd3252365 feat(js): infer continuous for watch-deps task (#29976)
## Current Behavior
The `@nx/js` plugin exposes a helper to generate `build-deps` and
`watch-deps` tasks for inference plugins.
It does not currently infer `continuous` for the `watch-deps` task.

## Expected Behavior
Ensure `watch-deps` is infered with `continuous: true`
2025-04-15 09:23:45 -04:00
Colum Ferry
229cf28198 feat(remix): add continuous task support (#29905)
## Current Behavior
When `serve, dev, start` targets are inferred by the `@nx/remix` plugin,
they are not inferring `continuous`.


## Expected Behavior
When `NX_CONTINUOUS_TASKS_PREVIEW` env var exists, infer the
`continuous` property.
2025-04-15 09:23:45 -04:00
Jason Jean
f326bfe52e feat(core): introduce continuous tasks (#29750)
<!-- 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. -->

An RFC about this feature is happening here: #29025. This has the most
information about this feature.

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

Nx currently does not explicitly handle tasks which run continuously
until they are terminated.

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

This PR adds the initial support for continuous tasks which run
continuously until they are terminated. This adds the ability to depend
on continuous tasks. There is some more work to be done but this will be
enough as an MVP.

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

Fixes #
2025-04-15 09:23:45 -04:00
Leosvel Pérez Espinosa
0082d939eb
fix(linter): remove empty entry in typescript eslint flat config (#30727)
## Current Behavior

The `flat/typescript` config contains a config block with the `files`
containing an invalid empty entry.

## Expected Behavior

The `flat/typescript` config should be correct.

## Related Issue(s)

Fixes #30725
2025-04-15 08:08:17 -04:00
Leosvel Pérez Espinosa
b3c1404b02
fix(testing): unset customConditions when running cypress tasks (#30709)
## Current Behavior

Cypress e2e tasks in a workspace with the `customConditions` TypeScript
compiler option set, fail with the error:

```bash
TSError: ⨯ Unable to compile TypeScript:
error TS5098: Option 'customConditions' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'.
```

This happens because Cypress forces ts-node to use `module: commonjs`
and `moduleResolution: node10`, which is not compatible with the
`customConditions` TypeScript compiler option.

## Expected Behavior

Cypress e2e tasks in a workspace with the `customConditions` TypeScript
compiler option set should work as expected.

## Related Issue(s)

Fixes #
2025-04-14 09:17:34 -04:00
Leosvel Pérez Espinosa
70f1e660c8
fix(rspack): do not reuse existing ts-node compiler options when inferring tasks (#30703)
## Current Behavior

The `@nx/rspack` graph plugin reuses the potentially existing
`TS_NODE_COMPILER_OPTIONS` to set the `env` property of the inferred
tasks for a TS config file. This is not correct since the env var could
have a different value (or not exist at all) when running tasks compared
to when the graph plugin runs.

## Expected Behavior

The `@nx/rspack` graph plugin should not reuse any existing
`TS_NODE_COMPILER_OPTIONS` when inferring tasks for a TS config file.

## Related Issue(s)

Fixes #
2025-04-14 14:36:20 +02:00
Emily Xiong
65752addb5
fix(core): clean up batch process after post run (#30687)
<!-- 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, the batch process is not being cleanup

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
need to kill the batch process after post run in task orchestrator,
otherwise, when kill it during the post run (store the output to cache),
it will cause the process to hang in DTE

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

Fixes #
2025-04-12 08:36:45 -04:00
Jason Jean
d66b663879
fix(core): copy native file atomically to avoid hanging graph creation (#30695)
<!-- 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 copying the native file out of node_modules into tmp from multiple
processes (aka plugin workers)... this can result in Node deadlocking.

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

Copying the native file out of node_modules into tmp from multiple
processes will first copy to unique places in `/tmp` but then atomically
rename to the final location where it is still loaded from.

This at least fixes a flaky test in `nx:test` where the explicit
dependencies tests were timing out after 35 seconds

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

Fixes #
2025-04-11 19:21:14 -04:00
Jason Jean
b56df7ba7a
chore(repo): update nx to 20.8.0-beta.2 (#30694)
<!-- 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 Nx 20.7.0-beta.3

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

This repo uses Nx 20.8.0-beta.2

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

Fixes #
2025-04-11 19:18:50 -04:00
Leosvel Pérez Espinosa
ce41dedf01
fix(js): ensure the tsconfig files cache is correctly busted when implementation changes (#30689)
## Current Behavior

The `@nx/js/typescript` plugin sometimes throws an error due to a
mismatch between the cached information for the tsconfig files and a
newer implementation.

## Expected Behavior

The `@nx/js/typescript` plugin should correctly invalidate the cached
tsconfig files when the implementation changes.

## Related Issue(s)

Fixes #
2025-04-11 18:12:22 -04:00
Jason Jean
f3013ccafe
fix(testing): do not inherit existing env (#30688)
<!-- 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 -->

Inheriting the existing environment variable here causes tests to fail
for some reason.

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

This reverts it to how it functioned before and fixes the failing tests.

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

Fixes #
2025-04-11 14:25:49 -04:00
Jason Jean
f839b070f0
fix(core): ensure fileworker is cleaned up when workspace context is … (#30683)
…dropped

<!-- 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 file worker was holding onto `nx_files.nxt` causing our tempFs to
not clean up properly.

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

When the node cleans up workspace context, the file worker will be
dropped and release the `nx_files.nxt`. TempFs will thus be able to
clean up the temp directory properly.

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

Fixes #
2025-04-11 17:44:16 +00:00
Leosvel Pérez Espinosa
259561ff9a
fix(testing): enforce commonjs module for ts-jest (#30681)
## Current Behavior

The `@nx/jest` graph plugin and the `@nx/jest:jest` executor correctly
force the `moduleResolution: node10` to be used by `ts-node` (used by
`ts-jest`), but don't force using `module: commonjs`, which can result
in issues due to incompatible `module`/`moduleResolution` pair.

## Expected Behavior

The `@nx/jest` graph plugin and the `@nx/jest:jest` executor should
force the `moduleResolution: node10` and `module: commonjs` compiler
options to be used by `ts-node`.

## Related Issue(s)

Fixes #
2025-04-11 14:47:34 +00:00
Miroslav Jonaš
baf663729c
feat(core): allow globs in project config to extend atomized targets (#30630)
## TL;DR;

This PR enabled mapping glob patterns in target names within the project
config to match and extend atomized targets.

## Problem statement

The project configuration (via project.json or package.json) enables us
to override target defaults set via inferred plugins and/or
targetDefaults.

However, this is only possible for fixed targets. Overriding
atomized/dynamic targets would require listing them all explicitly,
which would create a lot of overhead and would break the dynamicity and
automation of the atomized targets.

## Why not use targetDefaults?

The targetDefaults already support globbing to match a range of targets
like e2e-ci-**/* so we can use the same logic on the project level.

We often need to make modifications on project level, rather than the
entire monorepo. E.g. all atomized targets running on a feature lib
checkout should have an implicit dependency on build target of
dependency as stated by "dependsOn": ["^build"] but they also should
have a dependency on app:build - the application which e2e tests are
serving, although there is no direct or indirect dependency between
checkout-e2e and app. This is significant to retain the lean affected
graph.

## Solution 

We can use the same globbing logic from targetDefaults and will apply in
mergeProjectConfigurationIntoRootMap function to match glob patterns to
range of targets instead of searching for the explicit target name only.

When the glob pattern doesn't match any targets, the fallback is still
the existing functionality.

This is possible given the fact that plugins' targets get applied before
we start parsing the project configurations, as they have priority over
generic plugin definitions and `targetDefaults.`

Override would look like this:
```jsonc
{
  "name": "users-e2e",
  "implicitDependencies": ["users"],
  "targets": {
    "e2e": {
      "dependsOn": ["^build", { "target": "build", "projects": "app" }]
    },
    "e2e-ci--**/*": {
      "dependsOn": ["^build", { "target": "build", "projects": "app" }]
    }
  }
}
```

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

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

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

Fixes #
2025-04-11 11:26:13 +02:00
Nicholas Cunningham
ff53b006e4
fix(bundling): Lock webpack version to be compatible with @angular-devkit (#30676)
<!-- 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 have `^` it forces an update to webpack version
`5.99.x` which is incompatible at the moment with `@angular-devkit`
which is locked to webpack version `5.98.0`.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Nx should be compatible with the migration provided by it's own package
`@nx/webpack`

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

Fixes #
2025-04-10 19:03:05 +00:00
Jason Jean
9fe73eaf31
chore(core): fix publish for linux (#30669)
<!-- 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 -->

Publish is failing for linux workflows missing openssl.

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

Publish passes as reqwest will use `rustls-tls`

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

Fixes #
2025-04-10 11:55:29 -04:00
Leosvel Pérez Espinosa
136e721d58
fix(js): handle when there are no package manager workspaces' patterns (#30666)
## Current Behavior

The helper to add a project to the package manager workspaces'
configuration doesn't handle correctly when there are no patterns and
this results in the error `Invalid glob pattern` being thrown.

## Expected Behavior

The helper to add a project to the package manager workspaces'
configuration should handle when there are no patterns.

## Related Issue(s)

Fixes #
2025-04-10 13:16:43 +00:00
Leosvel Pérez Espinosa
77e60c329f
fix(core): log more information when ProjectConfigurationsError is thrown (#30661)
## Current Behavior

When the `ProjectConfigurationsError` is thrown, no helpful information
is logged.

## Expected Behavior

When the `ProjectConfigurationsError` is thrown, helpful information
should be logged.

It replicates the handling previously done for `ProjectGraphError`.

## Related Issue(s)

Fixes #
2025-04-10 13:34:12 +02:00
Colum Ferry
c71a7832b9
fix(angular): ensure crystal targets for testing when bundler=rspack (#30631)
## Current Behavior
Angular Rspack relies on Inferred Targets however, when scaffolding the
application, the unit test runners are being set up with executors.

## Expected Behavior
Ensure that when `bundler=rspack` unit test runners are being set up
with inference plugins
2025-04-10 11:06:15 +01:00
Miroslav Jonaš
d4ebf82ac8
feat(core): add filter for git checkouts in generated pipelines and docs (#30547)
This PR adds Git filter `tree:0` to Azure and GitHub pipelines to avoid
fetching the full history content because of the affected command.

The change is made to:
- `ci-workflow` generator in `workspace` project for Azure and GitHub
- `ci-workflow` generator in `gradle` project for GitHub
- this repo's  main pipeline -`ci.yaml`
- all documentation occurrences where fetch depth 0 is used on Azure or
GitHub

More info on reasoning here:
https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone/

## 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-04-10 11:33:31 +02:00
Craigory Coppola
3ad8082a39
fix(core): wasm build should build (#30655)
## Current Behavior
There are warnings as well as an error and wasm does not build

## Expected Behavior
wasm. builds
2025-04-09 18:18:39 -04:00
Leosvel Pérez Espinosa
5feafd64d4
feat(testing): add support for cypress v14 (#30618)
## Current Behavior

Cypress v14 is not supported.

## Expected Behavior

Cypress v14 is supported.

## Related Issue(s)

Fixes #30097
2025-04-09 17:12:39 -04:00
Craigory Coppola
0525426a51
feat(core): add support for http based caches (#30593)
Implements http based remote caches per the RFC here:
https://github.com/nrwl/nx/discussions/30548
2025-04-09 19:25:03 +00:00
Colum Ferry
494f150a69
fix(core): angular rspack should not prompt for SSG (#30647)
## Current Behavior
Create Nx Workspace will prompt for SSG when `Rspack` is chosen as a
bundler option for Angular.
SSG is currently not supported by Angular Rspack.

## Expected Behavior
Do not mention SSG when prompting for SSR with Angular Rspack
2025-04-09 16:17:56 +00:00
James Henry
7b85d912ba
feat(release): revamped nx release version implementation (#30418) 2025-04-08 18:17:19 +04:00
Jason Jean
dbd86480c8
chore(core): regen native typings (#30633)
<!-- 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 -->

Native typings are out of date.

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

native typings are updated

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

Fixes #
2025-04-08 14:02:34 +00:00
Leosvel Pérez Espinosa
220023de62
fix(core): do not run sync generators when running tasks in ci (#30591)
## Current Behavior

When running tasks, Nx will run and check the sync generators associated
with the task graph. While locally this is desirable to ensure the code
is always up to date while making changes, in CI, we don't make changes
that need to be synced or checked for every task. This is suboptimal,
and it results in duplicate processing.

## Expected Behavior

Sync generators should not run when running tasks in CI. To validate the
sync status, it is recommended to have a dedicated early step in the CI
pipeline that runs `nx sync:check` once.

## Related Issue(s)

Fixes #
2025-04-08 09:08:32 -04:00
Joshua Carter
2fd964fd3f
fix(js): Use correctly resolved path to tsconfig in readTsConfigWithRemappedPaths() (#30156)
## Current Behavior
When `buildLibsFromSource: false`, webpack fails to resolve custom
entries in the tsconfig `paths`

## Expected Behavior
The tsconfig paths will be correctly loaded by webpack and resolved.

## Related Issue(s)

Fixes #30155.

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2025-04-08 14:39:56 +02:00
Colum Ferry
64030f55b5
feat(core): add --bundler=rspack option to angular stack cnw (#30629)
## Current Behavior
There is currently no way to generate an Angular Rspack app when
creating a new Nx Workspace.

## Expected Behavior
Add support for `--bundler=rspack` in `create-nx-workspace` including
adding `Rspack` as a prompt option when asking for bundler.
2025-04-08 13:29:20 +01:00
Jonathan Cammisuli
17a543f2c4
chore(core): update cargo deps, fix warnings (#30570) 2025-04-08 15:21:41 +04:00
Colum Ferry
27d40a9270
feat(angular): add --bundler=rspack option to app generator (#30623)
## Current Behavior
The `@nx/angular` app generator currently does not support generating an
Angular Rspack application. This makes it slightly more difficult for
users to get up and running with Angular Rspack


## Expected Behavior
Add `rspack` as a supported `--bundler` option allowing for easy
generationg of new Angular Rspack apps.
2025-04-08 09:41:59 +01:00
Nicholas Cunningham
32b48a3a04
feat(rspack): add support for non-buildable libraries in external dependencies (#30606)
Parity with https://github.com/nrwl/nx/pull/30538
2025-04-04 07:41:22 -06:00
Nicholas Cunningham
074da70ada
fix(webpack): enable legacy decorators and metadata in base config for compatibility (#30605)
<!-- 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 PR fixes a runtime error in our NestJS application:

```
TypeError: Cannot read properties of undefined (reading 'get')
```
The root cause was that services were not being injected correctly due
to missing metadata reflection, which NestJS relies on for its
dependency injection system to resolve services.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
We now fully support NestJS's DI system by adding:

```ts
transform: {
  legacyDecorator: true,
  decoratorMetadata: true,
}
```
This restores proper behavior, and services are injected as expected.

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

Fixes #29136
2025-04-04 07:25:16 -06:00
Nicholas Cunningham
6e50a011e7
fix(nextjs): add eslint plugin dependencies in application and library generators (#30592) 2025-04-02 18:04:40 +00:00
Colum Ferry
27b78cd7ae
fix(webpack): migrate to latest version to prevent security vulnerabilities #29755 (#30590)
## Current Behavior
The `@nx/webpack` depends on `webpack` at version `^5.80.0`. Despite the
`^` allowing it to resolve to a higher minor, there has been no
migration to force users onto a higher version.
There is a security vulnerability with version `5.88.0`.

## Expected Behavior
Ensure users are migrated to a version where the security vulnerability
has been fixed.

## Related Issue(s)

Fixes #29755
2025-04-02 12:32:24 -04:00
Colum Ferry
9669dfdb62
feat(react): add crystal mf support to host and remote (#30424)
## Current Behavior
The `@nx/react` `host` and `remote` generators currently use executors
to support Module Federation


## Expected Behavior
When `bundler=rspack` use Crystal Module Federation with no executors
for Module Federation

## Related Issues
#30391
2025-04-02 16:58:45 +01:00
Colum Ferry
176e8f985a
fix(vue): upgrade vite plugin vue to v5 to avoid install errors (#30559)
## Current Behavior
After the migration to Vite 6 - The `@vitejs/plugin-vue` was not updated
to v5.
This has led to an incorrect peer dependency.

## Expected Behavior
Upgrade `@vitejs/plugin-vue` to version 5 to remove peer dependency
issues

## Related Issue(s)

Fixes #30326
2025-04-02 16:13:21 +01:00
Nicholas Cunningham
a9a486aa21
fix(webpack): nestjs workspace libs referencing when using ts solution (#30538)
<!-- 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 you have a Nest app that imports a Nest Lib that is not
buildable inside a TS solution workspace the serving that application
fails because the library is marked as external.

Before we would include these projects as a part of
`tsconfig.compilerOptions.paths`. However, this is no longer possible as
it would not be a valid TS solution setup.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
If a library is not buildable it should be able to be resolved
regardless if we are using TS solutions or the legacy paths.

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

closes: #30492, #30410, #30544
2025-04-02 08:55:37 -06:00
Jack Hsu
538fd8cbf6
fix(js): update @swc/cli version to fix vulnerability (#30575)
The `@swc/cli` version we're currently using has a security
vulnerability due to dependency on `cross-spawn`. This PR updates it to
the version that fixes the vulnerability.

Advisory: https://github.com/advisories/GHSA-3xgq-45jj-v275


## Current Behavior
Existing and new JS workspaces have a high security warning.

## Expected Behavior
No high security warning for new workspaces, and existing ones are
updated.

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

Fixes #
2025-04-02 09:51:36 -04:00
Colum Ferry
962aa7606a
feat(storybook): migrate to latest storybook 8 version (#30584)
## Current Behavior
There is an issue in the most recent versions of Storybook 8.4 where
expected symbols are not exported correctly.

## Expected Behavior
Migrate to latest Storybook 8.6 to ensure these symbols are correctly
exported to ensure Storybook runs smoothly
2025-04-02 13:31:14 +01:00