13462 Commits

Author SHA1 Message Date
Pascal zhang
3ba2763911
docs(core): adding npx where it missing (#27015)
<!-- 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 -->
having some command without npx before
````
nx .....
````
## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Have npx on all command 
````
npx nx .....
````

Co-authored-by: pikooli <>
2024-07-25 13:59:44 -04:00
Isaac Mann
4a3a8a9c90
docs(core): npm workspaces tutorial video (#26821)
Add video for npm workspaces tutorial
2024-07-25 13:07:52 -04:00
Isaac Mann
529fa429f0
docs(core): react monorepo tutorial video (#26817)
Add video to React monorepo tutorial
2024-07-25 12:39:39 -04:00
MaxKless
73536da764
fix(core): always load task envs from workspace root instead of relative to cwd (#27120) 2024-07-25 12:29:07 -04:00
Jonathan Cammisuli
dd84dab01c
chore(repo): use inputs instead of env for the cache step in agents (#27123)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #
2024-07-25 12:18:59 -04:00
Nicholas Cunningham
8e55dbe537
Fix (nx-dev): idea feedback (#27121)
Taken from: https://github.com/nrwl/nx/pull/26560

## Currently

When you enter a space in the idea form it gets trimmed so users are
unable to add a proper sentence when submitting an idea.

## Expected

Users should be able to add spaces as they feel is necessary without
being restricted.

---------

Co-authored-by: Sarthak <130341942+Sarthak0085@users.noreply.github.com>
2024-07-25 10:14:58 -06:00
Craigory Coppola
40d39d40a8
feat(core): include target architecture in nx report (#27094) 2024-07-25 12:01:58 -04:00
Jonathan Cammisuli
173ea84d92
chore(repo): update nx agents to use v4 of cache and checkout (#27122)
<!-- 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 -->
agents.yaml are currently using a pinned version of v3.6

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
agents.yaml are using v4 of the workflow steps

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

Fixes #
2024-07-25 11:58:37 -04:00
Colum Ferry
58cd577f2c
fix(vite): vitest executor should continue to load plugins #22001 (#27118)
<!-- 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 -->
Plugins were not being loaded by vitest executor when calling
`startVitest` when using a vite config file with a custom name.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Correctly load the plugins found in the resolved config file, regardless
of the config file name


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

Fixes #22001
2024-07-25 15:48:19 +00:00
Jason Jean
37cc8ab747
fix(core): bump the time crate so compilation succeeds (#27117)
<!-- 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 -->

`time` crate is locked to a version which fails to compile.

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

`time` crate is updated to a version which does not fail to compile.

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

Fixes #
2024-07-25 10:45:56 -04:00
Leosvel Pérez Espinosa
484e9b1de6
fix(js): generate additional entry point exports without the filename for barrel files (#27112)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #23519
2024-07-25 16:22:05 +02:00
Colum Ferry
2e8f162cf8
feat(react): add skipPackageJson flag to remote and host generators (#27116)
<!-- 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 `host` and `remote` generators do not have an option to skip package
install.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Add the `skipPackageJson` flag to the remote and host generators

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

Fixes #
2024-07-25 15:19:02 +01:00
Nicholas Cunningham
a0ca85841f
feat(nx-dev): Migrate pricing page from nx.app (#27012)
Co-authored-by: Juri <juri.strumpflohner@gmail.com>
2024-07-25 10:14:51 -04:00
Warren Dugan
6fd9cf4d45
docs(misc): update monorepo-ci-azure.md (#26299)
Add `--targets` to `nx affected` command.
2024-07-25 09:35:14 -04:00
Leosvel Pérez Espinosa
e9d9c9fde9
fix(core): format global config files modified by nx migrate (#27066)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #8928
2024-07-25 09:22:18 -04:00
Jason Jean
9fe9c291c8
feat(core): update axios to ^1.7.2 (#27076)
## Current Behavior
<!-- This is the behavior we have today -->

`axios@^1.6.0` is used.

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

`axios@^1.7.2` is used

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

Fixes #26538
2024-07-25 09:19:02 -04:00
Leosvel Pérez Espinosa
1774edd1a6
fix(js): do not override package.json type when defined in tsc executor (#27106)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #23579
2024-07-25 12:23:28 +02:00
Leosvel Pérez Espinosa
ebb42b73eb
fix(angular): bump ngrx version and add @ngrx/operators to the package update list (#27107)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #26694
2024-07-25 10:35:43 +02:00
Denis Frenademetz
5d5b13e783
fix(linter): ensure too many warnings is only logged if enabled (#27083)
<!-- 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 -->

ESLint found too many warnings (maximum: -1).

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Nothing should be logged if maximum is set to -1
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-07-25 10:10:07 +02:00
Jack Hsu
3890edc560
docs(core): feature Nx Cloud sections more prominently in CLI tutorials (#27077)
Updated these tutorials:
-
https://nx-dev-git-docs-cli-tutorials-promote-cloud-nrwl.vercel.app/getting-started/tutorials/npm-workspaces-tutorial
-
https://nx-dev-git-docs-cli-tutorials-promote-cloud-nrwl.vercel.app/getting-started/tutorials/react-standalone-tutorial
-
https://nx-dev-git-docs-cli-tutorials-promote-cloud-nrwl.vercel.app/getting-started/tutorials/react-monorepo-tutorial
-
https://nx-dev-git-docs-cli-tutorials-promote-cloud-nrwl.vercel.app/getting-started/tutorials/angular-standalone-tutorial
-
https://nx-dev-git-docs-cli-tutorials-promote-cloud-nrwl.vercel.app/getting-started/tutorials/angular-monorepo-tutorial
-
https://nx-dev-git-docs-cli-tutorials-promote-cloud-nrwl.vercel.app/getting-started/tutorials/vue-standalone-tutorial
-
https://nx-dev-git-docs-cli-tutorials-promote-cloud-nrwl.vercel.app/getting-started/tutorials/gradle-tutorial
-
https://nx-dev-git-docs-cli-tutorials-promote-cloud-nrwl.vercel.app/recipes/adopting-nx/adding-to-monorepo
-
https://nx-dev-git-docs-cli-tutorials-promote-cloud-nrwl.vercel.app/recipes/adopting-nx/adding-to-existing-project
2024-07-24 21:32:01 -04:00
Nicholas Cunningham
fc60f6b187
feat(nx-dev): Update nx-cloud page ai section (#27103)
To be inline with ocean: https://github.com/nrwl/ocean/pull/5379
2024-07-24 18:33:06 -06:00
Craigory Coppola
0104ea4fc3
fix(core): allow overriding NX_PARALLEL with --parallel (#27016) 2024-07-24 17:41:24 -04:00
Jason Jean
fc1ad39fa2
fix(core): improve error for setting an internal node as an external … (#27102)
…dependency

<!-- 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 unhelpful error is thrown when someone specifies a local project as an
external dependency input.

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

A helpful error is thrown when someone specifies a local projecft as an
external dependency input.

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

Fixes https://github.com/nrwl/nx/issues/27088
2024-07-24 15:31:19 -05:00
Emily Xiong
28cd0c4eef
feat(js): add scopes option for verdaccio (#26918) 2024-07-24 16:18:13 -04:00
Leosvel Pérez Espinosa
8afd3ea15d
fix(core): update migration generators missing calls to format files (#27082)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #25122
2024-07-24 16:03:49 -04:00
Leosvel Pérez Espinosa
e474b597c5
fix(core): remove outdated workaround artificially keeping process alive (#27062)
Remove an old workaround added in https://github.com/nrwl/nx/pull/5807.
The issue it was addressing was fixed in the Angular CLI shortly after,
but the workaround was never removed.

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

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

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

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

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

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

Fixes #
2024-07-24 16:02:36 -04:00
Leosvel Pérez Espinosa
c7e1a1681e
fix(testing): use taskkill to kill web server process when running cypress on windows (#27068)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #26599
2024-07-24 15:48:59 -04:00
Jason Jean
bb92857b21
chore(repo): make publishing depend on build targets (#27080)
<!-- 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 -->

Populating the local registry for e2e tests is not dependent on the
builds but runs them. It sometimes gets cache misses for some builds
thus making that inconsistent.


https://staging.nx.app/runs/FxIwbj6UQo/task/%40nx%2Fnx-source%3Apopulate-local-registry-storage

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

Populating the local registry for e2e tests is dependent on the builds
and does not run them within itself. In the CI pipeline, this ensures
that the build tasks are run first.


https://staging.nx.app/runs/NUrFeUBbQk/task/%40nx%2Fnx-source%3Apopulate-local-registry-storage

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

Fixes #
2024-07-24 15:46:09 -04:00
Craigory Coppola
def20f29ca
fix(core): shorten socket length for plugin workers (#27073)
<!-- 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
Plugin worker's socket path includes a hash digest of the workspace
root. This is not needed, as the socket path already includes the
process pid in it which is unique. The hash digest adds an additional 20
characters to the path and as the path is too long on some unix systems
the uniqueness is dropped, causing the plugin transactions to get hit
inappropriately.

## Expected Behavior
The plugin socket path doesn't contain extra characters, so it should be
unique.

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

Possibly related #27040
2024-07-24 15:42:24 -04:00
Craigory Coppola
b7472fdd41
fix(core): reset should cleanup temporary nx-cloud files (#23316)
<!-- 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` -->

## Current Behavior
<!-- This is the behavior we have today -->
`nx reset` doesn't remove marker files used by nx cloud.
## Expected Behavior
`nx reset` removes marker files from nx cloud

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

Fixes #https://github.com/nrwl/nx/issues/23308
2024-07-24 15:39:14 -04:00
Katerina Skroumpelou
467f343e3d
feat(misc): only create one commit with cloud onboard URL on cnw (#27093)
* Only create one commit during CNW
* Commit includes cloud onboarding URL
![Screenshot 2024-07-24 at 7 15
54 PM](https://github.com/user-attachments/assets/39b50443-4fbd-4423-b25c-68c45099af66)
2024-07-24 14:05:34 -05:00
Raz Luvaton
99a488ae75
fix(core): use argument length that match the actual size of the argument length (#21074) 2024-07-24 12:23:18 -04:00
Adrian Dimech
918b8fbc52
fix(core): ensure output paths returned are unique (#18207)
It is possible for users to define multiple duplicate outputs in their
project.json. This is leading to fs related issues like `ENOTEMPTY:
directory not empty, rmdir`. The reason this occurs is that the src will
tried to be copied to the cached directory in parallel for all output
paths (even duplicated ones) and is the reason why these errors are seen
sporadically. By ensuring output paths are unique, we only ever copy one
path which resolves this issue.

Note: There may still be an issue present if there is a glob that is
overlapping another directory i.e: `cdk.out/*` and `cdk.out`, however
have not been able to reproduce a fs error while testing.

fixes #17277, #16337

## Current Behavior
If you have a project.json which has duplicate output entires, it is
possible to receive fs related errors when the cache is being written to
disk.

## Expected Behavior
each output should only be copied once into the caches directory. 

## Related Issue(s)
#17277, #16337

Fixes #17277, #16337
2024-07-24 11:57:11 -04:00
Phillip Barta
aeec5cc31a
cleanup(core): refactor nx list command to remove unused code and code duplication (#21748)
<!-- 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` -->

## Current Behavior
<!-- This is the behavior we have today -->
the code for the `nx list` command has unused and duplicated code.
 
## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
no unused code and code duplication

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

Fixes #

---------

Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>
2024-07-24 11:56:27 -04:00
Colum Ferry
a8dc251cce
fix(bundling): get workspace package prefix length correctly #20817 (#27092)
<!-- 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 there are workspace libraries with the following import paths:

```
@org/core
@org/core/db
@org/core/acme
```

They need to be sorted for the manifest such that matching finds the
most specific first.
The logic for this is currently based off whether an `*` exists, which
doesn't work when the paths are specific.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Try to use `*` first and fallback to `/` to determine package prefix
length.


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

Fixes #20817
2024-07-24 10:26:39 -04:00
Jack Hsu
31f9d9ef11
docs(core): update CI tutorials with better distribution screenshots (#27049)
The current screenshot doesn't show any tasks. This PR replaces it with
one that actually shoes tasks in progress, as well what the GitHub PR
looks like. Also updates the workflow config file to align with what we
generate for 19.5.1.

Previews:
-
https://nx-dev-git-docs-ci-tutorials-update-part-2-nrwl.vercel.app/ci/intro/tutorials/circle
-
https://nx-dev-git-docs-ci-tutorials-update-part-2-nrwl.vercel.app/ci/intro/tutorials/github-actions
2024-07-24 10:18:57 -04:00
Katerina Skroumpelou
7a642ee4fb
feat(misc): prioritize github onboarding flow (#27085)
* Prioritized remotes in the order: `origin`, `upstream`, `base`, and
then the first remote found, when trying to determine if repo uses
GitHub.
* Implemented fallback to a default GitHub onboarding URL
(`/setup/connect-workspace/github/select`) if no remotes are found.
* Added corresponding unit tests to verify the new remote priority order
and fallback behavior.
2024-07-24 16:22:49 +03:00
Colum Ferry
339d673b2b
fix(bundling): prevent exports overwrite with esbuild (#27047)
Co-authored-by: Colum Ferry <cferry09@gmail.com>
Co-authored-by: katsanva <1161259+katsanva@users.noreply.github.com>

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

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

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

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

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

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

Fixes #20324 #20325

Co-authored-by: katsanva <1161259+katsanva@users.noreply.github.com>
2024-07-24 08:30:24 -04:00
Colum Ferry
db7cb5de48
fix(vite): respect existing package.json type #27057 (#27084)
<!-- 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 `@nx/vite:build` executor is always overwriting the
`packageJson.type` field when generating a packageJson.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The `@nx/vite:build` executor should respect the existing type in
packageJson

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

Fixes #27057
2024-07-24 08:29:45 -04:00
Colum Ferry
996c97f13e
fix(vite): remove cache.dir option from test utils (#27087)
<!-- 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 -->
`cache.dir` is still generating when it shouldn't be.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
`cache.dir` option should not be generating

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

Fixes #27039
2024-07-24 08:29:23 -04:00
Jan-Niklas W.
9faeddc1d6
feat(core): update pnpm/action-setup to v4 in ci-workflow generator (#26838)
I just created a new nx monorepo with pnpm and in the github.ci file it
uses pnpm/action-setup@v2.
I ran into the following issue
https://github.com/pnpm/action-setup/issues/136 and updating to
pnpm/action-setup@v4 solved the issue for me

---------

Co-authored-by: Jan-Niklas Wortmann <jan-niklas.wortmann@jetbrains.com>
Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
2024-07-24 13:54:37 +02:00
Guilherme Prezzi
15b71d0803
feat(module-federation): support setremotedefinition api (#27051)
<!-- 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
The only method available to manage remotes is `setRemoteDefinitions`
method, that overwrite the previous state, as expected. The problem is
that in some cases, when it needed to add more remotes dynamically, this
API replace it current state, removing the previous remotes.

## Expected Behavior
Expose a new API called `setRemoteDefinition(remoteName: string,
remoteUrl: string)` that adds or replace a new remote definition in the
remotes map, without overwrite the remotes map.

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

Fixes #27050

---------

Co-authored-by: Guilherme Prezzi <guilherme.prezzi@totvs.com.br>
2024-07-24 09:38:20 +01:00
Matthew Hancock
92eb1fa701
feat(module-federation): improve console output for remote build errors (#26711)
## Current Behavior
When running `nx serve` for a module federation application, if one of
the static remotes fail you get output that looks as such
```
> nx run shell:serve:development


 NX  Starting module federation dev-server for shell with 13 remotes


 NX  Building 13 static remotes...

/<user-path>/node_modules/@nx/react/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js:140
                throw new Error(`Remote failed to start. A complete log can be found in: ${remoteBuildLogFile}`);
                ^

Error: Remote failed to start. A complete log can be found in: /<user-path>/.nx/workspace-data/2024-06-26T21_21_37_744Z-build.log
    at ChildProcess.<anonymous> (/<user-path>/node_modules/@nx/react/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js:140:23)
    at Object.onceWrapper (node:events:632:26)
    at ChildProcess.emit (node:events:517:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:292:12)

Node.js v18.20.3

——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 NX   Running target serve for project shell failed
```

The cause of the failure is not immediately obvious. The output is
cryptic and seems like a fatal error occurred, not one from the project
source code. The failure could happen for many reasons such as updating
a package that is not compatible with all remotes.

## Expected Behavior
With the changes proposed in this PR, we get a much more improved output
that's easier to read and much more obvious what happened in the project
source code.

1. Replace the `throw` statement with a promise rejection which outputs
a clean Nx Error
2. When an error is detected from webpack, output that snippet directly
into the console. No need to open and scroll through the entire log file
searching for the error.

```
 NX  Starting module federation dev-server for shell with 13 remotes


 NX  Building 13 static remotes...

m (id hint: vendors) 134 KiB [rendered] reused as split chunk (cache group: defaultVendors)
chunk (runtime: mover) 8762.js 13.4 KiB [rendered]
chunk (runtime: mover) 8798.js 14.9 KiB [rendered]
chunk (runtime: mover) 8802.js (id hint: vendors) 20.1 KiB [rendered] reused as split chunk (cache group: defaultVendors)
chunk (runtime: mover) 8930.js (id hint: vendors) 121 KiB [rendered] split chunk (cache group: defaultVendors)
chunk (runtime: mover) 8974.css, 8974.js 150 KiB (javascript) 252 bytes (consume-shared) 25.6 KiB (css/mini-extract) [rendered]
chunk (runtime: mover) 42 bytes reused as split chunk (cache group: default)
chunk (runtime: mover) 9199.js 17.4 KiB [rendered]
chunk (runtime: mover) 9227.js 7.02 KiB [rendered]
chunk (runtime: mover) 9241.js 10.7 KiB [rendered]
chunk (runtime: mover) 9279.js (id hint: vendors) 209 KiB [rendered] split chunk (cache group: defaultVendors)
chunk (runtime: mover) 9289.js (id hint: vendors) 228 KiB [rendered] reused as split chunk (cache group: defaultVendors)
chunk (runtime: mover) 9354.js 15 bytes [rendered]
chunk (runtime: mover) 9356.js 14.5 KiB [rendered]
chunk (runtime: mover) 9426.js (id hint: vendors) 26.8 KiB [rendered] reused as split chunk (cache group: defaultVendors)
chunk (runtime: mover) 9500.js 1.05 KiB [rendered]
chunk (runtime: mover) 9637.js 78.1 KiB (javascript) 84 bytes (consume-shared) [rendered] reused as split chunk (cache group: default)
chunk (runtime: mover) 9716.js (id hint: vendors) 59.5 KiB [rendered] split chunk (cache group: defaultVendors)
chunk (runtime: mover) 9807.js 16.2 KiB [rendered]
chunk (runtime: mover) 9888.js 7.42 KiB [rendered]

ERROR in ./apps/app1/src/../../../index.tsx:20:20
TS2322: Type '"foo"' is not assignable to type 'Tones'.
    18 |   return (
    19 |     <div data-component-id="Banner">
  > 20 |       <ComponentA tone={'foo'} >
       |                   ^^^^
    21 |         <div className="space-y-2">
    22 |           <div className="pr-2">

webpack compiled with 1 error (bd60f37cf54db8e4)


 NX   Remote failed to start. A complete log can be found in: /<user-path>/.nx/workspace-data/2024-06-26T21_27_40_438Z-build.log



——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 NX   Running target serve for project shell failed
```

## Related Issue(s)
N/A

Co-authored-by: Hancock, Matthew <Matthew_Hancock@comcast.com>
2024-07-24 09:37:18 +01:00
Nicholas Cunningham
232e12479e fix(nx-dev): Remove announcement banner 2024-07-24 01:28:24 -07:00
Jason Jean
684d2a9bbe
fix(core): fix watch daemon error (#27067)
<!-- 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 watch` throws an error saying the daemon is not running when the
daemon is indeed running.

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

`nx watch` does not throw an error saying the daemon is not running when
the daemon is indeed running.

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

Fixes #
2024-07-23 15:40:47 -04:00
Miroslav Jonaš
a7ff250f27
feat(nx-dev): reprioritize customer logos on landing page (#27061)
A follow up PR will replace Amplify logo with AWS

## Current Behavior
<img width="1257" alt="image"
src="https://github.com/user-attachments/assets/75063fc7-ea4f-4110-82d2-de0640ff9352">


## Expected Behavior
<img width="1220" alt="image"
src="https://github.com/user-attachments/assets/38fdb143-19ac-4a12-900d-67a8952f057f">


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

Fixes #
2024-07-23 21:37:44 +02:00
Louie Weng
981d8c1c1b
chore(repo): enable dte summary table (#27055)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

There is no summary of distributed task runs

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

There is a summary of distributed task runs on CI
https://app.circleci.com/pipelines/github/nrwl/nx/53764/workflows/208f1b92-909b-489d-9144-58444e1b3c43/jobs/429693

 

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

Fixes #
2024-07-23 14:46:16 -04:00
Miroslav Jonas
f2df3b57fd docs(nx-dev): replace amplify logo with aws 2024-07-23 11:17:09 -07:00
Leosvel Pérez Espinosa
8ccfc925a1
fix(module-federation): pin versions mf packages versions (#27071)
Pin the MF package versions to a minor range that works. There was a
release today that is causing failures:
https://staging.nx.app/runs/h1eVO5d9D7/task/e2e-angular%3Ae2e-ci--src%2Fmodule-federation.test.ts.

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

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

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

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

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

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

Fixes #
2024-07-23 14:03:39 -04:00
MaxKless
184e83ad58
feat(core): error when running atomized tasks outside of DTE (#26898)
<!-- 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
Nx allows running atomized tasks (like `e2e-ci`) anywhere.

## Expected Behavior
Nx allows running atomized tasks (like `e2e-ci`) only in distributed
environments like Nx Agents or DTE. We'll leave that actual check to nx
cloud but in the default runner, we'll throw an error.
It's possible to escape from this with an env var.
2024-07-23 10:52:14 -04:00