14845 Commits

Author SHA1 Message Date
Benjamin Cabanes
5fc641012d
docs(nx-dev): add nx cloud logos (#30926)
This commit introduces new SVG files with single color for Nx Cloud.
2025-04-29 15:28:23 -04:00
Benjamin Cabanes
b3e7eee063
docs(nx-dev): add nx cloud logo (#30922)
This commit introduces a new SVG file, `nx-cloud-full.svg`, to the favicon directory.
2025-04-29 14:34:51 -04:00
Isaac Mann
13ebf4359a
docs(core): tutorial preview bug (#30903)
- Fix tutorial bug with the preview pane
- Bump Nx version to 20.8 for all 3 tutorials
2025-04-29 13:49:03 -04:00
Jason Jean
c1d375883f
chore(repo): update nx to 21.0.0-beta.10 (#30906)
<!-- 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 21.0.0-beta.8.

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

This repo uses Nx 21.0.0-beta.10

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

Fixes #
2025-04-29 13:32:48 -04:00
Leosvel Pérez Espinosa
f39c1f991e
cleanup(linter): deprecate the Linter enum (#30875)
Properly deprecate the `Linter` enum in favor of the `LinterType` union
type and remove unneeded internal usages.
2025-04-29 12:39:36 -04:00
Benjamin Cabanes
8028eea824
docs(nx-dev): add NX Cloud favicon (#30921)
Introduce a new favicon specifically for NX Cloud in SVG format.
2025-04-29 12:09:49 -04:00
Leosvel Pérez Espinosa
8d0c7f6349
feat(testing): remove tsConfig and copyFiles options from the @nx/cypress:cypress executor (#30870)
Removes the previously deprecated and unused `tsConfig` and `copyFiles`
options from the `@nx/cypress:cypress` executor.

BREAKING CHANGE: The previously deprecated and unused `tsConfig` and
`copyFiles` options from the `@nx/cypress:cypress` executor were
removed.
2025-04-29 11:12:47 -04:00
Leosvel Pérez Espinosa
9ae691ede8
feat(testing): remove tsConfig option from the @nx/jest:jest executor (#30888)
Removes the previously deprecated and unused `tsConfig` option from the
`@nx/jest:jest` executor.

BREAKING CHANGE: The previously deprecated and unused `tsConfig` option
from the `@nx/jest:jest` executor was removed.
2025-04-29 11:08:59 -04:00
Craigory Coppola
c8d89e2f2a
feat(core)!: remove legacy cache flag from nx.json (#30787) 2025-04-29 10:39:36 -04:00
Louie Weng
4cca2ba062
docs(nx-cloud): address typos in assignment rules docs (#30901)
<!-- 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
-->

1. remove unnecessary references to `runs-on`
2. fix ordering of rule precedence example so that it matches the
explanatory paragraph
3. modify the matrix github actions example so that agents of different
types do not have the same name

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

Fixes #
2025-04-29 14:11:35 +00:00
Craigory Coppola
4b9eab994a
fix(core): tui summary should handle in progress tasks properly (#30905)
## Current Behavior
When running via run-many failures that include a continuous task are
indicated as a cancellation on the tui summary

## Expected Behavior
Failures that run to completion are not cancelled, and should be
displayed as a failure

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

Fixes #
2025-04-29 10:00:54 -04:00
Jack Hsu
147d0e1345
chore(js): bump some v21 removal to v22 (#30911)
This PR bumps two v21 removals to v22:
1. SWC inline feature -- some people still use it even though it's
experimental. We should rethink how to remove this.
2. Cypress component testing not relying on `@nx/webpack:webpack`
executor -- we need a separate `webpack.cy.config.js` that only
configures the plugins needed Cypress CT.

This PR also keeps the Webpack plugin exports of `@nx/react` and
`@nx/webpack` packages. The `convert-to-inferred` and app generators
have been using the `@nx/react/webpack-plugin` and
`@nx/webpack/app-plugin` already for a while, there's no harm to keep
the exports in the index for older projects if they haven't been
updated.
2025-04-29 09:58:06 -04:00
Jack Hsu
e1b56f7c0a
feat(webpack): remove isolatedConfig option for @nx/webpack:webpack (#30910)
This PR removes the `isolatedConfig` option that has been deprecated
since v17. Back when it was deprecated, we had a migration to remove the
option and set `webpackConfig` with a generate config file that matches
the executor's built-in behavior. Now that we're removing the option, a
similar migration is added to generate the config files for any projects
that skipped the migration the first time.
2025-04-29 09:57:24 -04:00
Jack Hsu
e21c1a6010
feat(react): replace deprecated babel classProperties.loose option in .babelrc files (#30912)
This PR updates all `.babelrc` file that still uses the deprecated
`classProperties.loose` (deprecated since v18). The top-level `loose`
option does the same thing -- previously the two options handled
different cases because `@babel/preset-env` did not include class
properties.
2025-04-29 09:57:16 -04:00
Jack Hsu
9234fb30a6
feat(react): undeprecate svgr option for Next.js apps since --turbo supports it (#30909)
This PR delays deprecation of `svgr` for `@nx/next`, as Turbopack
supports it now.

This PR also deprecates all SVGR support for v22. It is not a well-used
feature, and the webpack plugin is not maintained. We'll ensure in v22
to add the SVGR webpack plugin to userland configs, but we'll not
maintain it ourselves moving forward.

<!-- 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-04-29 08:44:21 -04:00
Jason Jean
cf4a1f35e9
chore(repo): make local-registry continuous (#30789)
<!-- 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 -->

No continuous tasks are used in CI.

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

The local-registry is a continuous task and it is used in CI.

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

Fixes #
2025-04-28 20:45:34 -04:00
Benjamin Cabanes
a3a17531d0
docs(nx-dev): update remote cache page (#30902)
Updates texts and remote cache UI with "recommended" label.
2025-04-28 16:20:17 -04:00
Craigory Coppola
eb54b1d249
feat(core)!: drop support for create nodes v1 in favor of only calling create nodes v2 (#30616) 2025-04-28 15:47:44 -04:00
Emily Xiong
bb8c727681
chore(gradle): disable gradle import (#30900)
<!-- 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 -->
gradle import e2e failed from time to time. i think it is flaky test
because it passed before.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
disable this e2e test for now. will enable it later.

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

Fixes #
2025-04-28 12:21:56 -04:00
Jason Jean
87e5e6bef8
fix(core): properly print errors coming from js when tui is enabled (#30885)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

When the TUI is enabled, JS errors during task running cause the process
to exit without printing out information about the error and also leave
the terminal in a broken state.

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

JS errors are printed before the process exits and the terminal is
restored to a good state.

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

Fixes #
2025-04-28 11:58:59 -04:00
Jason Jean
2c8aba2fc2
feat(core): add enter and q keybindings (#30786)
<!-- 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 TUI is missing some standard keybindings:

Q to quit
Enter to show task output

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

Q now triggers a confirmation to exit. Because Q is close to 1, users
might often accidentally hit Q so this gives them a chance to cancel the
exit.
Enter will show the task output.

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

Fixes #
2025-04-28 10:40:34 -04:00
Jason Jean
85bc540a15
fix(core): quick fix to support trailing commas when reading hoisted … (#29436)
…versions

<!-- 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 -->

Graph fails when there is a trailing comma in a package.json

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

Graph does not fail and works when there is a trailing comma in a
package.json

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

Fixes #
2025-04-27 00:12:44 +00:00
François
da4f55bca3
fix: check if dependencies & devDependencies exist before deleting dep (#30224)
## Current Behavior
`removeDependenciesFromPackageJson` tries to delete dep from `undefined`
if there is no `dependencies` or `devDependencies` in package.json

## Expected Behavior
First check if `dependencies` or `devDependencies` exists

## Related Issue(s)
Fixes #30222

Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
2025-04-25 23:42:31 +00:00
Jack Hsu
bde7315b0f
docs(graph): update Migrate UI docs and link from the feature page (#30881)
This PR updates the Migrate UI recipe to match the experience.
Screenshots are added to provide previews of what it looks like prior to
users trying, and also makes the recipe easier to follow.

Future: It would be great to have a short video going over the process
rather than just text and screenshots. This is good enough for first
iteration, and we'll do a follow up on this.

Preview:
https://nx-dev-git-docs-migrate-ui-nrwl.vercel.app/recipes/nx-console/console-migrate-ui
Also updates:
https://nx-dev-git-docs-migrate-ui-nrwl.vercel.app/features/automate-updating-dependencies
2025-04-25 16:52:01 -04:00
Jack Hsu
0dc4dbf499
feat(graph): add undo migration option when one is pending approval (#30878)
This PR adds a button for user to undo a migration that's already been
applied and pending approval.

See: https://www.loom.com/share/97286bdc80ea4538af76a914ef8f0f8b

Also, fixes an existing issue where `migrations.json` did not record the
correct git sha for each commit.


## Current Behavior
When a migration is pending approval, the only option is to accept it.

## Expected Behavior
Allow user to undo a migration if they don't want the changes.

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

Fixes #
2025-04-25 16:20:17 -04:00
Benjamin Cabanes
3b0c456bbe
docs(nx-dev): add enterprise security page (#30852)
Introduce a new enterprise security page highlighting key features like cache poisoning protection, CI access, and personal access control.
2025-04-25 15:22:02 -04:00
Jason Jean
73da211694
feat(misc): remove migrations prior to v19 in preparation for v21 (#30839)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

Users migrating from Nx 17 can go up to Nx 20. 

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

Users migrating from Nx 19 can go up to Nx 21. Users migrating from Nx
17 or 18 should go to Nx 19 first.. then go to Nx 21.

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

Fixes #
2025-04-25 15:06:02 -04:00
Craigory Coppola
c17d43c6a4
fix(repo): don't cancel running jobs on master when new branch merged (#30871) 2025-04-25 14:01:18 -04:00
Craigory Coppola
c21b606120
fix(core): error message when failing to fetch migrations is no good (#30874)
<!-- 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
We error when failing to find a package version via the install step,
but meant to warn. Additionally, the warning is hard to see.

## Expected Behavior
We don't error when failing to install the package, but the warning is
more visible.

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

Fixes #
2025-04-25 13:40:10 -04:00
Jonathan Cammisuli
2f739e9fbf
fix(core): do not clone screen on every render loop of the TUI (#30872)
<!-- 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 -->
Everytime the TUI is rendered with a terminal pane opened, we clone the
screen. This cloning is resource intensive as we would be creating a new
screen every couple of milliseconds.
 
## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
This has changes so that we can pass a reference to the screen to be
used in places where its needed. This avoids the cloning the screen.

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

Fixes #
2025-04-25 17:25:53 +00:00
Jason Jean
8214ab49f2
chore(repo): assign proper outputs to build targets (#30865)
<!-- 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:build` cannot be run in parallel with any other tasks. It was an
improper fix for an issue we were facing in our task graph. This is also
not workable if any continuous tasks are running.. which I want
`local-registry` to be running while things are built.

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

The proper outputs are set on `build` targets. Most of them only need
`README.md` as the output. `nx`, `create-nx-workspace`, and
`create-nx-plugin` are different and need a few more files.

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

Fixes #
2025-04-25 13:23:44 -04:00
Leosvel Pérez Espinosa
840aef802f
feat(core): remove deprecated readWorkspaceConfig (#30868)
Remove the deprecated function `readWorkspaceConfig` from
`@nx/workspace`.

BREAKING CHANGE: The previously deprecated `readWorkspaceConfig`
function from `@nx/workspace` was removed.
2025-04-25 15:28:37 +00:00
Hyun Don Moon
858eb69207
docs(misc): fix typo in microfrontend architecture article (#29911)
## Current Behavior
There's a typo in the [microfrontend architecture
article](https://nx.dev/concepts/module-federation/micro-frontend-architecture#shared-libraries)
under the "Shared Libraries" section.

`The default the Nx setup configures`

## Expected Behavior
Should be `The default Nx setup configures`

Fixes #
2025-04-25 11:02:41 -04:00
Petr Plenkov
cb5e7a24be
docs(core): declarationMaps -> declarationMap typo fix (#29981)
Just fixing a typo in a docs.

declarationMaps ->
[declarationMap](https://www.typescriptlang.org/tsconfig/#declarationMap)
2025-04-25 11:01:48 -04:00
Colum Ferry
0c63624407
fix(module-federation): check the remote project targets for buildTarget to use #30808 (#30867)
## Current Behavior
Module Federation collectRemotes util looks for a hardcoded `build`
target.

## Expected Behavior
Read the remote's targets and find the correct `buildTarget` option for
the module-federation-dev-server to use

## Related Issue(s)

Fixes #30808
2025-04-25 16:00:00 +01:00
Yong-Yuan Chen
7affa87af9
docs(nx-dev): fix typo to prevent misleading the definition of production (#30244)
<!-- 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 -->
A small typo to make reader misunderstand the definition of `production`
## 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-25 10:40:51 -04:00
James Henry
c0426c1b35
fix(release): ensure versionData is always populated even when no bumps (#30866) 2025-04-25 09:13:37 -04:00
Leosvel Pérez Espinosa
73077fec66
feat(core): remove usage of cli property from migration definitions (#30855)
Removes the usage of the `cli` property from migration definitions.

BREAKING CHANGE: The `cli` property from migration generator definitions
is no longer used. The CLI to run the migration generator will be
identified based on whether the definition is contained in `generators`
(Nx) or `schematics` (Angular CLI).
2025-04-25 09:13:01 -04:00
Leosvel Pérez Espinosa
c0aa245d9c
feat(testing): remove deprecated getJestProjects (#30844)
Remove the deprecated function `getJestProjects`.

BREAKING CHANGE: The previously deprecated `getJestProjects` function
was removed in favor of `getJestProjectsAsync`.
2025-04-25 09:12:13 -04:00
Thomas Dekiere
69ea6327d3
fix(release): ensure generatorOptions and rootVersionActionsOptions are passed to updateLockfile function (#30796) 2025-04-25 12:41:03 +00:00
Miroslav Jonaš
cd55dfcb3e
feat(linter): add support for package based secondary entry points (#30809)
This PR adds support for package.json based secondary entry points and
implements fix for situation when package imports base entry point as
dynamic dependency and secondary entry point as static dependency.

## Current Behavior
When the package is imported from itself, check for a secondary entry
point checks only Angular-style secondary entry points.

When package is importing from the same library as dynamic import from
root and static import from secondary entry point we still get linter
errror.

## Expected Behavior
Check for secondary entry points should also support standard
package.json-based entry points.

Importing from the same library as dynamic import from root and static
import from secondary entry point should be allowed.

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

Fixes #18552
2025-04-25 14:31:33 +02:00
Jason Jean
dda740fd2d
fix(core): handle skipped tasks and trigger finished state (#30864)
<!-- 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 tasks are skipped due to a dependent task's failure, the TUI does
not recognize that the command is concluded and leaves the user in a
confusing state where Nx seems like it is still waiting for tasks.

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

When tasks are skipped due to a dependent task's failure, the TUI shows
that the command has concluded.

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

Fixes #
2025-04-25 12:15:43 +00:00
Colum Ferry
a65f0f421b
feat(rspack): use custom WriteIndexHtmlPlugin to handle variable interpolation (#30805)
## Current Behavior
The `HtmlRspackPlugin` does not support interpolation of %VAR% in the
index.html.
This is supported with a custom Webpack Plugin for `@nx/webpack` for
generating index.html files.

## Expected Behavior
The `@nx/rspack` plugin should support the same feature set as webpack
for seamless migration.
Add a new `WriteIndexHtmlPlugin` for Rspack to support this.
It should only be used when `useLegacyHtmlPlugin` is set to true
2025-04-25 09:58:21 +01:00
Jason Jean
851196aaa5
chore(repo): update nx to 21.0.0-beta.8 (#30863)
<!-- 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 is using Nx `21.0.0-beta.7`

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

This repo is using Nx `21.0.0-beta.8`

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

Fixes #
2025-04-25 00:16:20 -04:00
James Henry
ee097a8e10
feat(release)!: useLegacyVersioning is false by default, migrate config (#30838)
This PR updates `nx release` to use the revamped versioning
implementation by default. It also updates and adds relevant
documentation, and provides an automated migration for the new
configuration structure.

For anyone exclusively versioning TS/JS packages, there should be no
real difference to your experience (although a number of bugs have been
fixed and new features around updating multiple `package.json` files at
once are now available to you with this change).

For the lifecycle of Nx v21, `release.version.useLegacyVersioning` will
remain as a option that can be set to `true` to revert to the old
behavior and configuration structure.

NOTE: This should only be a temporary solution, for example if one of
the plugins you use does provide a `VersionActions` based versioning
implementation yet. The option and legacy implementation will be removed
entirely in Nx v22 (in ~6 months).

BREAKING CHANGE:

**⚠️ For any early adopters of `VersionActions` in Nx 20.8 when it was
opt-in, there are breaking changes to the abstract class here as well.**

`manifestRootsToUpdate` has gone from `string[]` to `manifestsToUpdate:
{ manifestPath: string; preserveLocalDependencyProtocols: boolean; }[]`
to support controlling the local dependency updates per manifest in
order to support advanced source vs dist scenarios, and correspondingly
`isLocalDependencyProtocol` has been removed from the abstract class and
the method will no longer be called from the core logic. It should be
thought of as an implementation detail of `updateProjectDependencies`
instead.
2025-04-24 22:09:38 -04:00
Jason Jean
053fc67e90
fix(core): ensure task environments are processed properly in dte (#30862)
<!-- 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 new DTE APIs are missing a few things related to task environments.
Firstly, even though it processes task envs.. they are not stored on the
`processedTasks` map. Thus, the task env is not actually used to run
tasks. Secondly, some environment variables are not set during dte..
which used to.

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

The.2 things that are missing are now back. The map is populated with
the task envs and the environment variables are set based on the args.

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

Fixes #
2025-04-24 20:08:34 -04:00
Craigory Coppola
4323302188
chore(repo): set concurrency group for macos (#30858)
## Current Behavior
macos ci runs are not cancelled on new CI push

## Expected Behavior
macos ci runs are cancelled on new CI push

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

Fixes #
2025-04-24 18:20:23 -04:00
Jack Hsu
8397a95a7e
fix(graph): disable primary CTA for Migrate UI when approval is required first (#30836)
This PR updates the Migrate UI such that the primary CTA always performs
an action. Previously, when there is a migration to approve, the primary
CTA says `Run Migrations`, but clicking it does nothing since we're
already in the middle of running migrations.

<img width="1093" alt="Screenshot 2025-04-23 at 9 36 05 AM"
src="https://github.com/user-attachments/assets/4d55e3d0-d16b-4c4b-9b16-551690be60ab"
/>

Now, with this PR, the primary CTA will be disabled and tell the user to
approve the current migration before continuing.

## Current Behavior
Primary CTA in Migrate UI does nothing when there is a migration to
approve

## Expected Behavior
Primary CTA should reflect the current action that the user must take,
in this case to approve the migration

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

Fixes #

---------

Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
2025-04-24 17:31:13 -04:00
Jason Jean
4254c4bcce
feat(core): allow executors to specify if they are continuous (#30821)
<!-- 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 only way to set if a task is continuous is either directly in
`project.json` or via Project Graph Plugins.

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

Executors know if they are definitely continuous or not. Plenty of
existing continuous tasks are using executors. Executors are now able to
define if they are continuous in their `schema.json` files. Thus,
existing tasks configured with certain executors will automatically
become continuous.

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

Fixes #
2025-04-24 16:41:17 -04:00
Jason Jean
eb5138e858
fix(core): add continuous to the project.json schema (#30853)
<!-- 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 `project.json` schema is missing `continuous`.

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

The `project.json` schema has `continuous` defined.

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

Fixes #
2025-04-24 15:53:54 -04:00