Compare commits

..

1337 Commits

Author SHA1 Message Date
“JamesHenry” fb42a0dfac chore: use @nx/graph for graph implementation details 2024-07-27 22:56:21 +04:00
Colum Ferry 7b9ee39c22 docs(webpack): update NxAppWebpackPlugin reference (#27156)
<!-- 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-26 17:02:35 +01:00
Colum Ferry 795f8479d8 fix(vite): ensure nxViteTsPaths resolve before vite internal resolver (#27155)
<!-- 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 -->
In Yarn and PNPM Workspaces, the `nxViteTsPaths`'s `resolveId` is not
called because Vite has already tried to resolve the module.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Ensure the `nxViteTsPath`'s logic is run before vite's internal
resolver.

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

Fixes #20520
2024-07-26 16:59:20 +01:00
Colum Ferry 38a7f43925 fix(module-federation): handle tspath mappings with /* wildcard #26765 (#27149)
<!-- 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 -->
Module Federation setups using `/*` wildcards in ts path mappings error
out as they cannot resolve the module.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
`/*` ts path mappings should still allow modules to be resolved

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

Fixes #26765
2024-07-26 11:54:09 -04:00
Isaac Mann b7f2514e47 docs(core): show projects example with tags (#27145)
Fixes #25062
2024-07-26 11:40:39 -04:00
zack-derose e78a6a2c48 docs(misc): isaac review items 2024-07-26 08:03:00 -07:00
zack-derose f0904b6eeb docs(misc): nx cloud updated 2024-07-26 08:03:00 -07:00
zack-derose d2a2315e0a docs(misc): typo fix 2024-07-26 08:03:00 -07:00
zack-derose 84ced3c7b1 docs(misc): adjustments from Jason conversation 2024-07-26 08:03:00 -07:00
zack-derose 7557046f4e docs(misc): small adjustments 2024-07-26 08:03:00 -07:00
zack-derose bb2d3bc710 docs(misc): update react section 2024-07-26 08:03:00 -07:00
zack-derose 000210d726 docs(misc): add changelog info 2024-07-26 08:03:00 -07:00
zack-derose 41ddab9d4c docs(misc): review updates for 19.5 blogpost 2024-07-26 08:03:00 -07:00
zack-derose 0b0f029a74 docs(misc): nx 19.5 update blogpost 2024-07-26 08:03:00 -07:00
Isaac Mann 719c6a5322 docs(core): explain root level tasks in project.json (#27151)
Fixes #20522
2024-07-26 10:45:58 -04:00
Leosvel Pérez Espinosa 5e4f05c52b fix(misc): generate the "types" field in package.json if no set (#27147)
<!-- 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 #20003
2024-07-26 15:56:48 +02:00
Eason Lin fa976e04c8 docs(react): change word "Angular" to "React" (#27140)
<!-- 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. -->

"Hence we can easily import them into other libraries and our Angular
application. As an example, let's use the pre-generated
ProductsComponent component from our libs/products library."

It's a tutorial providing a React project example, I think "Angular" is
typing wrong

## Current Behavior

Hence we can easily import them into other libraries and our **Angular**
application. As an example, let's use the pre-generated
ProductsComponent component from our libs/products library.

## Expected Behavior

Hence we can easily import them into other libraries and our **React**
application. As an example, let's use the pre-generated
ProductsComponent component from our libs/products library.
2024-07-26 07:32:02 -06:00
Jack Hsu b3d75091cc fix(node): ensure artifacts are built before serving app (#27146)
This PR ensures that all dependencies are built before serving the Node
app.
<!-- 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
If users don't manually run `nx build <app>` first, then the
dependencies won't build because when `@nx/js:node` executor runs, it
uses `runExecutor` which skips dependencies.

## Expected Behavior
Set `dependsOn` on the `serve` target so run `<app>:build` first, which
would ensure dependencies are all built. Also add
`runBuildTargetDependencies: false` to the target options for
visibility, so users could toggle it on if they want to re-build deps
whenever there is a change (during watch). The option will slow things
down, so we still want it to be `false` by default.

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

Fixes #18964
2024-07-26 09:24:25 -04:00
Leosvel Pérez Espinosa 09b0b38333 cleanup(angular): replace old util with devkit util and remove "ignore" dependency (#27126)
<!-- 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-26 14:59:53 +02:00
Jack Hsu 45c458e677 fix(react): generate valid Vite + JSX setup for React (#27130)
The current `@nx/react:app` generator does not take the `--js` option
into account. There are two problems:

1. `index.html` includes `main.tsx` not `main.jsx`.
2. `.js` files with JSX are invalid in Vite, and must be named `.jsx`.

This PR adds a new option to the `toJS` devkit util to preserve `.jsx`
rather than renaming them to `.js`. The vast majority of non-Vite React
projects will use `.js` and not `.jsx` (e.g. Next.js, Expo, Remix, etc.)
so we just want to apply this change to Vite only for now.

In the future we could enhance React generators to support `--jsx`, for
example.

## 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 #20810
2024-07-26 08:30:16 -04:00
Benjamin Cabanes d2e3fc79db feat(nx-dev): add ai for ci (#27096)
Introduced a new AI section with dark/light image support. Refactored component exports from arrow functions to named functions for better readability and consistency. Included minor adjustments to class names and style properties.
2024-07-26 01:07:19 -07:00
Nicholas Cunningham b3c67defdb feat(nx-dev): Update footer links (#27075)
Co-authored-by: Juri <juri.strumpflohner@gmail.com>
2024-07-25 22:18:35 -04:00
Jack Hsu 4ab9e6dc14 fix(nextjs): fix inlined workspace root in .nx-helpers (#27136)
This PR fixes an issue where our `withNx` function for Next.js is
compiled with inlined `workspaceRoot` (to support container
environments). On Windows, we write the `.nx-helpers/with-nx.js` with
the following:

```js
workspaceRoot: 'C:\Users\user\projects\app',
```

The `\u` character result in a Node error: `Invalid Unicode escape
sequence`.

The fix is to escape `\` as `\\`, so when the file is written, the path
is valid and does not cause unicode errors.

<!-- 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 #18824
2024-07-25 18:01:27 -06:00
Craigory Coppola 8e596c3abf docs(core): document projectsAffectedByDependencyUpdates (#27134)
<!-- 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
No docs for new config flag

## Expected Behavior
Docs 🎉 

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

Fixes #22259
2024-07-25 19:18:27 -04:00
Craigory Coppola 97b00840cc docs(nx-plugin): fixup docs for project name and root changes (#27139)
<!-- 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
Some plugin docs don't make sense after project name and root changes

## Expected Behavior
They've been touched up

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

Fixes #25191
2024-07-25 19:17:59 -04:00
Nicholas Cunningham fcbc142c6c fix(nx-dev): improve bandwidth usage convert gif to mp4 (#27129)
This PR aims to improve the bandwidth usage of nx-dev which is hosted on
Vercel.
2024-07-25 15:12:23 -06:00
Nicholas Cunningham 09c0b3d31a feat(nx-dev): Migrate brands from nx.app (#27044) 2024-07-25 16:53:43 -04:00
Craigory Coppola 8f5d3dccc9 chore(repo): cache documentation script (#27100)
<!-- 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
`documentation` is not cacheable. It is reran everytime someone tries to
push, including the following flow:

- git push, fails as docs changes found
- git commit -am "chore(repo): add docs"
- git push, runs full docs cycle again in pre-push hook

## Expected Behavior
`documentation` is cacheable, and avoids rerunning when no fs changes
are made

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

Fixes #
2024-07-25 16:52:40 -04:00
Jason Jean 155e69b946 fix(devkit): detect package manager based on install location (#27127)
<!-- 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 package manager is detected based off of the relative `cwd` which in
most cases is `''`. This incorrectly goes off of the `cwd` of the
command rather than the location of the `package.json` file being
modified.

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

The package manager is detected based off the absolute path of the
directory containing the `package.json` file being modified. So if this
is the root, it will detect the package manager at the root rather than
the `cwd`

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

Fixes https://github.com/nrwl/nx/issues/19831
2024-07-25 14:40:57 -05:00
Wixewr 50e08aa356 feat(js): added a verdaccio listen address to configuration (#26976)
Co-authored-by: William van der Vegt <william.van.der.vegt@moba.net>
Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>
2024-07-25 14:43:33 -04:00
Rajhans Jadhao a9c2f16bee fix(linter): checking command is specified (#26908) 2024-07-25 14:41:59 -04:00
Isaac Mann 3a5e0ddfef docs(core): remove reference to affected:graph (#27128)
Fixes #26582
2024-07-25 14:23:07 -04:00
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
Nicholas Cunningham e9b02cb3f7 feat(nx-dev): Migrate careers from nx.app (#27020) 2024-07-23 08:39:34 -04:00
Lars Gyrup Brink Nielsen f953ab8d9c chore(core): update actions/setup-node to v4 in ci-workflow generator (#26642)
Currently, the following warning is output when using GitHub Actions.

> Node.js 16 actions are deprecated. Please update the following actions
to use Node.js 20: actions/setup-node@v3. For more information see:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

<!-- 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 `actions/setup-node` GitHub Action is installed in version 3.x
which uses the deprecated Node.js 16 runtime for GitHub Actions

## Expected Behavior
- The `actions/setup-node` GitHub Action is installed in version 4.x
which uses the supported Node.js 20 runtime for GitHub Actions

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

Fixes #

---------

Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
2024-07-23 12:09:22 +02:00
Rares Matei ff505a7983 docs(nx-cloud): remove managed saml docs (#26969)
<!-- 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 #

---------

Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
2024-07-23 11:43:17 +02:00
Nicholas Cunningham 3b1deb1a22 Add filters to blog page (#26997)
Co-authored-by: Juri <juri.strumpflohner@gmail.com>
2024-07-23 02:36:16 -07:00
Miroslav Jonaš 157aca4d40 docs(nx-dev): add distribute on manual to custom dte (#27059)
<!-- 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 11:29:35 +02:00
Rares Matei 21cb714377 docs(nx-cloud): fix saml callback url (#27009)
<!-- 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 11:05:28 +02:00
Leosvel Pérez Espinosa e7c07ed719 fix(angular): remove unnecessary esbuild peer dependency (#27046)
<!-- 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 #26770
2024-07-23 09:31:25 +02:00
Craigory Coppola c4f9d898ba fix(repo): update tests to pass regardless of actually installed yarn version (#27054)
… version

<!-- 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-22 18:32:43 -04:00
Emily Xiong bfb0106e13 feat(graph): add parallelism in target details (#27014)
<!-- 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 -->
![Screenshot 2024-07-19 at 4 00
37 PM](https://github.com/user-attachments/assets/10637098-2429-4672-bec9-6caacd8ca190)
![Screenshot 2024-07-19 at 3 27
54 PM](https://github.com/user-attachments/assets/11b2c280-2b26-4ba0-b83d-3b833fea2ae7)


## 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-22 17:30:23 -05:00
Emily Xiong 627504d8d3 docs(core): add docs for parallelism (#26950)
<!-- 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-22 17:42:03 -04:00
Colum Ferry 8cf69c4b9a fix(vite): typecheck vue projects with vue-tsc #20242 (#26450)
<!-- 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 -->
Typechecking of  Vue Projects with Vite is not functioning correctly

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Typechecking of Vue projects should type check the .vue files and not
error in TS files importing .vue files

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

Fixes #20242
2024-07-22 17:52:59 +01:00
Tim van den Eijnden 764eceed67 feat(testing): support vite configOverrides for cypress (#26554)
We'd like to use shared cypress commands, but that's currently not
working because vite cannot resolve the import.
By allowing to pass options to the vite config we have the possibility
to add an alias or a plugin to fix this.

This adds support for an **optional** `viteConfigOverrides` object.

## Current Behavior
![Screenshot 2024-06-14 at 15 19
21](https://github.com/nrwl/nx/assets/951290/78f5037f-c839-4227-a3ea-4de4142006cf)

cypress.config.ts:
```ts
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';
import { defineConfig } from 'cypress';

export default defineConfig({
  e2e: {
    ...nxE2EPreset(__filename, { cypressDir: 'cypress', bundler: 'vite' }),
  },
});
```

## Expected Behavior
![Screenshot 2024-06-14 at 15 23
56](https://github.com/nrwl/nx/assets/951290/385cde67-91b9-462e-9bfa-0c784d3947b7)

cypress.config.ts:
```ts
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';
import { defineConfig } from 'cypress';

const viteConfigOverrides = {
  resolve: {
    alias: {
      '@cypress-shared-commands': '../../../shared-cypress-commands',
    },
  },
};

export default defineConfig({
  e2e: {
    ...nxE2EPreset(__filename, { cypressDir: 'cypress', bundler: 'vite', viteConfigOverrides }),
  },
});
```
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-07-22 12:51:17 -04:00
Rares Matei 224305cb0d docs(nx-cloud): add release notes (#26989)
<!-- 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 #

---------

Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-07-22 17:05:04 +01:00
Louie Weng fb55c905c2 feat(repo): run e2e in the same command as build,test,lint (#27019)
<!-- 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-22 09:46:28 -06:00
Isaac Mann 199ffd1d54 docs(core): angular monorepo tutorial video (#26819)
Add video to Angular monorepo tutorial
2024-07-22 17:17:21 +02:00
Leosvel Pérez Espinosa 5217c3385f fix(linter): convert root projects correctly to inferred and remove default option values (#27035)
<!-- 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 -->

Converting a root project to inferred results in the plugin registration
to have the `includes` option set to `./**/*`. This is invalid and
causes no project to be inferred.

Additionally, the eslint `convert-to-inferred` generator:

- keeps a redundant `config` option, which is not needed because
inferred tasks only work with default/known ESLint config files, so
there's no need to specify it in the options
- converts all `lintFilePatterns` to `args`, which is correct, but it
keeps the patterns that are already inferred by the plugin, which leads
to duplicated patterns when running the task

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

Converting a root project to inferred should work as expected and result
in the `lint` task being inferred for the project.
Also, default inferred options should be removed from the target
options.

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

Fixes #26775
2024-07-22 10:03:19 -04:00
Leosvel Pérez Espinosa 0bc889838f fix(core): copy package manager config files when installing latest nx version in nx migrate (#27032)
<!-- 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 #26926
2024-07-22 15:59:12 +02:00
Leosvel Pérez Espinosa 5b414d1727 docs(testing): remove wrong cypress config filenames from plugin overview (#26981)
<!-- 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 cypress plugin overview lists `cypress.config.mts` and
`cypress.config.cts` filenames, which are not configuration filenames
supported by Cypress by default.

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

The cypress plugin overview only lists valid configuration filenames
supported by Cypress.

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

Fixes #
2024-07-22 15:58:32 +02:00
Leosvel Pérez Espinosa c724d10e2c cleanup(linter): remove leftover console.log from lint executor (#27002)
<!-- 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-22 15:58:18 +02:00
Leosvel Pérez Espinosa ae48a15629 fix(linter): log a message when the number of warnings exceeds the specified maxWarnings for the lint executor (#27003)
<!-- 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 #26906
2024-07-22 15:58:01 +02:00
Jason Jean f08cd4cae3 docs(misc): lower concurrency to 3 in the docs (#27013)
<!-- 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 was changed in the generated ci workflow but not on the docs.

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

This is changed in the docs as well so it's not confusing.

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

Fixes #
2024-07-22 09:46:19 -04:00
Jason Jean e1cced3016 fix(core): record stats for more commands (#27017)
<!-- 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 -->

Stats are not recorded for `nx connect`, `nx view-logs`, and `nx init`.

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

Stats are recorded for those commands and they get sent to the right URL

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

Fixes #
2024-07-22 09:45:55 -04:00
James Henry 521c3f3891 fix(core): typo in nx update log (#27036) 2024-07-22 08:50:24 -04:00
Arthur f366d4e09c docs(core): added missing close bracket (#27023)
<!-- 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 a missing closing bracket in the
[cache-task-result](https://nx.dev/features/cache-task-results#finetune-caching-with-inputs-and-outputs)

<img width="696" alt="Screenshot 2024-07-21 at 2 22 01 PM"
src="https://github.com/user-attachments/assets/4a798a3a-3869-46e9-bd0b-cb762034a70f">


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

Add the missing closing bracket: change `{projectName` to
`{projectName}`.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
N/A!
2024-07-22 08:54:58 +02:00
Leosvel Pérez Espinosa 4871642a74 fix(angular): generate correct server file when using webpack-based executors (#27007)
<!-- 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 #26722
2024-07-22 08:50:59 +02:00
Isaac Mann 9410164313 docs(core): github actions tutorial update (#26995)
Update the github actions tutorial:
- Removes content that focuses on GitHub Actions itself
- Updates for the new `nx connect` onboarding flow

---------

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-07-19 15:29:39 -04:00
Emily Xiong e87bf395e1 fix(react-native): fix unable to resolve realm (#26983)
<!-- 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 https://github.com/nrwl/nx/issues/26853
2024-07-19 15:25:45 -04:00
Milan Kovacic b623104aac docs(nest): add deployment section (#26048)
<!-- 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
nx/nest documentation contains no deployment information.

## Expected Behavior
Deployment information is present, as it is a common question in
Discord.

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

---------

Co-authored-by: MilanKovacic <9189985+MilanKovacic@users.noreply.github.com>
2024-07-19 13:16:43 -06:00
Nicholas Cunningham 51d5d23eb8 feat(nx-dev): add Nx Cloud Page (#26865) 2024-07-19 14:53:25 -04:00
Benjamin Cabanes f1f8ab7fe7 feat(nx-dev): update typography and hero component styles (#27011)
Enhanced the typography styles to improve text scaling across various
screen sizes. Adjusted the hero component to include responsive line
breaks and optimized the SVG element for better alignment and sizing.
2024-07-19 14:12:21 -04:00
Jack Hsu ec5b04fb82 docs(core): move "nx connect" earlier in CI section for standalone/monorepo tutorials (#26845)
We're making an enhancement to `nx g ci-workflow` such that when the
workspace is already connected to Nx Cloud, we'll enable distribution in
the workflow file, rather than having them commented out. For the flow
of the tutorial, it makes more sense to do `nx connect` first so things
are set up correctly without user intervention.

Note: I left the "Make sure the following line is uncommented" for
distribution because older versions will still leave it uncommented.

Example:
https://nx-dev-git-docs-tutorials-update-nrwl.vercel.app/getting-started/tutorials/angular-monorepo-tutorial

---------

Co-authored-by: Isaac Mann <isaacplmann@gmail.com>
2024-07-19 13:43:05 -04:00
Emily Xiong 188f0d8526 fix(core): normalizeTargetDependencyWithStringProjects should not return undefined (#26994)
<!-- 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 https://github.com/nrwl/nx/issues/26975
2024-07-19 09:57:58 -07:00
Jack Hsu 8b1c78caa5 fix(module-federation): do not cache assets from static serve (#27005)
We're currently caching files for an hour when serving the host with
static remotes. This PR fixes the issue by setting `cacheSeconds: -1` on
the static server (disables cache).

This affects development only.
<!-- 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-19 10:39:32 -04:00
Benjamin Cabanes 83b88a10c7 feat(nx-dev): update descriptions and layout styles for better clarity (#26991)
Revised meta descriptions and adjusted layout styles to improve visual
consistency and accessibility. Enhanced card layout by refining padding
and icon handling for different screen sizes.
2024-07-18 14:09:20 -04:00
Colum Ferry a549b9b0c9 feat(module-federation): use proxy servers to proxy to single file server for static remotes (#26782)
<!-- 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 -->
Remotes that are served for a host are usually served from a single file
server running on a single port.
We perform some mapping logic during the build of the host application
to update the locations the remotes can be found at to point to the
single file server.

This works, but it's also wrong, as it breaks the flow that users
expect.
It also breaks dynamic remotes.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Continue to serve the remotes from a single file server, as this helps
reduce the amount of resources used on developers machines.
Use express to create proxy servers that will proxy requests from the
original remote location to the single file server.

This allows applications to continue to work without us having to
interfere and map any remote locations.
It also solves the issue with dynamic remotes.


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

Fixes #26318
2024-07-18 13:46:06 -04:00
Leosvel Pérez Espinosa 53d2e9cfc7 fix(core): resolve nested delegated executor package correctly (#26979)
<!-- 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 -->

Resolving the package for delegated executor definitions doesn't take
into account that the package could be nested inside the parent package.

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

Resolving the package for delegated executor definitions should work
correctly.

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

Fixes #26896
2024-07-18 16:41:26 +02:00
Colum Ferry e38830415f docs(remix): update the plugin overview to match the latest iteration of the plugin #26943 (#26977)
<!-- 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 information on the Remix Plugin Overview is out of date.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The information should be up to date

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

Fixes #26943
2024-07-18 14:36:36 +01:00
Jason Jean 8633f3d024 fix(misc): update concurrency in ci workflows to 3 (#26974)
## Current Behavior
<!-- This is the behavior we have today -->

Generated CI Workflows use 5 agents.

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

Generated CI Workflows use 3 agents.

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

Fixes #
2024-07-18 00:37:41 -04:00
Colum Ferry 483bcf3465 feat(module-federation): add nx-runtime-library-control-plugin (#26816)
- feat(module-federation): use @module-federation/enhanced for
withModuleFederation
- feat(module-federation): expose API for users to override module
federation plugin options
- fix(module-federation): angular mf ssr projects should not create
vendor chunks
- feat(module-federation): add nx-runtime-library-control-plugin

<!-- 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 common occurrence when working with NX Module Federation is that a
shared library may get resolved from a static remote.
Any changes to the shared lib are therefore not reflected in the dev
server.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Add the `nx-runtime-library-control-plugin` to ensure that shared
libraries are shared from a remote that is served via
webpack-dev-server.

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

Fixes #11615
2024-07-17 22:46:14 -04:00
Jack Hsu 7f53e568bf fix(devkit): remove --web from being logged to show project details (#26968)
The `--web` option isn't needed in Nx 19 as it is the default. Updating
the devkit util to reflect that change.
<!-- 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-17 19:56:11 -04:00
Juri 1f34788c75 feat(nx-dev): improve hero section on homepage 2024-07-17 13:32:53 -07:00
Juri Strumpflohner ad2dcba093 feat(nx-dev): add announcement pill on top of hero section (#26961)
Adds back the announcement pill on the hero section
2024-07-17 16:16:14 -04:00
Nicholas Cunningham fb02e3d0d5 fix(nx-dev): Navigating to blogs should work (#26972)
Before:

![Screenshot 2024-07-17 at 2 42
10 PM](https://github.com/user-attachments/assets/bbc60e06-98b0-4752-bb07-e7d206877dec)

After: 
![Screenshot 2024-07-17 at 12 54
04 PM](https://github.com/user-attachments/assets/062e2e9c-36df-45d6-91e6-7ac16040bc52)
2024-07-17 16:06:04 -04:00
Jason Jean 064eb714cf chore(repo): update nx to 19.5.0-beta.5 (#26925)
<!-- 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 `19.4.0-rc.1`

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

This repo uses Nx `19.5.0-beta.5`

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

Fixes #
2024-07-17 11:12:21 -04:00
Isaac Mann a0baab0d47 docs(core): update nx connect feature page (#26957)
Fix the title of "Connect to Nx Cloud" to be consistent

Old inconsistent titles:
![Screenshot 2024-07-16 at 10 09
47 AM](https://github.com/user-attachments/assets/8122aa79-edaf-46a9-b278-a3c4e2fa214d)

Also adds a sentence explaining the `nx-cloud record` line in step 3,
since that isn't obvious what it is doing.
2024-07-17 08:08:12 -04:00
Johanna Pearce 3a40d37f5e fix(nx-dev): website copy corrections and changes 2024-07-17 02:28:46 -07:00
Jason Jean 039f91dde4 fix(core): disable isolation in wasm (#26960)
<!-- 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 -->

Something is causing plugin isolation to fail on wasm environments.

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

Plugin isolation is disabled on wasm environments pending a fix.

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

Fixes #
2024-07-16 18:12:46 -05:00
Emily Xiong ccb0d7d244 feat(gradle): change test glob to include Tests and Test (#26913)
<!-- 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-16 18:31:36 -04:00
Jason Jean fa83b36131 fix(core): properly handle reading target defaults (#26959)
<!-- 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 targets have executors, they cannot be matched with a glob pattern

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

When targets have executors, they can still be matched with a glob if
the executor does not have target defaults set.

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

Fixes #
2024-07-16 17:25:32 -05:00
Jason Jean 87021ecb85 fix(core): decrease initial memory for wasm (#26956)
<!-- 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 fails to import Wasm if there is not 16 gigs of memory available
which is.. pretty often.

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

Nx fails to import wasm if there 1 gig of memory available which should
be not often.

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

Fixes #
2024-07-16 18:20:10 -04:00
Jason Jean 31bef6a85a fix(misc): finalize ab testing (#26958)
## Current Behavior
<!-- This is the behavior we have today -->

There is ab testing for different messages for connecting to cloud.

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

There is no ab testing for connecting to cloud prompts

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

Fixes #
2024-07-16 16:10:52 -04:00
Benjamin Cabanes 85d310a8c2 feat(nx-dev): update home page (#26893)
Add new sections and update information about Nx.

---------

Co-authored-by: Juri <juri.strumpflohner@gmail.com>
2024-07-16 15:43:41 -04:00
Craigory Coppola facfc147f8 fix(core): running just 'nx' should show help (#26871)
<!-- 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
Running `nx` errors

## Expected Behavior
`nx` show's help

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

Fixes #
2024-07-16 13:49:28 -04:00
Jason Jean 51f5fe4434 fix(core): merge package.json plugins and updated project.json plugin… (#26952)
… using v2

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

The `package.json` handling is split between before and after plugins so
it's confusing. Also, `package.json` nodes will get overwritten by
plugins while others won't.

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

The `package.json` handling is merged. Also, the `package.json` nodes
will always overwrite plugins as intended.

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

Fixes #
2024-07-16 12:46:57 -05:00
Jack Hsu 1a9429643f feat(core): ci-workflow adds workflow file to sharedGlobal inputs (#26948)
When we generate the workflow file, users should also add the new
workflow file to the `sharedGlobals` named input, otherwise changes may
land without verifying that all tasks are successful.

This is already called out in the CI tutorials, and doing it
automatically improves the DX.

## 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-16 13:38:32 -04:00
Jack Hsu 34da542ce6 fix(rollup): always generate package.json when using @nx/rollup:rollup (#26940)
Prior to Nx 19.4, the `@nx/rollup:rollup` executor generates
`package.json` outside of the actual Rollup build. Nx 19.4 changed this
to be a proper Rollup plugin in order to support inferred targets
better. This led to a slight regression, where projects that override
`plugins` array in their `rollup.config.js` file will also remove the
`generatePackageJson` plugin.

This PR brings the behavior back, so the `package.json` file is _always_
generated regardless of how the `plugins` array is customized.

<!-- 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-15 16:33:05 -04:00
Philip Fulcher 46497356ce chore: migrate links to blog (#26892)
<!-- 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 -->
Blog links point to Medium and dev.to blogs
## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Blog links point to internal blog
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-07-15 15:28:06 -04:00
Gunter Chou a41a8d68cf fix(linter): Correctly collect lintable files for project in @nx/eslint plugin (#26638) 2024-07-15 12:48:20 -04:00
Jason Jean f3fa705b82 fix(core): do not mutate target defaults (#26941)
## Current Behavior
<!-- This is the behavior we have today -->

Target defaults is mutated when the target is normalized. Subsequent
targets are normalized with the mutated version yielding the incorrect
projects configuration.

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

Target defaults is not mutated and all targets are correct.

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

Fixes #
2024-07-15 11:12:36 -05:00
MaxKless 33d2bece53 fix(misc): add NX_E2E_RUN_E2E env to e2eInputs (#26939) 2024-07-15 08:46:34 -06:00
Nicholas Cunningham 6f50d9f4c3 fix(nx-dev): Update Next.js version (#26912)
Fix nx-dev hmr not working.
2024-07-12 21:02:27 +00:00
Emily Xiong 39e104b6c3 feat(core): add parallelism to target configuration (#26820)
<!-- 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-12 16:35:45 -04:00
Jason Jean 37f0ccaa20 chore(repo): update freebsd publish to run on ubuntu and use latest f… (#26924)
…reebsd to fix issue

<!-- 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's an issue with running `npm` when building on freebsd

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

There are no issues building on freebsd

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

Fixes #
2024-07-12 15:26:09 -05:00
Craigory Coppola 92d0e15d1f feat(core): pattern matching for target defaults (#26870)
<!-- 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
TargetDefaults can be specified by keys matching either executor or
target name only

## Expected Behavior
TargetDefaults can match based on a glob pattern that may match the
target name. This is useful for things like `e2e-ci--*`. Only 1 target
default will ever apply to a given target. We recognize this may be
confusing, but is inline with current handling. If no default matches
the target name or key, the first default that matches by pattern will
be used.

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

Fixes #
2024-07-12 16:25:32 -04:00
Nicholas Cunningham f2e1f0fad9 feat(nx-dev): Add more OSS logos (#26922) 2024-07-12 13:52:33 -06:00
Emily Xiong fc1c04918b feat(gradle): add help metadata (#26810)
<!-- 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-12 14:28:28 -04:00
Emily Xiong 638647d77c chore(core): add check to run macos tests if packages changed (#26894)
<!-- 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-12 14:22:26 -04:00
Emily Xiong aa7c5dc3ea chore(core): add unit tests for not connected to nx cloud (#26885)
<!-- 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-12 13:25:55 -04:00
Jason Jean adacd983b7 fix(misc): add more ab testing for setting up ci and nx cloud (#26907)
## Current Behavior

There is AB testing

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

There is more AB testing

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

Fixes #
2024-07-12 13:03:56 -04:00
Jonathan Cammisuli 26c3d21f1e docs(core): add documentation for "Explain With AI" (#26656)
<!-- 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 #

---------

Co-authored-by: Caleb Ukle <caleb@nrwl.io>
2024-07-12 11:40:57 -04:00
Nicholas Cunningham 82831bcee6 feat(nx-dev): add customers & company pages (#26813)
Co-authored-by: Juri <juri.strumpflohner@gmail.com>
2024-07-12 11:22:35 -04:00
Craigory Coppola 0b0db782f7 fix(core): report should work if project graph errors (#26858) 2024-07-11 17:35:02 -04:00
Leosvel Pérez Espinosa 58ba1ffc6d feat(angular): support angular v18.1.0 (#26504)
<!-- 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 -->

Angular v18.1.0 is not supported.

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

Angular v18.1.0 should be supported.

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

Fixes #
2024-07-11 11:17:00 -04:00
Craigory Coppola 2c4c2ae8ca feat(core): enable plugin isolation by default (#26888)
<!-- 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-10 17:16:13 -04:00
Craigory Coppola b3d2d957a2 feat(core): avoid forking process for nx:noop (#26869)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
When we run a task with executor nx:noop we still fork a process for
that executor to run.

## Expected Behavior
`nx:noop` is a fixed executor which never does anything. We can skip
forking the process.

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

Fixes #
2024-07-10 17:01:35 -04:00
Jason Jean 1cb4f65210 fix(misc): properly set the value of the bitbucket option for ci work… (#26890) 2024-07-10 16:58:34 -04:00
Craigory Coppola a6fde9ba95 fix(core): load isolated plugins in parallel (#26874)
<!-- 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
Plugins are not loading in parallel correctly

## Expected Behavior
Plugins should load in parallel

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

Fixes #
2024-07-10 16:57:57 -04:00
Rares Matei 550de60446 docs(nx-cloud): bitbucket data center docs (#26862)
- Adds docs for the new bitbucket data center integration + auth
- Refactors some of the other integration docs to be consistent with
each other and link to the Helm repo where possible
2024-07-10 09:47:15 -06:00
Leosvel Pérez Espinosa e31b1689c4 feat(js): add createNodesV2 for typescript plugin (#26788)
<!-- 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 implementation for the `CreateNodesV2` API.

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

There should be an implementation for the `CreateNodesV2` API.

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

Fixes #
2024-07-10 10:21:58 +02:00
Emily Xiong 2b7b5231fb feat(core): uncomment start-ci-run (#26645)
<!-- 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-09 19:22:50 -04:00
Jasper McCulloch 8fd38cba9a fix(vite): Only attempt to amend test object if one exists (#26822)
Test object is assigned using optional chaining but previously did not
check that any value had actually been assigned which would cause the
`getStart` call to fail resulting in a failed migration.

## Current Behavior
Migration fails if no matching test object is found.

## Expected Behavior
Migration should not fail.

## Related Issue(s)
I haven't opened an issue, just the PR. I can open an issue if required
for tracking.
2024-07-09 07:47:37 -06:00
Leosvel Pérez Espinosa 73858a094e fix(vue): bump vue-tsc version to 2.x.x (#26867)
<!-- 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 -->

Building a newly created Nuxt workspace/application fails with:

```bash
Nuxt Build Error: Cannot find module '@volar/typescript/lib/node/proxyCreateProgram'
```

This can be seen in current CI runs like the following:
https://staging.nx.app/runs/bszKddEenc/task/e2e-nuxt%3Ae2e-ci--src%2Fnuxt.test.ts.

This is happening because the `vite-plugin-checker` (used by Nuxt)
requires `vue-tsc@>=2.0.0`, but the `@nx/vue` plugin installs
`vue-tsc@^1.8.8`.

```bash
└─┬ nuxt 3.12.3
  └─┬ @nuxt/vite-builder 3.12.3
    └─┬ vite-plugin-checker 0.7.1
      └── ✕ unmet peer vue-tsc@>=2.0.0: found 1.8.27
```

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

Newly created Nuxt workspaces/applications should build successfully.

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

Fixes #
2024-07-09 15:33:36 +02:00
Jason Jean 92e09d9322 fix(misc): adjust nx cloud ab test (#26866)
<!-- 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 -->


![image](https://github.com/nrwl/nx/assets/8104246/98c3b475-d213-4e81-8c80-4010714ad4f7)


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


![image](https://github.com/nrwl/nx/assets/8104246/2a67ae6b-2718-45f3-adfe-2dcc88c8ecbd)


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

Fixes #
2024-07-08 18:28:59 -04:00
Pavlo 3e0d2de468 feat(core): add support for wildcards in dependsOn (#19611)
Now it is possible to define targets like this:

```
{
  "targets": {
    "build-css": {},
    "build-js": {},
    "test": {
      "dependsOn": ["build-*"]
    },
  }
}
```

<!-- 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
No support for wildcard target dependencies.

## Expected Behavior
This PR is an example of what I described here:
https://github.com/nrwl/nx/issues/19414.

## Related Issue(s)
Closes #19414

---------

Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>
2024-07-08 18:16:01 -04:00
Ben Snyder 81fe13250a feat(linter): support eslint.config.cjs and *.cjs extension with flat config (#26637) 2024-07-08 12:51:13 -04:00
Craigory Coppola 3cbe2abc25 fix(core): ensure better create nodes error messaging (#26811)
<!-- 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 see a stack trace pointing to where the aggregate create nodes error
is thrown rather than the messaging about the individual errors

<img width="911" alt="image"
src="https://github.com/nrwl/nx/assets/6933928/61907d8c-bb77-4a39-b55f-42fa38c0ed19">

## Expected Behavior
The message is shown

<img width="946" alt="image"
src="https://github.com/nrwl/nx/assets/6933928/f79f5aeb-e5b2-4ff1-9cbc-a7f10e8f910e">


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

Fixes #
2024-07-08 09:57:10 -04:00
Emily Xiong 4ae16b361f fix(gradle): fix gradle exclude src/test (#26741)
<!-- 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-05 16:09:54 -04:00
LongYinan 981eb30a0f feat(core): support compile to wasi target (#22870)
This pull request is trying to add wasm32-wasi target support for the
nx/native

To test the build, you can run the following commands:

- `rustup target add wasm32-wasip1-threads`
- `pnpm exec napi build --release --platform --package-json-path
packages/nx/package.json --manifest-path packages/nx/Cargo.toml --js
./native-bindings.js -o packages/nx/src/native --target
wasm32-wasip1-threads`

And the wasm file will be built at
packages/nx/src/native/nx.wasm32-wasi.wasm

Blocked by:

- Support @napi-rs/cli 3.0  Cammisuli/monodon#48
- https://github.com/napi-rs/napi-rs/issues/2009

The pseudo_terminal mod is excluded on the wasm32 targets, which is as
expected.

The watch mod is excluded because of the upstream `watchexec` deps
introduced by ignore-files don't support the wasi target at this moment
(but we can improve it).

## Related Issues
Fixes https://github.com/nrwl/nx/issues/21860
Fixes https://github.com/nrwl/nx/issues/23821

---------

Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2024-07-05 15:55:35 -04:00
Jonathan Gelin 23ce6af2cc fix(nx-plugin): tslib is not set as a dependency when using create-package generator (#22429)
<!-- 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
The linting failed on clean `create-nx-plugin` generation:

![image](https://github.com/nrwl/nx/assets/954509/80bfbaeb-0994-48d9-a6dc-20f8f723a95d)

## Expected Behavior
After a clean generation, build, test, and lint should be successful

Co-authored-by: Emily Xiong <xiongemi@gmail.com>
2024-07-05 15:29:48 -04:00
Emily Xiong 62baf4f307 feat(gradle): gradle atomizer (#26663)
<!-- 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-05 15:22:37 -04:00
Naymi e15479b691 fix(core): recursive resolve deps on create command graph (#22989)
## introductory
<img width="620" alt="image"
src="https://github.com/nrwl/nx/assets/21343944/1ef5e2a2-0f65-4fde-aa7d-b52152af59a7">


## Current Behavior

```shell
nx exec --projects=my-node-app -- pwd
TypeError: graph.dependencies[id] is not iterable
    at _findCycle (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/tasks-runner/task-graph-utils.js:8:39)
    at _findCycle (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/tasks-runner/task-graph-utils.js:11:23)
    at findCycle (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/tasks-runner/task-graph-utils.js:23:23)
    at createCommandGraph (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/commands-runner/create-command-graph.js:25:52)
    at getCommandProjects (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/commands-runner/get-command-projects.js:7:72)
    at runScriptAsNxTarget (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/command-line/exec/exec.js:60:73)
    at Object.nxExecCommand (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/command-line/exec/exec.js:44:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.handler (/Users/anatolijfedorov/prjcts/tmp/nx-nest-workspace/node_modules/nx/src/command-line/exec/command-object.js:11:13)

```


## Expected Behavior

```shell
nx exec --projects=my-node-app -- pwd
/tmp/nx-nest-workspace/my-node-lib-2
/tmp/nx-nest-workspace/my-node-lib
/tmp/nx-nest-workspace/apps/my-node-app
```

Fixes https://github.com/nrwl/nx/issues/22994
Added function that resolves dependencies recursively

Co-authored-by: afedorov <afedorov@rvision.ru>
2024-07-05 14:21:06 -04:00
Jack Hsu 2baf672b61 docs(nx-cloud): update onboarding flow to use "nx connect" (#26842)
The new Nx Cloud onboarding flow is to run `nx connect` and follow the
prompts. There's no need to explain beyond that in the docs since the
flow is prone to changes in nx.app.
2024-07-05 14:19:04 -04:00
Colum Ferry a6522f71a1 feat(module-federation): use @module-federation/enhanced for withModuleFederation (#26777)
<!-- 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 -->
We currently use the `ModuleFederationPlugin` from `webpack` itself. 
This doesn't receive the same attention as the new
`@module-federation/enhanced` package, which is where all new work by
Zack Jackson and Bytedance is being conducted.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Our `withModuleFederation` utils should use the
`@module-federation/enhanced` package.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
#26322 
Fixes #
2024-07-05 09:48:17 -04:00
Jack Hsu c7878533ed docs(misc): disable prefetch on page load for links (#26837)
This PR changes `<Link>` to use `prefetch={false}` in the following
components:

1. Header
2. Sidebar
3. Docs header
4. Markdown content

This means that prefetch happens on hover of the link rather than page
load, and will reduce the amount of edge requests made from the 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 #
2024-07-05 09:29:08 -04:00
Jack Hsu 653cad2492 feat(react): add support for React Compiler in @nx/react/babel (#26826)
This PR adds a check in `@nx/react/babel` preset to enable React
Compiler when `babel-plugin-react-compiler` is installed.

This affects:

- React apps using Webpack + Babel
- React libs using Rollup + Babel
- React Native apps using Webpack + Babel

If SWC is used, there is no way to use React Compiler currently.

Also adds a [new
recipe](https://nx-dev-git-feat-react-compiler-nrwl.vercel.app/recipes/react/react-compiler)
showing how to enable the compiler using `@nx/react/babel`.

## 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-04 16:18:34 -04:00
Jack Hsu 7caf9017f0 feat(react-native): update react-native-svg to 15.3.0 (#26827)
There's a bug in 15.2.0 so this PR updates the version. See:
https://github.com/software-mansion/react-native-svg/issues/2241#issuecomment-2115255421

<!-- 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-04 15:27:28 -04:00
Emily Xiong 311710e56c feat(graph): add copy button for entire target configuration (#26284)
<!-- 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 -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
<img width="540" alt="Screenshot 2024-07-03 at 5 29 12 PM"
src="https://github.com/nrwl/nx/assets/16211801/bed98c56-3bd5-4170-893b-cefe5fe292f9">

<img width="1195" alt="Screenshot 2024-07-03 at 5 29 03 PM"
src="https://github.com/nrwl/nx/assets/16211801/544a4c4e-299f-40fc-a767-215d9c758dd8">



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

Fixes #
2024-07-04 10:16:13 -04:00
MaxKless e09bad9363 fix(core): ignore errors from cleanupNativeFileCache (revert to previous behaviour) (#26806) 2024-07-04 14:59:16 +02:00
Nicholas Cunningham 295c4229db fix(node): Enable e2e test (#23508)
Re-enables e2e tests for node 

Docker changes to be merged first: https://github.com/nrwl/nx/pull/26365
2024-07-04 08:57:27 -04:00
Juri Strumpflohner 929a57c127 feat(nx-dev): update next to fix img fetchpriority error (#26766)
## Current Behavior

`fetchpriority` attribute error in Next image loading cmp. 

<img width="1260" alt="image"
src="https://github.com/nrwl/nx/assets/542458/9ba9f539-e0ad-4fe1-9a6a-64db856fd25c">

## Expected Behavior

Upgrading patch version of next fixes it.

//Edit: some context:
https://github.com/vercel/next.js/issues/65161#issuecomment-2087899325

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

Fixes #
2024-07-04 08:53:32 -04:00
Juri Strumpflohner 6ce107d6e1 fix(nx-dev): plugin-registry menu (#26767)
<!-- 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 on https://nx.dev/plugin-registry the side-bar menu doesn't open on
mobile.

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

Should obviously open. Also adjusted the top-level header menu
"Documentation" -> "Docs" (just sounds better)

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

Fixes #
2024-07-04 08:19:31 -04:00
Jason Jean 28939dd982 fix(core): always inherit output from plugins (#26797) 2024-07-03 17:04:59 -04:00
Jack Hsu 8cf96cc5b2 fix(core): register swc transpiler once per compilerOptions (#26807)
Apply the same patch for `@swc-node/register` that we did for `ts-node`.
This prevent errors during graph construction.

<!-- 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 #26798
2024-07-03 14:55:48 -04:00
Craigory Coppola 2ae57dcfbe feat(core): move target defaults back to post graph step (#26596)
<!-- 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 moved target defaults to a graph plugin around the release of Nx 18.
It never fit really perfectly, but because we wanted to apply them
before project.json / package.json configuration results which **_are_**
plugins and do make sense as a plugin it made sense at the time.

## Expected Behavior
We want to expand the behavior of target defaults in the near future to
better handle pattern matching. In doing this, we need more flexibility
in how its applied and that process will need to be aware of which
targets are going to be created by plugins. As such, we are moving it
back to being a post-step in the project configuration construction.

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

Fixes #
2024-07-03 14:50:12 -04:00
Isaac Mann 65c3e560e2 docs(core): react standalone tutorial (#26304)
Update the react standalone tutorial to start from `npm create vite --
--template=react-ts`
2024-07-03 14:34:56 -04:00
EugeneKruglei 6e84cbfac0 fix(core): cannot read properties of undefined (reading 'options') (#26721) 2024-07-03 14:10:08 -04:00
Isaac Mann 7cd35e0ca1 docs(core): sync top menu features with sidebar (#26814)
- Syncs top menu features drop down names with sidebar
- Moves Setup enterprise feature under Enterprise -> On Premise
- Collapse concepts section in CI tab
2024-07-03 14:04:58 -04:00
Isaac Mann fa3c5c42cd docs(core): vue cli tutorial (#26451)
Update the Vue standalone tutorial to start from a Vue CLI generated
project
2024-07-03 10:19:55 -04:00
Leosvel Pérez Espinosa adb81afa91 fix(js): normalize excluded paths to task inputs correctly in typescript plugin (#26801) 2024-07-03 14:26:17 +04:00
Katerina Skroumpelou 4c76b95271 fix(nx-cloud): onboarding cloud version handling (#26790)
<!-- 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-02 20:26:36 +03:00
Colum Ferry 54036397c8 fix(testing): pin cypress to 13.12.0 and re-enable skipped tests (#26751) 2024-07-02 11:46:00 -04:00
Colum Ferry 8f65944405 fix(vite): remove deprecated cache.dir from vitest generation (#26756)
<!-- 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 `cache.dir` option for `vitest` is deprecated in favour of
`config.cacheDir` which we already generate.

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

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

Fixes #
2024-07-02 16:24:00 +01:00
Jason Jean 0eed1bdf2c chore(repo): use the async api of getJestProjects (#26792)
<!-- 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 `getJestProjects` rather than `getJestProjectsAsync`

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

This repo uses `getJestProjectsAsync`

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

Fixes #
2024-07-02 09:49:46 -04:00
Jason Jean cf396f71a9 chore(repo): update nx to 19.4.0-rc.1 (#26763)
<!-- 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 `19.4.0-rc.0`

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

This repo uses Nx `19.4.0-rc.1`

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

Fixes #
2024-07-02 09:16:21 -04:00
MaxKless 86da1b5936 fix(gradle): pass process.env when running gradle (#26776) 2024-07-01 17:19:59 +02:00
Isaac Mann de68084db2 docs(core): add jonathan gelin to champions (#26779)
Adds Jonathan Gelin (@jogelin) as an Nx Champion
2024-07-01 09:43:36 -04:00
Jason Jean b2feceae4f fix(core): do not re-register ts-node twice for the same compiler opt… (#26758) 2024-06-28 16:38:22 -04:00
Caleb Ukle 22aa2d9a81 docs(nx-cloud): improve launch template docs with new image release (#26757)
- add info about `ubuntu22.04-node20.11-v9` image
- add debugging template starter
- add nvm to custom node section


https://nx-dev-git-docs-nx-agent-image-v9-nrwl.vercel.app/ci/reference/launch-templates
2024-06-28 13:17:16 -05:00
Isaac Mann 8935b18f57 docs(core): contact dpe for eu cluster (#26753)
Adds note explaining that enterprise customers need to work with their
DPE to use the EU hosted version of Nx Cloud
2024-06-28 13:30:51 -04:00
Isaac Mann 826f28fe08 docs(core): link to add plugin instructions 2024-06-28 19:09:22 +02:00
Maciej Łyskawiński 5245bedc41 fix(js): node executor now correctly kills tasks when exiting (#19219)
Previously, the node executor od @nx/js did not kill spawned processes
due to not awaiting finishing of killing and infinite loop.
This fix allows for seemless running nx in docker containers with
support for signals

<!-- 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
When killing nx running `@nx/js:node`, child processes are not killed

## Expected Behavior
Child processes should be killed
2024-06-28 12:36:40 -04:00
Jack Hsu 31989c4d1e docs(core): clean-up outdated content from docs and CNW readme (#26748)
This PR:

1. Removes the `{{getting-started}}` template string from [CNW
README.md](https://www.npmjs.com/package/create-nx-workspace), which was
removed before from generation but this file missed an update.
2. Updates docs for `run-scripts` to show `project.json` examples, not
`workspace.json` (we link to this from PDV and it's very awkward).
3. Removes unused run-script and run-commands example files from
`packages/workspace/docs`. These were moved to `packages/nx/docs` but
somehow the old files remained even though they aren't used.
4. Updates host/remotes React generators to mention `nx.json` not
`workspace.json`. The option is already renamed `--skipNxJson` but the
description does not match.

<!-- 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-06-28 11:15:44 -04:00
Jack Hsu 412dade3b7 fix(vite): infer build and serve targets when rollupOptions.input is present (#26750)
This PR adds a check for `build.rollupOptions.input` in addition to
`build.rollupOptions.inputs`. Plugins like `sveltekit()` will use the
former property, and we should infer build/server targets correctly in
those cases.

## Current Behavior
`sveltekit()` is not supported

## Expected Behavior
`sveltekit()` and other setups using `input` are supported

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

Fixes #
2024-06-28 11:15:03 -04:00
Jack Hsu e292500ef2 fix(misc): respect useInferencePlugin in nx.json when generating apps and libs (#26703)
The `@nx/vue:app` and `@nx/vue:lib` generators do not respect
`useInferencePlugins` set in `nx.json`. This PR fixes the generators.
Same for `@nx/rollup:init`.
<!-- 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-06-28 09:49:47 -04:00
Miroslav Jonaš fdd89a6fe2 fix(core): handle packageManager property with createPackageJson (#26726)
This PR was originally authored by @stephenwade. It adds the `packageManager` property to the `createPackageJson` function that ensures the generated `package.json` uses the same package manager that was used when generating it.

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

---------

Co-authored-by: Stephen Wade <stephen@stephenwade.me>
Co-authored-by: Stephen Wade <stephen.wade@avb.net>
2024-06-28 13:48:39 +02:00
Jason Jean 336d371ceb fix(testing): only add atomizer label for parent atomizer task (#26740)
<!-- 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 -->

Atomizer is shown for all split targets

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

Atomizer is shown for only the parent atomizer target.

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

Fixes #
2024-06-27 15:03:29 -07:00
Jason Jean 5364e27d68 fix(gradle): fix migrations (#26739)
<!-- 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 migrations aren't added properly.

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

Gradle migrations run

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

Fixes #
2024-06-27 17:00:16 -04:00
James Henry dcaa0867e3 fix(core): do not load transpiler when within tsx environment (#26723) 2024-06-27 16:47:28 -04:00
Jason Jean a8742539e6 chore(repo): update nx to 19.4.0-rc.0 (#26728) 2024-06-27 16:22:02 -04:00
Juri Strumpflohner 6761091182 docs(misc): move videos further down because it looks weird (#26727)
Moves the videos further down in the blog post as otherwise the blog
thumbnail and video (which has the same) follow one after the other
which looks super weird.
2024-06-27 14:45:02 -04:00
Craigory Coppola 66140faeec fix(core): prevent cmd popups from isolation (#26730)
<!-- 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
Isolation uses `fork` which can cause popups on windows

## Expected Behavior
Isolation uses `spawn` which doesn't cause popups when used with
windowsHide.

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

Fixes #
2024-06-27 14:42:40 -04:00
scottpledger f5c8eda6e1 fix(core): correctly detect Windows Bamboo agents as CI environments (#26699) 2024-06-27 14:28:31 -04:00
MaxKless 7f1e351cbb fix(graph): update atomizer metadata & pdv hint (#26733)
<!-- 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-06-27 14:28:21 -04:00
Jack Hsu c75e7ef683 fix(nextjs): fixes for convert-to-inferred (#26735)
…nferred

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

---------

Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
2024-06-27 13:58:16 -04:00
Jack Hsu d90a735540 feat(core): add --help content to project details view (#26629)
This PR adds help text for each inferred target that provides
`metadata.help.command`. To pass options/args to the target, users are
directed to open `project.json` and copy the values from `--help` output
into `options` property of the target.

To display the options help section, the inferred target must provide
metadata as follows:

```json5
 metadata: {
      help: {
        command: `foo --help`
        example: {
          options: {
            bar: true
          },
        },
      },
    },
```

The `help.command` value will be used to retrieve help text for the
underlying CLI (e.g. `jest --help`). The `help.example` property
contains sample options and args that users can add to their
`project.json` file -- currently rendered in the hover tooltip of
`project.json` hint text.

---

Example with `vite build --help`:

<img width="1257" alt="Screenshot 2024-06-21 at 3 06 21 PM"
src="https://github.com/nrwl/nx/assets/53559/b94cdcde-80da-4fa5-9f93-11af7fbcaf27">


Result of clicking `Run`:
<img width="1257" alt="Screenshot 2024-06-21 at 3 06 24 PM"
src="https://github.com/nrwl/nx/assets/53559/6803a5a8-9bbd-4510-b9ff-fa895a5b3402">

`project.json` tooltip hint:
<img width="1392" alt="Screenshot 2024-06-25 at 12 44 02 PM"
src="https://github.com/nrwl/nx/assets/53559/565002ae-7993-4dda-ac5d-4b685710f65e">
2024-06-27 13:33:35 -04:00
Uzhanin Egor df83dd4c6e feat(core): added the ability to split command property into an array in nx:run-commands executor (#20201)
<!-- 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

In projects, you can often find teams that are too long. Example here:

```json
 "run:dev": {
    "executor": "nx:run-commands",
    "options": {
      "command": "docker compose -f .docker/compose/docker-compose.services.yml -f .docker/compose/docker-compose.dev.yml --project-directory . up -d"
    },
    "dependsOn": ["update:dev"]
  }
```
## Expected Behavior

Implemented splitting of the 'command' parameter, added the ability to
pass it as an array to avoid such *huge* strings:

```json
"run:dev": {
    "executor": "nx:run-commands",
    "options": {
      "command": [
	"docker compose -f",
        ".docker/compose/docker-compose.services.yml -f",
	".docker/compose/docker-compose.dev.yml",
	"--project-directory . up -d"
      ]
    },
    "dependsOn": ["update:dev"]
  },
```
Added a couple of tests and changed schema.json to 'run-commands'
executor.
2024-06-27 12:47:27 -04:00
Emily Xiong 412a450dae fix(expo): should support app.config.ts (#26713)
<!-- 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 https://github.com/nrwl/nx/issues/26467
2024-06-27 12:37:22 -04:00
Colum Ferry 2a803158ef chore(testing): disable cypress test (#26734)
<!-- 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-06-27 12:10:50 -04:00
Emily Xiong 5e022951da fix(graph): fix empty target group (#26704)
<!-- 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 -->
![Screenshot 2024-06-26 at 2 56
04 PM](https://github.com/nrwl/nx/assets/16211801/d9cc93db-06a2-4c30-b88a-3054edfb619a)

when the others group are empty, it shows the container.
move the check to
graph/ui-project-details/src/lib/target-configuration-details-group-container/target-configuration-details-group-container.tsx.

## 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-06-27 11:51:43 -04:00
Nicholas Cunningham 4197a91845 feat(nextjs): Add convert-to-inferred generator (#26706)
This PR enables the ability to migrate project(s) from using nextjs
executors to inferred targets.

---------

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-06-27 11:21:35 -04:00
Miroslav Jonaš 7f8bb4ba1f fix(linter): dependency checks should respect pnpm workspace versions (#26709)
<!-- 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 #26707
2024-06-27 17:19:35 +02:00
Colum Ferry 5843068d3b fix(vue): application generator should use normalized app name #26605 (#26729)
<!-- 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 `vue` app generator is not using the normalized name produced by
`projectRootAndFormat` util when creating the application.
This leads to errors in some cases.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Use the `projectName` produced by the value to create the project
correctly.

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

Fixes #26605
2024-06-27 15:48:37 +01:00
Altan Stalker 544eff02b4 fix(nx-cloud): do not use bff api for onboarding (#26712)
## Current Behavior
CLI uses BFF

## Expected Behavior
CLI should not use BFF
2024-06-27 10:41:40 -04:00
Katerina Skroumpelou 88efb216a2 fix(misc): restrict countries not supported by OpenAI (#26725)
Restrict countries that are not supported by OpenAI APIs:
https://platform.openai.com/docs/supported-countries


![Screenshot 2024-06-27 at 3 58
47 PM](https://github.com/nrwl/nx/assets/6603745/54a82c41-57b3-408e-a79e-c5907d8de193)
2024-06-27 17:11:26 +03:00
MaxKless 0cefa29eca fix(core): add windowsHide for depencies-and-lockfile plugin with bun (#26718)
## Current Behavior
Using bun as a package manager on windows causes cmd windows to pop up
when the project graph is computed.

## Expected Behavior
We shouldn't see any windows pop up.

## Related Issue(s)

Fixes https://github.com/nrwl/nx-console/issues/2149
2024-06-27 14:18:27 +02:00
Miroslav Jonaš acddf894a4 fix(core): fix create package json root parsing (#26717)
<!-- 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-06-27 12:12:28 +02:00
Katerina Skroumpelou 9aca5f30f2 fix(nuxt): api template typo (#26719)
Typo in the `nuxt` server api template.
2024-06-27 12:43:34 +03:00
Jason Jean c2c6a13514 fix(core): do not create projects twice from package.json (#26700)
<!-- 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 -->

NPM scripts show up twice in the project details view.


![image](https://github.com/nrwl/nx/assets/8104246/98c55a03-7e71-430f-9fc3-de91ce180e26)


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

NPM scripts only show up once in the project details view.


![image](https://github.com/nrwl/nx/assets/8104246/27787794-a8ef-40be-b00a-c9b1d26182f2)


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

Fixes #
2024-06-26 17:31:49 -04:00
Craigory Coppola a0e8f83672 fix(core): move plugin worker to socket (#26558)
<!-- 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 isolation communicates with workers via built-in node IPC with
forked processes. When doing this, the parent process will not exit
until the child process has exited, in case more messages would be sent.
This requires an explicit call to shut down the plugin workers.

We set this up as a `process.on('exit')` listener, to shutdown the
workers whenever the main Nx process dies. This is "fine", but requires
explicit calls to `process.exit` as node won't exit on its own
otherwise.

## Expected Behavior
To allow plugin workers to clean themselves up on exit, but not require
explicit `process.exit` calls, we need to detach them from the main
process and call `unref`. This only works when IPC is not being used. As
such, we need a different way to communicate with the worker.

This PR updates the communication method to mirror the daemon, and
communicate over a socket. Additionally, this PR enables isolation
during the Nx repo's E2E tests.

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

Fixes #
2024-06-26 17:31:10 -04:00
Ilya Zyablitsev 24cc86b96f docs(core): update @nxext/ionic-* plugins github link (#26705)
<!-- 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
wrong link to @nxext/ionic-angular and @nxext/ionic-react plugins in
plugins registry

## Expected Behavior
correct link to @nxext/ionic-angular and @nxext/ionic-react plugins in
plugins registry

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

Fixes #
2024-06-26 16:56:10 -04:00
dfr-exnaton 0ca7df7495 feat(nextjs): add experimental-build-mode option to support compile only (#26465)
## Current Behavior

The nextjs build executor does not support all build flags such as
`--experimental-build-mode` (see
https://nextjs.org/docs/app/api-reference/next-cli#build).

## Expected Behavior

For certain deployment models (e.g. mult-environment builds), it is
helpful to only compile but not generate pages at build time. See
https://github.com/vercel/next.js/discussions/46544 for a discussion.

---------

Co-authored-by: Emily Xiong <xiongemi@gmail.com>
Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>
2024-06-26 14:54:49 -06:00
Jack Hsu 86412cb99a fix(webpack): add comment to explain useLegacyNxPlugin and how to remove it (#26696)
This PR adds a comment when `useLegacyNxPlugin` is used so users know
what it is, and how they can remove it.

<!-- 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-06-26 14:44:21 -04:00
Jack Hsu 04bb1f7cd9 docs(core): add troubelshooting guide for convert-to-inferred migrations (#26630)
<!-- 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-06-26 14:15:09 -04:00
Katerina Skroumpelou 92be32c1a8 feat(nx-cloud): unhide new onboarding flow 2024-06-26 07:50:30 -07:00
Katerina Skroumpelou d928558bc4 feat(nx-cloud): updates to the new onboarding flow 2024-06-26 07:50:30 -07:00
Emily Xiong 88fd03be3b fix(core): expand env variables on load and unload (#26459)
This pr is meant to replace https://github.com/nrwl/nx/pull/22585 and
https://github.com/nrwl/nx/pull/20524

Env variables using other variables were not unloaded from the
environment and further customizations were impossible in more specific
env files.

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

## 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 https://github.com/nrwl/nx/issues/23581

Co-authored-by: Mateo Tibaquira <nestormateo@gmail.com>
2024-06-26 10:19:57 -04:00
Leosvel Pérez Espinosa 7ba49ffc41 fix(linter): handle eslint flat config path correctly in lint executor (#26687)
<!-- 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 #26424
Fixes #26586 
Fixes #26532
2024-06-26 10:19:35 -04:00
MaxKless 6528da3bd8 feat(graph): add atomizer label to target groups (#26622)
## Current Behavior
Atomized Groups are treated just like any other groups in the PDV

## Expected Behavior
We want to let people know that something was created by the Atomizer
and also surface more information to users.
2024-06-26 10:17:59 -04:00
Colum Ferry ce3f7f4ed8 fix(module-federation): dynamic remotes external to workspace should be skipped correctly #26551 (#26692)
<!-- 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 -->
Module Federation utils were not checking if the remotes defined
dynamically in the `module-federation.manifest.json` were in the project
graph.



## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Check that the dynamic remotes exist in the project graph before trying
to do work with them

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

Fixes #26551
2024-06-26 10:09:17 -04:00
Leosvel Pérez Espinosa d3383caad3 fix(testing): accept a numeric value for the playwright executor's workers option (#26689)
<!-- 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 #26437
2024-06-26 10:08:39 -04:00
Jack Hsu c24c20e990 fix(linter): ensure that @nx/eslint-plugin is installed when we add an extracted base eslintrc file (#26679)
The current eslint logic doesn't add the necessary `@nx/eslint-plugin`
package when we extract root config. This PR fixes the issue. This
applies to projects not generated using CNW but rather using something
like `npm create vite`, where the eslint setup isn't what we expect.

<!-- 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-06-26 12:38:31 +02:00
Colum Ferry 81dced7252 fix(angular): migration of browserTarget to buildTarget should handle empty config #26681 (#26690)
<!-- 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 migration from `browserTarget` to `buildTarget` assumed config would
not be undefined.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The migration should check if config is undefined

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

Fixes #26681
2024-06-26 10:12:24 +01:00
Leosvel Pérez Espinosa a871643b37 fix(angular): allow usages of ecmascript decorators in ng-packagr executors (#26691)
<!-- 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 #26448
2024-06-26 09:06:08 +00:00
Josh Kim 93b3e2142c fix(module-federation): module-federation-dev-server hang caused by child process exiting too early (#26684) (#26685)
<!-- 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
See #26684 

## Expected Behavior
See #26684

Fixes #26684 

---

This fix is targeted at NX 19. For a backport to NX 18, a small, trivial
change is necessary. I will file another PR targeting NX 18.

---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2024-06-26 10:04:55 +01:00
Thomas Dekiere 1e41672e6a fix(remix): don't add @remix-run/eslint-config dependency to new remix apps (#26568)
<!-- 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 a new remix app is generated with @nx/remix, it can't be installed
due to peer dependencies that are introduced by
@remix-run/eslint-config. This dependency though is not used in the nx
workspace and has also been removed from the official create-remix
method.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Running `npm install` should not throw errors after a remix application
was added to the nx workspace.

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

Fixes #26540
2024-06-26 09:40:45 +01:00
James Henry 3a2e8d45f5 feat(release): allow disabling GitHub username matching in default changelog renderer (#26672) 2024-06-25 13:46:15 -04:00
Colum Ferry b42b6f7dbe fix(vite): incremental builds tmp tsconfig should have baseUrl set to workspace root (#26680)
<!-- 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 nxViteTsPaths resolves the tmp tsconfig we create for the buildable
libs, it uses the absoluteBaseUrl of the tsconfig to when creating the
ESM matcher for resolving files.
There is no baseUrl set, therefore the absoluteBaseUrl becomes the
directory of the tmp tsconfig
This means the paths to the built artifacts are incorrect


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Use the workspace root, which lines up with the output locations for
built artifacts, for the baseUrl for the tmp tsconfig


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

Fixes #
2024-06-25 18:15:23 +01:00
James Henry d356f61192 fix(release): skip dependents of projects without changes in conventional commits (#26671) 2024-06-25 12:56:23 -04:00
Colum Ferry e04b5761de fix(vite): setup-paths-plugin should only register import once (#26678)
<!-- 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:setup-paths-plugin` generator is adding the import
multiple times


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The `@nx/vite:setup-paths-plugin` should only add the import when it
does not exist

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

Fixes #
2024-06-25 17:33:46 +01:00
Emily Xiong 6ebf676b5e fix(graph): fix search params reload when back to graph (#26580)
<!-- 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 -->
- change useIntervalWhen
- when this function is used, it is mostly calling a fetch request,
change it to take an async function
- wait for the current fetch request to finish before firing the next
one
  - change the name to usePoll
- currently, when going back to graph, it needs to remove the search
params expand and sometimes need to add ?project= search params
- delete expand search params is called after adding the project search
params
  
```

 setSearchParams(
        (currentSearchParams) => {
          currentSearchParams.delete('expanded');
          return currentSearchParams;
        },
        { replace: true, preventScrollReset: true }
      );

```


this function does not contain the ?project= search param key, caused
the graph page to reload twice
- change the function useRouteConstructor to delete the search params
`expanded` there


## 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-06-25 10:05:05 -04:00
Leosvel Pérez Espinosa 89fbde996f fix(bundling): register plugin correctly in rollup migration generator (#26673)
<!-- 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-06-25 15:53:38 +02:00
Leosvel Pérez Espinosa c936f864b8 fix(misc): register plugins correctly in migration generators (#26670)
<!-- 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 NXP-816 -->

Fixes #
2024-06-25 08:33:24 -04:00
Leosvel Pérez Espinosa 8872ca5c8f fix(angular): fix chalk import and correctly skip invalid projects in ng-add generator (#26667)
<!-- 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 #26654
2024-06-25 10:37:31 +02:00
Leosvel Pérez Espinosa 47dfdcfc6b feat(webpack): add convert-to-inferred generator (#26621)
<!-- 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 #

---------

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-06-24 21:13:24 -04:00
Jason Jean a3322f76ef fix(bundling): use vite createNodes v2 for add plugin (#26662)
<!-- 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 -->

vite createNodesV1 is used during init

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

vite createNodesV2 is used during init

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

Fixes #
2024-06-24 13:33:12 -07:00
Emily Xiong 0e7e4690f2 feat(gradle): support composite build (#25990)
<!-- 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 -->

## Expected Behavior
![Workspace Project Graph
(2)](https://github.com/nrwl/nx/assets/16211801/9776a642-16c6-45ee-a253-cfc4b86a12a8)



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

Fixes #
2024-06-24 16:05:32 -04:00
Craigory Coppola 3b2c42a8a5 fix(core): isolated plugins should provide cleanup function (#26657)
<!-- 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
- Isolated plugins return no-op cleanup function.

## Expected Behavior
- Isolated plugins cleanup fn shuts them down.

## Related Issue(s)
In #26625 we are starting to reload plugins when their configurations
change. This makes sense, but means we should actually shutdown + reload
workers.

Fixes #
2024-06-24 15:22:31 -04:00
Jason Jean cb4cff7251 fix(core): pick up changes to plugins configuration in daemon (#26625)
<!-- 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 previous set of plugins are reused even when the plugins
configuration change (plugins are added/removed or have their options
changed).

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

Plugins are cleaned up and reloaded when the plugins configuration
change.

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

Fixes #
2024-06-24 14:06:28 -04:00
Jack Hsu 8e4db82709 fix(bundling): rename aliases for @nx/rollup:convert-to-inferred generator (#26659)
If you use `entryFile`, `f`, or `exports` in `project.json`, these
fields do not migrate correctly to `rollup.config.js`.

<!-- 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-06-24 13:50:18 -04:00
MaxKless dece9afc0d feat(core): add lifecycle to record task history & retrieve via daemon (#26593)
<!-- 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-06-24 10:22:15 -04:00
Colum Ferry 65e0cb90de fix(storybook): output should match CLI flag (#26652)
<!-- 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 -->
Output option is not renamed to match CLI flag

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Output option shuold be renamed to match CLI flag

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

Fixes #
2024-06-24 14:25:30 +01:00
MaxKless 8efe26c99a fix(core): repair sourcemaps that had file & plugin swapped (#26628) 2024-06-24 07:19:00 +00:00
Nicholas Cunningham 963f753ae8 fix(webpack): skip useLegacyNxPlugin during graph creation (#26626) 2024-06-21 11:14:12 -06:00
Colum Ferry f8ffc05e8d fix(bundling): convert to inferred should handle config file (#26619)
<!-- 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-06-21 11:32:04 -04:00
Leosvel Pérez Espinosa f66ac74b64 fix(webpack): handle nullable plugin options (#26624)
<!-- 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-06-21 17:06:48 +02:00
Colum Ferry b1713be2c3 feat(remix): add convert-to-inferred generator (#26601)
- feat(remix): add convert-to-inferred migration
- feat(remix): add serve executor logic

<!-- 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-06-21 11:01:53 -04:00
Juri efd0994ee6 docs(nx-dev): update monorepo world links 2024-06-21 15:17:14 +02:00
Colum Ferry 18fdd9425b feat(storybook): add convert-to-inferred generator (#26595)
- feat(storybook): add convert-to-inferred generator
- feat(storybook): add post target transformers
- feat(storybook): convert-to-inferred handles kebab case flags

<!-- 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-06-21 09:01:30 -04:00
Nicholas Cunningham b1dbf47aa2 feat(webpack): add convertConfigToWebpackPlugin (#26516)
This PR introduces functionality for users who currently use the
`withNx` and `withReact` plugins in their webpack configuration to
migrate to the `NxAppWebpackPlugin`.

The `nxUseLegacyPlugin` wraps the legacy style function so that it
continues to work with the standardized generated webpack config.

By implementing this change, the aim is to provide a consistent method
for users opting to transition to inferred targets. This ensures a
smoother migration process, offering better integration and reducing
potential configuration complexities.
2024-06-21 08:55:23 -04:00
Isaac Mann 1d1c699c81 docs(core): small tutorial updates (#26559)
Update the npm workspaces, react monorepo and angular monorepo tutorials
2024-06-21 07:40:14 -04:00
Isaac Mann 5b44085c81 docs(core): remove tasksRunnerOptions (#26615)
Remove the tasksRunnerOptions section in the nx.json docs
2024-06-21 07:40:05 -04:00
James Henry 472459d9f5 chore(repo): allow e2e workflows to publish relative versions (#26609) 2024-06-21 00:11:35 +04:00
Caleb Ukle 7699b33ea1 fix(nx-dev): allow linking to headers that are code wrapped (#26608)
before if a header that was using `code` in the title (i.e. launch
template) the header should so the link icon but would not link anywhere
because the rendered id tag would be an empty string

![empty id tag for
headers](https://github.com/nrwl/nx/assets/23272162/6ee2aa5f-7b1f-4a98-ad11-2e088dd5c36d)

after the id tag is correctly linked by checking the rendering children
contains a `code` tag and pulls the code children out.

added benefit includes the code headers being linked in the side nav
correct too

![side by side diff with
changes](https://github.com/nrwl/nx/assets/23272162/c4f7a166-44fa-4541-ae72-d095962bee5b)



Example showing working from preview:
https://nx-dev-git-docs-allow-linking-code-headers-nrwl.vercel.app/ci/reference/launch-templates#launchtemplatestemplatenameinitsteps
2024-06-20 13:00:26 -05:00
Jack Hsu 86954ae96b fix(misc): rename @nrwl/* to @nx/* in init generator descriptions (#26610)
We forgot to rename these in the init generator descriptions. This
affects tutorials since we've been including the terminal output with
the wrong scope.


## 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-06-20 13:08:39 -04:00
Juri bb3658a809 docs(misc): adjust blog urls 2024-06-19 22:21:01 +02:00
Leosvel Pérez Espinosa c15ac1b9ca fix(testing): handle different jest config files in configurations when migrating to inferred (#26591)
<!-- 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-06-19 09:14:28 +02:00
Emily Xiong 5646b38c99 feat(expo): add to project package.json for install command (#26500)
<!-- 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 -->

## 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 https://github.com/nrwl/nx/issues/22393
2024-06-18 21:09:04 -04:00
Emily Xiong fe30d02109 fix(expo): fix expo start windows (#26493)
<!-- 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 -->
- interactive command does not work on windows, use executor instead

## 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 https://github.com/nrwl/nx/issues/24138
2024-06-18 21:08:04 -04:00
Leosvel Pérez Espinosa 95a6e6864d feat(webpack): add createNodesV2 for plugin (#26588)
<!-- 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 implementation for `createNodesV2`.

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

There should be an implementation for `createNodesV2`.

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

Fixes #
2024-06-18 15:06:08 +02:00
Leosvel Pérez Espinosa df3c7522ea feat(testing): add convert-to-inferred migration generator for jest (#26259)
<!-- 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 -->

## 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-06-18 05:59:30 -07:00
Tycho Bokdam e5d7805d4b chore(core): nx plugin submissions @nx-extend/docusaurus (#26578) 2024-06-17 12:51:09 -04:00
Jack Hsu 09a08c6cef fix(graph): improve layout when target groups are empty or there are no groups (#26555)
This PR fixes empty target groups and adds consistency between grouped
and ungrouped targets.

## Before

Empty groups have bad empty state -- we should not show it. The
ungrouped targets being on their own without a group is also
inconsistent.

<img width="1153" alt="Screenshot 2024-06-14 at 9 46 11 AM"
src="https://github.com/nrwl/nx/assets/53559/b6e96187-fc6f-4c3f-9b45-39744d02b0ec">

## After

If group is empty, don't render it. Also, if there are no groups then
don't nest the ungrouped targets.

<img width="1190" alt="Screenshot 2024-06-14 at 9 46 29 AM"
src="https://github.com/nrwl/nx/assets/53559/76cd0b32-532b-470d-ad2f-85fc3aaf3997">

If there are groups, put the ungrouped targets into `Others`.

<img width="1152" alt="Screenshot 2024-06-14 at 9 45 55 AM"
src="https://github.com/nrwl/nx/assets/53559/465e64c7-e376-4555-b580-d6ecaafb61f5">
2024-06-17 09:28:58 -07:00
Leosvel Pérez Espinosa 59ab43ab79 fix(core): merge args and options in nx:run-commands executor (#26573)
<!-- 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 a target using `nx:run-commands` has the `args` option set, the
rest of the options are completely ignored and not forwarded to the
command.

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

When a target using `nx:run-commands` has the `args` option set, the
rest of the options that don't match any of the options set in `args`
and are not specific to the executor should be forwarded to the command.

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

Fixes #
2024-06-17 16:35:17 +02:00
Colum Ferry 44565262a6 fix(vite): nxViteTsPaths plugin should not run-many for vitest (#26574)
<!-- 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 -->
`nxViteTsPaths` does not check if the mode is test and only filters the
`run-many` command based on whether Vite's config.command === serve.

Vitest will set `config.command` to serve, even for `test` targets.
It does set `mode = test` however.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
When `mode === test`, we do not invoke `nx run-many`

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

Fixes #
2024-06-17 06:52:28 -07:00
Nicholas Cunningham c467129758 fix(nest): Add missing props (#26534)
Add missing props back to the schema so that they can be
defaulted/overwritten.


closes: #26384
2024-06-17 06:23:11 -07:00
Pavlo Grosse 15b7e9f079 feat(angular): add helper function to devkit to add viewProviders to a component (#26526)
## Current Behavior

Angular Nx utils have `addProviderToComponent` function to add a
provider to an Angular component, but are missing a function to add
viewProviders.

## Expected Behavior

There should be a function like `addProviderToComponent` to add view
providers to a component.

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2024-06-17 10:51:49 +02:00
Craigory Coppola f431d0a6a1 feat(core): allow defining target with only dependsOn (#26545)
<!-- 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
You must specify either `executor` or `command`, otherwise the target is
removed.

## Expected Behavior
If a target specifies `dependsOn` it is not removed.

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

Fixes #
2024-06-14 16:49:09 -04:00
Callum Silcock df2ff2ded2 docs(misc): add .nx/workspace-data to .gitignore in manual setup (#26520)
folder is created during install but is not required to be committed

feel free to close if not required

resolves #26519

---------

Co-authored-by: Isaac Mann <isaacplmann@gmail.com>
2024-06-14 16:38:41 -04:00
Colum Ferry b36c39e331 feat(vite): add convert-to-inferred migration generator (#26249)
- feat(vite): add convert-to-inferred generator for migrating to
inference
- feat(vite): add build postTargetTransformer
- feat(vite): add serve, preview, test postTargetTransformer
- feat(vite): convert-to-inferred should clean up inputs and outputs
- docs(vite): add convert-to-inferred
- feat(vite): update outDir correctly

<!-- 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 -->
There is currently no generator that can migrate projects that use
`@nx/vite:*` executors to use Inference plugins.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Add `@nx/vite:convert-to-inferred` generator

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

Fixes #

---------

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-06-14 14:53:25 -04:00
Emily Xiong e9b7439ce2 feat(graph): add description and tags to details page (#26252)
<!-- 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 -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
<img width="1155" alt="Screenshot 2024-05-29 at 5 47 20 PM"
src="https://github.com/nrwl/nx/assets/16211801/025f08d5-52cf-4087-94a5-e3319c89f8b1">
<img width="1127" alt="Screenshot 2024-05-29 at 5 47 04 PM"
src="https://github.com/nrwl/nx/assets/16211801/ff19514d-2513-4b13-ac9c-4b124ac0ce4a">
<img width="387" alt="Screenshot 2024-06-04 at 11 56 54 PM"
src="https://github.com/nrwl/nx/assets/16211801/ea2f0c47-a444-4be8-9ccd-60fd2b534e12">



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

Fixes #
2024-06-14 14:27:14 -04:00
James Henry b61546fc1a chore(repo): remove pnpm cache from data step, improve messages (#26552) 2024-06-14 08:14:45 -04:00
James Henry 42749b8225 chore(repo): refactor publish.yml for PR releases (#26550)
Redo of #26509, with more guards for unexpected missing/relative values
within full releases in GitHub Actions.

---

Refactors our publish workflow to support PR releases, in addition to
our previous triggers.

**Tests:**

---

- Example of failure on non-PR release (comment skipped):
https://github.com/nrwl/nx/actions/runs/9480869812

---

- Example of failure on PR release (comment created on PR):
  - https://github.com/nrwl/nx/actions/runs/9480852880
  - https://github.com/nrwl/nx/pull/26515#issuecomment-2162646682

---

- Example of dry-run of full release (`workflow_dispatch` with no PR
number provided): https://github.com/nrwl/nx/actions/runs/9497871483

---

- Real PR release created here:

| Release details | 📑 |
  | ------------- | ------------- |
| **Published version** |
[0.0.0-pr-26515-856ef7f](https://www.npmjs.com/package/nx/v/0.0.0-pr-26515-856ef7f)
|
  | **Triggered by** | @JamesHenry |
| **Branch** |
[JamesHenry-patch-1](https://github.com/nrwl/nx/tree/JamesHenry-patch-1)
|
| **Commit** |
[856ef7f](https://github.com/nrwl/nx/commit/856ef7f353ec173d6e1dcdaa286147f4784d72ab)
|
| **Workflow run** |
[9497298216](https://github.com/nrwl/nx/actions/runs/9497298216) |

---------

Co-authored-by: Katerina Skroumpelou <sk.katherine@gmail.com>
2024-06-14 07:07:06 -04:00
Leosvel Pérez Espinosa e22021da4e feat(angular): update ngrx packages to v18 (#26549)
<!-- 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 -->

## 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 NXP-747 -->

Fixes #
2024-06-14 06:43:20 -04:00
Jack Hsu fbd7f80bc9 fix(bundling): set project type correct for buildable vite projects (#26420)
<!-- 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` -->

This PR:

1. fixes `@nx/vite/plugin` so that it infers the correct `projectType`
2. changes the default `package-json-workspaces` plugin such that
`projectType` is not inferred is `appsDir` and `libsDir` are not set
3. Update PDV to look for the normalized `type` property on projects if
`projectType` is missing (due to no longer being inferred by any
plugin).

## 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-06-13 15:48:07 -04:00
Jason Jean 73c8c3343d Revert publish (#26544)
<!-- 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 below commit caused the publish pipeline to publish a `minor`
version when it should have been a `next` version.

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

This reverts commit
https://github.com/nrwl/nx/commit/3750366ebc5a714912a85bfc0bae4724739847b2.

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

Fixes #
2024-06-13 14:27:36 -04:00
Jack Hsu 8804f12450 feat(bundling): add convert-to-inferred generator for @nx/rollup (#26280)
This PR adds `@nx/rollup:convert-to-inferred` generator.


## 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-06-13 13:52:55 -04:00
Colum Ferry 364198f03e feat(devkit): add aggregateLog util for executor to plugin migration (#26523)
<!-- 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 -->
There is no way to aggregate logs and output at the end of execution for
the executor to plugin migrations

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
There should be a way to aggregate logs and output them at the end of
execution

Usage:
```ts
// Call with the executorName that is being migrated
// Make sure the log itself does not contain dynamic values
// Add the project root that is being migrated

aggregateLog({executorName: '@nx/vite:build', project: projectRoot, log: 'Encountered X in project.json. Do Y to handle this manually.'})

// Then in GeneratorCallback run a task
return () => { flushLogs() };
```

Example Output

![image](https://github.com/nrwl/nx/assets/12140467/9a36c855-7377-4ad5-946c-c50202d9b50c)


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

Fixes #
2024-06-13 19:31:20 +02:00
James Henry 92c94d8212 chore(repo): tweak publish.yml wording (#26542) 2024-06-13 11:47:00 -04:00
Leosvel Pérez Espinosa 6cf0dbdf22 fix(core): generate npm lockfile with correct hoisted dependencies (#26539)
Failing new test case covering the broken scenario:
https://staging.nx.app/runs/s0YaQGUVgq/task/nx%3Atest

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

## 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 #22386
2024-06-13 16:28:48 +02:00
James Henry 3750366ebc chore(repo): refactor publish.yml for PR releases (#26509) 2024-06-13 09:28:43 -04:00
Jack Hsu c86de97b12 fix(core): convert-to-monorepo support for root project without project.json (#26507)
This PR fixes `convert-to-monorepo` generator, so it works after `nx
init` on a single project.

## Current Behavior

If you use :

```
npm create vite react-app -- --template=react-ts
cd react-app
npx nx init
```

Then, you'll get an error when running `nx g convert-to-monorepo`.

```
 NX   The following projects are defined in multiple locations:

- react-app:
  - .
  - packages/react-app

To fix this, set a unique name for each project in a project.json inside the project's root. If the project does not currently have a project.json, you can create one that contains only a name.

MultipleProjectsWithSameNameError: The following projects are defined in multiple locations:
- react-app:
  - .
  - packages/react-app
  - 
```

## Expected Behavior
The generator should work, and you can run commands successfully
afterwards (e.g. `nx serve react-app`).

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

Fixes #
2024-06-12 18:24:32 -04:00
Colum Ferry 07fa8a6ffa feat(vite): add createNodesV2 function (#26484)
- chore(vite): move single file processing of plugin to own function
- feat(vite): add CreateNodesV2 function

<!-- 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 -->
There is no implementation for createNodesV2


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
There should be an implementation for createNodesV2

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

Fixes #
2024-06-12 18:20:03 -04:00
Leosvel Pérez Espinosa bcac55178f cleanup(linter): batch globbing to improve @nx/eslint/plugin perf (#26475)
Below are the benchmark results running the changes in the Nx repo:

**No cache**:
Command: `NX_DAEMON=false NX_CACHE_PROJECT_GRAPH=false
NX_PERF_LOGGING=true NX_ISOLATE_PLUGINS=true pnpm nx graph --no-open`
Current: **1780ms**
After the changes: **1089ms**
**~39%** less time
**~1.6x** faster

**Full cache**:
Command: `NX_DAEMON=false NX_PERF_LOGGING=true NX_ISOLATE_PLUGINS=true
pnpm nx graph --no-open`
Current: **1527ms**
After the changes: **377ms**
**~75%** less time
**~4x** faster

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

## 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-06-12 18:18:04 -04:00
Emily Xiong c02eeac7c2 feat(core): extend option readyWhen to accept multiple strings (#26426)
<!-- 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 -->
this pr is meant to replace https://github.com/nrwl/nx/pull/17310
Option readyWhen for nx:run-commands only accepts a single string.

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

Option readyWhen for nx:run-commands accepts either a single string or
an array of strings. In case the provided value is an array of strings,
we will wait until all strings have appeared in stdout or stderr.

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

Fixes #

Co-authored-by: Karel Frederix <karelfrederix@gmail.com>
2024-06-12 16:40:34 -04:00
Leosvel Pérez Espinosa 783bfe61aa fix(testing): add the preset from the jest config to the inferred task inputs (#26511)
<!-- 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 -->

## 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-06-12 16:16:44 -04:00
Jason Jean a8efe596e8 fix(js): fix typescript resolution for packages with different resolv… (#26533)
…ed package.json

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

When a package such as `@json2csv/plainjs` reroute their `package.json`
(maybe unintentionally) to an invalid `package.json`, the dependency
location logic fails.

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

When a package such as `@json2csv/plainjs` reroute their `package.json`
(maybe unintentionally) to an invalid `package.json`, the dependency
location logic traverses up to the right `package.json`.

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

Fixes #
2024-06-12 15:29:36 -04:00
Isaac Mann 508fd862c6 chore(nx-dev): skip website publish for older minor versions (#26272)
Update the website publish flow to not publish if the current minor is
not the latest version.
Moves the logic into a node script
2024-06-12 15:14:17 -04:00
James Henry 2ba4cf23f6 fix(release): ensure given preid modifies conventional commits specifier (#26524) 2024-06-12 14:23:49 -04:00
Craigory Coppola 5d56e21163 fix(core): read project name from package json if not set in project json (#26386)
<!-- 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
If `project.json` exists without a name, we infer one based on the root
path. This can be confusing when there exists a `package.json` alongside
it that contains a name which doesn't match our inferred name.

## Expected Behavior
If `project.json` and `package.json` both exist, the name from
`package.json` will be used if `project.json` contains no name.

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

Fixes #26347
2024-06-12 11:18:29 -04:00
Emily Xiong 471f82c991 fix(js): remove default port for verdaccio (#26502)
<!-- 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 -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
- remove default port for verdaccio so it can take port from config file

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

Fixes https://github.com/nrwl/nx/issues/23007
2024-06-12 10:06:49 -04:00
Jack Hsu 4a5eb23302 fix(bundling): vite init generator supports updating vite projects to use workspace libraries (#26503)
This PR adds a `@nx/vite:setup-paths-plugin` generator to add
`nxViteTsPaths` plugin to all vite config files in the workspace. This
can also be used with init/add as follows:

```shell
nx add @nx/vite --setupPathsPlugin
nx g @nx/vite:init --setupPathsPlugin
```

Which takes a config such as:

```ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

export default defineConfig({
  plugins: [react()],
})
```

And updates it to:

```ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';

export default defineConfig({
  plugins: [react(), nxViteTsPaths()],
})
```

Taking into account ESM (default) and CJS (deprecated).

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

## 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-06-11 16:55:58 -04:00
Leosvel Pérez Espinosa 0a4551c2f3 fix(linter): update eslint config lookup to correctly handle configs at the root (#26508) 2024-06-11 16:27:24 +02:00
Miguel 0018842424 fix(js): filter project dependencies when calculating topological ordering (#26491) 2024-06-11 18:04:09 +04:00
Nicholas Cunningham b9b89b2575 feat(nx-dev): Use app router for blogs (#23127)
The PR activates the app router for the Blog page at /blog. 

Its purpose is to test Next.js changes within nx-dev, allowing us to
identify and address any issues that users might encounter.
Integrating these changes into our environment, we can gain firsthand
experience and insights into potential problems, ensuring that the
updates are robust and reliable.

This approach helps us improve the overall quality and user experience
of our platform by proactively identifying and resolving any issues that
could affect consumers.
2024-06-11 09:28:29 -04:00
Katerina Skroumpelou 8351cb11f3 fix(core): remove devDependencies in production build (#21428) 2024-06-11 09:15:05 +00:00
Craigory Coppola 16008751ec fix(core): don't infer scripts as targets if sibling project json declares them (#26464)
<!-- 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
Inferring some scripts during package-json-workspaces causes some
thrashing

## Expected Behavior

We only infer a script as a target if its not in project.json

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

Fixes #

---------

Co-authored-by: “JamesHenry” <james@henry.sc>
2024-06-10 18:19:38 -04:00
James Henry 3689c8881b fix(release): ensure git add related commands run from root (#26497) 2024-06-10 22:43:06 +04:00
James Henry 29af58f290 fix(release): false positive npm dist-tag add (#26496) 2024-06-10 22:18:28 +04:00
James Henry b54f5c3648 Revert "fix(release): false positive npm dist-tag add" (#26495)
Reverts nrwl/nx#26494
2024-06-10 21:14:40 +04:00
James Henry c764a62060 fix(release): false positive npm dist-tag add (#26494) 2024-06-10 21:13:51 +04:00
Colum Ferry 0327559ca4 fix(vite): ensure typecheck is using correct tsconfig #21844 (#26447)
<!-- 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 -->
When running typecheck, we use the provided tsconfig or find the
projects tsconfig.
This doesn't take into consideration the buildLibsFromSource which
creates a tmp tsconfig to map buildable libraries.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Ensure the correct tsconfig is used when running typecheck

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

Fixes #21844
2024-06-10 12:56:19 -04:00
Isaac Mann c7401b5657 docs(core): clarify interpolated keywords (#26486)
Fixes #23511
2024-06-10 11:23:24 -04:00
Jason Jean ccc5ad5db4 fix(bundling): fix vite plugin caching (#26487)
<!-- 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 -->

A missing await caused the hash for the cache file name to be the same
for different options.

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

The hash for the cache file name is different for different options.

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

Fixes #
2024-06-10 10:12:08 -04:00
Juri Strumpflohner 9280c9a8d9 fix(release): improve error msg to mention how to add the nx/js plugin (#26473) 2024-06-09 23:33:38 +04:00
Craigory Coppola 55197fb33f fix(misc): nx wrapper should work better on windows (#26460)
!-- 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
- wrapper echo's its contents
- wrapper doesn't exit properly
- wrapper has LF line endings

## Expected Behavior
- wrapper is silent
- wrapper exits early
- wrapper has CRLF endings

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

Fixes #26254
2024-06-07 16:39:05 -04:00
Emily Xiong 4989865978 fix(core): fix duplicate nx entry in gitignore (#26461)
<!-- 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 -->

## 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-06-07 16:38:54 -04:00
Jason Jean a7dc8f6d7f chore(repo): fix file formatting (#26463)
<!-- 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 -->

Files are unformatted.

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

Files are formatted.

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

Fixes #
2024-06-07 16:10:22 -04:00
Bastien c5f5320ef2 fix(web): add shell true (#26411)
Add option `shell: true` to allow child process on Windows

Closes #26161
2024-06-07 15:13:39 -04:00
Craigory Coppola 8891bdc3ab fix(core): ensure tuple passed to aggregate create nodes error (#26456) 2024-06-07 18:14:22 +00:00
Jason Jean 08a0e5cb59 fix(core): clean versions read from package.json when resolving depen… (#26457)
…dencies

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

When versions in published `package.json` files such as
https://unpkg.com/@trpc/server@11.0.0-rc.394/package.json are depended
on, the version is not cleaned of extra parts of the version, and the
dependency is resolved properly.

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

When versions in published `package.json` files such as
https://unpkg.com/@trpc/server@11.0.0-rc.394/package.json are depended
on, the version is cleaned and resolves properly as a dependency.

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

Fixes https://github.com/nrwl/nx/issues/26410
2024-06-07 13:55:57 -04:00
Craigory Coppola 6de382c8a2 fix(core): don't throw when hashing undefined object (#26455)
<!-- 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
Plugins call hashObject w/ options, which is sometimes undefined. This
causes hashObject to throw

## Expected Behavior
hashObject doesn't throw

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

Fixes #
2024-06-07 17:36:49 +00:00
Colum Ferry 926d140d08 docs(module-federation): clarify --skipRemotes option #23574 (#26443)
<!-- 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 -->
Remotes not in the workspace are now skipped automatically. The
`--skipRemotes` option is now used to intentionally skip remotes in the
workspace that are served by other means

## 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 #23574
2024-06-07 13:01:15 -04:00
Colum Ferry 558c91c909 chore(webpack): update source-map-loader to 5.0.0 #21933 (#26446)
<!-- 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 -->
Linked GH issue explains it well.
## 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 #21933
2024-06-07 13:00:41 -04:00
Nicholas Cunningham a09c029f8f fix(nextjs): Generating an app using tailwind should not add module css (#26454)
<!-- 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
When you generate a Next.js app using `tailwind` it will also generate
an accompanying
- `page.module.css` for app router
- `index.module.css` for pages router

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

When geneating a Next.js app using `tailwind` it does not generate
module css files.

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

Fixes #
2024-06-07 10:34:44 -06:00
James Henry 28b3d80f2f fix(core): correctly handle negative patterns in workspaces/packages config (#26453) 2024-06-07 19:21:34 +04:00
Craigory Coppola 356479b332 fix(core): handle projects inside dependsOn correctly (#26392) 2024-06-07 10:38:14 -04:00
Nicolas Belliard fea232ee32 docs(core): upgade major version in contributing doc (#26442)
Hello!

Little fix of the contributing doc that I faced during the install of nx
in my local environment.

## Current Behavior
The major version used in the contributing is the 18.0.0

## Expected Behavior
It should be the 20.0.0
2024-06-07 08:26:25 -04:00
Austin Fahsl ebfd4b75ba docs(release): publish from dist directory recipe (#26370) 2024-06-07 15:55:23 +04:00
Jason Jean 7495f0664b chore(repo): add sync generator for e2e configs (#26427) 2024-06-06 16:51:18 -04:00
Jack Hsu ec5461fa85 fix(react): prevent generating empty props since setting strict in tsconfig is not compatible with it (#26428)
This PR updates the React components so that interface for props is not
generated. Some components don't have them, and users know how to add
them if needed. This makes the generated component pass type checking if
`strict: true` is used in tsconfig.

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

## 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-06-06 16:40:07 -04:00
Jack Hsu cc023c91f9 fix(js): add default baseUrl when extracting tsconfig.base.json or building libs will fail (#26432)
This PR ensures that `"rootDir": "."` is set in `tsconfig.base.json` is
set, or else generating libs in a standalone project will fail with and
error like this:

```
error TS5090: Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?
```

## 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-06-06 16:10:36 -04:00
Craigory Coppola b2e6662e19 chore(repo): dont use unit-test-setup during e2e (#26393)
<!-- 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 -->

## 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-06-06 15:57:24 -04:00
Jason Jean e44199142d fix(core): fix postinstall when nx is not resolveable (#26433)
<!-- 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 -->

`postinstall` task exits 1 when errors are thrown.

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

`postinstall` task always exits 0. Errors are OK because nothing here is
critical.

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

Fixes https://github.com/nrwl/nx/issues/26400
2024-06-06 15:52:56 -04:00
Craigory Coppola 795bec023b fix(misc): gitignore workspace-data when init run (#26429)
<!-- 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
`init` doesn't gitignore workspace-data

## Expected Behavior
`workspace-data` is ignored

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

Fixes #
2024-06-06 15:13:34 -04:00
Emily Xiong 9ab31e435a fix(core): should not pass --no-color --no-parallel (#22763)
<!-- 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 -->
- pass --no-parallel --no-color to underlying command

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
- should handle --no-parallel and --no-color

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

Fixes https://github.com/nrwl/nx/issues/22321
2024-06-06 14:23:29 -04:00
Craigory Coppola bb79c6deb3 fix(core): don't load env vars when insantiating daemon client (#26421) 2024-06-06 14:22:37 -04:00
Nicholas Cunningham 9eebe4980a feat(node): Add output path to setup docker (#26365)
This PR updates how we generate a DockerFile for inferred and non
inferred projects.

Now you need to provide a output path.
2024-06-06 10:42:50 -06:00
Jonathan Cammisuli 88161e00c0 docs(core): include documentation about inputs for launch templates (#26266)
<!-- 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
There is no documentation on how to use inputs with steps for launch
tempaltes
## Expected Behavior
There is now documentation on how to use/configure inputs for steps in
launch templates

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

Fixes #
2024-06-06 11:17:08 -04:00
Leosvel Pérez Espinosa 15e1f78021 fix(angular): install @typescript-eslint/utils when using relevant angular eslint v18 packages (#26418)
<!-- 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 -->

Angular ESLint v18 packages now have `@typescript-eslint/utils` as a
peer dependency, but new projects don't install it, and existing
projects are not getting it installed in a migration.

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

The `@typescript-eslint/utils` should be installed when creating new
Angular projects and when migrating when the workspace has the relevant
Angular ESLint packages in v18.

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

Fixes #26408
2024-06-06 16:54:28 +02:00
Nicholas Cunningham cfcedb481a fix(nextjs): enable failing storybook tests (#22675) 2024-06-06 08:42:32 -06:00
Benjamin Cabanes 7b1073ebb5 feat(nx-dev): update text on enterprise & contact screens (#26416)
Adjusted the Contact Us wording and changed the primary contact link on the website from sales to engineering. The sales link is also presented with a more engaging prompt.
2024-06-06 10:16:25 -04:00
Leosvel Pérez Espinosa d2f4bdf254 fix(linter): improve error message for misconfigured parserOptions.project in @nx/eslint:lint executor (#26383)
<!-- 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 -->

## 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 #23088
2024-06-06 09:14:16 -04:00
Leosvel Pérez Espinosa b40ed1fa03 fix(linter): do not glob for invalid eslint config filenames in plugin (#26409)
<!-- 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 `@nx/eslint/plugin` globs for `.eslintrc.base.json` and
`eslint.base.config.js` workspace root files, which are not valid ESLint
config filenames. The ESLint CLI wouldn't pick them up directly, and we
shouldn't infer or process them. They are only used as part of a valid
config file name that extends from them.

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

The `@nx/eslint/plugin` only globs for valid ESLint config filenames.

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

Fixes #26388
2024-06-06 09:12:25 -04:00
Colum Ferry 94b1a210ab fix(nuxt): ensure .output directory is marked as an output (#26414)
<!-- 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 -->
Nuxt states that the `.output` folder is created with a production
build, regardless of the `buildDir` set in the `nuxt.config.ts` file.
We do not have this folder listed as an output and therefore it is not
cached and restored correctly


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Ensure the `.output` folder is listed correctly as an output

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

Fixes #
2024-06-06 08:29:18 -04:00
Colum Ferry faaa0f6d20 fix(nuxt): app generation should respect as-provided for app names (#26412)
<!-- 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 -->
Trying to generate an app called `myApp` fails because the
`@nx/nuxt:app` generator is using a mix of correct and incorrect mapped
project names when `as-provided` is used.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Ensure the value coming from `determineProjectRootAndFormat` for
projectName is used when referencing the project

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

Fixes #
2024-06-06 08:28:54 -04:00
Rares Matei fc33152d0c docs(nx-cloud): ami nxcloud update instructions (#26382)
<!-- 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 -->

## 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-06-06 12:47:28 +01:00
Jack Hsu 00c1e3925a fix(bundling): load rollup config using the rollup version installed in the workspace (#26298)
This PR updates `@nx/rollup/plugin` so it loads the config file using
`loadConfigFile` from the Rollup version installed in the workspace.

This fixes the issue when initializing in the
[axios](https://github.com/axios/axios) repo, since the `require` call
in their config is no longer valid ESM in Rollup 4.

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

Co-authored-by: Emily Xiong <xiongemi@gmail.com>
2024-06-05 23:45:13 -04:00
Emily Xiong bccb2c5018 fix(core): add quotes around string to command (#23056)
<!-- 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 -->

## Expected Behavior
- nx run will not have quotes, but underlying command will have

<!-- This is the behavior we should expect with the changes in this PR
-->
<img width="524" alt="Screenshot 2024-05-23 at 2 07 20 PM"
src="https://github.com/nrwl/nx/assets/16211801/7c96f884-3c11-4f56-b6b4-b3fd41ac2187">
<img width="471" alt="Screenshot 2024-05-23 at 2 07 03 PM"
src="https://github.com/nrwl/nx/assets/16211801/b6746a25-ebfc-4cb2-ad1d-4f8600782037">



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

Fixes #
2024-06-05 17:02:48 -04:00
Emily Xiong 58041e893c fix(graph): make cacheable and nx release pill sticky to the right (#26157)
<!-- 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 -->

## Expected Behavior
<img width="1098" alt="Screenshot 2024-05-28 at 10 26 50 AM"
src="https://github.com/nrwl/nx/assets/16211801/9f190b8e-fbdb-4a4f-9533-b467018d4fae">

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

Fixes #
2024-06-05 16:59:40 -04:00
Emily Xiong 20529d4dc9 feat(graph): add source info for command and script (#26162)
<!-- 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 -->

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

<img width="993" alt="Screenshot 2024-05-28 at 12 19 15 PM"
src="https://github.com/nrwl/nx/assets/16211801/35b95537-72ff-474f-b03a-68e20a7dfe55">
<img width="942" alt="Screenshot 2024-05-28 at 12 19 05 PM"
src="https://github.com/nrwl/nx/assets/16211801/b67d920b-2689-452c-9214-d96ce12331dc">
<img width="728" alt="Screenshot 2024-05-28 at 12 09 15 PM"
src="https://github.com/nrwl/nx/assets/16211801/c6e74976-83b5-44bf-b0b7-c99e22cd6e03">


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

Fixes #
2024-06-05 16:56:50 -04:00
Jason Jean 7e984e11a6 fix(core): handle paths deleted by the ide (#26363)
<!-- 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 -->

When IDEs delete directories on some operating systems, the watch events
are registered as deleted paths. These events were not handled so
plugins were continuing to process files which did not exist.

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

Watch events which are directories being deleted are handled and plugins
will not continue to process files which do not exist.

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

Fixes #
2024-06-05 16:38:23 -04:00
Benjamin Cabanes 9e3867e40c fix(nx-dev): update section layout in 'how-can-we-help' component (#26394)
The layout for a section in the 'how-can-we-help' component has been adjusted to better suit different screen sizes. The 'col-span-2' class has been moved within a media query ('md') to apply only for medium and larger screens, which will improve the responsiveness on smaller devices.
2024-06-05 15:49:52 -04:00
Jason Jean 3ff1b5b4f7 fix(core): make plugin pool cleanup to be synchronous (#26389) 2024-06-05 13:37:56 -04:00
Jack Hsu fcb6498e76 feat(web): allow additional http-server options to be passed from @nx/web:file-server (#26391)
This PR allows additional args such as `-d` (directory listing) and
`--mimetypes` to be passed from `serve` to the underlying `http-server`
module.

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

## 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 #22138
2024-06-05 13:08:42 -04:00
Colum Ferry 187569e0e1 fix(nuxt): generate tsconfig files correctly (#26385)
<!-- 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 TsConfig files we generate when creating a Nuxt application do not
apply the types from `nuxt.d.ts` correctly.
This leads to IDE errors with Nuxt Auto Imports.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Ensure the TsConfig files are generated correctly

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

Fixes #26120 #21862
2024-06-05 17:14:36 +01:00
Emily Xiong 2a1898e428 fix(gradle): use shell to exec gradle for windows (#26361)
<!-- 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 -->

## 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-06-05 11:38:48 -04:00
Nathanael a01ddcea11 feat(testing): cypress autoCancelAfterFailures (#26281)
Pass autoCancelAfterFailures to cypress executor

Fixes #26264

---------

Co-authored-by: Nathanael Smith <nathanael.smith@hilton.com>
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2024-06-05 17:33:27 +02:00
Nicolas Belliard 58f36170f7 docs(core): adding warning following the breaking change in the environment variable documentation (#26357)
Following the breaking change with the process environment variable are
no available.

I see that this [issue](https://github.com/nrwl/nx/issues/26023) has
been created.

Therefore, I think a warning in the documentation is needed to inform
that this variables are not accessible for Nx version greater or equal
to 19.

## Current Behavior
On the current Nx documentation, there is no information regarding this
breaking change:


![image](https://github.com/nrwl/nx/assets/22777121/ddc66b14-751a-4bc5-adf2-6c60981b2cd4)

Doc link:
https://nx.dev/reference/environment-variables#environment-variables

## Expected Behavior
Adding a warning to inform about this breaking change:


![image](https://github.com/nrwl/nx/assets/22777121/be03b76d-20e8-417e-9e51-604af10b921a)


## Related Issue(s)
[<!-- Please link the issue being fixed so it gets closed when this is
merged. -->](https://github.com/nrwl/nx/issues/26023)

Let me know if it is ok for you and if you want to rephrase the
following warning.

Nicolas Belliard
2024-06-05 11:16:39 -04:00
Attila Tóth 0038f55b92 fix(js): wrong compiler helper config file path for swc (#23193)
Fixes a bug that resulted in returning an object instead of a string for
JS executors.
There is also a helper type introduced that triggers TS to show an error
for similar problems.

Also this PR rises the minimum prettier version from 2.7.1 to 2.8.0,
because that supports the `satisfies` TS operator.

_I had another PR for this change, but that got messed up by a rebase,
so I closed that and opened this one._
_I wrote some comments there that describe what I did and why:
https://github.com/nrwl/nx/pull/22335 ._
_Also, since I created that PR many things have changed in the master
branch which allows this PR to be even simpler._

## Current Behavior
Currently build processes fail with this error message:
The "path" argument must be of type string or an instance of Buffer or
URL. Received an instance of Object .

I am experiencing it with a NestJS project.

## Expected Behavior
Builds pass without problems.

## Related Issue(s)
https://github.com/nrwl/nx/issues/22160

Fixes #22160

---------

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-06-05 10:21:45 -04:00
Jack Hsu 0c1e2e08f4 feat(web): update postcss to a version without security advisory (#23478)
https://github.com/advisories/GHSA-7fh5-64p2-3v2j

## 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-06-05 09:10:56 -04:00
MaxKless c2d1a06a56 fix(core): catch nonexistent user error when requiring native code (#26381)
## Current Behavior
On certain environments, calling node's `userInfo()` errors, leading to
native code not being loaded correctly.

## Expected Behavior
We should be resilient towards this and not error.


Fixes https://github.com/nrwl/nx/issues/26351
2024-06-05 08:37:40 -04:00
Every a8c4e2479b fix(js): swc exclude config may not a array (#21904)
[swc config is not
required](https://swc.rs/docs/configuration/compilation#exclude)

## Current Behavior
if not configed `"exclude"` will get a error
```text
TypeError: Cannot read properties of undefined (reading 'concat')
    at generateTmpSwcrc (/Users/hongxu/repos/smallfish/node_modules/@nrwl/js/src/utils/swc/inline.js:7:41)
```

## Expected Behavior
give a default value for swc exclude if nx must need it
2024-06-05 08:09:51 -04:00
Rares Matei e658c16a8f docs(nx-cloud): clarify nx cloud deployment options (#26349)
<!-- 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 -->

## 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-06-05 12:59:35 +01:00
Leosvel Pérez Espinosa d4370b9ba1 fix(misc): ignore .nx/workspace-data when generating new workspaces (#26378)
<!-- 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 -->

## 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-06-05 13:11:17 +02:00
Leosvel Pérez Espinosa 51d651946b fix(vue): handle eslint flat config correctly in vue generators (#26377)
<!-- 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 -->

## 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 #21739
2024-06-05 12:46:47 +02:00
Leosvel Pérez Espinosa ffea1d5c6d fix(linter): handle paths correctly in enforce-module-boundaries eslint rule (#26373)
<!-- 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 -->

## 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 #21889
2024-06-05 12:38:21 +02:00
Leosvel Pérez Espinosa f4b379f459 fix(linter): check for flat config correctly in @nx/eslint:lint executor (#26350)
<!-- 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 -->

## 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 #22575
2024-06-05 12:36:48 +02:00
Katerina Skroumpelou f8239debd0 feat(nx-cloud): new cloud onboarding flow (#26262)
New Nx cloud onboarding flow.

![Screenshot 2024-05-30 at 5 29
43 PM](https://github.com/nrwl/nx/assets/6603745/c26f6416-f54b-4b6d-8b3c-4d4c1acfcbb1)

![Screenshot 2024-05-30 at 5 30
18 PM](https://github.com/nrwl/nx/assets/6603745/acb2b1d1-8437-4d8b-8b87-602cc918f12b)

![Screenshot 2024-05-30 at 5 31
26 PM](https://github.com/nrwl/nx/assets/6603745/e6b1f595-e3c1-4c09-83e7-9f71b5383a35)
2024-06-05 12:45:22 +04:00
Greg Westneat 260562e484 feat(expo): update expo sync-deps executor (#26086)
## Current Behavior

When running `@nx/expo:sync-deps` it includes many unexpected
dependencies.

If you add a backend project as an implicit dependency to the expo
project, then all of the backend project's dependencies are included in
the expo package.json when running `@nx/expo:sync-deps`

You can use the `exclude` option, but with hundreds of excluded
packages, this adds a lot of bloat to the targets in `project.json`

## Expected Behavior

Ideally, when using `sync-deps` as a part of the `build`, only packages
necessary in the context of the `build` would be synced.

Since the packages from `implicitDependencies` aren't typically relevant
to the expo build, we should optionally be able to not include them.

## Notes

### Default Value

I made the default `excludeImplicit: false` so that it doesn't diverge
from current behavior/expectations — but it's possible that it would
make more sense to have it be `true` by default — would defer to y'all
on that question.


## Additional Considerations

### Other Possible Options 


> [!NOTE]
> Let me know if you're interested in PRs to add any of these


<details>
  <summary>Other Possible Options</summary>

Here are some other options which might be worth considering.

- [x] `excludeImplicit` <- _added in this PR_
- [ ] `onlyNativeDependencies`*
- [ ] `onlyPodInstallDependencies`*
- [ ] `traceDependencyPaths`**
- [ ] `excludeDevDependencies`***
- [ ] `matchRootPackageJsonCatgeory`***
- [ ] `onlySrcFiles`****
- [ ] `filterByCacheInputs`****


#### Only Native / Pod Installs*
Based on the discussion in issue #18788 it seem like the primary reason
for `sync-deps`, is to support pod install.

#### Trace Dependency Paths**

When I was originally debugging "why is axios being added?" — before I'd
realized about the `implicitDependencies` — I wrote a utility to output
the trace for the included packages — that's how I realized what was
going on. Could be a useful feature addition.


![image](https://github.com/nrwl/nx/assets/2213636/e1cb1511-c518-47d8-85fb-69c6a6d88058)


#### Deps vs DevDeps***

By default, the `sync-deps` feature will find all dependencies
including(eg jest, storybook) and add them to `package.json` under the
`"dependencies":` key.

It might be useful to either match the root `package.json`'s
categorization or just exclude devDependencies altogether.

#### File aware filtering****

Currently the `findAllNpmDependencies` is filtering some hardcoded
external nodes:
```
  'npm:@nx/react-native',
  'npm:@nrwl/react-native',
  'npm:@nx/expo',
  'npm:@nrwl/expo',
```
These are in the dependency graph because they are used as executors in
`project.json` targets.

It might be useful to derive these exclusions dynamically, by only
considering relevant productions files.

A simple approach would be to only consider dependencies that stem from
files in the `src` directory

A more robust alternative would be to read the cache inputs from the
calling target, and filter dependencies based on matching files

</details>

### Fingerprinting?

<details>
  <summary>Fingerprinting</summary>

There's a related matter having to do with `@expo/fingerprint` where
having the native dependencies visible from the project-level
`package.json` is important to getting accurate project-level
fingerprints.

The more ideal solution would be to use the Nx graph to handle the
"fingerprinting" hash generation, but it would require some thought /
feature design.

So in the meantime the `sync-deps` (only need native deps) +
`@expo/fingerprint` recourse seems like the best option.

</details>

Thanks!
2024-06-05 01:04:10 -04:00
Jason Jean 5a06daac7a chore(repo): update nx to 19.2.0-rc.0 (#26371)
<!-- 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 -->

This repo uses Nx `19.2.0-beta.4`

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

This repo uses Nx `19.2.0-rc.0`

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

Fixes #
2024-06-04 21:51:30 -04:00
Craigory Coppola 5e39cb0019 feat(core): allow partially resetting workspace (#23381) 2024-06-04 18:55:10 -04:00
Craigory Coppola d06992e5b9 fix(core): handleErrors returns an exit code (#26343) 2024-06-04 18:44:52 -04:00
Craigory Coppola cda799b8a6 feat(core): allow skipping lockfile for affected (#23509) 2024-06-04 18:15:00 -04:00
Emily Xiong 43ddd72aa2 fix(core): fall back to pacakgeManager if yarn --version failed (#26356)
<!-- 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 -->

## 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-06-04 17:53:39 -04:00
Michal Jez 6d2e7cd2cf feat(nx-plugin): update executor generator to have context (#16982)
Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>
2024-06-04 17:49:50 -04:00
Benjamin Cabanes a1c26d51ab feat(nx-cloud): add new Webinars link in menu-items (#26368)
The href for the Webinars section in the `menu-items.ts` file has been updated.
2024-06-04 17:19:36 -04:00
Benjamin Cabanes cddc69996d fix(nx-dev): correct typo in link (#26367)
Corrected a typo error in the 'Contact engineers' link from `/contact/enigeering` to `/contact/engineering`. Also, unused 'Contact us' section was removed from the file.
2024-06-04 17:15:26 -04:00
Craigory Coppola dd6eda84b0 feat(devkit): allow to customize overwrite mode in generateFiles (#26354)
Adds a new capability to choose how to handle already existing target
files when using a generator.

See #17925

Co-authored-by: Michael Monerau <micmo@qontrol.io>
2024-06-04 16:12:15 -04:00
Emily Marigold Klassen 8800a30022 fix(misc): support ts-node options in tsconfig files (#21723) 2024-06-04 16:08:49 -04:00
cdwheatley 56a3af6f9d docs(nx-plugin): update local-executors.md
Change path for generation of my-plugin to libs/my-plugin

nx g @nx/plugin:plugin libs/my-plugin

This makes it work with the plugin executor generate command.
2024-06-04 16:06:40 -04:00
Stefan Schweiger 215bc42c11 feat(core): additional .local patterns for .env files (#19163)
## Current Behavior
Loading order of .env files

1. `apps/my-app/.env.[target-name].[target-configuration-name]`
2. `apps/my-app/.env.[target-name]`
3. `apps/my-app/.[target-name].[target-configuration-name].env`
4. `apps/my-app/.[target-name].env`
5. `apps/my-app/.env.local`
6. `apps/my-app/.local.env`
7. `apps/my-app/.env`
8. `.env.[target-name].[target-configuration-name]`
9. `.env.[target-name]`
10. `.[target-name].[target-configuration-name].env`
11. `.[target-name].env`
12. `.env.local`
13. `.local.env`
14. `.env`

## Expected Behavior
1. `apps/my-app/.env.[target-name].[target-configuration-name].local`
2. `apps/my-app/.env.[target-name].[target-configuration-name]`
3. `apps/my-app/.env.[target-name].local`
4. `apps/my-app/.env.[target-name]`
5. `apps/my-app/.[target-name].[target-configuration-name].local.env`
6. `apps/my-app/.[target-name].[target-configuration-name].env`
7. `apps/my-app/.[target-name].local.env`
8. `apps/my-app/.[target-name].env`
9. `apps/my-app/.env.local`
10. `apps/my-app/.local.env`
11. `apps/my-app/.env`
12. `.env.[target-name].[target-configuration-name].local`
13. `.env.[target-name].[target-configuration-name]`
14. `.env.[target-name].local`
15. `.env.[target-name]`
16. `.[target-name].[target-configuration-name].local.env`
17. `.[target-name].[target-configuration-name].env`
18. `.[target-name].local.env`
19. `.[target-name].env`
20. `.env.local`
21. `.local.env`
22. `.env`

## Related Issue(s)
#19161
2024-06-04 16:06:03 -04:00
Simon Lipp 09705129d0 fix(core): resolve dependent task output files path (#22253) (#23179) 2024-06-04 15:55:17 -04:00
Craigory Coppola a6cddba9d4 chore(repo): fix formatting in commitizen.js (#26364)
<!-- 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 -->

## 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-06-04 15:54:22 -04:00
Michal Gawrys c002b54fdc chore(misc): add test for move generator when there is a list export in the same file as path to update (#22070) 2024-06-04 15:28:21 -04:00
Emily Xiong 9c2162fadc fix(react-native): should not include ts in build (#26352)
<!-- 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 -->

## 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 https://github.com/nrwl/nx/issues/22948
2024-06-04 15:02:41 -04:00
Craigory Coppola 0105fd20cc fix(linter): export createNodesV2 (#26360) 2024-06-04 18:40:59 +00:00
Nicholas Cunningham d2d06cdbab chore(nx-dev): Replace duplicate references to discord icon 2024-06-04 09:45:33 -07:00
Nicholas Cunningham 17a4c5a757 feat(nx-dev): Add community and discord to resources header 2024-06-04 09:45:33 -07:00
Sean Parmelee a8ae302ae4 fix(nextjs): support canary versions of next (#22672)
<!-- 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
When using a `canary` version of `next` in an nx monorepo where the
next.js application depends on a lib that's also in the monorepo,
running `nx build` results in `Module parse failed: Unexpected token`
errors start occurring.

The use of a `canary` version essentially reintroduces
https://github.com/nrwl/nx/issues/16658 because of how `semver` [handles
pre-release
tags](https://github.com/npm/node-semver/tree/main?tab=readme-ov-file#prerelease-tags).
As mentioned in the docs, we can suppress this behavior by passing the
`includePrerelease` option, which is what this PR does.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
`nx build` successfully builds my Next.js application

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
https://github.com/nrwl/nx/issues/16658
https://github.com/nrwl/nx/issues/16516
https://github.com/nrwl/nx/issues/19635
2024-06-04 09:36:30 -06:00
Austin Fahsl b2855fd6e1 feat(release): add support for version plans (#23190) 2024-06-04 16:44:28 +04:00
Leosvel Pérez Espinosa e95204b037 fix(linter): generate flat config for new projects correctly (#26328)
- Change generated import for `FlatCompat`:
  ```diff
  - const FlatCompat = require('@eslint/eslintrc');
  + const { FlatCompat } = require('@eslint/eslintrc');
  ```
- Fix replacing overrides to be reflected in the end result (the updated
content with the replacements was not being assigned)
- Add extended plugins/configs to the start (matches behavior of the old
config)

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

## 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 #22350 
Fixes #26151
2024-06-04 14:11:28 +02:00
Craigory Coppola 0594debfef feat(linter): migrate to create-nodes-v2 (#26302)
<!-- 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
No cache for eslint nodes

## Expected Behavior
v2 cache for eslint nodes

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

Fixes #

---------

Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2024-06-03 20:01:03 -04:00
Jason Jean cf0142d711 fix(core): exit the process after postinstall (#26336) 2024-06-03 13:12:47 -04:00
Nicholas Cunningham 8525bba7c6 feat(nx-dev): Add No_NEXT_PUBLIC_NO_INDEX environment variable (#26330)
Add no index env var
Preview / Dev now will have the `noindex` while the main / production
will be indexed
![Screenshot 2024-06-03 at 9 46
26 AM](https://github.com/nrwl/nx/assets/338948/f6f1d581-fdfa-44b6-8f43-24a3ddd4f4eb)
2024-06-03 09:49:02 -06:00
Leosvel Pérez Espinosa fbc88f2e6d fix(linter): return callback to install deps when running eslint migration to flat config generator (#26323)
<!-- 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 -->

## 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-06-03 09:18:35 -04:00
Leosvel Pérez Espinosa 030ede2c95 cleanup(devkit): prevent mutating targetDefaults in migration to crystal helper (#26316)
<!-- 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 -->

## 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-06-03 09:17:40 -04:00
Leosvel Pérez Espinosa adc1d70744 fix(linter): handle configuration without "rules" in migration (#26317)
<!-- 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 -->

## 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 #26306
2024-06-03 09:17:13 -04:00
Colum Ferry b97a295fad fix(vite): ensure installed version matches defined peer in package.json (#26324)
<!-- 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 -->
Our `@nx/vite` package has a peer dep on `vite@^5.0.0` but we only
install `vite@~5.0.0` creating a conflict in dependencies.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The version we install should match the peerDep range we specify in the
package.json

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

Fixes #
2024-06-03 09:12:40 -04:00
Miroslav Jonaš 77d1c15bf9 fix(core): fix daemon plugins caching (#26321)
<!-- 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 -->

## 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 #26001
2024-06-03 07:32:02 -04:00
Leosvel Pérez Espinosa ccd16b10dd fix(angular): normalize and handle dev remotes correctly (#26320)
<!-- 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 -->

## 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 #26169
2024-06-03 13:23:22 +02:00
Leosvel Pérez Espinosa 1ea0589641 fix(angular): update broken imports in ng-packagr executors (#26319)
<!-- 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 -->

## 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 #26235
2024-06-03 12:28:01 +02:00
Benjamin Cabanes d010267d83 feat(nx-dev): add engineering team contact page (#26293) 2024-06-02 16:48:05 -04:00
Craigory Coppola 6f223005b8 fix(misc): ensure plugins are not creating workspace context while creating nodes (#26253) 2024-05-31 18:54:56 -04:00
Craigory Coppola a308e1dc6b fix(core): prevent graph output from being truncated (#23446)
<!-- 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
--graph stdout and --file stdout aren't documented. When printing graph
to stdout, its possible for some output to get missed.

## Expected Behavior
Existing flags are documented, and `--print` is more discoverable. We
await stdout finishing before exiting the program.

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

Fixes #18689
2024-05-31 18:05:26 -04:00
Jason Jean 1e7cd7e9e6 feat(testing): use createNodesV2 for cypress and playwright (#26301) 2024-05-31 17:53:31 -04:00
Jason Jean 92718fd52b chore(repo): update nx to 19.2.0-beta.4 (#26270)
<!-- 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 -->

This repo uses Nx `19.2.0-beta.1`

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

This repo uses Nx `19.2.0-beta.2`

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

Fixes #
2024-05-31 16:46:24 -04:00
Jason Jean b558f56c69 feat(testing): use createNodesV2 for jest (#26292)
<!-- 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/jest/plugin` uses CreateNodesV1. Multiple Jest plugins are not able
to be run in parallel and in isolation.

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

`@nx/jest/plugin` uses CreateNodesV2. Multiple jest plugins are able to
run in parallel and in isolation.

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

Fixes #
2024-05-31 15:43:01 -04:00
Emily Xiong 1f7c0bc51d fix(linter): support lib as standalone src path (#26263)
<!-- 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 -->

Root projects are considered standalone projects which shouldn't lint everything if the `src` directory exists.

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

Root projects which have a `lib` directory should be treated the same way.

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

Fixes #
2024-05-31 14:16:48 -04:00
Leosvel Pérez Espinosa 2fe4def42f cleanup(testing): update out-of-sync test case expectation (#26294)
<!-- 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 -->

## 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-05-31 13:00:11 -04:00
Jack Hsu 4e49d527ba feat(bundling): extract rollup plugins into withNx function for use with run-commands (#26168)
This PR adds `withNx` function to `@nx/rollup/with-nx` so it can be used
in `rollup.config.js` to replicate what `@nx/rollup:rollup` executor
does without needing to use the executor.

e.g. 

```js
// rollup.config.js
const { withNx } = require("@nx/rollup/with-nx");

module.exports = withNx(
  {
    main: "./src/index.ts",
    outputPath: "./dist",
    tsConfig: "./tsconfig.lib.json",
    compiler: "babel",
    external: ["react", "react-dom", "react/jsx-runtime"],
    format: ["esm"],
    assets: [{ input: ".", output: ".", glob: "README.md" }],
  },
  {
    // Provide additional rollup configuration here. See: https://rollupjs.org/configuration-options
    // e.g.
    // output: { sourcemap: true },
  }
);
```


## Notes

1. Existing `@nx/rollup:rollup` continues to encapsulate rollup options
and will not support an isolated mode.
2. Newly created JS and React libs with `--bundler=rollup` will use the
new `withNx` function and explicit `rollup.config.js`.
3. If `NX_ADD_PLUGINS=false` or `useInferencePlugins: false` is set,
then new projects will continue to use the `@nx/rollup:rollup` executor.
2024-05-31 10:50:10 -04:00
Leosvel Pérez Espinosa c05e4ac268 cleanup(devkit): ensure externalDependencies input from inferred task is merged into target inputs when migrating (#26273)
<!-- 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 -->

## 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-05-31 16:24:29 +02:00
Emily Xiong d29e3147a6 feat(react-native): upgrade react native to 0.74 (#26143)
<!-- 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 -->

## 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-05-31 10:19:30 -04:00
Leosvel Pérez Espinosa 2b583fdb94 fix(misc): add externalDependencies input to some plugins missing them (#26291)
<!-- 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 -->

## 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-05-31 15:29:34 +02:00
Jason Jean fde4932ab9 fix(gradle): expose create nodes v2 (#26282)
<!-- 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 -->

`createNodesV2` was written but not exported.

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

`createNodesV2` is exported.

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

Fixes #
2024-05-31 09:18:19 -04:00
Emily Xiong 2cb7ecb77b fix(expo): remove deprecated webpack. (#26137)
config.js

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

## 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 https://github.com/nrwl/nx/issues/26118
https://github.com/nrwl/nx/issues/25291
https://github.com/nrwl/nx/issues/23233
2024-05-30 22:49:46 -04:00
Emily Xiong a2ca3d3392 fix(react-native): not cache pod-install (#26279)
<!-- 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 -->

## 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 https://github.com/nrwl/nx/issues/23084
2024-05-30 22:49:20 -04:00
James Henry ef0dc01ffa fix(core): multi module handling and fall back matching for external nodes (#26277)
<!-- 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 -->

- Packages such as `minimatch` which block access to their
`package.json` AND have multi module format outputs are missed by the
target project locator
- There is no fall back matching of external nodes from the graph by
name

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

- The target project locator appropriately finds modules such as
`minimatch`
- There is fall back matching of external nodes from the graph by name

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

Fixes #
2024-05-31 01:06:58 +04:00
Craigory Coppola a5682d1ca5 feat(core): add create nodes v2 for batch processing config files (#26250) 2024-05-30 15:28:59 -04:00
Isaac Mann 1277b22ce4 docs(core): link to pass args recipe (#26276)
Link to the `Pass Arguments to Commands` recipe
2024-05-30 13:31:27 -04:00
Colum Ferry fb0430012c feat(vite): set watch:false in test config by default (#26267)
<!-- 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 -->
Currently, running vitest with inference will result in a process that
waits for the user to end it as vitest defaults to running in watch
mode.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
We should set watch:false to allow users to specifically choose watch
mode by passing `--watch`

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

Fixes #
2024-05-30 12:52:01 -04:00
Román Benjámin e647719a21 fix(gradle): use os specific line separator for dependency parsing (#26119)
## Current Behavior

## Expected Behavior

## Related Issue(s)

Fixes #
2024-05-30 12:14:08 -04:00
Jason Jean 2787a588e5 chore(repo): re-enable failing swc e2e test (#26246)
<!-- 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 test was failing because of a bad swc version.

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

A new version of swc has been released which fixes the issue.

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

Fixes #
2024-05-30 10:28:17 -04:00
James Henry 7001e350af fix(core): prefer project specific external deps (#23307)
<!-- 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 -->

We only ever discover one version of an external dependency for the
file-map.json. This means the `@nx/dependency-checks` lint rule can
produce incorrect failures when multiple copies of a dependency exist
within a workspace.

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

In the file-map.json the project specific version of a package (if
multiple exist) is preferred and therefore the lint rule produces
accurate results.

---

For example, in a repo where the root package.json has lodash@4.0.0
(which becomes `npm:lodash` on graph) and the foo project has
lodash@3.0.0:

**Before**


![image](https://github.com/nrwl/nx/assets/900523/fa0b3711-5004-4abc-9904-0433a37bc3cf)

**After**


![image](https://github.com/nrwl/nx/assets/900523/d0527368-44b4-486f-aa7a-79d996a20ef4)

## Performance

`NX_ISOLATE_PLUGINS=true NX_PERF_LOGGING=true NX_DAEMON=false nx show
project nx --json false`


** Before **

Time for 'build typescript dependencies' 505.52144700009376

** After **

Time for 'build typescript dependencies' 701.247584999539
2024-05-30 10:23:47 -04:00
Marcus Thelin 7cbecf3bbf docs(core): add changelog render options on manage releases page (#22810)
Add a "customize changelog output" section to describe the available
render options as described by in [this
file](https://github.com/nrwl/nx/blob/master/packages/nx/release/changelog-renderer/index.ts).

## Related Issue(s)
Fixes #22809
2024-05-30 09:53:18 -04:00
James Henry 063e3c9174 fix(angular): update angular-eslint to v18 (#26165) 2024-05-30 09:13:03 -04:00
Jason Jean 316dcb948c fix(core): handle relative paths after {projectRoot} in outputs (#26244)
<!-- 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 -->

Outputs such as `{projectRoot}/../relative/path` do not get interpolated
correctly.

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

Outputs such as `{projectRoot}/../relative/path` get interpolated
correctly.

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

Fixes #
2024-05-29 19:08:11 -04:00
Leosvel Pérez Espinosa 7b196dc630 cleanup(devkit): add util for processing outputs in crystal migration generators (#26247)
<!-- 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 -->

## 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-05-29 21:35:13 +00:00
Jason Jean 7ab246b4be chore(repo): update nx to 19.2.0-beta.1 (#26140)
<!-- 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 -->

This repo uses Nx `19.1.0-beta.5`.

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

This repo uses Nx `19.2.0-beta.1`

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

Fixes #
2024-05-29 15:57:07 -04:00
Rares Matei 4966797ff1 docs(nx-cloud): update release notes (#26242)
<!-- 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 -->

## 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-05-29 16:23:29 +01:00
Zoran Kokeza 14eb8de800 fix(react): disable react refresh overlay (#22013)
## Current Behavior
Currently when a user runs into a compile/runtime error in react
application 2 error overlays will show. One from react-refresh-plugin
and the second one from webpack-dev-server (which is enabled by default)

![image](https://github.com/nrwl/nx/assets/19208948/c6be47bc-3ffd-4148-bdc6-18b59affae7f)

![image](https://github.com/nrwl/nx/assets/19208948/65ebe2a4-ed47-4feb-b289-645f3e2303cc)

### Steps to reproduce

This is reproducible using both webpack config types when the react
refresh plugin is applied to the configuration.
1. create fresh nx react app with webpack
2. add `hot: true`in webpack dev server configuration, so
react-refresh-plugin gets applied
3. anywhere in the app code throw an error i.e.
```
useEffect(() => {
  setTimeout(() => {
    throw new Error('test');
  }, 1000);
}, []);
```
4. observe 2 error overlays shown
Or clone the repo https://github.com/zoran995/nx-react-error-overlay,
branch main is using nx enhanced config, branch default-config is using
plain webpack config. Here is also a codesandbox showcasing an issue
https://codesandbox.io/p/github/zoran995/nx-react-error-overlay/main?file=%2Fapps%2Forg%2Fsrc%2Fapp%2Fapp.tsx&import=true

## Expected Behavior
Only one error should be shown to the user, and this is the actual
configuration of the plugin that is used by react scripts. I went with
not exposing another config option for nx react webpack plugin as there
is already an option to configure webpack dev server error overlay and
most of the react community is used to have the react-refresh one
disabled.
2024-05-29 09:20:37 -06:00
Aushwin eb44f9b07e cleanup(react): improved error message throwed when executor is not available or not valid (#23282)
The error message which is throwed when executer is not available or not
valid is really confusing. Hence updating it to throw the exact issue
why it errored.

<!-- 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
The error message throwed is really vauge. And does't really tell
anything about why it happened.

Fixes #
Improved error message which is throwed when excuter is not valid or not
present in the project.json
<img width="1421" alt="Screenshot 2024-05-10 at 1 17 05 AM"
src="https://github.com/nrwl/nx/assets/54993680/455163e4-3197-419c-b511-040c35784a72">
2024-05-29 09:04:05 -06:00
Rares Matei 89ed6b12aa docs(nx-cloud): update release notes (#26003)
<!-- 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 -->

## 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-05-29 16:43:07 +02:00
Jason Jean 27940d3fff fix(bundling): use watch mode for rollup plugin (#26139)
<!-- 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/rollup/plugin` will not properly reload `rollup.config.js` files
when they are updated as they are cached.

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

`@nx/rollup/plugin` loads rollup configs with `watchMode` enabled so
that rollup utilizes the proper cache busting mechanism so that
`rollup.config.js` is properly reloaded.

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

Fixes #
2024-05-29 09:02:06 -04:00
Miroslav Jonas bdd3375256 feat(nx-dev): improve the enteprise page 2024-05-29 03:03:42 -07:00
Miroslav Jonas 87760eec0a fix(nx-dev): case study link should open in new tab 2024-05-29 03:01:16 -07:00
Ivens Diego Müller 6d0bbee9e7 fix(release): improve error handling for npm publish (#26159) 2024-05-29 14:00:25 +04:00
Mark Lindsey 52d04d9864 docs(core): documentation for github integration for private nx cloud (#22305)
<!-- 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
-->
Adding documentation to show how to set up a GitHub app for private nx
cloud in order to make use of the full github integration.

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

## Current Behavior
Private Nx Cloud orgs cannot use the full GitHub integration as they
need to create their own GitHub app and set the required environment
variables.
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Docs should support the new GitHub integration by providing the
necessary steps to set up the integration.

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

Fixes #

---------

Co-authored-by: Mark Lindsey <markl@nrwl.io>
2024-05-29 10:36:24 +01:00
Jason Jean 7088b09f47 chore(repo): disable failing swc e2e test (#26166)
<!-- 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 -->
https://github.com/swc-project/swc/issues/8988 is causing e2e tests to
fail.

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

The failing e2e tests are disabled while the issue is resolved.

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

Fixes #
2024-05-28 18:48:02 -04:00
Jack Hsu 012ce7c12b fix(bundling): rollup watch mode yields result from async iterable (#26160)
This PR fixes the return from `@nx/rollup:rollup` executor so that it
yields results from the inner async iterable.

## 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-05-28 17:16:00 -04:00
Miroslav Jonaš c7bea55d59 fix(core): ensure correct hoisted packages detection with pnpm parser (#26153)
<!-- 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 -->

## 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-05-28 13:49:34 -04:00
Leosvel Pérez Espinosa 2b820a274e docs(misc): update /packages/ links to /nx-api/ (#26128)
- Update `/packages/` links to `/nx-api/`
- Convert some unneeded absolute links to relative
- Remove leftover examples doc for the already removed `cypress-project`
generator

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

## 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 #26126
2024-05-28 09:44:48 -04:00
Vadim Goy b9e190d22b fix(react): full support custom secure host for module federation (#25288)
## Related Issue(s)

Fixes #
https://github.com/nrwl/nx/issues/21210

Co-authored-by: Vadim Goy <vadim.goy@zoominfo.com>
2024-05-28 09:48:36 +01:00
Emily Xiong 7f11a1d7d3 fix(core): fix preset empty (#26142)
<!-- 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 -->

## 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-05-27 20:40:17 -04:00
Jason Jean e8b0972850 fix(core): limit the amount of choices shown so that the prompt fits … (#26132)
…on screen

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

When multiselect prompts have too many choices, `enquirer` does weird
unexpected things with the terminal.

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

Multiselect prompts are limited to enough lines so that they fit in the
terminal view preventing unexpected behavior.

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

Fixes #
2024-05-27 16:55:35 -04:00
Emily Xiong a6e23c1b9f fix(js): fix swc version warning (#24034)
<!-- 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 -->
npm warnings:
```
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @swc-node/core@1.13.1
npm WARN Found: @swc/core@1.3.107
npm WARN node_modules/@swc/core
npm WARN   dev @swc/core@"~1.3.85" from the root project
npm WARN   3 more (@swc-node/register, nx, ts-node)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer @swc/core@">= 1.4.13" from @swc-node/core@1.13.1
npm WARN node_modules/@swc-node/register/node_modules/@swc-node/core
npm WARN   @swc-node/core@"^1.12.0" from @swc-node/register@1.8.0
npm WARN   node_modules/@swc-node/register
npm WARN 
npm WARN Conflicting peer dependency: @swc/core@1.5.7
npm WARN node_modules/@swc/core
npm WARN   peer @swc/core@">= 1.4.13" from @swc-node/core@1.13.1
npm WARN   node_modules/@swc-node/register/node_modules/@swc-node/core
npm WARN     @swc-node/core@"^1.12.0" from @swc-node/register@1.8.0
npm WARN     node_modules/@swc-node/register
```

## 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 https://github.com/nrwl/nx/issues/23688
2024-05-27 16:46:30 -04:00
Miroslav Jonaš 8403f03822 feat(core): add support for pnpm lockfile v9 (#22906)
- [X] Fix parenthesis separator detection
- [x] Fix leading dash detection
- [x] Migrate existing pnpm normalizer to latest code
- [X] Add unit tests for v9
- [X] Dogfooding Pnpm v9 to Nx repo and agents

Fixes regression with alias packages introduced via
https://github.com/nrwl/nx/pull/23017

## Benchmarks

PNPM v9 Branch (migrated to branch's code)
```
  Time (mean ± σ):      3.526 s ±  0.081 s    [User: 0.717 s, System: 0.948 s]
  Range (min … max):    3.390 s …  3.714 s    20 runs
```
Master (running nx 19.1.0-beta.3)
```
  Time (mean ± σ):     11.160 s ±  0.112 s    [User: 0.799 s, System: 0.979 s]
  Range (min … max):   10.955 s … 11.379 s    20 runs
```

## 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 #22850
Fixes #23256

---------

Co-authored-by: James Henry <james@henry.sc>
2024-05-27 16:12:18 -04:00
Emily Xiong c9f3c05ac9 fix(core): keep version for third party preset (#23284)
<!-- 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 -->

## 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 https://github.com/nrwl/nx/issues/23174
2024-05-27 15:38:52 -04:00
Emily Xiong a7c5603691 feat(core): clean up show project --json false (#23486)
<!-- 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 -->

<img width="657" alt="Screenshot 2024-05-27 at 1 54 08 PM"
src="https://github.com/nrwl/nx/assets/16211801/b66bbf57-1d75-485f-bf8e-17a28579a7e5">

## 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-05-27 15:37:04 -04:00
Nicholas Cunningham 6292055aba feat(webpack): Support incremental builds via buildLibsFromSource (#25060)
This PR adds the ability for incremental builds when using the Webpack
Plugin.

Instead of using the source library directly, you can now utilize the
output folder by utilizing the `buildLibsFromSource` option within your
webpack.config file, through `NxAppWebpackPlugin`. This means that
instead of accessing `mylib/src/index.ts`, it will access
`dist/mylib/index.js`.

This directly aligns with incremental builds as it ensures that the
build process only recompiles the source doe that has been modified
since the last build.
2024-05-27 14:04:15 -04:00
Jordan Hall ed1f7a68ea fix(core): prevent max buffer issues with bunlock files (#25985)
Fixes #25978 #25965
2024-05-27 13:29:12 -04:00
Jason Jean 901d17d273 chore(release): fix failing snapshots (#26133)
<!-- 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 -->

Snapshot tests are failing.

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

Snapshot tests are fixed

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

Fixes #
2024-05-27 13:11:27 -04:00
Alice Kile e32b81961f docs(core): elaborate output-style option (#23521)
<!-- 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 -->

`output-style` option's potential values are not explained.

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

add description to `output-style` option's potential values

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

Fixes #20159


![image](https://github.com/nrwl/nx/assets/5159834/15406dcf-80c3-444c-881a-268fcf9704e5)
2024-05-27 11:47:53 -04:00
Nicholas Cunningham 377667eb13 fix(nx-dev): Remove ToC from CI releases page (#26040)
Remove the ToC section from CI releases.

Ref:
https://nx-dev-git-fix-nx-dev-release-page-scroll-nrwl.vercel.app/ci/reference/release-notes
2024-05-27 15:44:32 +00:00
Emily Xiong ef4035a56a feat(graph): add target group for scripts (#26035)
<!-- 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 -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
<img width="1131" alt="Screenshot 2024-05-24 at 3 58 30 PM"
src="https://github.com/nrwl/nx/assets/16211801/9aadeac3-ca74-4449-baf6-21d7c97118aa">

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

Fixes #
2024-05-27 11:06:29 -04:00
Emily Xiong e0450f7969 fix(graph): show script in header (#26034)
<!-- 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 -->

## Expected Behavior
<img width="771" alt="Screenshot 2024-05-24 at 3 48 22 PM"
src="https://github.com/nrwl/nx/assets/16211801/11ad5526-8449-4b9f-9e02-296903855dd5">

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

Fixes #
2024-05-27 10:36:09 -04:00
James Henry aa2519ff62 fix(js): show lifecycle script contents in publish executor, scrub version in dry-run (#23850)
<!-- 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 -->

Lifecycle scripts related to publishing change the output of `npm
publish`, which mixes JSON with non-JSON content despite the `--json`
flag being set. Currently, we will error when attempting to parse the
whole thing as JSON.

The lifecycle scripts contents themselves are not shown to the user.

Additionally, during dry-run we have no choice but to print the version
that currently exists on disk, which can be confusing.

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

We extract and parse the JSON from the `npm publish` output, even when
it is mixed with other output. We also show the lifecycle script outputs
to the user, where applicable.

During dry-run, we replace the version in the publish output with a
placeholder to avoid confusion around what would be published.

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

Fixes https://github.com/nrwl/nx/issues/22925
2024-05-27 10:20:01 -04:00
Jordan Hall 4cbb0f0988 fix(core): add missing bun PM support (#26084)
This fix add support for bun PM in daemon and affected changes.

Helps towards #26053 fix
2024-05-27 10:00:35 -04:00
Jason Jean 33ba03a81f fix(core): do not re-read from nx.json for dependsOn (#26033)
<!-- 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 `nx.json` `dependsOn` for targets already get merged into the
project configuration. When `nx.json` defines a dependsOn for a target
but a plugin overwrites it, the task graph still considers the dependsOn
from `nx.json`

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

The task graph is created based on the project configurations.

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

Fixes #
2024-05-27 09:54:22 -04:00
Jason Jean a5b92c53eb fix(core): include dependencies when hashing nx executors (#26024)
<!-- 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 -->

Dependencies of executors are not hashed when hashing a task.

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

Dependencies of executors are hashed when hashing a task.

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

Fixes #
2024-05-27 09:46:37 -04:00
Leosvel Pérez Espinosa e80edfe543 docs(angular): add angular 18 to nx and angular compatibility version docs (#23905)
https://nx-dev-git-docs-update-nx-ng-matrix-nrwl.vercel.app/nx-api/angular/documents/angular-nx-version-matrix

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

## 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. -->
<!-- NXP-757 -->

Fixes #
2024-05-25 14:51:20 -04:00
Nicholas Cunningham af463c4833 feat(nx-dev): Add canary index (#25982)
This PR updates the Algolia search feature to now point to a canary
index for the master branch.

Adding a `.env.local` file allows local development off master.

I also added env vars to Vercel for both `master` and `website-19` to
point to `nx-canary-production` and `nx-production` respectively.
2024-05-24 11:49:29 -06:00
Leosvel Pérez Espinosa 9d6e5ad48c fix(linter): move eslint to peerDependencies and allow eslint 9 (#26013)
<!-- 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 -->

## 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-05-24 17:31:36 +02:00
Jason Jean d7cd6a2597 chore(repo): update nx to 19.1.0-beta.4 (#25989)
<!-- 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 -->

This repo uses Nx `19.1.0-beta.3`

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

This repo uses Nx `19.1.0-beta.4`

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

Fixes #
2024-05-24 10:22:47 -04:00
James Henry be6453cfbd fix(linter): migrate no-extra-semi rules into user config, out of nx extendable configs (#26011) 2024-05-24 09:59:58 -04:00
MaxKless 10f97b99bc fix(core): use current user when hashing native file & enable setting its directory via env (#24326) 2024-05-24 09:10:51 -04:00
Miroslav Jonaš 61e4ab2eef fix(core): use zkochan/js-yaml directly to avoid false audit errors (#25999)
Some of the audit tools have been falsely flagging the alias to
`@zkochan/js-yaml` as `js-yaml@0.0.7` (which has security holes) so we
decided to use the package explicitly.

## 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-05-24 12:43:18 +02:00
Jason Jean 12c6a734fc fix(core): cache getting the package manager to the module scope (#25992)
<!-- 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 -->

This function is called many times and they all `exec` a command

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

This function is called once and the result is cached.

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

Fixes #
2024-05-23 22:07:29 -04:00
Austin Fahsl 95cea78f66 chore(release): fix e2e test project configuration (#25984)
Fixes an issue with the e2e test project configuration for the Nx
Release e2e tests.
2024-05-23 17:56:52 -04:00
Jason Jean affb98b228 chore(repo): update nx to 19.1.0-beta.3 (#25981)
<!-- 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 -->

This repo uses Nx `19.1.0-beta.1`

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

This repo uses Nx `19.1.0-beta.3`

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

Fixes #
2024-05-23 17:45:35 -04:00
Craigory Coppola a4a185f45b fix(misc): various inference plugins caching should track changes (#23315)
<!-- 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
Plugin's cache entries overwrite each other if multiple instances of the
same plugin are running. They also don't remember previous cache states.

## Expected Behavior
Plugin's caches grow as changes are made, and don't overwrite previous
entries.

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

Fixes #
2024-05-23 17:05:05 -04:00
Jack Hsu 445916f18a feat(testing): remove --watch=false from inferred vitest targets to keep things inlined with vitest recommendations (#25975)
Users should use `vitest`, which will run with watch mode for local dev,
and non-watch mode in CI.

If users need to run `affected` or `run-many` locally they can always
pass `--watch=false` manually. This is the same as running through npm
workspaces or other monorepo tools. IMO, users should be running tests
from their IDEs anyway.

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

## 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-05-23 16:45:29 -04:00
Isaac Mann a1ba0ad700 fix(js): handle tsconfig file with no compilerOptions (#25966)
Handles adding a root `tsconfig.base.json` when there is a root
`tsconfig.json` with no `compilerOptions` property.

Prerequisites:
Have a repository has a root `tsconfig.json` with no `compilerOptions`
property and there is no root `tsconfig.base.json`.

Steps to reproduce:
1. Generate a js library (`nx g @nx/js:lib my-lib`)

Expected results:
Library is created.

Actual results:
There is an error.

```
 NX   Cannot read properties of undefined (reading 'rootDir')
```

This PR fixes the error.
2024-05-23 15:43:35 -04:00
Emily Xiong 94707d9575 fix(core): fix buildTargetFromScript takes a long time (#25209)
<!-- 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 -->

## 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 https://github.com/nrwl/nx/issues/25923
2024-05-23 14:44:48 -04:00
Nicholas Cunningham c1b1c5b388 feat(nx-dev): Add more blogs (#25939)
- Add more blogs
- Add privacy policy link
- Fix blog footer link
- Fix discord server link for all blogs
2024-05-23 11:30:25 -06:00
Jason Jean f728058c7c fix(linter): only depend on eslint v8 (#25938)
<!-- 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/eslint` is bringing in `eslint v9` prematurely.

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

`@nx/eslint` should not bring in `eslint v9` yet. Though, it does have
support for having `v9` installed at the workspace level.

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

Fixes https://github.com/nrwl/nx/issues/25319
2024-05-23 13:23:51 -04:00
James Henry 253de9b985 feat(release): updateDependents generator option for versioning, support circular dependencies (#23252)
<!-- 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 -->

When releasing projects independently, if a dependent project is
untouched directly by the changes, it will not have its version updated
and there is no way to opt into this behavior.

Additionally, circular dependencies between packages are not supported.

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

When releasing projects independently, if a dependent project is
untouched directly by the changes, **BY DEFAULT** it will not have its
version updated, **BUT** you can opt into it always being updated via a
generator option (`release.version.generatorOptions.updateDependents =
auto` and you can control what kind of semver bump should be applied to
the otherwise unchanged dependent project. Transitive local dependents
(`A -> B -> C`) will also be updated in this scenario.

Additionally, when opted into, such version only changes will appear in
the changelog under a new `Updated Dependencies` section.

Circular dependencies between packages are now supported for versioning,
changelog generation and publishing.

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

Fixes #22268
2024-05-23 12:51:38 -04:00
Leosvel Pérez Espinosa 37f02f7e6b feat(angular): support angular 18.0.0 (#22509)
<!-- 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 -->

## 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 #25284
2024-05-23 17:50:04 +02:00
Leosvel Pérez Espinosa 881adfb185 docs(misc): replace angular.io links with angular.dev (#25831)
[Angular.dev](https://angular.dev/) is now the new home for Angular
developers as mentioned in the [Angular 18 release blog
post](https://blog.angular.dev/angular-v18-is-now-available-e79d5ac0affe).

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

## 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 NXP-759 -->

Fixes #
2024-05-23 15:58:53 +02:00
dmcweeney 261b0ff002 fix(release): npm publish error when file path contains spaces (#24750)
## Current Behavior

## Expected Behavior

## Related Issue(s)

Fixes #24682
2024-05-22 22:30:49 -04:00
Jason Jean 7705757c62 fix(misc): adjust npm keywords (#24743)
<!-- 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 -->

NPM Keywords do not include those which are shown under the categories
under the `Discover packages` section. https://www.npmjs.com/

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

NPM Keywords include those which are shown under the categories under
the `Discover packages` section when applicable. https://www.npmjs.com/


![image](https://github.com/nrwl/nx/assets/8104246/ebbd4317-0336-4834-b4eb-0c673a358601)


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

Fixes #
2024-05-22 22:30:10 -04:00
Emily Xiong ebb9233bce fix(js): export setup verdaccio generator (#24008)
<!-- 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 -->

## 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 https://github.com/nrwl/nx/issues/21500
2024-05-22 18:01:20 -04:00
Jack Hsu 58a28e5ddf fix(js): print warning when --generateLockfile is used with Bun rather than erroring out (#25158)
Currently if you pass `--generateLockfile` and use Bun, it'll error out
because the lockfile content is returned as `null`. There is no API to
prune `bun.lockb` files so it's better to skip it with a warning to the
user. We can discuss generating `yarn.lock` file instead as a follow-up.

## 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-05-22 17:58:59 -04:00
Jason Jean dc5f91beee fix(linter): only set flat config env for eslint v9+ (#25189)
<!-- 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 `ESLINT_USE_FLAT_CONFIG` env flag was set unnecessarily even if the
installed version of ESLint is < 9.

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

The `ESLINT_USE_FLAT_CONFIG` env flag is only set if the value is
different than the default in the installed version of ESLint.

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

Fixes #
2024-05-22 17:48:48 -04:00
Jordan Hall 80702b59c7 feat(core): add bun package manager (#22602)
Bun uses yarn lock for it's binary file. Running the binary will produce
the content of a yarn lock file (v1)

Other option is to use the -y command on add and install. This will
create a yarn lock file and then createLockFile can just modify the
yarn.lock file instead?

This is the PR made from #19113 and pushed due to #22402 being closed.

PS Bun feels more stable since the PR was first created!

This PR will resolve #22283 and start of #21075
2024-05-22 16:51:21 -04:00
James Henry 383be1f7d4 fix(core): more helpful output for format:check --verbose (#23503) 2024-05-22 15:05:32 -04:00
TheWrightDev a9783c7627 docs(nx-cloud): Change exec to dlx for GHA Nx cloud agent command. (#24052)
Node modules are installed yet so exec causes `Command "nx-cloud" not
found. ` error.

<!-- 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
The suggested command in recommended position causes an error.

## Expected Behavior
The suggested command in recommended position would not cause an error.

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

Fixes #
2024-05-22 14:34:56 -04:00
Isaac Mann c412bf2d5e docs(core): ci section for tutorials (#24728)
- update CI section in tutorials to not include screenshots of
onboarding flow
- add CI section to `nx init` tutorials
2024-05-22 11:54:15 -04:00
Colum Ferry 64c6287b83 feat(vite): support incremental builds with nxViteTsPaths (#23908)
<!-- 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 -->
We do not support incremental builds with vite when using inference
plugin


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Support incremental builds with vite when using inference plugin

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

Fixes #
2024-05-22 16:30:53 +01:00
James Henry 8cfc0a0c08 fix(linter): support eslint v9 (#24632) 2024-05-22 19:27:06 +04:00
Jason Jean 6e6211d072 chore(repo): update nx to 19.1.0-beta.1 (#24023)
<!-- 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 -->

This repo uses Nx 19.0.0-rc.1

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

This repo uses Nx 19.1.0-beta.1
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-05-22 10:18:53 -04:00
Chabbey François 32030435b7 docs(core): fix dependsOn snippet in project configuration reference (#23668)
I'm not totally sure, but by reading the docs, the intent of the first
example is to say that the test target depends of the build target.
Otherwise, it would mean that the build target depends of the build
target, which does not make sense. Or did I misunderstood something in
the doc ?

Co-authored-by: U812320 <francoisjulien.chabbey@mobi.ch>
2024-05-22 14:42:18 +02:00
Isaac Mann 89fdd42c80 chore(core): update devcontainer (#23479)
Updates the devcontainer so that it has the correct version of pnpm

Fixes #20419
2024-05-21 18:37:09 -04:00
Emily Xiong 08ef0e4bde feat(graph): show script content in header (#23257)
<!-- 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 -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
![Screenshot 2024-05-15 at 10 32
54 AM](https://github.com/nrwl/nx/assets/16211801/1ef4d67f-94e5-46bd-bcee-b966984e86cd)

<img width="1023" alt="Screenshot 2024-05-08 at 5 53 06 PM"
src="https://github.com/nrwl/nx/assets/16211801/cb9161bd-fc4a-4965-89f7-09ce8d72226e">

<img width="585" alt="Screenshot 2024-05-08 at 5 52 51 PM"
src="https://github.com/nrwl/nx/assets/16211801/760ebe19-1c29-4fad-ba9d-174b8303a362">


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

Fixes #
2024-05-21 18:11:04 -04:00
Nicholas Cunningham 992ae85192 docs(nx-dev): Add deprecation message for aws-lambda (#23971)
Adds deprecation message for `@nx/aws-lambda` since the module is
deprecated and unmaintained.

Ref: https://www.npmjs.com/package/@nx/aws-lambda

closes: #23520
2024-05-21 13:26:15 -06:00
James Henry b641852d9c chore(repo): teardown local registry in case of setup error (#23470) 2024-05-21 11:05:14 -04:00
Colum Ferry 44429451c8 fix(devkit): combineAsyncIterable should not be blocking when error occurs #21393 (#23400)
<!-- 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 -->
`combineAsyncIterators` has a `finally` block which is blocking
execution waiting for all iterators to be `done` so it can call the
`return` function as cleanup.
This leads to prolonged execution when unnecessary, such as when an
error has occurred.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
`finally` block should be non-blocking allowing errors to be immediately
surfaced and execution to stop.

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

Fixes #21393
2024-05-21 10:36:56 -04:00
Younes Jaaidi a7bc3006a4 fix(release): invalid tag for fixed groups without changes (#22800) 2024-05-21 18:29:38 +04:00
MaxKless d8f84893e8 docs(misc): add Nx Console Troubleshooting page to Troubleshooting section (#23869)
<!-- 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 -->

## 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-05-21 10:18:32 -04:00
Isaac Mann aedea54624 chore(nx-dev): check for broken anchor links (#23580)
Checks for broken anchor links, except for links that go to `/nx-api` or
`/blog`
Fixes existing broken anchor links
2024-05-21 09:31:37 -04:00
Leosvel Pérez Espinosa 6be46cfe56 fix(core): install packages per migration when creating commits (#23820)
<!-- 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 -->

## 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 #23505
2024-05-21 13:34:01 +02:00
Colum Ferry 1255603203 fix(react): applications not using plugin usage should set target defaults (#23582)
<!-- 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 -->
Generating applications when `addPlugin: false` is not setting
targetDefaults that are expected to be added by inference plugins to the
individual targets


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
When `addPlugin: false`, specifically set `targetDefaults.build`
correctly.

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

Fixes #
2024-05-20 16:41:07 +01:00
Colum Ferry 5813bb321c chore(repo): ensure changes to vite plugin are handled correctly (#23578)
<!-- 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 -->
Updating the vite plugin and the config it produces should correctly
fail where needed.
Currently, `@nx/vite` depends on `@nx/js`, however, `@nx/js` also
depends on `@nx/vite`.
There is a circular dependency there which is more difficult to
circumvent.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
To avoid circular dependency issues, move the tests that test the output
of `vite.config.ts` to the `@nx/vite:configuration` specs from the
`@nx/js:library` specs.


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

Fixes #
2024-05-20 15:49:08 +01:00
Leosvel Pérez Espinosa c240c2685e feat(core): allow executor definition to point to another executor (#23576)
Add support for executor definitions that point to another executor. The
upcoming Angular 18 uses this feature:
https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/build_angular/builders.json#L4,
so we need to be able to resolve the builders correctly using such a
configuration.

Note: the change is also in [the Angular 18
PR](https://github.com/nrwl/nx/pull/22509), where it's tested with the
Angular version that requires it. I'm extracting the change to this PR
to facilitate reviews and reduce the size of the Angular 18 PR.

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

## 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-05-20 15:51:14 +02:00
Miroslav Jonaš 0eb86c849c fix(core): fix alias package parsing and pruning for npm (#23474)
<!-- 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 -->

## 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 #22098
Fixes #21180
Fixes #21009

---------

Co-authored-by: James Henry <james@henry.sc>
2024-05-20 15:21:38 +02:00
Isaac Mann cf33e31be3 docs(core): fix common inputs set link (#23504)
Fix common inputs link
2024-05-20 08:12:09 -04:00
Miroslav Jonas 65e6727bdc chore(repo): remove leftover console from test 2024-05-20 11:18:12 +02:00
Phillip Barta f1ae1bc879 fix(core): remove duplicate js-yaml packages 2024-05-20 10:23:06 +02:00
Jason Jean 352372053c fix(repo): hash proper projects when nx (#23506)
<!-- 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 `prepopulate-local-registry` task was not being hashed according to
the packages properly.

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

The `prepopulate-local-registry` task is hashing the packages we build
for publishing.

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

Fixes #
2024-05-17 16:42:24 -04:00
Jack Hsu 53345f2241 fix(nextjs): additional experimental HTTPS options (#23334)
There are three additional flags if user wishes to generate their own
key, cert, ca files rather than the auto-generated ones by Next.js.



## Current Behavior
Cannot pass additional CLI options.

## Expected Behavior

Can  pass additional CLI options for custom files.

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

Closes https://github.com/nrwl/nx/discussions/23331
2024-05-17 14:50:47 -04:00
Emily Xiong 248949f905 feat(graph): change gradle and nextjs svg (#23201)
<!-- 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 -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
change the SVG to match cloud
https://github.com/nrwl/ocean/pull/4907/files

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

Fixes #
2024-05-17 14:35:12 -04:00
Colum Ferry b90f04ae9b chore(vite): update snapshots in other packages for emptyOutDir (#23502)
<!-- 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 -->

## 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-05-17 19:07:16 +01:00
Nicholas Cunningham d289134bb0 fix(web): Add strict mode for @nx/web (#23497) 2024-05-17 20:29:32 +04:00
Colum Ferry 6f2c6ed352 fix(react): remote generator should update host's app routes (#23499)
<!-- 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 -->
When parsing the source file for updating the host's app.tsx file,
typescript was not parsing the file as a TSX file.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The file should be parsed as TSX

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

Fixes #
2024-05-17 16:05:51 +00:00
Colum Ferry 9451046a40 fix(vite): add prop to config to ensure output dir is emptied #23382 (#23466)
<!-- 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 -->
We do not generate `emptyOutDir` when creating vite config, which throws
a warning and does not delete the output directory when it is outside
the project root.
This is common in integrated workspaces


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
`emptyOutDir` should be added to the config

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

Fixes #23382
2024-05-17 10:05:17 -06:00
Jonathan Cammisuli 3bbc964688 fix(core): only check for err in handleWorkspaceChanges (#23500)
<!-- 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 -->
When there are watch event changes, and we filter them all out, we get
an empty `changedEvents` array. There were previous checks that had a
`!changedEvents.length` condition that resolved to true when the length
was 0.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
We now check to see if `err` is set before triggering the error branch

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

Fixes #23031
2024-05-17 11:55:09 -04:00
Emily Xiong a53fee8988 fix(react-native): fix test-setup for react native/expo jest (#23314)
<!-- 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 -->

## 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 https://github.com/nrwl/nx/issues/23027
https://github.com/nrwl/nx/issues/22198
2024-05-17 11:43:06 -04:00
Leosvel Pérez Espinosa 217a349adc fix(testing): handle existing jest preset file correctly (#23437)
<!-- 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 -->

## 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 #20449
2024-05-17 08:26:29 -06:00
James Henry 937019b172 chore(repo): disable failing e2e-node test src/node-server.test.ts (#23488) 2024-05-17 08:19:44 -06:00
Colum Ferry 9f712770bf docs(core): clarify automate updating dependencies #23460 (#23465)
<!-- 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 current doc is ambiguous around whether third party packages will be
updated when running `nx migrate`


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Clarify that running `nx migrate` may sometimes update third party
packages

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

Fixes #23460
2024-05-17 15:10:01 +01:00
Jason Jean 443df168c5 docs(core): update node compatibility table (#23443)
<!-- 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 node compatibility table does not have v19 listed.

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

Node compatibility table has v19 listed with Node v22 supported.

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

Fixes #
2024-05-17 10:02:04 -04:00
James Henry c560b2bba6 Revert "fix(web): Add strict mode" (#23472)
Reverts nrwl/nx#23457
2024-05-17 15:05:29 +02:00
Colum Ferry 4315e91970 fix(angular): @angular/core should always be provided as a shared package #19121 (#23464)
<!-- 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 -->
In our Module Federation utils for Angular, we set some packages that
should always be shared.
This array was missing `@angular/core` which should be shared at all
times for DI to function as expected


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Ensure `@angular/core` is shared

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

Fixes #19121
2024-05-17 10:59:41 +01:00
Nicholas Cunningham 0f47f03451 fix(web): Add strict mode (#23457)
This PR adds the option of `strict` when using `@nx/web:app` generator.

It also updates the application generator by separating utility
functions into their own modules.


closes: #9238
2024-05-16 21:38:19 -06:00
Craigory Coppola 312b271457 Revert "feat(core): support finding matching projects with only negative patterns (#22743)" (#23459)
This reverts commit 897578676d.

Fixes https://github.com/nrwl/nx/issues/23458
2024-05-16 17:46:34 -04:00
Nicholas Cunningham 1b7cf426c2 fix(node): Docker generator should work (#23452)
Also fixes the unit tests for node package

## Currently

When you generate a docker file using either the node generator or the
node:setup-docker generator using inferred targets would create the
DockerFile but the COPY command would be incorrect.

It would resemble something similar to
```
//...

COPY   acme 

//etc...

```

## Expected

Now it generates the correct command.

```
//...

COPY dist/acme  acme/

//etc...

```

closes: #23365
2024-05-16 15:15:40 -06:00
Nicholas Cunningham 2e630568eb fix(react): respect unitTestRunner passed to the generator (#23383)
closes: #22276
2024-05-16 14:59:57 -06:00
Jack Hsu e4a4121ca4 docs(core): add a page for Nx releases (#23455)
Add a page (under References > Releases) to show current LTS versions
and policies on deprecation and breaking changes. Also link to it from
the Changelog.

Preview:
https://nx-dev-git-docs-releases-nrwl.vercel.app/reference/releases



## 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 #23220
2024-05-16 16:36:36 -04:00
Isaac Mann 195e1824fc docs(core): list version for runtime input (#23456)
Specifies which version of Nx allows `runtime` inputs to be listed in
the `inputs` property.

Fixes #17594
2024-05-16 15:44:07 -04:00
Isaac Mann 04b2067ad5 fix(core): azure ci workflow (#23453)
The Azure pipelines CI generator had an invalid step

`displayName` can't be the first line of a step
2024-05-16 19:11:58 +00:00
Isaac Mann f1f2024ea8 docs(core): fix links (#23378)
Fixes #21793
2024-05-16 14:57:08 -04:00
Louie Weng 22d7ea21cc docs(nx-cloud): update start-ci-run docs with --force flag and cleanup command (#23168)
<!-- 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 -->
Updates docs to include `nx-cloud cleanup` command as an alternative to
resetting your system after running `nx-cloud start-ci-run`.

Also provides more context about `nx-cloud start-ci-run`'s check for
local environments and how to bypass this check with the `--force` flag.

## 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-05-16 11:42:06 -07:00
Leosvel Pérez Espinosa 8685e10173 feat(core): resolve nx migrate target version against registry (#23450)
<!-- 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 -->

## 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 #21418
2024-05-16 19:20:01 +02:00
Craigory Coppola 7a34a4603c fix(core): migrate should warn if package does not exist (#23317)
<!-- 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
Migrations are a noop if the package can't be fetched

## Expected Behavior
There is a warning if the package doesn't exist

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

Fixes #22308
2024-05-16 12:55:59 -04:00
Colum Ferry 504d0482fa fix(webpack): only add entrypoints if they are intentionally injected #20049 (#23444)
<!-- 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 -->
We are still injecting `styles` and `scripts` even if `inject=false` in
`project.json`.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Do not inject styles and scripts if `inject=false`

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

Fixes #20049
2024-05-16 12:48:14 -04:00
Leosvel Pérez Espinosa 5757350ebd fix(core): do not add an ending new line when serializing a json (#23440)
<!-- 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 -->

## 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 #19315
2024-05-16 17:44:51 +02:00
Colum Ferry 381e5cd494 fix(vue): ootb unit testing should work with --routing #19921 (#23441)
<!-- 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 -->
When generating a vue application with routing and testing, the test
setup is incorrect and fails


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The test setup for vue applications with routing should work OOTB

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

Fixes #19921
2024-05-16 09:38:16 -06:00
Phillip Barta e9bf1a2acb chore(misc): remove unused dependency tar-fs (#23421)
<!-- 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 -->
unused dependency `tar-fs`

## 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-05-16 11:28:28 -04:00
Katerina Skroumpelou f0bfb56fae fix(js): fix update package.json (#21415)
Co-authored-by: xiejay97 <xiejay97@gmail.com>
2024-05-16 18:13:38 +03:00
Jonathan Cammisuli 62274c958e chore(core): fix cargo build warnings (#23436) 2024-05-16 11:01:56 -04:00
MaxKless c7f60fcf54 fix(graph): reload graph app only when hash changes in watch mode (#23434) 2024-05-16 10:23:53 -04:00
castleadmin 7f32d8643d feat(bundling): added support for declarations (*.d.ts) (#21084)
<!-- 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
esbuild doesn't support the creation of declaration files (*.d.ts) and
probably never will (see https://github.com/evanw/esbuild/issues/95).
Since declaration files are essential for published libraries,
it would be great if @nx/esbuild:esbuild would provide an option to
output them.

## Expected Behavior

- Introduced a new boolean valued `declaration` option for the `esbuild`
executor
- If `declaration` or the tsconfig option
[declaration](https://www.typescriptlang.org/tsconfig#declaration) is
true,
then the TypeScript compiler is used before esbuild to generate the
declarations
- The output directory structure of the declarations can be influenced
by setting the TypeScript rootDir via the `declarationRootDir` option

## Related Issue(s)
https://github.com/nrwl/nx/issues/20688

### Additional Comment
Please note that the generated declaration files directory structure is
affected by the tsconfig `rootDir` property.

For a library that doesn't reference other libraries inside the
monorepo, the `rootDir` property can be changed freely.
If a library inside the monorepo is referenced the `rootDir` property
must be set to the workspace root.

The `tsc` executor has a sophisticated check that automatically sets the
`rootDir` to the workspace root if a library is referenced.

https://github.com/nrwl/nx/blob/master/packages/js/src/executors/tsc/tsc.impl.ts#L104

This check is quite complex and specific to the `tsc` executor options.
Therefore, it hasn't been included inside the esbuild implementation.

The current implementation leaves it to the user to solve the edge case
by removing the `declarationRootDir` option or by setting the
`declarationRootDir` to `.`.

In the future, it might make sense to generalize and use the `tsc`
executor check.
2024-05-16 17:16:43 +03:00
James Henry 24060dc650 chore(repo): prepopulate verdaccio storage for e2e-ci (#23429) 2024-05-16 10:06:25 -04:00
Colum Ferry b164569e9d docs(angular): bring incremental build docs up to date (#23424)
<!-- 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 incremental build docs for angular are currently outdated


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Bring the incremental build docs up to date


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

Fixes #
2024-05-16 11:24:07 +01:00
Colum Ferry 34547b30d1 fix(angular): libraries should not contain tslib by default #21023 (#23423)
<!-- 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 -->
When generating buildable and publishable angular libraries, we always
add `tslib` to the `package.json#dependencies`.
These libaries may not actually use this dependency and therefore it is
redundant.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Do not add `tslib` by default.
If users need it, they can add it when they do.

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

Fixes #21023
2024-05-16 11:23:55 +01:00
Jason Jean d581cef194 chore(js): update verdaccio to 5.30 (#23413)
<!-- 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 -->

This repo uses `verdaccio@5.14.4`

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

This repo uses `verdaccio@5.30.0`

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

Fixes https://github.com/nrwl/nx/issues/20151
2024-05-15 17:12:12 -04:00
Nicholas Cunningham efdfb694f2 fix(js): Respect loose option provided from config (#23406)
closes: #21937
2024-05-15 14:05:17 -06:00
Craigory Coppola 425d442d44 feat(core): default show to web view when in interactive terminal (#23358)
<!-- 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
`nx show projects` shows unformatted json by default

## Expected Behavior
In a TTY we open web view by default

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

Fixes #20650
2024-05-15 13:32:27 -04:00
Jonathan Cammisuli 74a2166ca8 docs(core): add documentation about custom steps for nx cloud workflows (#23385)
<!-- 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 -->
There is no documentation for creating custom steps for nx cloud agents

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
There is now a section dedicated to creating custom steps. 

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

Fixes #
2024-05-15 12:19:02 -04:00
Craigory Coppola 1acbc7e555 fix(core): retry interrupted errors when writing to stdout (#23359)
<!-- 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 -->

## 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-05-15 10:57:07 -04:00
MaxKless 5ce53374c7 fix(core): copy native files to tmp file location instead of .nx/cache (#23375)
## Current Behavior
Currently, the `.node` files required to load native code are saved in
`.nx/cache`. This can cause different issues:
- users on windows sometimes experience errors during `nx reset` because
it's trying to delete the entire folder and some process is still
locking the file
- `@angular-eslint` users are seeing the `.nx/cache` folder in their
workspace since it uses `@nx/devkit`

## Expected Behavior
We want no errors and for noone to be bothered by the `.node` file. This
is why we move the `.node` file to a tmp location outside the workspace
instead of `.nx/cache`. We still make sure to delete it during `nx
reset` but throw no errors if that fails. It will simply be deleted by
the next invocation of `nx reset`.

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

Fixes https://github.com/nrwl/nx/issues/23224
2024-05-15 10:46:38 -04:00
Leosvel Pérez Espinosa 9af7386d61 fix(testing): check for project eslint config file in cypress and pla… (#23401)
…ywright configuration generators

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

## 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 #21301
2024-05-15 10:45:36 -04:00
Colum Ferry c8c1304738 chore(gradle): use -version when logging java version in e2es (#23372)
<!-- 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 -->
Java 9 has changed the version flag to single `-`
Our e2es are trying to use `--`


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


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

Fixes #
2024-05-15 10:16:42 -04:00
MaxKless 5221103242 fix(graph): properly remove <base> tag when generating static graph file (#23399) 2024-05-15 15:31:48 +02:00
Leosvel Pérez Espinosa c4343948ca fix(testing): ignore jest-sequencer- paths in jest resolver (#23396)
<!-- 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 -->

## 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 #20865
2024-05-15 14:45:07 +02:00
Barry Michael Doyle 38a947f7f8 docs(nx-dev): update define-environment-variables.md changed NX_ to… (#23397)
## Current Behavior
Incorrect environment variable prefix `NX_` in docs.

## Expected Behavior
Correct environment variable prefix `NX_PUBLIC_` in docs.

## Related Issue(s)
https://github.com/nrwl/nx/issues/23362
2024-05-15 12:32:16 +02:00
Emily Xiong a2a7d7eaf7 fix(core): fix eslint --help command (#23274)
<!-- 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 -->

## 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-05-14 21:53:58 -04:00
Jason Jean 722b2d0fac fix(core): fix affected detection for inputs after named inputs (#23354)
<!-- 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 -->

Inputs after named inputs are not considered for affected.

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

Inputs after named inputs are considered for affected...

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

Fixes #
2024-05-14 20:23:50 -04:00
Jason Jean 09fd1bbd0c chore(core): fix failing unit test (#23392)
<!-- 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 -->

Getting inputs sometimes may cause Nx to panic

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

Getting inputs will return an error rather than panic which should come
along with stack traces.

Also, a test which sometimes.. triggered the panic... is maybe fixed?

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

Fixes #
2024-05-14 18:51:14 -04:00
Jason Jean cfadd7d8cf Revert "fix(core): addPlugin should not conflict on project.json targ… (#23391)
…ets (#23264)"

This reverts commit 85c89160

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

## 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-05-14 18:01:30 -04:00
castleadmin e28d872bf6 chore(core): nx plugin submission nx-serverless-cdk (#21085)
<!-- 
_[Please make sure you have read the submission guidelines before
posting an
PR](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#submit-pr)_

# Community Plugin Submission

Thanks for submitting your Nx Plugin to our community plugins list. Make
sure to follow these steps to ensure that your PR is approved in a
timely manner.

## Plugin Requirements

Before you submit your plugin to be listed in our registry, it needs to
meet the following requirements:
- Run some kind of automated e2e tests in your repository
- Include `@nx/devkit` as a `dependency` in the plugin's `package.json`
- List a `repository.url` in the plugin's `package.json`

i.e.

```
{
  "repository": {
    "type": "git",
    "url": "https://github.com/nrwl/nx.git",
    "directory": "packages/web"
  }
}
```

Note: We reserve the right to remove unmaintained plugins from the
registry. If the plugins become maintained again, they can be
resubmitted to the registry.

## Steps to Submit Your Plugin
- Use the following commit message template: `chore(core): nx plugin
submission [PLUGIN_NAME]`
- Update the `community/approved-plugins.json` file with a new entry for
your plugin that includes `name`, `url`, `description`:

Example:

```json
// community/approved-plugins.json

[{
    "name": "@community/plugin",
    "url": "https://github.com/community/plugin",
    "description": "This plugin provides the following capabilities."
}]
```

Once merged, your plugin will be available when running the `nx list`
command, and will also be available in the Plugin Registry on
[nx.dev](https://nx.dev/plugin-registry)
-->

# Community Plugin Submission

## nx-serverless-cdk

nx-serverless-cdk is an Nx plugin for creating AWS CDK applications and
construct libraries inside an Nx monorepo.
It offers the possibility to test and debug infrastructure code and AWS
Lambda functions locally.
The plugin provides the full flexibility of the AWS CDK CLI and the
local AWS SAM CLI commands.
It aims to make the usage of these tools as easy as possible inside an
Nx monorepo.

Author: Tobias Willig
2024-05-14 16:12:55 -04:00
Jonathan Gelin 1393679932 Nx Plugin Submission @huge-nx/conventions (#23291)
HugeNx is a toolkit designed to dynamically generate and manage [Nx
workspaces](https://nx.dev/) by adhering to established workspace
conventions.


![image](https://github.com/nrwl/nx/assets/954509/5ff5153d-eae6-4d99-a9e7-0f3c21e35353)

More info: https://github.com/jogelin/huge-nx
2024-05-14 14:30:22 -04:00
Isaac Mann 6c0ba0ee3a docs(core): local links should not use nx.dev (#23380)
Ensure that local links start with `/` instead of `https://nx.dev/`
2024-05-14 14:19:49 -04:00
Emily Xiong 9122b85616 fix(core): not load env files when NX_LOAD_DOT_ENV_FILES is false (#23231)
<!-- 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 -->

## 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 #23090
2024-05-14 13:54:24 -04:00
Jason Jean a25c2f6a81 chore(misc): fix failing remove unit tests (#23373)
<!-- 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 -->

## 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-05-14 13:32:17 -04:00
Nicholas Cunningham 66b910644b feat(nextjs): Update Next & Tailwindcss Package (#23313)
Update next.js to `14.2.4`
Update tailwindcss to `3.4.3`
closes: #22918
2024-05-14 10:33:47 -06:00
MaxKless 6c36bef06b fix(core): read socket dir on demand & load .env files on client startup (#23348)
<!-- 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
The daemon doesn't correctly read the `NX_DAEMON_SOCKET_DIR` env
variable if it's set in `.env`.
Also, the `.env` files aren't loaded if the daemon client is imported &
used directly (like it is in Nx Console).


## Expected Behavior
The daemon should correctly read the `NX_DAEMON_SOCKET_DIR` variable
regardless of where it's specified and setting it shouldn't cause any
issues with Nx Console.

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

Fixes https://github.com/nrwl/nx-console/issues/2114
2024-05-14 11:09:31 -04:00
arekkubaczkowski d4140b06fc feat(react-native): add optional syncDeps param to storybook executor (#22032)
closed #22009

<!-- 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
storybook executor runs syncDeps automatically without option to disable
it

## Expected Behavior
as per #22009 we might need to disable syncDeps step at some
circumstances.
2024-05-14 10:09:10 -04:00
Piotr Kuczynski 7611671994 docs(release): add configure changelogs (#23324)
## Current Behavior
Documentation is missing

## Expected Behavior
Documentation should be there...

---------

Co-authored-by: Isaac Mann <isaacplmann@gmail.com>
2024-05-14 09:51:26 -04:00
Colum Ferry 88297dd727 fix(vite): migration should handle config object correctly #20921 (#23364)
<!-- 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 migration to update vite config is incorrectly matching other object
literal and arrow functions


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Ensure more accurate updating of vite config file

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

Fixes #20921
2024-05-14 14:21:22 +01:00
Colum Ferry 3e8496721d fix(webpack): apply-base-config should initialize options it will set #23296 (#23368)
<!-- 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 `@nx/webpack/plugin` will resolve and read webpack options from user
defined config files.
However, it does not set the env vars indicating that a task is being
run, because tasks are not being run at this stage.

This means that certain config properties are not being set by
`applyBaseConfig`.

Users' webpack configs may rely on these properties being set so they
can modify them.
When not set, this throws, meaning the graph cannot be constructed.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Initialize the properties that we usually set when `applyBaseConfig` is
used.


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

Fixes #23296
2024-05-14 14:19:47 +01:00
Colum Ferry 61b7549ba9 chore(repo): e2e matrix (#23363)
## Current Behavior
<!-- This is the behavior we have today -->
E2E Matrix is not running because python 3 on macos does not come with
required modules pre-installed

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Install the required python modules before running `pnpm install`

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

Fixes #
2024-05-14 10:44:29 +01:00
Nicholas Cunningham cc9b7f3b39 Fix/nx dev header enterprise (#23355) 2024-05-13 20:47:36 -04:00
Denis Bendrikov b5d477580e fix(core): properly indent command output with mixed line endings (#23321)
<!-- 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
The command output is not indented when it has mixed line endings
(`crlf` and `lf`)


![image](https://github.com/nrwl/nx/assets/1770529/5f65e9c4-ded2-4fba-a6c8-9f22297b2b35)

## Expected Behavior

![image](https://github.com/nrwl/nx/assets/1770529/c8111456-407e-47af-8129-4efa6f5792ca)

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
2024-05-13 18:53:58 -04:00
Craigory Coppola 593790d471 fix(misc): guard against failure to decode file in migration (#23069)
<!-- 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
A migration in `nx` (escape-dollar-sing-env-variables) does not guard
against non utf-8 files, and can result in a crash during the migration
run.

## Expected Behavior
If it fails to parse a file, we'll log a message and keep going.

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

Fixes #22956
2024-05-13 16:34:59 -04:00
Craigory Coppola 897578676d feat(core): support finding matching projects with only negative patterns (#22743)
<!-- 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
Passing `--projects !tag:someTag` would select 0 projects, since the
only pattern is negative

## Expected Behavior
Passing `--projects !tag:someTag` would select X projects, where X is
the number of projects without someTag.

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

Fixes #
2024-05-13 16:33:06 -04:00
Nicholas Cunningham d879279fc1 fix(nextjs): Moving a library using @nx/workspace:move should update … (#23311)
## Current
When you using `@nx/workspace:move` after create a Next.js library the
server path remains unchanged.

## Expected
The server path is changed as well as the main entry point for the
library path.

Fixes: #20821
2024-05-13 12:48:27 -06:00
Colum Ferry 61255ce540 fix(js): copy assets handler should correctly handle assets on windows (#23351)
<!-- 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 -->
CopyAssetsHandler was not outputting the assets in the correct location
due to issues with `path/posix`.
`path/posix` is required for some areas of this code, like `minimatch`.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
`minimatch` ignores should continue to work as expected
assets should be output to the correct location

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

Fixes #
2024-05-13 19:44:53 +01:00
Jason Jean 461b901a38 fix(linter): fix migrating projects with the eslint plugin (#23147)
<!-- 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 -->

Creating a new project with ESLint is mistakenly creating a
`eslint.base.config.js`.

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

Creating a new project with ESLint only creates a
`eslint.base.config.js` file when the repo was originally standalone and
the second project is made.

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

Fixes #
2024-05-13 14:27:56 -04:00
Leosvel Pérez Espinosa 5fea49a980 fix(vite): generate vitest cache dir scoped to each project root and normalize vite cache dir (#23330)
- Update Vitest `cache.dir` to be scoped to each project root to avoid
collisions (same as what's already done for Vite)
- Normalize Vite `cacheDir` to avoid trailing `/.` paths for root
projects
- Fix Remix & Storybook Vite `cacheDir` generation 

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

## 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 #21775
2024-05-13 14:14:43 -04:00
Isaac Mann 0bfd75f8b3 fix(nx-dev): move table of contents down (#23350)
Move the top of the table of contents down
2024-05-13 14:02:48 -04:00
Colum Ferry 61129f49c2 fix(storybook): should handle inferred cypress when generating cypress project #21770 (#23327)
<!-- 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 `@nx/storybook:cypress-project` generator expects there to be a
defined target for e2e target.
However, since the introduction of inference, this may not be the case.
This results in the generator erroring


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The `@nx/storybook:cypress-project` generator should handle inference
and generate an appropriate cypress.config.ts file


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

Fixes #21770
2024-05-13 18:23:14 +01:00
Jack Hsu 99543b5a01 docs(core): update rescope message from Nx 19 to 20 (#23349)
<!-- 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 -->

## 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-05-13 12:55:21 -04:00
Leosvel Pérez Espinosa 1a981f749e fix(testing): resolve absolute paths for ts path mappings in jest resolver (#23346)
<!-- 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 -->

## 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 #22617
2024-05-13 18:42:16 +02:00
Jason Jean 6f197e910c fix(core): throw a specific error for print-affected and affected graph (#23336)
<!-- 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 -->

A non-descriptive error is thrown when using the recently removed
`print-affected` and `affected:graph` commands.

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

A descriptive error is thrown when using the recently removed
`print-affected` and `affected:graph` commands.

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

Fixes #
2024-05-13 12:04:03 -04:00
Jack Hsu 0f5e14ce2c chore(repo): update deps to remove critical vulnerabilities (#23338)
The root `package.json` has two deps that resulting critical
vulnerabilities.

```
$ pnpm audit --audit-level=critical
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ critical            │ Cross-realm object access in Webpack 5                 │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ webpack                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=5.0.0 <5.76.0                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=5.76.0                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │                                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-hc6q-2mpp-qw7j      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ critical            │ Babel vulnerable to arbitrary code execution when      │
│                     │ compiling specifically crafted malicious code          │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ @babel/traverse                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <7.23.2                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=7.23.2                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │                                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-67hx-6x53-jw92      │
└─────────────────────┴────────────────────────────────────────────────────────┘
46 vulnerabilities found
Severity: 6 low | 26 moderate | 12 high | 2 critical
```

`webpack` is caused by outdated `@nestjs/cli`, which is now `^10.0.2` in
`packages/nest/src/utils/versions.ts`. `styled-components` is not needed
so is removed.

## 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-05-13 12:03:36 -04:00
Colum Ferry 85c8916087 fix(core): addPlugin should not conflict on project.json targets (#23264)
<!-- 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 -->
Calculating conflicts in target names does not consider if the
project.json defined targets will actually be impacted by the plugin
that wants to be added creating false negatives

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Calculating conflicts should be more accurate

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

Fixes #22476
2024-05-13 10:53:09 -04:00
Isaac Mann 08654e1966 feat(nx-dev): put banner above menu (#23335)
Moves the banner above the menu
2024-05-13 10:40:13 -04:00
Nicholas Cunningham 9cd0b420d1 feat(react): Add SvgOptions for NxReactWebpackPlugin and WithNx (#23283)
This PR adds the ability to now override our svg options by providing
them either using `NxReactWebpackPlugin` for react apps or `withNx` for
Next.js apps

```
new NxReactWebpackPlugin({
  svgr: {
    svgo: true,
    titleProp: true,
    ref: true,
  }
}),
  ```

This now gives you control on customizing how the svg is handled. Should you need to enable svgo you can provide the config using `svgr.config.js`

https://react-svgr.com/docs/options/#svgo

closes: #9487
2024-05-13 08:15:44 -06:00
James Henry 8cda56ed36 fix(nx-cloud): ensure generated ci workflows use dlx for nx-cloud (#23333) 2024-05-13 17:50:30 +04:00
Colum Ferry 4f316085d8 fix(core): workspace remove generator should handle no root jest config (#23328) 2024-05-13 16:34:49 +04:00
Dmitry Zakharov 7561e71b1a fix(linter): rename languageSettings to languageOptions for flat config migration (#22924) 2024-05-11 14:58:30 +04:00
Denis Bendrikov 1ef6f27aba fix(linter): log transpilation errors of workspace rules (#21503) 2024-05-11 14:55:08 +04:00
Mehrad Rafigh f7dcf433c3 fix(core): include more binary extensions (#22788) (#22861) 2024-05-10 18:50:11 -04:00
Isaac Mann 186a420a74 docs(core): decisions section (#23038)
Create an "Organizational Decisions" section under Concepts for
recommendations and discussions about how to set up Nx that aren't firm
requirements.
2024-05-10 15:42:46 -04:00
Patrick P 88ac601798 fix(js): Adds mjs files to prettierrcNameOptions (#21796)
<!-- 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 -->
when running a generator, it does not check for the existence of a
prettier.config.mjs or .prettierrc.mjs file

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
When using a generator, it check for the existence of all config file
names specified in the docs.

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


Fixes https://github.com/nrwl/nx/issues/21795

adds .mjs file names to checks
2024-05-10 13:26:34 -06:00
Jason Jean efe4cb1e47 fix(misc): move e2e-ci to a separate parallel 1 command (#23305)
<!-- 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 generated `ci-workflow` runs `e2e-ci` with `parallel: 3` by default.

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

The generated `ci-workflow` runs `e2e-ci` in a separate step with
`parallel: 1`.

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

Fixes #
2024-05-10 14:47:52 -04:00
MaxKless e4223b3b31 docs(nx-cloud): fix nx-cloud validate command example path (#23306) 2024-05-10 17:42:14 +02:00
Patrick Sullivan 77e926a057 docs(core): fix jest link text (#23286)
- revised the user-facing link name for the Jest link in the "Set up"
section to accurately read `@nx/jest` instead of `@nx/playwright`
2024-05-10 17:29:45 +02:00
Leosvel Pérez Espinosa fd71b6bcab cleanup(misc): improve check for whether stats should be recorded (#23234)
<!-- 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 -->

## 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-05-10 11:22:06 -04:00
Colum Ferry 7cf09a677f fix(vite): support passing --watch to inferred vitest commands (#23298)
<!-- 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 -->
We currently do not handle passing `--watch` when running inferred
`vitest` commands

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
We should support handling `--watch`

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

Fixes #23185
2024-05-10 15:31:59 +03:00
James Henry 613fdb07c2 fix(linter): ensure all spreads are removed from rules before parsing (#23292) 2024-05-10 14:03:05 +04:00
Zz 16217634e5 docs(core): fix deployment docs example code (#23289)
<!-- 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

Using example code directly will result in an error because a
`PackageJson` object cannot be parsed to the `writeFileSync` function.

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

Replace the `writeFileSync` fn with the `writeJsonFile` fn from
'@nx/devkit'
2024-05-10 10:30:06 +02:00
Isaac Mann 1a85787e1c docs(core): fix reference to missing example (#23281)
Fixes #20946
2024-05-09 22:04:54 -04:00
Isaac Mann 0e199cdf11 feat(nx-dev): check for missing images (#23248)
Checks for broken image links
2024-05-09 15:59:47 -04:00
Jonathan Cammisuli 6dd9455b67 docs(core): add launch template validation section (#23268)
<!-- 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 -->
There is no documentation on how to use `nx-cloud validate`

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
There is now documentation showing how to validate custom launch
templates using `nx-cloud validate`

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

Fixes #
2024-05-09 14:37:36 -04:00
Nicholas Cunningham 0322b9804f fix(module-federation): Throw an error if remote is invalid (#23100)
If you are generating a remote using `--dynamic` either by using the
`host` generator or the `remote` generator we now check to ensure that
the remote name is a valid JavaScript variable.

If this is not done the app with be invalid and unable to be ran or
bundled.


closes: #23024
2024-05-09 11:19:50 -06:00
Nicholas Cunningham bdac1e2a6f docs(nx-dev): Add 404 for unknown blog urls (#23267)
This PR adds the 404 fallback if a user navigates to a specified blog
that does not exist.

Currently, we are showing a 500 error.
2024-05-09 09:30:33 -06:00
Isaac Mann f489fbef8e feat(nx-dev): show banner on documentation pages (#23266)
Show the banner on documentation pages
2024-05-09 10:36:34 -04:00
Isaac Mann 25574ae614 docs(core): rearrange tutorial files (#23265)
Moving files around.
No visible website changes.
Deleted core tutorial files (that wasn't linked anywhere in the
navigation)
2024-05-09 09:12:54 -04:00
James Henry d5945bd173 fix(linter): ensure config.rules is spread into rules in flat config migration (#23263) 2024-05-09 15:06:27 +02:00
Isaac Mann bf51d19600 docs(core): redirect bad nx 19 blog link (#23260)
Redirects incorrect link to the Nx 19 blog post
2024-05-09 14:25:12 +02:00
Edward Wang 8f25ade650 fix(webpack): publicPath and rebaseRootRelative (#20992)
<!-- 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 -->
 can not configure webpack publicPath with NX option.
## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
 make the publicPath work with postcssCliResources.
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2024-05-09 12:39:29 +01:00
Jason Jean 8f705e31e2 fix(misc): adjust deprecation messages to v20 (#23223)
<!-- 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` -->

## Breaking Changes:


BREAKING CHANGE: `nx print-affected` was deprecated in 16.4.0 and has
been removed.
BREAKING CHANGE: `nx affected:graph` was deprecated in 16.4.0 and has
been removed.
BREAKING CHANGE: The `criticalPath` and `affectedProjects` properties of
the JSON created by `nx graph --file graph.json` was deprecated in
16.2.0 and has been removed.

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

Some deprecation messages still reference v19.

`nx print-affected` was deprecated in 16.4.0 to be removed in Nx 19 but
was not removed.
`nx affected:graph` was deprecated in 16.4.0 to be removed in Nx 19 but
was not removed.

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

Deprecation messages reference v20 now.

`nx print-affected` is removed.
`nx affected:graph` is removed.

There are redirects to a `deprecated` page describing those commands for
Nx users using Nx <19

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

Fixes #
2024-05-08 21:54:41 -04:00
Jason Jean dc20a3b462 chore(repo): update stale bot configuration (#23255) 2024-05-08 18:07:51 -04:00
Jack Hsu 4106691d33 fix(core): update getLastValueFromAsyncIterableIterator to support AsyncIterables returned from executors (#23229)
When an executor returns an `AsyncIterable` Nx fails because it cannot
read the value using `getLastValueFromAsyncIterableIterator` (which only
supports `AsyncIterableIterator`. This PR updates it to support both so
executors like `@nx/rollup:rollup` will work.


<!-- 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
Running Nx command fails if executor returns `AsyncIterable` e.g. by
calling `createAsyncIterable`.

## Expected Behavior
Nx command succeeds when executor returns `AsyncIterable`.

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

Fixes #23028
2024-05-08 18:07:14 -04:00
Bouzid Badreddine 078dd06dd9 add missing minus (#22252)
<!-- 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 -->

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

Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-05-08 16:22:32 -04:00
Nicholas Cunningham 79ee857380 docs(nx-dev): Update docs sidemenu enabling the close button (#23254)
This PR fixes the issue where the close button was not working in the
nx-dev documentation pages after opening the overflow menu.
Now, the close button functions correctly.
2024-05-08 14:18:37 -06:00
Taylor Braun-Jones 0bfeea6be3 preserving-git-histories.md: Move files _before_ merging (#20289)
Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-05-08 15:28:51 -04:00
mot 3e63bc0754 docs(core): update define-environment-variables.md (#21727)
add `dotenvx` example. 


## Current Behavior

* env-cmd only

## Expected Behavior

* include dotenvx example 

## Related Issue(s)
N/A

Fixes #
N/A
2024-05-08 15:22:27 -04:00
Craigory Coppola 5542350e16 fix(core): show project --web shouldn't error (#23251)
<!-- 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 -->

## 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-05-08 14:57:03 -04:00
Leosvel Pérez Espinosa 2460c89047 fix(core): set yarn berry nodeLinker correctly in migrate command (#23249)
<!-- 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 -->

## 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 #23222
2024-05-08 19:55:26 +02:00
Robin Csutorás a08133f440 feat(module-federation): add remote configuration override (#19694)
## Current Behavior

The configuration of the served MFE always passed to the remotes. If a
new configuration is needed to skip one remote (e.g.
`serve:skip-remote1`) but `remote2` then a configuration called
`skip-remote1` is needed in the `remote2`.

## Expected Behavior

Add an ability to override the configuration and the empty
configurations in the remotes can be deleted.

## Related Issue(s)

Fixes #19693
2024-05-08 18:52:37 +01:00
Isaac Mann 0066543096 fix(nx-dev): fix home page mobile menu (#23250)
Fix the home page mobile menu
2024-05-08 11:47:23 -06:00
James Henry 3970a1e288 fix(release): ensure changelog renderers are resolvable when processing config (#23214) 2024-05-08 13:21:47 -04:00
Isaac Mann 8363ba4a5e docs(core): intro updates (#23247)
Update the Editor setup page
Add more features to the intro page
2024-05-08 12:34:52 -04:00
Isaac Mann a05d38931b docs(core): collapse concepts and recipes (#23246)
Collapse concepts and recipes top level sections

Also make sure that sidebar expands to the active link even if it is
multiple sections down
2024-05-08 12:34:46 -04:00
Emily Xiong a2d9f9cc16 fix(gradle): run gradle init if no settings.gradle (#23226)
<!-- 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 -->

## 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-05-08 12:23:25 -04:00
Jack Hsu dfb994d185 docs(core): fix more images to point to webp (#23245)
Missed two images in last PR.

<!-- Example: `fix(nx): must begin with lowercase` -->

## 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-05-08 11:57:20 -04:00
Jack Hsu 3a7e657f4f docs(core): fix images to point to webp (#23244)
A few images were missed when converting to webp.

## 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-05-08 11:38:53 -04:00
Jack Hsu ef85a63073 docs(core): add missing option for dep-checks lint rule (#23238)
This option was added in https://github.com/nrwl/nx/pull/20157 but never
made it into docs.

<img width="951" alt="Screenshot 2024-05-08 at 9 34 00 AM"
src="https://github.com/nrwl/nx/assets/53559/b43fc774-2a68-49b2-8709-b43a685a520b">
<!-- 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 -->

## 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-05-08 10:50:20 -04:00
Isaac Mann c8576261c9 docs(core): revert (#23239)
Revert "docs(core): collapse concepts and recipes (#23219)"

This reverts commit f13a9608b1.
2024-05-08 10:24:29 -04:00
Zachary DeRose 59bd199e33 docs(core): Nx 19 blogpost (#23207)
<!-- 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 -->

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


https://nx-dev-git-feat-nx-19-blogpost-nrwl.vercel.app/blog/2024-05-07-nx-19-release

## 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>
2024-05-08 10:22:39 -04:00
Mike Peters 1449d1acc1 fix(webpack): don't overwrite output config (#22116)
## Current Behavior

Some webpack output options, like `filename` are overwritten when using
the `NxWebpackPlugin`, e.g.

```ts
module.exports = {
  output: {
    path: join(__dirname, '../../dist/apps/my-app'),
    // this has no affect:
    filename: ({ runtime }) =>
      migrationEntryPoints.some(({ entryName }) => entryName === runtime)
        ? 'migrations/[name].js'
        : '[name].js',
  },
  plugins: [
    new NxWebpackPlugin({ ... }),
  ]
};
```

## Expected Behavior

The `NxWebpackPlugin` should preserve base config where it makes sense.

I think this is the intended behaviour, but required some extra
parentheses to behave correctly.
2024-05-08 14:12:08 +00:00
Leosvel Pérez Espinosa 4cc3dc6960 fix(misc): create workspaces and default app with the name as provided (#23196)
<!-- 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 -->

## 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 #19253
2024-05-08 17:33:47 +04:00
Isaac Mann f13a9608b1 docs(core): collapse concepts and recipes (#23219)
Collapse the concepts and recipes sections by default

![Screenshot 2024-05-07 at 11 34
05 AM](https://github.com/nrwl/nx/assets/861504/1428c5e9-9c46-4001-b9dc-d06e2efa086d)
2024-05-08 08:32:24 -04:00
andriizavoiko 46336df3a4 fix(bundling): resolve index files from ts paths when running esbuild without bundling (#23098)
## Current Behavior
During build process a file `tmp/<path>/main-with-require-overrides.js`
is generated to handle `paths` resolutions from `tsconfig` when
`esbuild` is not running in `bundle` mode.

Having following `tsconfig.json` as example
```json
{
  ...
  "compilerOptions": {
    ...
    "paths": {
      "@lib/lib1": ["libs/lib1/src/index.ts"],
      "@app1/*": ["apps/app1/src/*"],
    }
  }
}
```

We can use `lib1` in code as follows and during runtime it will
automatically be resolved to `dist/apps/app1/libs/lib1/src/index.js`:
```js
// apps/app1/src/main.ts
import lib1 from '@lib/lib1';
```

Hovewer, when trying to use paths with wildcards, e.g.:
```js
// apps/app1/src/config/index.ts
const config = {};
export default config;

// apps/app1/src/main.ts
import config from '@app1/config';
```

It gets resolved to `dist/apps/app1/apps/app1/src/config.js` and
`isFile` condition fails as such module doesn't exist, thus path is not
replaced and runtime error is produced.

## Expected Behavior
During resolution of following code:
```js
import config from '@app1/config';
```

`_resolveFilename` should consider all possible combinations of module
path - `dist/apps/app1/apps/app1/src/config.js` and
`dist/apps/app1/apps/app1/src/config/index.js`
2024-05-08 13:17:10 +01:00
Mateo Tibaquirá 7dd7c2bab8 fix(webpack): fix default compiler option (#22762)
Given a configuration without `options.tsConfig` the `babel` compiler
breaks in `createLoaderFromCompiler` where the babel case uses
`path.join(options.root, options.tsConfig)` and throws an exception if
it's undefined.

## Current Behavior


In my case, the root `package.json` generates a dependency in the tree
with "empty" options:
```
{
  root: '/root/of/my/monorepo/monorepo',
  projectRoot: '',
  sourceRoot: '',
  outputFileName: undefined,
  outputPath: undefined,
  assets: [],
  target: 'web',
  projectName: undefined,
  targetName: undefined,
  configurationName: undefined,
  projectGraph: undefined
}
``` 
which breaks the project graph with this exception:
```
Unable to read angular.json
[Failed to process project graph.
  The "@nx/webpack/plugin" plugin threw an error while creating nodes from src/backend/server/webpack.config.js:
    TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
        at new NodeError (node:internal/errors:405:5)
        at validateString (node:internal/validators:162:11)
        at Object.join (node:path:1171:7)
        at createLoaderFromCompiler (/monorepo/node_modules/.pnpm/@nx+webpack@18.2.2_@swc-node+register@1.9.0_@swc+core@1.3.107_@types+node@18.16.9_nx@18.2.2_t_auhl3zn4afi4laot7gdsrcezcy/node_modules/@nx/webpack/src/plugins/nx-webpack-plugin/lib/compiler-loaders.js:50:58)
        at applyNxDependentConfig (/monorepo/node_modules/.pnpm/@nx+webpack@18.2.2_@swc-node+register@1.9.0_@swc+core@1.3.107_@types+node@18.16.9_nx@18.2.2_t_auhl3zn4afi4laot7gdsrcezcy/node_modules/@nx/webpack/src/plugins/nx-webpack-plugin/lib/apply-base-config.js:314:61)
        at applyBaseConfig (/monorepo/node_modules/.pnpm/@nx+webpack@18.2.2_@swc-node+register@1.9.0_@swc+core@1.3.107_@types+node@18.16.9_nx@18.2.2_t_auhl3zn4afi4laot7gdsrcezcy/node_modules/@nx/webpack/src/plugins/nx-webpack-plugin/lib/apply-base-config.js:36:5)
        at configure (/monorepo/node_modules/.pnpm/@nx+webpack@18.2.2_@swc-node+register@1.9.0_@swc+core@1.3.107_@types+node@18.16.9_nx@18.2.2_t_auhl3zn4afi4laot7gdsrcezcy/node_modules/@nx/webpack/src/utils/with-nx.js:15:49)
        at combined (/monorepo/node_modules/.pnpm/@nx+webpack@18.2.2_@swc-node+register@1.9.0_@swc+core@1.3.107_@types+node@18.16.9_nx@18.2.2_t_auhl3zn4afi4laot7gdsrcezcy/node_modules/@nx/webpack/src/utils/config.js:23:28)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async readWebpackOptions (/monorepo/node_modules/.pnpm/@nx+webpack@18.2.2_@swc-node+register@1.9.0_@swc+core@1.3.107_@types+node@18.16.9_nx@18.2.2_t_auhl3zn4afi4laot7gdsrcezcy/node_modules/@nx/webpack/src/utils/webpack/read-webpack-options.js:17:18)] {
  name: 'ProjectGraphError'
}
```

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

The default values should fallback properly without throwing an
exception for this case.

---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2024-05-08 13:16:26 +01:00
Matthias Stemmler b4f6e425c4 fix(vite): get tsconfig from new path including target (#22775)
## Current Behavior
Since v18.2.3 (e4c4697f69) the
`tsconfig.generated.json` file generated if `"buildLibsFromSource":
false` is placed under a path containing the current build target. The
`nx-tsconfig-paths` plugin of `@nx/vite` was not updated accordingly, so
now it doesn't find `tsconfig.generated.json`, effectively causing
`@nx/vite` to ignore the `"buildLibsFromSource": false` setting.

## Expected Behavior
With this PR, `nx-tsconfig-paths` finds `tsconfig.generated.json` at the
correct path, so `"buildLibsFromSource": false` works as it did before
v18.2.3.
2024-05-08 12:30:07 +01:00
Sean Sanker 1502433673 fix(vite): don't generate tasks for remix projects (#22551)
<!-- 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 -->
Attempting to use Remix + Vite results in a few errors. I assume this is
due to the vite and remix plugins conflicting with each other.

One of which being:
```
Failed to process project graph.
  The "@nx/vite/plugin" plugin threw an error while creating nodes from myremixapp/vite.config.ts:
    Error: Missing "root" route file in /Users/username/work/remix-demo/app
        at Object.resolveConfig (/Users/username/work/remix-demo/node_modules/@remix-run/dev/dist/config.js:154:11)
        at updateRemixPluginContext (/Users/username/work/remix-demo/node_modules/@remix-run/dev/dist/vite/plugin.js:367:9)
        at config (/Users/username/work/remix-demo/node_modules/@remix-run/dev/dist/vite/plugin.js:598:7)
```

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
It should work just like it currently does for Remix Classic.

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

## PR Status
This is a very early draft. I don't think this is a good approach but it
does work for me at the moment. I'm not sure exactly how we can discern
a remix project from a vanilla vite project (that you can use standard
tooling for) without parsing the `package.json` or `vite.config.ts` and
searching for remix-specific content.

## Steps to reproduce my current state
Set up a standard @nx/remix project as shown
[here](https://nx.dev/recipes/react/remix).
Follow the instructions
[here](https://remix.run/docs/en/main/future/vite#migrating) from
`Migrating` down to but NOT including `Migrating a custom server`.

Once I use the modified @nx/vite code provided in this PR, I'm able to
run `npx nx dev [app-name]` successfully.

## A Personal Note
I'd love to contribute more to nrwl/nx.
I'm quite a fan of Nx and use it in a few separate projects. 
That being said, I don't currently have a comprehensive knowledge of its
internals.
If anyone wants to give me some guidance (text-based or we can hop on a
call), I'd be more than happy to contribute the rest of this myself (and
other fixes).

---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2024-05-08 11:45:46 +01:00
Krystian Sowiński ea5c910e12 fix(bundling): rollup does not log build errors (#23141)
closed 22896

<!-- 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
given using @nx/rollup:rollup executor
when an error is thrown
then no message is logged (just stacktrace)

## Expected Behavior
error message to be displayed (as it was till v18.2.0)

## Related Issue(s)

Fixes #22896
2024-05-08 11:22:24 +01:00
Isaac Mann fd78152377 docs(core): monorepo world banner (#23225)
Add a banner on the nx.dev home page pointing to monorepo.tools/conf
2024-05-07 16:28:42 -04:00
Emily Xiong b666c6b38a fix(gradle): use local gradlew instead of sdkman (#23205)
<!-- 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 -->

## 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-05-07 14:03:48 -04:00
Daniel Santiago d9a97120f6 feat(core): add an option to seperate the output of show with provide… (#23172)
Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>
2024-05-07 13:55:41 -04:00
Nicholas Cunningham 5edc64af92 docs(core): Add blog author details to nx-dev blog page (#23206)
This PR adds a context view for blog authors that displays details about
their social.

It will be show on the blog details page.

Here is an example:
![Screenshot 2024-05-07 at 7 31
16 AM](https://github.com/nrwl/nx/assets/338948/3abb1cce-e4bd-400c-9a1b-151254630bef)

![Screenshot 2024-05-07 at 7 37
38 AM](https://github.com/nrwl/nx/assets/338948/042bf376-a33d-44a3-addd-812953dd4d65)
2024-05-07 10:20:01 -06:00
Leosvel Pérez Espinosa 8160f5879b feat(testing): updates cypress and @cypress/webpack-dev-server (#22902)
Updates `cypress` and `@cypress/webpack-dev-server` versions in
preparation to support the upcoming Angular v18, which requires support
for `webpack-dev-server` v5. The new versions are backwards compatible,
so they can be updated in advance.

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

## 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 NXP-705 -->

Fixes #
2024-05-07 18:03:18 +02:00
Isaac Mann 53693fdd1c docs(core): remove nx connect flow from docs (#23204)
Recommend people log in to `nx.app` and connect their repository instead
of running `nx connect` from the command line
2024-05-07 11:37:29 -04:00
Leosvel Pérez Espinosa d1c4073809 feat(misc): improve nx cloud setup prompts and messaging (#23218)
<!-- 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 -->

## 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-05-07 11:36:29 -04:00
Nicholas Cunningham d8ab165009 Feat/migrate more blogs (#23203)
This PR adds 4 more blogs to the `/blog` on nx.dev
2024-05-07 09:18:43 -06:00
Isaac Mann 62431372f1 docs(core): gradle webp images (#23217)
Squoosh images
2024-05-07 10:43:35 -04:00
Colum Ferry bf90604180 fix(module-federation): nested projects should be ordered first when reading from tsconfig paths #20284 (#23212)
<!-- 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 -->
When using nested projects (note: not secondary entry points), the
`shareWorkspaceLibraries` needs to order the nested projects first for
webpack to resolve the import path aliases correctly.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Ensure nested projects are ordered first when reading tsconfig path
aliases

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

Fixes #20284
2024-05-07 09:57:09 -04:00
Isaac Mann e8041bbb90 docs(core): monorepo world menu item 2024-05-07 14:58:48 +02:00
Leosvel Pérez Espinosa 0e56533d01 docs(angular): call out @nx/angular:dev-server is required when using @nx/angular build executors (#22883)
- Calls out the `@nx/angular:dev-server` executor as required when using
`@nx/angular` build executors
- Improves & aligns executor descriptions and examples

Main docs updated with the callouts:


https://nx-dev-git-fork-leosvelperez-docs-angular-executors-nrwl.vercel.app/nx-api/angular/executors/application

https://nx-dev-git-fork-leosvelperez-docs-angular-executors-nrwl.vercel.app/nx-api/angular/executors/browser-esbuild

https://nx-dev-git-fork-leosvelperez-docs-angular-executors-nrwl.vercel.app/nx-api/angular/executors/webpack-browser

https://nx-dev-git-fork-leosvelperez-docs-angular-executors-nrwl.vercel.app/nx-api/angular/executors/dev-server

The rest of the Angular executors' descriptions were also updated.

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

## 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-05-07 11:34:22 +02:00
Isaac Mann 1fe262ad7d docs(core): gradle tutorial (#22942)
Create a Gradle tutorial


https://nx-dev-git-fork-isaacplmann-docs-gradle-tutorial-nrwl.vercel.app/getting-started/tutorials/gradle-tutorial

---------

Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2024-05-06 14:18:07 -04:00
Jason Jean 41d21ab9ac fix(misc): make generated ci workflow work without nx-cloud (#23199)
<!-- 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 -->

`ci-workflow` generators error if Nx Cloud has not been enabled.

With the new Github onboarding flow, there is a chicken or the egg
problem.

The Github onboarding flow creates a PR but we don't have a pipeline to
run against it. To create the pipeline, Nx Cloud has to be enabled...
which... creates a lackluster PR.

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

`ci-workflow` generators do not error if Nx Cloud has not been enabled.
This way, the `ci-workflow` generator will be able to create a workflow,
which the PR made by Nx Cloud's Github onboarding flow will be run
against.

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

Fixes #
2024-05-06 12:54:53 -04:00
Leosvel Pérez Espinosa f13dcce8a9 fix(core): ensure setting up nx cloud in nx migrate using the generator from the installed latest version (#23194)
<!-- 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 -->

Choosing to set up Nx Cloud during `nx migrate` executes the generator
from the locally installed packages. This leads to the user getting an
outdated flow and messaging.

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

Choosing to set up Nx Cloud during `nx migrate` should execute the
generator from the installed latest version to ensure the user gets the
up-to-date flow and messaging.

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

Fixes #
2024-05-06 16:31:11 +02:00
Leosvel Pérez Espinosa 35dec92b92 chore(repo): fix windows nightly pipeline definition (#23191)
<!-- 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 -->

## 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-05-06 16:30:46 +02:00
Leosvel Pérez Espinosa 1ab1fa5e0b fix(core): forward process execArgv when using the native runner (#23195) 2024-05-06 10:00:24 -04:00
Jason Jean 0f71685b2b chore(repo): update nx to 19.0.0-rc.1 (#23189)
<!-- 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 -->

This repo uses Nx `19.0.0-beta.11`

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

This repo uses Nx `19.0.0-rc.1`

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

Fixes #
2024-05-04 14:15:57 -04:00
Craigory Coppola cc875a6ac8 fix(devkit): check if includes is actually necessary (#23181)
<!-- 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
We run the createNodes function once when converting to inferred
targets, and remove includes if its not needed anymore based solely on
the config files returned.

## Expected Behavior
We run the createNodes function twice, and remove includes if the result
was the same with / without it.

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

Fixes #
2024-05-04 10:01:10 -04:00
Emily Xiong fd5ea92062 fix(nx-dev): fix project details in nx dev (#23175)
<!-- 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 -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
fix project details in nx dev
add metadata to nx dev's project details json

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

Fixes #
2024-05-03 20:07:32 -04:00
Craigory Coppola 30446df23b fix(misc): dot nx setup shouldn't include target defaults (#23180)
<!-- 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
- `nx add @nx/gradle` installs latest version
- `nx init` sets up target defaults
- `nx add package@beta` will add `beta` as the version, rather than
resolving it to the tag.

## Expected Behavior
- `nx add @nx/gradle` installs version matching `nx`
- `nx init` lets plugin handle settings
- `nx add package@beta` will add the latest version matching the beta
tag

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

Fixes #
2024-05-03 19:07:56 -04:00
James Henry 84eb280236 fix(linter): add {options.outputFile} to outputs for inferred targets (#23173) 2024-05-03 18:00:11 -04:00
Caleb Ukle 7303b7a7fb docs(nx-cloud): add to launch templates documentation (#23156)
<!-- 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 -->
launch template docs are pretty sparse

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
expand upon what you can do with a custom launch template with some
examples

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

contributes to: APP-1414

---------

Co-authored-by: Altan Stalker <altan@nrwl.io>
2024-05-03 16:14:58 -05:00
Colum Ferry d71a324093 fix(testing): convert-to-inferred for cypress should handle nxE2EPreset with no options object (#23171)
<!-- 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 -->



## 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-05-03 14:46:35 -04:00
Emily Xiong f73d6530a1 fix(graph): add grayscale to technology icon (#23107)
<!-- 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 -->

## 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-05-03 12:08:36 -04:00
Colum Ferry 7bd40bc9db fix(remix): ensure default meta tags are always present for generated applications #23037 (#23169)
<!-- 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 -->
Meta tags that are required and recommended for remix apps are not being
rendered correctly when deployed to serverless locations such as AWS
Lambda
We do not attach them in the way that Remix recommends

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Attach these meta tags in the method that remix itself recommends to
ensure maximum compatibility

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

Fixes #23037
2024-05-03 11:53:50 -04:00
Colum Ferry 2526979ab0 fix(devkit): executor-to-plugin-migrator should add // targets hint (#23167)
<!-- 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 -->
When `convert-to-inferred` generators are run, they leave no hints as to
what happened to the targets.
This is usually fine as the person running the generator should know
what it is doing.
However, other team members who may not have been privy to the migration
may be confused when they see an empty project.json


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Add the same `// targets` hint that we generate for plugin-first
projects to help guide users to the PDV to see the targets.

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

Fixes #
2024-05-03 15:27:21 +00:00
Colum Ferry e06b787e63 feat(react): support react 18.3.1 (#23166)
<!-- 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 -->
We currently generate react projects with version 18.2.0


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
We generate react projects with version 18.3.1
We migrate existing users to version 18.3.1

This will prepare for the breaking changes coming in React 19


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

Fixes #
2024-05-03 10:26:45 -04:00
Jason Jean 2cb62c6177 chore(repo): update nx to 19.0.0-beta.11 (#23133)
<!-- 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 -->

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

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

This repo is using Nx `19.0.0-beta.11`

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

Fixes #
2024-05-03 10:21:26 -04:00
Colum Ferry 21d7e9221d fix(testing): convert-to-inferred generators should add includes only when needed (#23159)
- fix(devkit): executor-to-plugin-migrator should remove includes when
all config files are handled
- fix(testing): cypress convert-to-inferred should add
ciWebServerCommand correctly

<!-- 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 -->
`includes` are being added to all new plugins that are being added to
nx.json.
It should only be added when not all config files are addressed by the
plugin to be added.

Cypress Convert To Inferred is not creating a `ciWebServerCommand` when
it is possible to do so.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Ensure `includes` is added only when required.
Ensure `cypress:convert-to-inferred` is adding a ciWebServerCommand
correctly


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

Fixes #
2024-05-03 09:50:08 -04:00
Colum Ferry acd0993f1a feat(linter): add convert-to-inferred migration generator (#23142) 2024-05-03 17:23:01 +04:00
Leosvel Pérez Espinosa 1d2c843c26 fix(angular): ensure buildable libraries in-process tsconfig file extends from the correct path (#23165)
<!-- 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 -->

## 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 #23091
2024-05-03 14:41:58 +02:00
Colum Ferry e5c02062db fix(remix): use remix-serve for static-serve (#23164)
<!-- 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 -->
For `e2e-ci` with Remix projects, we needed a `static-serve` target that
would work for Remix.
We didn't have one as it cannot be served via a basic file server.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
For non-plugin usage, create a target in project.json using
`remix-serve`.
For plugin usage, create a target via `@nx/remix/plugin` for
`remix-serve`.


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

Fixes #
2024-05-03 13:18:27 +01:00
Colum Ferry dc54b5584d fix(remix): pin testing-library/jest-dom to compatible version (#23161)
<!-- 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 -->
@testing-library/jest-dom released a version that is broken currently
and it was being found by our version string.



## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Pin the version of the package to the latest working versions


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

Fixes #
2024-05-03 13:03:04 +01:00
Colum Ferry dbad02afe4 fix(testing): convert-to-inferred generator should handle legacy cypress executor (#23151)
<!-- 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 `convert-to-inferred` generator does not handle
`@nrwl/cypress:cypress`.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The generator should handle the legacy executor

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

Fixes #
2024-05-02 18:05:59 -04:00
Jason Jean eddd0d61c1 fix(gradle): fix gradle github ci workflow (#23154)
<!-- 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 -->

Gradle github CI workflow has an extra unnecessary step.

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

Gradle github CI workflow does not have the unnecessary step.

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

Fixes #
2024-05-02 16:51:03 -04:00
Craigory Coppola 64b4814c65 fix(core): projectName should not be interpolated as undefined (#23145)
<!-- 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
Tokens are interpolated into arguments while merging things into the
root map. Unfortunately, this means `{projectName}` is sometimes
interpolated as `undefined` because the project's name isn't known yet.

## Expected Behavior
Tokens are interpolated after the root map has been constructed, but
still during `createProjectConfigurations` s.t. we can know that we have
final project configurations afterwards.

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

Fixes #
2024-05-02 16:30:12 -04:00
Emily Xiong 11f30f638f fix(gradle): add namedInputs to nx.json in gradle init (#23152)
<!-- 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 -->

## 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-05-02 16:15:51 -04:00
Emily Xiong bacdc799b4 fix(graph): remove redux and useState and useContext hook (#23085)
<!-- 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 -->

## 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-05-02 13:38:23 -04:00
Jack Hsu 2e621f324c feat(misc): v19 cleanup for Nx plugins (#23104)
This PR removes deprecated code that's been slated for removal in Nx 19
- mentioned as `TODO(v19)` comments.

## Breaking Changes

- **CNW:** `create-nx-workspace` no longer support `--preset=empty` and
`--preset=core`, use `--preset=apps` and `--preset=npm` respectively.
Deprecated in Nx 15.9.
- **Next.js:** `NX_` environment variables are no longer bundled into
Next.js apps, use `NEXT_PUBLIC` instead. Deprecated in Nx 16.8.
- **Webpack, Storybook, Esbuild:** `NX_` environment variables are no
longer bundled into browser bundles, use `NX_PUBLIC` instead. This
removes the possibility of intentional bundling of `NX_` variables.
Deprecated in Nx 18.
- **Cypress:** `cypressComponentConfiguration` generator removed from
`@nx/cypress`, use `configurationGenerator`instead. Deprecated in Nx
16.8.
- **Cypress:** `cypressProjectGenerator` generator removed from
`@nx/cypress`, use `configurationGenerator` instead. Deprecated in Nx
15.9.
- **Expo:** `withNxWebpack` removed from `@nx/expo`, use [metro
bundler](https://docs.expo.dev/guides/customizing-metro/)
(https://docs.expo.dev/guides/customizing-metro/) in app.json instead.
There is a migration to handle this in Nx 19. Deprecated in Nx 15.8.

## Deferred to v20

- **JS:** `classProperties.loose` option removed from `@nx/js/babel`
preset, use `loose` instead. Deprecated in Nx 17.0.
- **ESLint:** Low priority task to "deviations from
@typescript-eslint/recommended" for our lint rules. @JamesHenry will
look at this later before Nx 20, but it is unimportant.
- **React:** component testing does not work with Project Crystal, and
we need the executor + built-in webpack configs to run CT. Will do a
follow-up on this after Nx 19 release. Related issue:
https://github.com/nrwl/nx/issues/21546
- **Next.js:** `withStylus` removal from `@nx/next`, use SASS instead.
It hasn't worked, but we kept the file to throw an error when used.
Deprecated in Nx 17.0.
- **Next.js**: `@nx/next:component` and `@nx/next:page` generators to
not derive the `components` and `app`/`pages` directory. Use `nx g
@nx/next:component apps/myapp/components/button` instead. Deprecated in
Nx 17.0.
- **Webpack:** `isolatedConfig` option removal from
`@nx/webpack:webpack` executor. There is a migration to handle this in
Nx 19. Deprecated in in Nx 17.2.
- **Angular:** `executeWebpackDevServerBuilder` removal from
`@nx/angular/executors`, use `executeDevServerBuilder` instead.
Deprecated in Nx 17.0.
2024-05-02 13:37:12 -04:00
Emily Xiong 35f0618347 fix(gradle): fix gradle not working for spring (#23130)
<!-- 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 -->

## 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-05-02 13:11:00 -04:00
Miroslav Jonaš e15720ba4f fix(core): remove obsolete git track from ci generators (#23134)
<!-- 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 -->

## 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-05-02 12:25:41 -04:00
Jason Jean 9da9f4220d feat(gradle): add ci-workflow generator (#23125)
<!-- 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 -->

There is no generator to setup a CI workflow for a Gradle workspace.

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

`./nx g ci-workflow` sets up a CI workflow for either Github Actions or
CircleCI. More will be added later.

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

Fixes #
2024-05-02 12:25:18 -04:00
MaxKless 2e85b1dbe5 fix(graph): remove dangling - and move button when PDV is rendered in console (#23144) 2024-05-02 18:24:51 +02:00
Colum Ferry 11fec5a4e8 fix(devkit): run callback for forEachProjectConfig when target.options is undefined (#23143)
<!-- 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 -->
`forEachExecutorOptions` will not run the callback if `target.options`
is undefined.
This means that even if a target exists with an executor, the target is
not being processed if it does not have `options`.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Run the callback anyway even if `target.options` is undefined

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

Fixes #
2024-05-02 12:20:07 -04:00
MaxKless 44fcb1a59c fix(core): catch workspace validity check errors (#23138)
<!-- 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 -->
Errors thrown by `assertWorkspaceValidity` aren't handled and lead to
the nx process' exit

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Errors are properly caught and handled with the ability to recover a
partial project graph like other errors.
2024-05-02 11:46:58 -04:00
pmariglia b898dd58e4 docs(nx-cloud): document arm resource classes (#23116)
## Update Nx Cloud Resource Class Documentation

Documents the docker_linux_arm resource classes in
`launch-templates.md`. No changes to the images are required.
2024-05-02 11:35:19 -04:00
Johanna Pearce 9c02175098 docs(nx-cloud): warn about rate limiting with ADO integration 2024-05-02 16:05:04 +01:00
MaxKless 2002a7872f feat(graph): log errors in console in graph watch mode (#23136) 2024-05-02 10:14:11 -04:00
Craigory Coppola 0fbd2f80a9 fix(core): ensure project with name undefined is not created (#23097)
* fix(core): ensure workspaces config is updated when daemon running

* fix(core): properly error when projects have no name but with a package.json
2024-05-02 10:09:25 -04:00
Jason Jean 5ded713c3c fix(repo): set version of pnpm for docker publishes (#23129)
<!-- 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 version of pnpm changed with the docker image.

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

The version of pnpm is installed over the one in the docker image to
ensure the right version is being used.

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

Fixes #
2024-05-01 18:40:53 -04:00
Nicholas Cunningham 02a8602607 docs(core): Update styles for enterprise page on small screens (#23126)
Addresses some styles for smaller screens. 

Fixes #
2024-05-01 20:18:36 +00:00
Nicholas Cunningham b0ee75e6af docs(core): Update meterics and customer background on enterprise page (#23123) 2024-05-01 14:01:47 -04:00
Phillip Barta 9b12d188c2 cleanup(core): remove deprecated command-line reexports (#19914)
<!-- 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 -->

## 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-05-01 13:36:49 -04:00
Isaac Mann 9a06a76fa7 fix(nx-dev): header styles fix (#23122) 2024-05-01 12:33:44 -04:00
Jason Jean a64a7e2db9 feat(core): cleanup for v19 (#22993) 2024-05-01 12:12:32 -04:00
Denis Bendrikov 307f8d4624 fix(core): align padding for output with failed tasks (#23119) 2024-05-01 12:12:06 -04:00
Isaac Mann e38df31ee6 Revert "chore(nx-dev): fix header styles (#23120)" (#23121) 2024-05-01 11:27:06 -04:00
Isaac Mann ba8ba3d7ea chore(nx-dev): fix header styles (#23120) 2024-05-01 11:14:37 -04:00
Emily Xiong 4f4f77c68f fix(graph): use class sticky for sticky header (#23082) 2024-05-01 11:10:19 -04:00
Jack Hsu 8cf7191809 feat(graph): show tooltips that were previously hidden due to upublished docs (#23099) 2024-05-01 10:57:18 -04:00
Chabbey François 877b37dac3 fix(core): add import for performance to increase compatibility (#23109)
Co-authored-by: U812320 <francoisjulien.chabbey@mobi.ch>
2024-05-01 10:30:39 -04:00
Benjamin Cabanes 22ef42a475 feat(nx-dev): add ui-enterprise library (#23086) 2024-05-01 06:45:51 -04:00
Craigory Coppola abd80cf3f1 fix(core): local plugins should be able to use {projectRoot} in options block (#23068) 2024-04-30 18:41:27 -04:00
Craigory Coppola 16e3f83d46 Revert "chore(repo): enable plugin isolation for nx repo (#22785)" (#23103) 2024-04-30 16:55:43 -04:00
Craigory Coppola c09f70f9a0 fix(js): copy assets handler should handle ignore globs on windows (#23065) 2024-04-30 14:14:54 -04:00
Michal Jez 8631b40d54 feat(core): validate that outputs is an array of strings (#22371) 2024-04-30 13:53:19 -04:00
Craigory Coppola 063a5d464f chore(repo): enable plugin isolation for nx repo (#22785)
Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
2024-04-30 12:47:44 -04:00
Colum Ferry 44820f2c4b feat(testing): add convert-to-inferred migration generator for cypress (#22884) 2024-04-30 12:47:12 -04:00
Leosvel Pérez Espinosa 4ef832f4d5 fix(core): do not forward --updatePackageScripts flag to init generators that are not from nx core plugins (#23064) 2024-04-30 11:59:54 -04:00
MaxKless 73ab6d35ff feat(graph): enable watch mode by default (#23092) 2024-04-30 11:55:57 -04:00
Emily Xiong 30a3875a0d fix(gradle): fix gradlew exec path for root project (#23094) 2024-04-30 11:54:50 -04:00
MaxKless c8d44b0355 feat(graph): show partial project graph & errors in graph app (#22838) 2024-04-30 11:35:07 -04:00
Jason Jean 0ceea2f7da chore(repo): update nx to 19.0.0-beta.8 (#23087) 2024-04-30 11:15:30 -04:00
Jack Hsu 458f2cc1e8 feat(nx-dev): add nx blog (#22828)
Co-authored-by: Juri <juri.strumpflohner@gmail.com>
Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
Co-authored-by: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
2024-04-29 17:04:37 -04:00
Nicholas Cunningham 1f6aba03a1 fix(js): Correct file path for cjs.js (#23081) 2024-04-29 19:54:09 +00:00
Craigory Coppola cd7f3df3de fix(core): ensure daemon socket dir exists when specified in env (#23071) 2024-04-29 13:54:09 -04:00
Jack Hsu 4fd731f508 chore(repo): update to 19.0.0-beta.7 and deep import webpack plugins (#23074) 2024-04-29 13:53:22 -04:00
Emily Xiong aa82f031c3 feat(graph): add target groups and technology icon (#22839) 2024-04-29 13:52:07 -04:00
James Henry addde70251 fix(js): typescript plugin target hashing (#23073) 2024-04-29 18:51:32 +01:00
Jack Hsu 3cf13ab864 chore(misc): update message in legacy readme files (#22887) 2024-04-29 13:49:02 -04:00
Jason Jean 59f7495cb5 chore(repo): update nx to 19.0.0-beta.7 (#23070) 2024-04-29 12:58:52 -04:00
Josh Goldberg ✨ 5a8a8c0a4e docs(core): correct Type(S|s)cript typo in ESLint guide (#23041) 2024-04-29 12:28:35 -04:00
Altan Stalker 9986144b60 docs(nx-cloud): mark --with-env-vars as Nx Agents only (#23067) 2024-04-29 12:24:58 -04:00
Nicholas Cunningham 24f6d38762 fix(nextjs): Boolean flags do not need a value (#23072) 2024-04-29 10:24:43 -06:00
Isaac Mann b0a27bd986 docs(core): nx migrate search results (#23066) 2024-04-29 10:16:48 -04:00
Isaac Mann c0311b8a31 docs(core): useInferencePlugins (#23010)
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2024-04-29 10:06:00 -04:00
Jason Jean 9c6532ca68 fix(repo): fix pnpm version on freebsd (#23045) 2024-04-29 07:50:40 -04:00
Nicholas Cunningham f74aeabdb5 docs(core): Fix the '>' position when rendering multiline commands (#23042) 2024-04-26 20:58:58 -04:00
Craigory Coppola f32f692c07 chore(misc): remove perf timings from individual createNodes files (#23044) 2024-04-26 19:26:08 -04:00
Craigory Coppola c5df9902b4 fix(js): ignore yarn corepack check when updating config (#23043) 2024-04-26 18:57:02 -04:00
Craigory Coppola bb2d7f39a1 fix(core): prevent device status report from being printed during pty execution (#23039) 2024-04-26 18:56:03 -04:00
James Henry 8a53892d45 fix(core): improve performance of pnpm lock file parsing (#23017)
Co-authored-by: Colum Ferry <cferry09@gmail.com>
2024-04-26 17:36:31 -04:00
Jason Jean 9bf197f5a1 fix(react): disable tty for next build (#23013) 2024-04-26 12:40:57 -04:00
Jason Jean c36e246c6f fix(core): affect all projects when nx.json is touched (#23036) 2024-04-26 12:40:40 -04:00
Jason Jean 4d3b988881 chore(repo): add package manager (#23018) 2024-04-26 12:40:32 -04:00
Jason Jean 252070fd5f fix(core): recommend nx reset when graph errors and print error in da… (#23014) 2024-04-26 12:40:23 -04:00
Emily Xiong e957d13715 feat(react-native): upgrade react native to 0.72.6 (#22729) 2024-04-26 11:36:57 -04:00
Emily Xiong f167bade10 feat(graph): add loading spinner on project details (#23023) 2024-04-26 11:13:41 -04:00
Colum Ferry aa760076b4 fix(repo): should ensure that unit tests are run correctly across package managers (#22978) 2024-04-26 10:44:03 -04:00
MaxKless d3454ede62 fix(core): read nx.json in the DaemonClient constructor instead of the module (#23033) 2024-04-26 10:42:12 -04:00
Jack Hsu b8e6ebbf9a feat(webpack): change plugin import paths to speed up config loading (#23021) 2024-04-26 10:41:59 -04:00
Leosvel Pérez Espinosa 9077ae8abb fix(storybook): do not infer a test-storybook task if @storybook/test-runner is not installed (#23034) 2024-04-26 15:18:26 +02:00
Leosvel Pérez Espinosa 521d417a16 fix(storybook): allow overriding default inferred task names in storybook plugin (#23030) 2024-04-26 13:18:12 +00:00
Leosvel Pérez Espinosa 326551034d fix(testing): fix test files pattern for jest inferred split tasks (#23025) 2024-04-26 15:10:23 +02:00
Colum Ferry 3122f2abbe fix(core): ensure include and excluded return from plugin worker (#23032) 2024-04-26 13:04:38 +00:00
Colum Ferry a78e75ccab fix(webpack): should correctly normalize paths in NxWebpackPlugin (#23003) 2024-04-26 12:55:07 +01:00
Nicholas Cunningham 49af691b24 fix(core): nxComponentTestingPreset should not expose bundler option (#23009) 2024-04-26 09:31:11 +01:00
Craigory Coppola ac9ad35754 fix(misc): propogate NX_PERF_LOGGING to plugin workers (#23016) 2024-04-26 03:39:17 +02:00
Leosvel Pérez Espinosa e78776a53e cleanup(linter): parallelize projects processing and better dedupe/ignore projects and files in eslint plugin (#23011) 2024-04-25 16:45:41 -04:00
Craigory Coppola 0fd6d23e3f fix(core): ensure create nodes functions are properly parallelized (#23005) 2024-04-25 16:45:26 -04:00
Craigory Coppola c6fe9696fd fix(misc): perf logging shouldn't be enabled twice (#23012) 2024-04-25 14:41:52 -04:00
Isaac Mann d48fb54d56 docs(core): restrict plugin inferred tasks (#22986) 2024-04-25 12:52:34 -04:00
Nicholas Cunningham 9cf8c29d27 fix(node): e2e target fails out of the box (#22987) 2024-04-25 09:31:25 -06:00
Jason Jean df7e40d547 feat(repo): split e2e tests (#22927) 2024-04-25 10:13:03 -04:00
Chabbey François aa1be0f41f docs(cypress): fix code snippet in cypress-setup-node-events.md (#22977) 2024-04-24 23:05:10 -04:00
Benjamin Cabanes 5f4dc886eb feat(nx-dev): disable banner on home page (#22992) 2024-04-24 23:04:39 -04:00
Emily Xiong cec57c4951 fix(gradle): get gradlew path with projectRoot joins workspaceRoot (#22988) 2024-04-24 19:06:34 -04:00
Jack Hsu 8cd326e71a fix(misc): fix publish script (#22981) 2024-04-24 18:49:36 -04:00
Jason Jean 12dd8722ef fix(core): handle created directories when watching on linux (#22980)
Co-authored-by: Jonathan Cammisuli <jon@cammisuli.ca>
2024-04-24 17:18:53 -04:00
Emily Xiong df87a5ec47 fix(gradle): should skip println in project report (#22862) 2024-04-24 13:43:02 -04:00
Jack Hsu f3a20bb6d3 chore(repo): remove unnecessary .eslintignore files and use ignorePatterns instead (#22976) 2024-04-24 12:02:44 -04:00
Leosvel Pérez Espinosa 070932b9e8 fix(misc): fix cypress option in workspace preset generator (#22975) 2024-04-24 17:13:59 +02:00
James Henry 526ea7cfdf chore(js): experimental tsc entrypoint (#22852)
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2024-04-24 10:14:57 -04:00
Isaac Mann d3190a29c1 docs(core): correct file names in gradle plugin (#22974) 2024-04-24 09:58:49 -04:00
Jack Hsu 973244970f chore(repo): use @nx/webpack/plugin to infer graph client targets (#22955) 2024-04-24 09:45:35 -04:00
Colum Ferry 25eeddc338 feat(testing): add playwright generator to convert from executors to plugin (#22784)
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2024-04-24 09:06:23 -04:00
Isaac Mann 0197bfecc9 docs(core): add atomizer name to task splitting (#22962) 2024-04-24 08:43:07 -04:00
Colum Ferry 34c2dc13fd docs(repo): missed autogenerated docs update (#22973) 2024-04-24 12:22:25 +01:00
Rares Matei e8ca02a612 docs(nx-cloud): fix latest published version 2024-04-24 11:12:22 +02:00
Isaac Mann 6ab77143ae docs(core): add CI terms to glossary (#22677)
Co-authored-by: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
2024-04-24 10:33:49 +02:00
Isaac Mann 33008f25b5 docs(core): clean up more concepts section (#22957) 2024-04-24 10:28:53 +02:00
Jason Jean 48e8752b7a chore(repo): ignore files in __fixtures__/nextjs/app (#22968) 2024-04-24 02:12:28 -04:00
Jack Hsu bc43243498 chore(repo): add eslint and jest plugins to use inferred targets (#22946) 2024-04-23 21:52:13 -04:00
Richard Roozenboom abaad324e6 fix(core): regression register ts transpiler for local plugin (#22964) 2024-04-23 18:08:11 -04:00
Craigory Coppola 7bb6e9ee14 feat(core): add API entrypoint to register metadata (#22773) 2024-04-23 17:04:51 -04:00
Emily Xiong 99e5c869b3 fix(gradle): change gradle command to be relative path (#22963) 2024-04-23 16:50:25 -04:00
Leosvel Pérez Espinosa 6cab4c9a1b fix(storybook): handle inherited config correctly when identifying the framework used for inferred tasks (#22953) 2024-04-23 15:32:04 -04:00
Craigory Coppola 355d5c593d fix(core): move a few api points to return root maps directly (#22949) 2024-04-23 15:09:48 -04:00
Jason Jean f76b8c63c1 fix(repo): downgrade to macos-13 in publish workflow (#22961) 2024-04-23 13:05:44 -04:00
Craigory Coppola 45184fec21 docs(core): add docs for registering new targets + merge logic (#22748)
Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-04-23 15:57:21 +00:00
Leosvel Pérez Espinosa 1e4324fbce fix(linter): do not infer lint tasks for projects without files to lint (#22944) 2024-04-23 11:38:08 -04:00
Colum Ferry 739e2e7115 feat(testing): make playwright default e2e test runner option (#22511) 2024-04-23 11:27:09 -04:00
Jason Jean 8ded3807ac fix(core): fix exclude for empty array (#22951) 2024-04-23 09:34:50 -04:00
Jonathan Cammisuli 3d9bd16ce0 fix(core): handle events that do not have paths (#22947) 2024-04-22 23:06:57 -04:00
MaxKless b37bfdb1af fix(graph): don't listen to system theme changes in console (#22938) 2024-04-22 21:59:07 -04:00
Benjamin Cabanes f5327b4baa chore(nx-dev): update framer-motion dependency (#22911)
The framer-motion dependency has been updated to the latest version which allows the deletion of the `react-intersection-observer` package. This includes refactoring the code to use newer version features, such as removing unnecessary libraries and updating some animation methods. The commit also includes cleaning tailwind classes for better maintainability and readability. The removal of unused libraries also improves performance.
2024-04-22 21:02:03 -04:00
Emily Xiong c3a3d1b0a6 feat(core): add root level forwardAllArgs (#22753) 2024-04-22 16:13:00 -04:00
Rares Matei 55a933855c docs(nx-cloud): update release notes (#22915) 2024-04-22 17:12:36 +01:00
Jason Jean 62e64820d5 chore(repo): update nx to 19.0.0-beta.2 (#22926) 2024-04-22 17:39:09 +04:00
Colum Ferry 6ef17d2b56 fix(core): workspace context glob respects exclude (#22939) 2024-04-22 14:33:27 +01:00
Miroslav Jonaš 705baa7dfd fix(core): fix pnpm install order on ci workflows (#22580) 2024-04-22 13:01:11 +02:00
Craigory Coppola c49c07d926 fix(core): different commands should not be considered compatible targets (#22863) 2024-04-19 23:43:00 -04:00
Jason Jean 9ca53b7153 fix(core): fix cursor being hidden and process shutdown for ctrl c (#22895) 2024-04-19 18:41:59 -04:00
Nicholas Cunningham e7f60dabcb feat(nextjs): Add https option for custom server (#22921) 2024-04-19 15:46:03 -06:00
Craigory Coppola 80b55144db fix(misc): don't clear node_modules require cache (#22907) 2024-04-19 17:41:20 -04:00
Craigory Coppola 82be2aebe5 fix(misc): mark migration for escaping env vars as skipped in nx repair (#22916) 2024-04-19 14:57:19 -04:00
Craigory Coppola 9a0b70de69 fix(core): disable pty on windows until stable (#22910) 2024-04-19 14:34:02 -04:00
Craigory Coppola 2f3bc2b196 chore(repo): update nx to 19.0.0-beta.1 (#22912) 2024-04-19 14:33:09 -04:00
Colum Ferry 75234ae1b5 fix(vue): do not add verbatimImportSyntax to tsconfig (#22905) 2024-04-19 14:14:50 +01:00
Leosvel Pérez Espinosa 397276da04 fix(angular): fix loading postcss configuration in ng-packagr executors (#22900) 2024-04-19 11:45:40 +02:00
Jack Hsu e617e549a4 chore(repo): remove @side/jest-runtime as Node v20.10 patched the memory leak (#22886) 2024-04-18 22:11:36 -04:00
Jack Hsu 5e08b153c9 feat(bundling): upgrade rollup to v4 (#22656) 2024-04-18 22:08:07 -04:00
Caleb Ukle 091e48ff74 docs(nx-cloud): add info about start-ci-run and --stop-agents-after u… (#22888)
Co-authored-by: Altan Stalker <stalkeraltan@gmail.com>
Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-04-18 21:07:37 -04:00
Jason Jean 08f64211ec fix(core): handle plugin errors from isolation correctly (#22890) 2024-04-18 20:54:46 -04:00
Craigory Coppola a927e935a9 fix(misc): add --verbose support to nx graph (#22889) 2024-04-18 20:50:39 -04:00
Jason Jean 595ea21424 fix(testing): bust require cache in jest plugin so configs reload (#22893) 2024-04-18 20:42:45 -04:00
Craigory Coppola e2cee00767 fix(core): group command exit listeners to avoid warning (#22892) 2024-04-18 18:40:09 -04:00
Nicholas Cunningham 4d6cd36f5c feat(nx-dev): new main navigation menu (#22829)
It adds a new main navigation menu on the website and in the documentation, offering more choices and simpler access to different parts of the content for the visitor.

Co-authored-by: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
2024-04-18 11:24:34 -04:00
Jason Jean 25f598ffbe fix(testing): fix jest ci target names (#22858) 2024-04-18 10:08:39 -04:00
Leosvel Pérez Espinosa 7ebd27af02 docs(angular): call out @nx/angular plugin as required to run angular devkit schematics and builders (#22872) 2024-04-18 15:53:35 +02:00
Jason Jean 2d20ad819b fix(core): fix hashing of external dependencies (#22865) 2024-04-18 09:36:17 -04:00
Leosvel Pérez Espinosa 125c1d2786 fix(core): forward args provided to the nx add command to the invoked init generator (#22855) 2024-04-18 09:55:20 +02:00
Jason Jean 7f0dc268a0 fix(core): handle schema validation errors running commands directly (#22864) 2024-04-18 02:33:20 -04:00
Kyle Cannon e549ea2b58 fix(bundling): handle circular dependencies in @nx/esbuild getExtraDependencies (#22644) 2024-04-17 21:39:59 -04:00
Craigory Coppola edc7931330 fix(nx-cloud): ensure root .env files are loaded during dte (#22859) 2024-04-17 18:10:15 -04:00
Craigory Coppola e7c2ebdd98 fix(core): keep plugin workers until main process shutdown (#22860) 2024-04-17 17:41:09 -04:00
Isaac Mann 18070cf0e3 docs(core): add champions (#22844) 2024-04-17 15:26:30 -04:00
Jack Hsu 701c513fd7 feat(js): add swc cli options --strip-leading-paths (#22856) 2024-04-17 14:18:10 -04:00
Colum Ferry 82145e7d02 fix(core): load config util supports absolute paths on windows (#22837) 2024-04-17 11:32:09 -04:00
MaxKless da1808d36c feat(core): load native files from tmp location instead of node_modules (#22648) 2024-04-17 11:14:28 -04:00
Leosvel Pérez Espinosa 45d89d21d4 docs(angular): improve recipe about environment variables and add information for esbuild (#22841)
Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-04-17 15:21:21 +02:00
MaxKless e05cb4f689 fix(core): repair sourcemap creation in createNodes (#22851) 2024-04-17 09:03:16 -04:00
Jason Jean 801a22b243 fix(core): fix init logging and package.json updates (#22843) 2024-04-16 16:48:48 -04:00
Jack Hsu 3ca5c7896c fix(bundling): show codeframes for Rollup build errors (#22845) 2024-04-16 16:39:22 -04:00
Jason Jean 911f049486 chore(repo): update nx to 18.3.0-beta.3 (#22831) 2024-04-16 13:13:41 -04:00
MaxKless 71023c8e74 fix(core): use name instead of .prototype.name when comparing errors (#22840) 2024-04-16 11:45:19 -04:00
Leosvel Pérez Espinosa 714ea48185 docs(misc): add more visibility to migrating one major version at a time recommendation (#22818) 2024-04-16 17:42:51 +02:00
Benjamin Cabanes 6b60d21f5d chore(nx-dev): update sales page description and wording (#22826)
The sales page description and wording have been updated in both the SEO and the UI text of the sales page.
2024-04-16 09:56:46 -04:00
Jason Jean 2ee965042d Revert "feat(js): add swc cli options --strip-leading-paths (#22193)" (#22832) 2024-04-15 20:35:58 -04:00
Jason Jean bf206e578e feat(misc): non conflicting init/add flow (#22791) 2024-04-15 16:45:08 -04:00
Craigory Coppola e97c5887ee fix(core): errors thrown when creating projects should prevent running targets (#22807) 2024-04-15 16:44:38 -04:00
Isaac Mann 705b8e2742 feat(nx-dev): banner for webinar (#22824) 2024-04-15 13:20:26 -04:00
Colum Ferry 5429ba47ec chore(remix): e2e tests should use strings to prevent issues running commands on windows (#22820) 2024-04-15 09:23:11 -06:00
Benjamin Cabanes f48b305509 chore(nx-dev): update hero contact us link (#22822) 2024-04-15 11:02:04 -04:00
Colum Ferry 7dcd043362 fix(js): do not default to commonjs type field in package.json (#22819) 2024-04-15 15:55:34 +01:00
Benjamin Cabanes 50dff717df feat(nx-dev): add contact pages (#22815)
This commit adds a new 'Contact' section to the website. It includes various subpages designed to assist and guide users looking to get in touch. Users can now seek help through a convenient form, connect with the team in multiple ways, or reach out to the sales team directly.
2024-04-15 10:18:52 -04:00
Jack Hsu 839e4b25fc docs(core): remove deprecated docs page for Nx 14 and earlier (#22767) 2024-04-15 09:09:49 -04:00
Colum Ferry 455742a8d6 chore(testing): increase windows e2e test timeout (#22821) 2024-04-15 13:56:44 +01:00
Philip Fulcher 810a3b5259 docs(release): adjust description for preid to be more clear (#22569) 2024-04-14 19:26:54 +04:00
Lucca Miranda 134cbbc23c fix(core): improve isCI to better detect other providers (#22694) 2024-04-12 19:04:02 -04:00
Jason Jean 54c42c1725 fix(devkit): update peer dependency on nx to include Nx 19 (#22811) 2024-04-12 18:32:26 -04:00
Leosvel Pérez Espinosa 36f297cf76 feat(nuxt): update @nuxt/eslint-config to a stable version (#22804) 2024-04-12 16:59:36 +02:00
Thomas Dekiere 637a00469e fix(vite): pass cli arguments as options to vitest (#22355) 2024-04-12 10:28:08 +01:00
Jaypee Ignacio a627ce84b1 docs(expo): fix the instructions for rejecting local cache (#22792) 2024-04-12 09:28:54 +02:00
Austin Fahsl 34cc2f2172 fix(release): do not try to interpolate packageRoot for root project (#22771) 2024-04-11 23:04:26 -04:00
Craigory Coppola d1584f860c feat(core): load root .env files on daemon (#22786) 2024-04-11 22:27:21 -04:00
Jason Jean 2cb43cac8d chore(repo): update nx to 18.3.0-beta.1 (#22781) 2024-04-11 14:55:54 -04:00
Leosvel Pérez Espinosa d7f1b3db73 fix(angular): execute wrapped schematics post tasks and log messages (#22780) 2024-04-11 16:57:17 +02:00
Every f59ed58ae6 feat(js): add swc cli options --strip-leading-paths (#22193)
Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-04-11 10:54:27 -04:00
Joe Flateau 4360a0b460 docs(expo): fix the description for the expo update republish option (#22713) 2024-04-11 10:51:04 -04:00
Leosvel Pérez Espinosa a2167648f7 fix(angular): respect skipPackageJson correctly across generators (#22777) 2024-04-11 16:15:30 +02:00
Leosvel Pérez Espinosa fb57667088 docs(misc): reorder sidebar menu items (#22746) 2024-04-11 11:40:23 +02:00
Craigory Coppola c8f179d2d2 feat(testing): add metadata to playwright targets (#22768) 2024-04-10 18:12:44 -04:00
Jason Jean fd7cf38c20 feat(testing): add ability to split jest tests (#22662) 2024-04-10 14:00:03 -04:00
Emily Xiong 4cd1808e48 fix(react-native): fix unable to resolve on windows (#22759) 2024-04-10 09:48:32 -04:00
Emily Xiong aa6d464694 fix(react-native): should ask for app name when preset is react native (#22761) 2024-04-10 09:42:59 -04:00
Leosvel Pérez Espinosa fe903504c0 cleanup(core): fix broken unit tests (#22764) 2024-04-10 08:14:17 -04:00
Craigory Coppola 7a7cbeca44 feat(core): re-enable running plugins in isolation (#22527) 2024-04-09 18:36:33 -04:00
Younes Jaaidi caf663fd32 fix(core): fix plugin exclude option (#22738) 2024-04-09 23:26:39 +01:00
Colum Ferry 0548871779 fix(core): attach cli args from target options explicitly with '=' (#22756) 2024-04-09 23:25:19 +01:00
Jack Hsu 9f3d305557 docs(core): fix expo overview page (#22755) 2024-04-09 14:41:36 -06:00
Jack Hsu 22735a011e docs(core): remove React 18 migration (#22750) 2024-04-09 15:52:20 -04:00
Jason Jean afdd37ac8c fix(core): detect imports from template literals in dynamic imports (#22749) 2024-04-09 15:52:04 -04:00
Emily Xiong 07ef435127 docs(gradle): add gradle overview page (#22552) 2024-04-09 15:51:18 -04:00
Vinit Neogi 56f16d8077 docs(core): fix typo on Nx affected page (#22751) 2024-04-09 14:37:47 -04:00
Jack Hsu e5317a2eb8 docs(core): remove old Nx Console recipes (#22747) 2024-04-09 13:40:06 -04:00
Leosvel Pérez Espinosa 27094c5f4b docs(angular): remove manual migration guide (#22723) 2024-04-09 17:40:35 +02:00
Nicholas Cunningham c27a668530 fix(webpack): Should work when absolute paths are supplied as output (#22736) 2024-04-09 09:27:10 -06:00
Nicholas Cunningham f11d7be115 fix(webpack): typo for outputPath (#22734) 2024-04-09 09:11:46 -06:00
Leosvel Pérez Espinosa c6f93019cc docs(angular): refresh dynamic module federation guide (#22728) 2024-04-09 17:03:11 +02:00
Leosvel Pérez Espinosa eada6060ba docs(testing): improve jest plugin overview page (#22437) 2024-04-09 16:02:05 +02:00
Juri Strumpflohner 6d571f379c docs(core): link nx release talk (#22742) 2024-04-09 09:52:09 -04:00
Isaac Mann d75318bef4 docs(core): remove old version warnings (#22704)
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2024-04-09 09:40:50 -04:00
Leosvel Pérez Espinosa 9d8335110c docs(misc): add recipe on how to pass args to commands (#22284)
Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-04-09 15:06:53 +02:00
Craigory Coppola 32144bb702 fix(core): update pty version to add windows specific flags (#22711) 2024-04-08 17:25:32 -04:00
Nicholas Cunningham 50d89c7d5a fix(nextjs): Adding tailwind should work when creating an app OOTB (#22709) 2024-04-08 08:44:20 -06:00
Rares Matei 53d7913953 docs(nx-cloud): update release notes (#22727) 2024-04-08 14:52:10 +01:00
Leosvel Pérez Espinosa 18a2878de6 fix(angular): fix dynamic module federation generation (#22724) 2024-04-08 14:39:07 +02:00
Jack Hsu a9e554ff79 fix(js): propagate error from child process to @nx/js:node executor (#22705) 2024-04-05 17:45:04 -04:00
Jack Hsu 8a9e2fd543 fix(bundling): print errors from rollup build (#22707) 2024-04-05 17:13:08 -04:00
Emily Xiong 9d4891c323 fix(core): not passing props of run-commands to underlying command (#22595) 2024-04-05 16:11:41 -04:00
Jack Hsu 430aecc156 fix(bundling): support exported array of options for rollup (#22703) 2024-04-05 15:45:19 -04:00
Craigory Coppola b9ecf1ab5a fix(core): errors from create dependencies should show properly (#22695) 2024-04-05 15:38:28 -04:00
Isaac Mann 81c6c72121 docs(core): remove CRA migration guide (#22696) 2024-04-05 15:37:34 -04:00
Jack Hsu 900db73c1d fix(webpack): remove url-loader from dependencies since it is replaced by asset modules (#22698) 2024-04-05 13:49:32 -04:00
Isaac Mann 211f3eda0e feat(nx-dev): remember selected tabs (#22699) 2024-04-05 13:47:22 -04:00
Colum Ferry 640c61dd1a fix(module-federation): serve dynamic remotes statically in their own processes (#22688) 2024-04-05 11:58:32 -04:00
Colum Ferry 1c6118e140 fix(js): append target when generating tmp tsconfig to prevent conflicts #21396 (#22671) 2024-04-05 11:58:15 -04:00
Colum Ferry 123932527a feat(core): list crystal plugins with nx report (#22649) 2024-04-05 08:57:37 -07:00
Juri Strumpflohner 4189a9c552 feat(nx-dev): link Nx Launch Conf videos (#22690) 2024-04-05 09:10:43 -04:00
Jason Jean 21f90cae85 feat(core): add metadata to targets (#22655) 2024-04-04 23:19:10 -04:00
Jonathan Cammisuli fc8d5ba828 docs(core): update bitbucket ci docs (#22639)
Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
2024-04-04 16:09:35 -04:00
Isaac Mann 81235494a1 docs(core): remove integrated tutorial (#22666) 2024-04-04 14:44:17 -04:00
Emily Xiong c51a084eea fix(core): write terminal output to cache folder (#22673) 2024-04-04 14:30:42 -04:00
Miroslav Jonaš 3b182e4650 fix(misc): fix optional branch tracking on ci pipeline (#22652) 2024-04-03 20:01:36 -04:00
Jack Hsu 4fdf862700 fix(webpack): support standard webpack config with @nx/webpack:dev-server (#22660) 2024-04-03 15:37:05 -06:00
Nicholas Cunningham 92a2cc775d fix(nx-dev): Update urls that are 404 (#22653) 2024-04-03 15:35:10 -06:00
Nicholas Cunningham b0b424ce32 docs(nx-dev): Add feedback CTA (#22455) 2024-04-03 15:45:26 -04:00
Altan Stalker d9bb051091 docs(nx-cloud): remove server api reference (#22654) 2024-04-03 15:15:49 -04:00
Colum Ferry 7f00927655 fix(testing): app generators should create correct e2e config at generation time (#22565) 2024-04-03 16:51:03 +01:00
Colum Ferry 2149fa292d fix(vite): ensure cache is created correctly for separate vite and vitest config files #22244 (#22618) 2024-04-03 07:57:51 -07:00
Altan Stalker 6db05635a6 chore(repo): enable dte v2 (#22651) 2024-04-03 10:48:27 -04:00
Jack Hsu 270788e47b fix(webpack): bring back previous SVG and SVGR behavior for React projects (#22628) 2024-04-02 20:46:41 -04:00
Austin Fahsl 12afa20210 fix(release): respect root .npmrc registry settings for publishing 2024-04-02 13:53:14 -06:00
Altan Stalker 902da5db58 fix(js): update jest snapshot after vite-plugin-dts bump (#22621) 2024-04-02 14:47:19 -04:00
Leosvel Pérez Espinosa 153096574a fix(testing): fix playwright executor uiPort option schema (#22610) 2024-04-02 14:29:29 -04:00
Jason Jean 9419bad776 fix(core): do not assume workspace inputs cause all projects to be af… (#22573) 2024-04-02 14:10:30 -04:00
Isaac Mann 5f255c5a43 docs(core): editor setup in getting started (#22416)
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2024-04-02 11:56:42 -04:00
Colum Ferry 9e13c8537a feat(vite): migrate to latest vite-plugin-dts (#22614) 2024-04-02 16:33:01 +01:00
Leosvel Pérez Espinosa 50cf7e303c docs(misc): remove incorrect and not needed targetDefaults option from snippet (#22533) 2024-04-02 17:08:23 +02:00
Leosvel Pérez Espinosa 910491d4ac docs(misc): add missing initial package.json content to monorepo migration recipe (#22541) 2024-04-02 17:08:10 +02:00
Leosvel Pérez Espinosa afc324d3f9 docs(angular): update ng add section in angular cli comparison (#22542) 2024-04-02 17:07:58 +02:00
Leosvel Pérez Espinosa de2df18e9d docs(testing): improve cypress plugin overview page (#22432) 2024-04-02 17:01:31 +02:00
Isaac Mann 3e669f01e2 docs(core): plugin task splitting configuration (#22423) 2024-04-02 10:31:51 -04:00
Leosvel Pérez Espinosa 1a82dd21cd docs(core): link related docs to inferred tasks (#22555) 2024-04-02 08:19:30 -04:00
Leosvel Pérez Espinosa 814d773623 fix(angular): fix @nx/angular/src/utils entry point (#22609) 2024-04-02 11:44:56 +02:00
Leosvel Pérez Espinosa 5d5e88df90 fix(angular): respect skipPackageJson correctly in library generator (#22608) 2024-04-02 11:32:47 +02:00
Leosvel Pérez Espinosa 2aed31fc0a fix(angular): prevent false positive validation due to option default value in dev-server executor (#22606) 2024-04-02 11:32:36 +02:00
arekkubaczkowski 120cde6d52 fix(react-native): storybook relative paths (#22031)
Co-authored-by: Emily Xiong <xiongemi@gmail.com>
2024-04-01 12:04:32 -04:00
Jack Hsu ef81455b64 fix(nuxt): use loadConfigFile from devkit rather than @nuxt/kit (#22571) 2024-03-28 17:46:45 -04:00
Leosvel Pérez Espinosa 557f873c43 docs(angular): update nx and angular version compat matrix with angular v17.3.0 (#22370) 2024-03-28 17:34:37 -04:00
Emily Xiong ebbbb73b32 fix(gradle): add @nx/gradle to nx migrations (#22567) 2024-03-28 15:52:39 -04:00
Miroslav Jonaš cb5a31b1db chore(repo): bump version of nx-cloud-workflows steps (#22560) 2024-03-28 13:39:26 -04:00
Jason Jean 910fa947b6 chore(repo): move feature requests to discussions (#22564) 2024-03-28 13:39:05 -04:00
Colum Ferry 61839443ca fix(react): HMR for withModuleFederation #22300 (#22562) 2024-03-28 16:57:25 +00:00
Emily Xiong b051bbf600 fix(gradle): only allow certain types of task to be cached (#22559) 2024-03-28 12:11:06 -04:00
Colum Ferry 71a0b0dce7 fix(remix): generate correct e2e config if Crystal is used (#22558) 2024-03-28 15:41:09 +00:00
Leosvel Pérez Espinosa 6f41c27156 feat(testing): infer open-cypress task (#22556) 2024-03-28 10:29:58 -04:00
Jason Jean 127c4dcd64 fix(core): fix caching outputs which have symlinks (#22548) 2024-03-28 10:27:51 -04:00
Jason Jean e6d90b65a0 chore(repo): update nx to 18.2.0-beta.1 (#22500) 2024-03-28 10:13:40 -04:00
Emily Xiong 63c6cbd88c fix(gradle): fix gradle icon (#22553) 2024-03-28 10:07:02 -04:00
Pascal Küsgen 4b75255ba8 docs(misc): remove callout to use @nx/angular:move generator (#20308) 2024-03-28 10:23:00 +01:00
Jack Hsu 7d2a42027c fix(webpack): resolve assets from executor options as relative to workspace root (#22544) 2024-03-27 21:36:19 -04:00
Jack Hsu 5381742379 feat(webpack): create build log for remotes to help debug errors (#22539) 2024-03-27 15:12:58 -04:00
Jack Hsu 554770f6b7 fix(rollup): remove exports field from @nx/rollup/package.json since is a breaking change (#22545) 2024-03-27 14:55:20 -04:00
MaxKless bbd7960b0f docs(core): update troubleshooting guide & console adjustments (#22519) 2024-03-27 18:19:51 +01:00
Leosvel Pérez Espinosa a79b92e35a chore(repo): bump agents docker image (#22536) 2024-03-27 13:10:07 -04:00
MaxKless bb4dd7d18f fix(core): handle undefined properties in schemas with additionalProperties (#22426) 2024-03-27 12:27:49 -04:00
MaxKless 81cf348f55 fix(core): ignore yarn/cache when watching with the daemon (#22516) 2024-03-27 12:20:37 -04:00
Jason Jean d8778730ca fix(js): do not write cached lockfile parsed results when an error is… (#22526) 2024-03-27 11:26:31 -04:00
Emily Xiong c0b209f151 feat(gradle): add technology (#22528) 2024-03-27 11:11:17 -04:00
Leosvel Pérez Espinosa 590c7ae905 fix(storybook): do not set cacheableOperations if not previously set (#22535) 2024-03-27 14:56:33 +01:00
Jack Hsu 35321615b2 fix(webpack): pass options from executor to NxWebpackPlugin correctly (#22529) 2024-03-27 08:21:04 -04:00
Leosvel Pérez Espinosa 0f4d005ef5 docs(misc): improve docs around target defaults (#22456) 2024-03-27 02:46:44 -07:00
Jack Hsu 82dc70373f fix(js): handle case where tslib or @swc/helpers are missing from externalNodes (#22523) 2024-03-26 18:05:29 -04:00
Jason Jean 7914496499 fix(testing): name group of e2e ci tasks distinctly from target name (#22525) 2024-03-26 17:59:01 -04:00
Leosvel Pérez Espinosa bc4339c19b fix(misc): align nx init package.json scripts handling when deselecting all plugins (#22490) 2024-03-26 17:27:54 -04:00
Jason Jean a1b1351dbb fix(core): rethrow unknown errors during incremental graph calculation (#22522) 2024-03-26 17:25:15 -04:00
Eric Büttner 1594a3e103 docs(core): fix broken link in NPM Workspace Tutorial (#22505) 2024-03-26 17:25:01 -04:00
Jack Hsu fa5c99f666 feat(graph): remove polyfills from graph client (#22494) 2024-03-26 15:42:20 -04:00
Colum Ferry 29c80a33de fix(web): spa flag should correctly define redirect (#22487) 2024-03-26 16:51:03 +00:00
Leosvel Pérez Espinosa 02075d5aed docs(misc): remove some wrong references to the deprecated cacheableOperations option (#22483) 2024-03-26 09:40:29 -07:00
Leosvel Pérez Espinosa 06fa1a7746 docs(misc): mention nx add in recipe to keep nx plugin versions in sync (#22512) 2024-03-26 09:39:25 -07:00
Leosvel Pérez Espinosa 7afc451be4 docs(misc): remove nx:run-commands section from @nx/workspace plugin overview (#22510) 2024-03-26 17:15:02 +01:00
Leosvel Pérez Espinosa 1473f1f92a docs(misc): add section to ignore .nx/cache dir in manual migration docs (#22513) 2024-03-26 09:07:21 -07:00
Jack Hsu f839ed14c0 fix(js): migrate core-js to 3.36 for workspaces that use it (#22495) 2024-03-26 10:59:12 -04:00
Jason Jean fb90767af8 Revert "chore(repo): update nx to 18.2.0-beta.0 (#22467)" (#22499) 2024-03-25 15:15:50 -04:00
Jason Jean a2ff37bbc6 chore(repo): update nx to 18.2.0-beta.0 (#22467) 2024-03-25 13:24:43 -04:00
Jack Hsu 8f02325136 fix(js): match core-js version with babel options (#22493) 2024-03-25 12:49:13 -04:00
Maxence LEFEBVRE 85aa577b6f fix(core): cannot read property kind of undefined (#21715) 2024-03-25 11:03:12 -04:00
Emily Xiong e0519d9e4c fix(gradle): fix gradle to work on windows (#22470) 2024-03-25 10:40:47 -04:00
Juri Strumpflohner 80e6b8e11d docs(nx-cloud): add why nx cloud page (#22449)
Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
Co-authored-by: isaacplmann
2024-03-25 07:39:26 -07:00
Leosvel Pérez Espinosa 9bfdf897be fix(angular): target correct versions of ng-packagr to create stylesheet worker synchronously (#22485) 2024-03-25 12:54:17 +01:00
Noriyuki Shinpuku 54d47805de chore(vite): revert comment about closeAllConnections (#21634) 2024-03-22 18:40:08 -04:00
Jason Jean 1391bc78dc fix(testing): remove root from the cypress ci-e2e group (#22468) 2024-03-22 18:36:52 -04:00
Jason Jean 777fbd1673 feat(core): add ability to scope plugins (#22379) 2024-03-22 18:33:16 -04:00
Nelson Dominguez 5a28158077 cleanup(core): remove unnecessary empty lines (#22089) 2024-03-22 17:24:15 -04:00
Mike Pham 16af95fb3c fix(core): exponential backoff retry on cache put fail (#21926)
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2024-03-22 17:10:21 -04:00
Isaac Mann da12d87b18 docs(core): rename test atomizer (#22464) 2024-03-22 15:19:19 -04:00
Eric Büttner 512786f62c chore(core): update license copy year (#21032) 2024-03-22 14:49:47 -04:00
Jason Jean 814f767bdb chore(repo): install playwright browsers into .local-browsers (#22463) 2024-03-22 14:37:51 -04:00
Jason Jean 286e83dbe9 chore(repo): prefer ts node on freebsd publish (#22457) 2024-03-22 13:03:05 -04:00
Emily Xiong b7b70da6f8 fix(core): fix no plugins found for nx init without packge.json (#22434) 2024-03-22 12:52:36 -04:00
Leosvel Pérez Espinosa da343418aa docs(core): link related docs to the manage releases page (#22448) 2024-03-22 17:08:35 +01:00
Johanna Pearce a96b53e02c docs(nx-cloud): add basic Azure DevOps setup recipe 2024-03-22 13:36:01 +00:00
Leosvel Pérez Espinosa 674ea4ed30 docs(nextjs): improve plugin overview page (#22438) 2024-03-22 10:47:24 +01:00
Leosvel Pérez Espinosa 157d041335 docs(storybook): update recipes to align better with crystal (#22431) 2024-03-22 10:47:08 +01:00
Jack Hsu 61cb63dad2 fix(js): update babel preset to specify minor version of core-js for better optimization (#22433) 2024-03-21 22:09:56 -04:00
Leosvel Pérez Espinosa 2068f20c01 docs(misc): rename section in tutorials (#22440) 2024-03-21 16:16:22 -04:00
Jason Jean 7849e66a19 feat(core): create structured project graph errors with all plugin er… (#22404) 2024-03-21 15:54:01 -04:00
Jack Hsu db70b9a0fc feat(bundling): refactor rollup executor to perform single build for all formats (#22436) 2024-03-21 13:23:01 -06:00
Leosvel Pérez Espinosa c20e00cab8 fix(misc): handle cwd correctly when generating artifacts with as-provided (#22411) 2024-03-21 12:48:47 -04:00
Isaac Mann a837f7f877 docs(core): update installation page (#22422) 2024-03-21 10:24:44 -04:00
Isaac Mann 10460ffeaa docs(core): rearrange intro page (#22424) 2024-03-21 10:24:08 -04:00
Isaac Mann a059f1ae7b chore(core): fix docs release (#22430) 2024-03-21 10:01:41 -04:00
Miroslav Jonaš 85ba3f9ae0 fix(linter): convert parser options to flat config even is parser is missing (#22388) 2024-03-21 14:37:44 +04:00
Leosvel Pérez Espinosa 2678bdf72b docs(react-native): update plugin overview page and recipe (#22414) 2024-03-21 10:29:24 +01:00
Leosvel Pérez Espinosa 2a4c57dc3a docs(react): improve docs about using env vars in react (#22417) 2024-03-20 18:57:08 +01:00
Leosvel Pérez Espinosa 3acb632cb9 chore(nx-dev): increase webServer timeout for e2e tests (#22419) 2024-03-20 13:44:26 -04:00
Jack Hsu b7ffb257a2 fix(bundling): prevent sensitive keys from being bundled (#22413) 2024-03-20 13:01:43 -04:00
Thomas Kaul 18a53ebc15 docs(core): improve wording (#22412) 2024-03-20 14:02:19 +00:00
Leosvel Pérez Espinosa c076eab950 docs(misc): improve local executors guide (#22396) 2024-03-20 09:20:43 -04:00
Nicholas Cunningham a00f6438b9 fix(core): Should work if extends is a string 2024-03-20 12:33:50 +01:00
Jason Jean 64b23966cc fix(gradle): fix gradle plugin path (#22405) 2024-03-19 20:22:35 -04:00
Emily Xiong a44475c1a4 feat(gradle): make gradle public (#22399) 2024-03-19 18:14:58 -04:00
Emily Xiong 998e99a5f7 fix(gradle): fix missing tasks (#22400) 2024-03-19 18:13:24 -04:00
Leosvel Pérez Espinosa 8baddb5f08 feat(angular): support angular 17.3.0 (#22202) 2024-03-19 14:58:23 -04:00
Jack Hsu d058c8c0b1 chore(devkit): fix failing devkit test for convertNxExecutor (#22398) 2024-03-19 14:55:43 -04:00
Joel Pelaez Jorge 384d8744e0 fix(core): override Path env variable on Windows platform (#22382) 2024-03-19 14:46:43 -04:00
Emily Xiong 6d83dd7ff0 feat(gradle): add gradle init generator (#22245) 2024-03-19 14:38:15 -04:00
Jack Hsu 45e1d78a21 chore(repo): split e2e tasks for nx-dev-e2e (#22181) 2024-03-19 13:40:41 -04:00
Jason Jean 5a9671b3fa feat(core): add ability to add metadata to projects (#22299) 2024-03-19 13:33:25 -04:00
Isaac Mann 9f3af7051b docs(core): update mental model (#22395) 2024-03-19 13:02:31 -04:00
Isaac Mann 4a1c3a03e5 docs(core): angular monorepo redirect (#22375) 2024-03-19 08:48:38 -04:00
Isaac Mann 537e8aec26 chore(core): website branches by major version (#21954) 2024-03-19 08:29:18 -04:00
Rares Matei f36e038010 docs(nx-cloud): update release notes (#22364) 2024-03-19 09:53:39 +01:00
Nicholas Cunningham 55f31cf07b fix(webpack): Stylus loader path (#22373) 2024-03-18 10:25:00 -06:00
Ruslan 3c72acdb75 docs(remix): replace serve target with dev (#22357) 2024-03-18 09:55:56 -04:00
Edouard Maleix 546f8806e2 chore(core): nx plugin submission @getlarge/nx-heroku (#22353) 2024-03-18 08:48:36 -04:00
Jason Jean 4a4c2b9e8e fix(core): do not use pseudo terminal if platform is unsuported and f… (#22341) 2024-03-16 00:53:38 -04:00
Jason Jean b69047e5ac fix(js): read lockfile from the workspace root (#22340) 2024-03-15 18:56:54 -04:00
Leosvel Pérez Espinosa 8a9cab5139 docs(angular): update angular tutorials (#22332) 2024-03-15 17:12:04 -04:00
Leosvel Pérez Espinosa 0a6edd0247 docs(angular): update min nx version for angular 17.2.0 compat (#22212) 2024-03-15 17:11:34 -04:00
Benjamin Cabanes 7153a62733 feat(nx-dev): add apollo.io tracking script to _app.tsx (#22339)
Integrated Apollo.io embed code script to enable tracking functionality. The script has been added with 'afterInteractive' strategy to ensure it loads after the main content, optimizing performance and tracking accuracy.
2024-03-15 16:53:07 -04:00
Colum Ferry d7cb6875f9 feat(remix): add option to create-nx-workspace (#22334) 2024-03-15 16:44:25 -04:00
Jason Jean 7390031b7e fix(release): fix default renderer resolution to be relative within t… (#22331) 2024-03-15 16:43:25 -04:00
James Henry 1fe5b98f45 fix(linter): refactor pcv3 plugin, expose configFiles on context (#21677) 2024-03-15 16:29:13 -04:00
Nicholas Cunningham cea7e93c86 docs(nextjs): Fix tabs for Nx 18 (#22338) 2024-03-15 13:42:54 -06:00
Jason Jean 1068513a03 chore(repo): update nx to 18.1.0-beta.10 (#22333) 2024-03-15 13:25:43 -04:00
Jason Jean 86c5b3d2aa cleanup(core): rename file with rust patterns (#22330) 2024-03-15 12:34:27 -04:00
Colum Ferry 2b0df87fcb feat(remix): support version 2.8.0 (#22326) 2024-03-15 12:34:15 -04:00
Nicholas Cunningham c7719c01f2 docs(nx-dev): Refresh /showcase/example-repos (#22320) 2024-03-15 09:52:37 -06:00
Jason Jean 02f0764d14 fix(core): fix pty for multiple commands in 1 process (#22294) 2024-03-15 09:58:26 -04:00
Juri d4e47cce20 docs(nx-cloud): link e2e video on CI entry page 2024-03-15 09:57:51 +01:00
Juri 194b3dd3fc docs(nx-cloud): add e2e test video 2024-03-15 08:50:04 +01:00
Isaac Mann 3b8cbae912 docs(core): fix links to nx agents (#22314) 2024-03-14 17:32:49 +01:00
Louie Weng e2692b2f9d docs(express): add library import to express project example (#22293) 2024-03-14 11:52:13 +01:00
Austin Fahsl cbb88f0d29 feat(release): add conventional commits configurability for version and changelog (#22004)
Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-03-13 18:19:24 -06:00
Nicholas Cunningham 73a8091b93 docs(nx-dev): Update internal links to use Link tag (#22287) 2024-03-13 10:34:55 +01:00
Colum Ferry 81df8485a1 fix(module-federation): ensure targetDefaults for module federation executors are setup correctly (#22282) 2024-03-12 19:33:27 +00:00
Nicholas Cunningham b6cd1962c8 fix(vite): Storing nxjson details too early (#22285) 2024-03-12 23:22:50 +04:00
Emily Xiong 9ca400c25f feat(core): run commands directly (#21918) 2024-03-12 15:01:52 -04:00
Jason Jean b78090ae58 chore(repo): update nx to 18.1.0-beta.9 (#22239) 2024-03-12 15:00:03 -04:00
Miroslav Jonaš 810c5dfcc2 fix(core): fix gh group success icon (#22281) 2024-03-12 14:59:48 -04:00
Alex Swindler 0025b3c8fa fix(core): make windows runtime input hashing windowless (#22197) 2024-03-12 11:56:22 -04:00
Miroslav Jonaš c16f57b691 docs(nx-dev): comment out start-ci-run on on docs according to the ci workflows (#22280) 2024-03-12 16:04:02 +01:00
Leosvel Pérez Espinosa 712d4e0042 docs(misc): fix paths in shared pdv json (#22274) 2024-03-12 08:08:35 -04:00
Leosvel Pérez Espinosa 5978e30d20 docs(misc): update typedoc (#22264) 2024-03-12 09:33:44 +01:00
Nicholas Cunningham 9520aa22d4 fix(nextjs): runCLI stdio (#22267) 2024-03-11 14:07:03 -04:00
Leosvel Pérez Espinosa 4850bdb6aa fix(nx-plugin): support root tsconfig.json in nx-plugin-checks eslint rule 2024-03-11 16:43:02 +01:00
Leosvel Pérez Espinosa e19f33bb27 fix(js): use NodeJs moduleResolution with ts-node to support CommonJS module and TS 4.x (#22258) 2024-03-11 11:21:59 -04:00
Jason Jean c01b566728 feat(core): revert running plugins in isolation (#22246) 2024-03-09 11:30:10 -05:00
Jason Jean 235ca8cbda fix(core): properly cleanup when the project-graph creation fails (#22243) 2024-03-08 15:29:55 -05:00
Isaac Mann 650dcf31af docs(core): npm workspace tutorial (#22018) 2024-03-08 15:01:49 -05:00
Samantha Lurio 72681b4707 docs(vue): fixes typo in vue-plugin (#22088) 2024-03-08 11:19:48 -07:00
Colum Ferry 85599939ca fix(react): pass correct argument to rspack configuration generator (#22241) 2024-03-08 18:08:15 +00:00
Jason Jean 4a642c51c2 chore(core): fix formatting in default base migration (#22240) 2024-03-08 12:23:03 -05:00
Colum Ferry 9b81821e67 feat(remix): use Remix CLI directly with Remix Crystal Plugin (#22234) 2024-03-08 16:33:11 +00:00
Rares Matei cb77810673 docs(nx-cloud): update release notes (#22236) 2024-03-08 10:54:02 -05:00
Leosvel Pérez Espinosa 864e0b1709 fix(nx-plugin): do not print duplicated warning about derived format when generating plugin (#22230) 2024-03-08 10:41:47 -05:00
Jason Jean ec12e67e10 fix(core): only start plugin workers once (#22222) 2024-03-08 10:29:37 -05:00
Isaac Mann f98b18d4a2 docs(core): various references to Nx Cloud (#22237) 2024-03-08 09:41:18 -05:00
Leosvel Pérez Espinosa ac949d64b6 fix(angular): install jsonc-eslint-parser only when @nx/dependency-checks is used (#22231) 2024-03-08 11:25:37 +01:00
Isaac Mann 97cc7140d8 docs(core): reference CI tutorials (#22216) 2024-03-08 00:17:38 -08:00
Nicholas Cunningham 381a36d790 fix(angular): Module federation with Crystal enabled. (#22224) 2024-03-08 08:49:23 +01:00
Isaac Mann 46592d7912 docs(core): ci section in why nx (#22217) 2024-03-07 10:50:57 -08:00
Nicholas Cunningham 466debe869 fix(nextjs): Surface error codes when build is interrupted by signals SIGINT, SIGTERM etc... (#22190) 2024-03-07 11:46:28 -07:00
Leosvel Pérez Espinosa 8a71ef59a6 fix(angular): fix message logged for unsupported ng cache (#22211) 2024-03-07 10:12:08 -05:00
Leosvel Pérez Espinosa 106a939b6d fix(angular): log message about unsupported ng cache command (#22154) 2024-03-07 09:59:51 -05:00
Jason Jean ec59d2ca98 chore(repo): update nx to 18.1.0-beta.5 (#22191) 2024-03-07 09:40:14 -05:00
Miroslav Jonaš ec0880b404 feat(repo): use latest pnpm for CI runs (#22207) 2024-03-07 14:51:21 +01:00
Miroslav Jonaš 002d2cec95 fix(core): fix terminal message alignment on errors (#22189) 2024-03-07 14:11:02 +01:00
Miroslav Jonaš c028e5a699 docs(nx-dev): add disclaimer to with-env-vars (#22163) 2024-03-07 13:36:46 +01:00
Jason Jean 84d96cc5f9 fix(core): reject all promises in pool during shutdown (#22188) 2024-03-06 17:48:15 -05:00
MaxKless d2cd822953 fix(graph): show command property as monospace (#21997)
Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
2024-03-06 15:31:21 -05:00
Jack Hsu 8030bd7291 docs(core): remove @nrwl/ rescope message from codeblocks (#22184) 2024-03-06 15:18:19 -05:00
Jason Jean 9d5bdbe884 chore(graph): disable failing e2e graph test (#22186) 2024-03-06 14:54:45 -05:00
Emily Xiong e1843ee01a feat(graph): add spinner on the projects page (#22149) 2024-03-06 13:03:16 -05:00
Miroslav Jonaš 0a00bfef15 chore(repo): bump version of actions/checkout for nightly (#21810) 2024-03-06 13:02:13 -05:00
Jason Jean 4484a91bc1 chore(repo): update nx to 18.1.0-beta.3 (#22135) 2024-03-06 12:58:29 -05:00
Emily Xiong 3260f4166a fix(testing): fix project config might not be defined (#22174) 2024-03-06 12:53:02 -05:00
Leosvel Pérez Espinosa 1731ad890a fix(misc): do not add includedScripts unless really needed when running nx add (#22180) 2024-03-06 18:28:52 +01:00
Emily Xiong da5a19dfee feat(core): forward options for run command (#22064) 2024-03-06 12:08:45 -05:00
Leosvel Pérez Espinosa 876bc94aab fix(misc): improve package.json scripts handling when running "nx init" and "nx add" (#22168) 2024-03-06 09:39:34 -05:00
Victor Login 91944484fe fix(linter): add v7 of typescript-eslint to peerDeps (#21853)
Co-authored-by: “JamesHenry” <james@henry.sc>
2024-03-06 14:05:37 +00:00
Alon Valadji a09e70a291 fix(core): fix no such file or directory, open 'package-lock.json' (#21835)
Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
2024-03-06 17:53:46 +04:00
Juri Strumpflohner 320b086290 fix(testing): minor adjustment to the config generation template (#22175) 2024-03-06 08:18:27 -05:00
Edouard Bozon cc2f6551e9 docs(core): fix plugin object declaration example (#21765) 2024-03-05 18:05:13 -05:00
Bacary Bruno Bodian 3b2e5a82f7 chore(nx): pass generic to CreateNodes (#22157) 2024-03-05 18:02:46 -05:00
Austin Fahsl 38179ad278 feat(js): replace publish script with nx release config (#21474) 2024-03-05 17:53:07 -05:00
Nicholas Cunningham 391f3ab8e6 fix(nextjs): Adding styles to nextjs cypress should not fail. (#22170) 2024-03-05 15:17:42 -07:00
Isaac Mann bf1dcdc986 docs(core): nx cloud video (#22103) 2024-03-05 20:25:07 +01:00
Emily Xiong a3ef2c6c3f feat(graph): add error boundary error page for project details (#22007)
Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
2024-03-05 13:52:21 -05:00
Emily Xiong e3dc02a1ad chore(graph): add emily to graph codeowners (#22169) 2024-03-05 13:43:41 -05:00
Isaac Mann 62e89f68c7 docs(core): enterprise custom dte (#22143) 2024-03-05 12:14:21 -05:00
Leosvel Pérez Espinosa acf4787ab4 feat(angular): remove optional @nx/cypress and @nx/jest from dependencies (#22162) 2024-03-05 17:53:54 +01:00
Leosvel Pérez Espinosa 30040845ae fix(testing): resolve cypress config glob pattern correctly to handle root projects (#22165) 2024-03-05 11:34:43 -05:00
Rares Matei 0d86305799 docs(nx-cloud): update release notes (#22161) 2024-03-05 15:54:00 +00:00
Isaac Mann e78116d709 chore(repo): revert enable e2e splitting for nx-dev-e2e (#21922) (#22164) 2024-03-05 09:36:41 -05:00
Emily Xiong 22de9b5b84 fix(core): add outputs to nx.json for nx init in monorepo (#22061) 2024-03-05 00:56:32 -05:00
Juri Strumpflohner 587fe6a63b fix(vue): small typo in CNW description (#21888) 2024-03-04 18:50:24 -05:00
Jack Hsu 454e78e32b chore(repo): enable e2e splitting for nx-dev-e2e (#21922) 2024-03-04 16:59:21 -05:00
Craigory Coppola 58d8f4cc13 fix(misc): add missing format files call (#22137) 2024-03-04 16:54:04 -05:00
Benjamin Cabanes dd666baa6e feat(nx-dev): change color for nx-agents & nx-ai buttons on home (#22142) 2024-03-04 19:51:39 +00:00
Leosvel Pérez Espinosa 2d9ecfd1fc fix(testing): close cypress web server correctly on windows (#22125) 2024-03-04 13:11:01 -05:00
James Henry 6957937ec4 fix(release): store rawVersionSpec on versionData (#22071) 2024-03-04 13:10:19 -05:00
Javier Abia 1961bb514e fix(nextjs): avoid path error on dev server creation (#21998) 2024-03-04 10:56:44 -07:00
Emily Xiong 8ccdd73c8b fix(react-native): pin ajv version to 8.12.0 (#22002) 2024-03-04 12:01:30 -05:00
Craigory Coppola c754facb0e fix(core): setting up .nx inside gradle shouldn't throw (#21957) 2024-03-04 11:00:42 -05:00
Leosvel Pérez Espinosa dee40997da fix(testing): increase the default timeout to 60s for the cypress web dev server to start (#22132) 2024-03-04 15:38:04 +01:00
James Henry 1d6e0f8c67 chore(repo): only valid latest publish when not local (#22131) 2024-03-04 17:23:00 +04:00
James Henry 80ae3971ff chore(repo): check valid release authors for latest (#22127) 2024-03-04 07:20:21 -05:00
Leosvel Pérez Espinosa 7c998db5ed cleanup(release): update outdated snapshots in e2e tests (#22126) 2024-03-04 15:05:17 +04:00
Leosvel Pérez Espinosa 47df7f94af chore(repo): add missing e2e-gradle to e2e matrix projects (#22124) 2024-03-04 11:01:42 +01:00
Austin Fahsl 8bde48fc7a fix(release): skip lock file update if workspaces are not enabled (#22055) 2024-03-01 10:15:55 -07:00
Austin Fahsl 7eec91289c feat(release): interpolate workspaceRoot in changelog path (#22058) 2024-03-01 10:15:35 -07:00
Nicholas Cunningham 9f4428259f fix(nextjs): Add spec files when creating a next app (#22079) 2024-03-01 09:28:37 -07:00
Craigory Coppola a661354709 fix(core): target defaults should represent nx.json in source info (#22080) 2024-03-01 10:04:33 -05:00
Katerina Skroumpelou 0e1055ef21 docs(storybook): upgrading using storybook cli (#22077) 2024-03-01 15:58:50 +02:00
James Henry f27ea85bc7 docs(release): document nx release for rust crates (#22072) 2024-03-01 08:54:23 -05:00
Leosvel Pérez Espinosa 2bcde03c01 fix(testing): calculate correct support file path in cypress e2e preset (#22096) 2024-03-01 14:40:09 +01:00
Colum Ferry 511eb36fa7 fix(remix): ensure component-testing is exported correctly #22091 (#22095) 2024-03-01 13:34:29 +00:00
Leosvel Pérez Espinosa 49861e30b7 fix(storybook): handle main.js file correctly in storybook plugin (#22081) 2024-03-01 10:25:59 +01:00
custompro12 ea66a26545 docs(core): fix instance type typos (#22090) 2024-02-29 23:20:07 -05:00
Austin Fahsl d705372f57 fix(release): currentVersionResolver git-tag should prefer merged tags (#22082) 2024-02-29 13:58:48 -07:00
Craigory Coppola a89c73483e feat(core): use flag in nx.json for toggling crystal (#21980) 2024-02-29 15:18:46 -05:00
Isaac Mann e9da3db560 docs(core): remove angularjs migration (#21916) 2024-02-29 15:10:49 -05:00
Jack Hsu 58cfaae951 fix(core): nextjs-standalone generates package scripts consistent with create-next-app (#21996) 2024-02-29 14:49:50 -05:00
Emily Xiong 42ad573405 feat(core): add gradle plugin (#21055) 2024-02-29 14:15:54 -05:00
Emily Xiong e687aad0e4 feat(detox): upgrade @config-plugins/detox to 7 (#21959) 2024-02-29 13:59:32 -05:00
Colum Ferry 729e0a15ce feat(bundling): crystalize rollup (#22045) 2024-02-29 13:56:09 -05:00
Leosvel Pérez Espinosa 7879b3fd2e fix(misc): fix buildable libs utils calculating dependent projects from task graph (#22015) 2024-02-29 12:09:55 -05:00
Katerina Skroumpelou 5971ae17f6 fix(misc): make sure to add e2e crystal plugin (#22041) 2024-02-29 16:54:07 +02:00
Leosvel Pérez Espinosa 036e31764c cleanup(misc): increase cypress web server timeout in flaky e2e tests (#22069) 2024-02-29 15:02:35 +01:00
Jack Hsu c523d52414 feat(core): provide a hint when project.json has empty targets (#22028) 2024-02-29 00:12:49 -05:00
Jack Hsu 56c34cf429 fix(js): set moduleResolution to Node10 so it is compatible with CommonJS module (#21979) 2024-02-28 23:08:18 -05:00
Craigory Coppola f6a183c4f7 fix(misc): migration should shutdown plugin workers if it starts them (#22048) 2024-02-28 18:07:30 -05:00
Craigory Coppola 9efde91aeb fix(core): plugins should not be registered twice and should respect shutdown queue (#22057) 2024-02-28 17:38:39 -05:00
Nicholas Cunningham 287a0e0616 fix(nuxt): Add e2e-ci and serve-static targets (#22056) 2024-02-28 13:53:20 -07:00
Colum Ferry f046c52e5c feat(bundling): rollup should support ESM config files (#21999) 2024-02-28 12:26:34 -05:00
Leosvel Pérez Espinosa 6576325f7b docs(misc): fix misc issues (#22039)
Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-02-28 10:02:27 -05:00
Jack Hsu 2fa693d297 docs(cypress): add "await" to the documented extension to setupNodEvents in order for webserver to be set up properly (#22027) 2024-02-28 09:45:59 -05:00
Colum Ferry 8fb5b0507a chore(remix): disable flaky test (#22038) 2024-02-28 08:34:14 -05:00
Craigory Coppola 4d13753b6d fix(core): plugin pool should not clobber promises when called multiple times (#21977) 2024-02-27 21:35:49 -05:00
Austin Fahsl 888110a20b chore(repo): exclude master commits from commit linting (#22029) 2024-02-27 19:30:52 -07:00
Almar Aubel c2070817ba doc(core): update reduce-repetitive-configuration.md (#22022)
Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
Co-authored-by: Isaac Mann <isaacplmann@gmail.com>
2024-02-27 15:03:42 -05:00
Jack Hsu 207b4926d1 feat(nextjs): use global NX_GRAPH_CREATION in withNx plugin to guard against graph creation during create nodes (#22026) 2024-02-27 14:57:39 -05:00
Isaac Mann e732e7116f docs(core): default cache directory update (#22023) 2024-02-27 11:40:33 -05:00
Katerina Skroumpelou 82278d9254 fix(nuxt): fix storybook preview config path (#22020) 2024-02-27 11:01:20 -05:00
Leosvel Pérez Espinosa 53e62c2097 cleanup(angular): increase cypress web server timeout in mf e2e tests to fix nightly runs (#22014) 2024-02-27 12:25:39 +00:00
Leosvel Pérez Espinosa 5b9fc0b5e7 cleanup(angular): fix e2e test cases setup (#22012) 2024-02-27 12:25:23 +00:00
Nicholas Cunningham 452d845917 docs(nextjs): Update nextjs deployment with Crystal (#22005) 2024-02-26 20:06:26 -05:00
Nicholas Cunningham b34f9df962 fix(node): Increase timeout for CI (#22003) 2024-02-26 12:19:20 -07:00
MaxKless 4c5654dac7 cleanup(core): rewrite text reference to nx console 'run' button (#21020) 2024-02-26 11:01:31 -05:00
Miroslav Jonaš ce933132d0 cleanup(linter): refactor code for dynamic/static imports check (#20897) 2024-02-25 20:59:51 +04:00
Jack Hsu 26b266faf4 fix(core): update generated README pages with more useful instructions (#21976) 2024-02-23 16:09:57 -05:00
Leosvel Pérez Espinosa 5161e4128c fix(misc): set nx property in root package.json when no replacing script in nx init (#21974) 2024-02-23 21:27:58 +01:00
Craigory Coppola c2581dcf0b feat(core): execute plugins in isolated processes (#21760) 2024-02-23 13:20:44 -05:00
Craigory Coppola cb0748a130 fix(core): target defaults application shouldn't include extra scripts (#21970) 2024-02-23 11:56:56 -05:00
Julian Martin 8c6d8a6d35 feat(nuxt): export storybook generator (#21969) 2024-02-23 17:09:57 +02:00
Leosvel Pérez Espinosa 1685226c15 feat(misc): log message in nx init when detecting plugins (#21932) 2024-02-23 15:18:14 +01:00
Leosvel Pérez Espinosa 23de0841e6 fix(core): normalize migration target versions when sorting migrations (#21967) 2024-02-23 15:05:22 +01:00
Leosvel Pérez Espinosa 77a01ca94c feat(testing): add getJestProjectsAsync to support inferred targets (#21897) 2024-02-23 15:03:46 +01:00
Leosvel Pérez Espinosa dd2c7d2601 feat(testing): update cypress version (#21961) 2024-02-23 14:44:22 +01:00
Katerina Skroumpelou 776367e882 fix(nuxt): tsconfig types and output dir (#21934) 2024-02-23 15:22:18 +02:00
Leosvel Pérez Espinosa 26ce6f6f64 fix(linter): fix eslint-plugin migration target version (#21966) 2024-02-23 16:19:07 +04:00
Colum Ferry c9c56a2cfd fix(react): ensure playwright configuration is using correct port in app gen (#21941) 2024-02-23 11:25:54 +00:00
Craigory Coppola 21e764833e fix(testing): add null checks when reading targets (#21952) 2024-02-22 17:23:48 -05:00
Craigory Coppola 836012b67a fix(testing): playwright plugin enoent error (#21951) 2024-02-22 16:51:15 -05:00
Craigory Coppola 95b77f8fb0 feat(core): flatten default base config to base (#19964) 2024-02-22 16:50:25 -05:00
Craigory Coppola 17e2248098 fix(misc): logs from rm-default-collection should render properly (#21953) 2024-02-22 16:50:05 -05:00
Craigory Coppola da4fb5a9a5 docs(core): add quiet flag to generate docs (#21378) 2024-02-22 15:55:23 -05:00
Craigory Coppola dc8f57937b fix(repo): update browser tools to fix ci (#21955) 2024-02-22 15:47:56 -05:00
Juri Strumpflohner 814035ba79 docs(core): add Nx 18 video to changelog page (#21948) 2024-02-22 11:31:40 -08:00
Steven Nance ead05ad883 fix(devkit): respect expectComments when parsing json (#21584) 2024-02-22 14:08:07 -05:00
Katerina Skroumpelou 00dae6a811 fix(vite): update vitest and use parseCLI (#21890) 2024-02-22 11:03:08 -05:00
Colum Ferry 1a7e812611 fix(testing): ensure baseUrl is not passed to playwright cli (#21943) 2024-02-22 16:00:08 +00:00
Leosvel Pérez Espinosa a1d8645ac5 fix(angular): ensure generated editor tsconfig in apps only include runtime files (#21945) 2024-02-22 16:32:42 +01:00
Katerina Skroumpelou f061f57836 feat(vite): add vitest.workspace.ts at root (#21915) 2024-02-22 16:43:06 +02:00
Hardik Patel 28cd744b80 docs(module-federation): fixed typo in readme creating-a-host.md (#21931)
Co-authored-by: Hardik <HPatel5@slb.com>
2024-02-22 08:28:18 -05:00
Leosvel Pérez Espinosa 41fc8354a0 fix(angular): do not add target defaults for the ng-packagr-lite executor when generating non-buildable library (#21935) 2024-02-22 11:25:08 +01:00
Emily Xiong 5d6abe437d fix(graph): fix open project with / in name (#21722)
Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
2024-02-21 16:36:39 -05:00
Jonathan Cammisuli ce3f2c17ca fix(core): do not use the new pty function for older versions of windows (#21854) 2024-02-21 15:13:01 -05:00
Jack Hsu 317ef2e275 fix(webpack): surface original error when remotes fail to start (#21919) 2024-02-21 13:31:53 -05:00
Jack Hsu 6efdfd24ca docs(nx-cloud): fix syntax for launch template example (#21921) 2024-02-21 13:14:46 -05:00
Austin Fahsl 20548270d8 feat(release): prompt to create github release when no file changes (#21819) 2024-02-21 11:01:54 -07:00
Katerina Skroumpelou f3cf98d5c3 fix(core): include nx/nuxt in migrations (#21885) 2024-02-21 17:10:43 +00:00
Colum Ferry 1d33c50d04 feat(angular): update jest-preset-angular dependency to 14.0.3 (#21912) 2024-02-21 16:20:27 +00:00
Leosvel Pérez Espinosa cfa0815385 fix(angular): stop using npmScope as a prefix for component and directive selectors (#21828) 2024-02-21 16:20:12 +01:00
Leosvel Pérez Espinosa fe72ab4c78 fix(testing): pin cypress version to avoid issue with verifying cypress (#21917) 2024-02-21 15:13:14 +00:00
Katerina Skroumpelou c7a1a75c78 fix(nuxt): turn on autoimport (#21894) 2024-02-21 08:48:03 -05:00
Colum Ferry e7826cdc6c fix(nuxt): init generator should add @nx/vite to dependencies (#21911) 2024-02-21 14:19:44 +02:00
Jack Hsu abc0cf8450 chore(repo): update to nx 18.1.0-beta.1 (#21900) 2024-02-20 16:11:10 -05:00
Craigory Coppola 7ef1d3c1dd fix(core): read all targets from package json when defining target defaults (#21719) 2024-02-20 15:33:32 -05:00
Colum Ferry fc0c99dd96 docs(module-federation): clarify usage of skipRemotes (#21887) 2024-02-20 19:18:58 +00:00
Isaac Mann 86acef668c docs(core): explain NX_ADD_PLUGINS (#21831) 2024-02-20 14:13:25 -05:00
Miroslav Jonaš ecf70adbce fix(core): align terminal output padding and remove leading arrow (#21809) 2024-02-20 17:43:46 +01:00
Isaac Mann 2c8c8d4f2a docs(core): fix links (#21891) 2024-02-20 07:51:26 -08:00
Miroslav Jonaš e864d35bbc fix(core): ensure migrate works with yarn PnP (#21824) 2024-02-20 10:36:01 -05:00
Leosvel Pérez Espinosa ca3965fcf3 fix(angular): do not force explicit targets for separate e2e projects (#21865) 2024-02-20 15:57:28 +01:00
Katerina Skroumpelou fe17fc3287 fix(vite): project conversion generator (#21646) 2024-02-20 16:38:12 +02:00
Colum Ferry 246fd1907b fix(remix): typo in tsconfig.spec.json update led to invalid tsconfig (#21886) 2024-02-20 16:04:14 +02:00
Dan Roujinsky 4a5b5f245d fix(webpack): correctly handle paranthesis in PostCSS in url (#21884) 2024-02-20 16:02:56 +02:00
Viktor Pöntinen 89e5e2a184 fix(remix): adjust remix start script when building (#21883) 2024-02-20 10:37:40 +00:00
Tine Kondo 003b9613c4 fix(core): propagate verbose flag when running init generator dur… (#21868) 2024-02-19 12:06:19 -05:00
Leosvel Pérez Espinosa 077debe2b2 fix(vite): normalize vitest cli args in executor (#21870) 2024-02-19 17:28:05 +01:00
Julian Martin 31348e2b85 fix(vue): tailwind generator ignoring styleSheet option (#21840) 2024-02-19 10:04:45 +02:00
Leosvel Pérez Espinosa 5b6d1b4017 feat(angular): force explicit targets when NX_ADD_PLUGINS is not explicitly true (#21852)
Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-02-16 17:42:51 -05:00
Nicholas Cunningham 4c8c24b97a fix(nextjs): Add missing e2e-ci target for cypress (#21805) 2024-02-16 16:36:01 -05:00
Zachary DeRose 11c849afab docs(misc): temporarily removing nx 18.0 video from changelog (#21851) 2024-02-16 13:30:47 -05:00
Zachary DeRose ba167293c0 docs(misc): adding tusky to nx cloud products (#21738) 2024-02-16 11:16:24 -05:00
Zachary DeRose fdcd4d0451 fix(vue): fixing vue and nuxt welcome templates (#21792) 2024-02-16 11:15:58 -05:00
Zachary DeRose 9c4d5005ee docs(core): adding Nx 17.2 changelogs (#21837) 2024-02-16 11:15:14 -05:00
Colum Ferry 90ba36696e feat(remix): upgrade to latest remix 2.6.0 (#21843) 2024-02-16 14:56:46 +00:00
Philip Fulcher f29383dc31 docs(js): fix createPackageJson and createLockFile example (#21818) 2024-02-16 15:00:06 +01:00
Colum Ferry ef277518e9 fix(remix): the output path should respect the remix.config.js in crystal (#21842) 2024-02-16 13:26:03 +00:00
Colum Ferry 73d041b885 fix(remix): should add remix plugin to nx.json on init correctly (#21827) 2024-02-16 08:03:08 -05:00
Isaac Mann c5a64d39be docs(core): add 18.0 changelog (#21832)
Co-authored-by: Zachary DeRose <zack.derose@gmail.com>
2024-02-15 23:47:09 -08:00
Emily Xiong 0f0074c91f fix(react-native): add all flag to sync-deps (#21821) 2024-02-16 01:12:16 -05:00
Benjamin Cabanes 27cf3082da feat(nx-dev): update website header components (#21833) 2024-02-15 17:34:34 -05:00
Nicholas Cunningham 97e60f3175 fix(core): Update NxWelcome connect to cloud (#21830) 2024-02-15 12:57:27 -07:00
Emily Xiong 3d48b2290b fix(react-native): change gradlew to absolute path (#21725) 2024-02-15 14:12:13 -05:00
Emily Xiong 4be897ac3f fix(webpack): resolve relative path for assets inputs (#21822) 2024-02-15 13:42:25 -05:00
Leosvel Pérez Espinosa 8963c4c538 feat(angular): support angular 17.2.0 (#21671) 2024-02-15 12:13:57 -05:00
Colum Ferry e4b9248d05 feat(angular): ensure all targets are generated for application and libraries (#21826) 2024-02-15 16:13:31 +00:00
Leosvel Pérez Espinosa 2b7047b8b8 feat(core): support migrating to canary versions of nx for testing (#21812) 2024-02-15 16:45:54 +01:00
Austin Fahsl c9c2d978e6 docs(release): introduction to github releases with nx release (#21814) 2024-02-15 08:06:00 -07:00
Isaac Mann d5e1451634 docs(core): expand nx agents feature (#21804) 2024-02-14 15:15:18 -05:00
Colum Ferry 3b384c78ac feat(react): add tailwind as style prompt option for app gen (#21784) 2024-02-14 17:51:37 +00:00
Leosvel Pérez Espinosa 343c0f6690 feat(angular): add the extract-i18n executor (#21802) 2024-02-14 14:37:25 +01:00
Austin Fahsl b625a79cca fix(release): move github release creation to git tasks (#21510) 2024-02-13 17:32:35 -07:00
Isaac Mann f4dd4403f5 docs(core): expand nx agents feature (#21803) 2024-02-13 15:56:22 -05:00
Colum Ferry 972801ede2 fix(js): swc executor should support inlining on windows (#21801) 2024-02-13 18:48:53 +00:00
Vadim Goy 499659c092 fix(react): full support custom secure host for module federation (#21777)
Co-authored-by: Vadim Goy <vadim.goy@zoominfo.com>
2024-02-13 11:06:08 -05:00
Emily Xiong a0f761c10a fix(testing): fix cypress project targets does not exist (#21785) 2024-02-13 11:05:40 -05:00
Leosvel Pérez Espinosa 81f59efab4 fix(core): run migrations ordered by their target version (#21799) 2024-02-13 16:50:11 +01:00
Isaac Mann b4689047bc docs(core): expand remote cache guide (#21756) 2024-02-13 06:47:13 -08:00
James Henry 30d10d72f7 Revert "feat(core): remove leading arrow from output headlines" (#21800) 2024-02-13 09:40:24 -05:00
Miroslav Jonaš c2a09c5043 feat(core): remove leading arrow from output headlines (#21359) 2024-02-13 09:11:39 -05:00
Austin Fahsl a045b3fe4d fix(release): use --first-parent to support merged repos (#21686) 2024-02-13 17:45:58 +04:00
Miroslav Jonaš ca90764671 fix(nx-dev): add colors to ms logo (#21790) 2024-02-13 11:16:25 +01:00
Isaac Mann 7d2cb37784 docs(core): release is no longer alpha (#21780) 2024-02-12 17:29:25 -05:00
Jordan Hall 7eb83940de docs(core): remove reference to deno (#21631)
Co-authored-by: Isaac Mann <isaacplmann@gmail.com>
2024-02-12 15:57:10 -05:00
Remco Krams c87884ad6e fix(react): generate correctly when --js is used for module federation host/remote (#20119)
Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-02-12 20:42:11 +00:00
Isaac Mann 86b136938d docs(core): env-vars in launch template (#21757) 2024-02-12 15:41:45 -05:00
Caleb Ukle 94593ccf23 docs(nx-cloud): correct launch template example (#21788) 2024-02-12 13:27:32 -06:00
Miroslav Jonaš 4caa6be71a feat(core): add option to disable log grouping on CI (#21782) 2024-02-12 19:07:03 +01:00
Isaac Mann c8866acb4a docs(core): remove illustrated dte guide (#21781) 2024-02-12 17:03:36 +01:00
Edouard Bozon ff143e465a fix(release): skip prompt for publish when no version created (#21769) 2024-02-12 16:33:38 +01:00
Colum Ferry 45f229f7d0 fix(testing): jest should handle root jest.preset.cjs (#21746) 2024-02-12 15:00:34 +00:00
Nicole Oliver 9663adced0 docs(nx-cloud): update CI/CD examples on DTE page (#21762) 2024-02-12 09:10:15 -05:00
James Henry f8523ed8c6 docs(release): update programmatic API example (#21778) 2024-02-12 07:17:05 -05:00
Jason Jean 9ef99e79c3 chore(repo): update nx to 18.1.0-beta.0 (#21772) 2024-02-12 15:56:48 +04:00
Leosvel Pérez Espinosa dbd0e7be5e feat(angular): update jest-preset-angular version (#21776) 2024-02-12 11:05:59 +01:00
Colum Ferry 11e139c7ec fix(js): nx release-version resolve-version-spec should normalize fetchSpec (#21710) 2024-02-10 13:58:27 +00:00
Nicholas Cunningham b1d0294d46 fix(nextjs): Svg should work when svgr is true in next config (#21761) 2024-02-09 17:55:26 -07:00
Leosvel Pérez Espinosa e810f82124 cleanup(misc): cleanup misc e2e tests (#21704) 2024-02-09 18:14:16 -05:00
Emily Xiong 27faa7d017 fix(playwright): fix include in tsconfig.json (#21730) 2024-02-09 18:13:18 -05:00
Jason Jean 2fe4396e51 fix(testing): ensure cypress closes the web dev server (#21759) 2024-02-09 18:10:17 -05:00
Emily Xiong f3cdce0c7a feat(core): update swc/register (#21755) 2024-02-09 18:09:23 -05:00
James Henry 5911ca653b fix(core): static run one lifecycle should always print dependent task status, and output when verbose (#21720) 2024-02-09 16:24:08 -05:00
Nicholas Cunningham 9683ebca24 fix(nextjs): Custom server should work with Crystal (#21736) 2024-02-09 14:23:12 -07:00
Jack Hsu 70ea82d58c fix(js): babel preset should also check for JEST_WORKER_ID to transpile to CJS (#21754) 2024-02-09 15:49:59 -05:00
James Henry a568df2934 fix(release): do not stop daemon in dry-run (#21743) 2024-02-09 13:45:21 -05:00
James Henry 114faf85b0 fix(release): ensure nx release publish --graph only includes projects with target (#21726) 2024-02-09 18:09:58 +00:00
Leosvel Pérez Espinosa 3e193b94b6 fix(angular): add missing forceEsbuild option to dev-server executor (#21753) 2024-02-09 17:29:44 +01:00
Isaac Mann a8dfc299e8 docs(core): expand e2e split guide (#21689) 2024-02-09 10:36:49 -05:00
Juri Strumpflohner df60a60c10 feat(nx-dev): update launch page link text (#21747) 2024-02-09 15:24:13 +00:00
Leosvel Pérez Espinosa fdae86c81c fix(testing): increase the default timeout to 15s for the dev server to start (#21716) 2024-02-09 15:51:18 +01:00
Isaac Mann d5a4fd886b docs(core): fix home page links (#21749) 2024-02-09 14:26:15 +00:00
Leosvel Pérez Espinosa d2272fdebd fix(misc): pin generated vite version to ~5.0.0 to avoid issues with storybook (#21740) 2024-02-09 08:13:17 -05:00
Philip Fulcher 3b21cefd8c docs(nx-dev): revert back to standard layout for launch nx page (#21732) 2024-02-08 21:48:07 -05:00
Zachary DeRose 9b4ee1bba7 docs(misc): thursday announcement (#21728) 2024-02-08 13:09:24 -08:00
Philip Fulcher 5f21561841 docs(nx-dev): livestream template (#21678) 2024-02-08 13:22:00 -05:00
Jonathan Cammisuli 81410e496a docs(core): remove beta tags from AI chat (#21708) 2024-02-08 11:57:10 -05:00
Colum Ferry ec00acd4eb fix(remix): do not rename root jest.preset.js (#21703) 2024-02-08 16:37:33 +00:00
Leosvel Pérez Espinosa 7b807a9c5d docs(testing): fix example in cypress overview for configuration generator (#21717) 2024-02-08 17:27:14 +01:00
Leosvel Pérez Espinosa 7f4c97e5a7 fix(module-federation): map static remote locations correctly (#21709) 2024-02-08 17:12:51 +01:00
Juri a0e4cf747d feat(nx-dev): update launch conf timings 2024-02-08 14:46:21 +01:00
Miroslav Jonaš 3ead01987b fix(nx-dev): remove fence from new packages and "nx add" commands (#21705) 2024-02-08 14:43:50 +01:00
Austin Fahsl 49bba42d37 fix(release): logging improvements (#21692) 2024-02-08 15:38:20 +04:00
Leosvel Pérez Espinosa ab9c57994b fix(angular): generate app server module setup correctly in setup-ssr generator (#21702) 2024-02-08 11:49:32 +01:00
Leosvel Pérez Espinosa db4c617c2c fix(angular): resolve the index html transformer correctly for esbuild based build targets in dev-server (#21679) 2024-02-08 10:24:34 +01:00
Yu Zheng bf45f08992 feat(expo): support cjs and mjs (#21408)
Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
2024-02-08 10:12:05 +01:00
DJ Stelmach 17d058857b docs(nx-dev): nx plugin submission @dman926/nx-python-pdm (#20416)
Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
2024-02-08 09:56:46 +01:00
Miroslav Jonas 18efd62003 fix(core): remove implementation detail from warning 2024-02-08 09:52:42 +01:00
Nicholas Cunningham aa622bab5a fix(nextjs): src package.json should not be copied to output folder
closes: #21535
2024-02-08 09:44:47 +01:00
Jason Jean 202f141778 chore(repo): disable failing e2e test (#21690) 2024-02-07 18:17:30 -05:00
Nicholas Cunningham a6ceef6b98 docs(webpack): Add docs for webpack ci deployment (#21650)
Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-02-07 16:06:12 -07:00
Craigory Coppola ebbb2f0241 fix(testing): cleanup e2e atomization plugins (#21688) 2024-02-07 18:00:55 -05:00
Jonathan Cammisuli 1dd363706b fix(core): handle blocking stdin (#21672) 2024-02-07 17:44:42 -05:00
Leosvel Pérez Espinosa 0f1207e825 fix(misc): ensure swc transpiler process required files (#21674) 2024-02-07 17:22:12 -05:00
Jack Hsu db8b37f809 fix(vite): import esbuild before loading config to keep it in cache (#21685) 2024-02-07 17:18:27 -05:00
Jonathan Cammisuli e0d8eab0f5 fix(core): temporary use forked portable_pty to inherit cursor position for windows (#21683) 2024-02-07 16:31:30 -05:00
Zachary DeRose a86b6291c8 docs(misc): adding wednesday's launch (#21661)
Co-authored-by: Juri <juri.strumpflohner@gmail.com>
2024-02-07 11:47:03 -07:00
Miroslav Jonas ab76d6291a fix(core): add missing parts to ci workflws and update docs 2024-02-07 12:39:46 -05:00
Juri Strumpflohner 2413e5daa5 fix(nx-dev): redirect on remote caching page (#21669) 2024-02-07 08:21:40 -05:00
Colum Ferry 8cbb36fb37 cleanup(angular): e2es should add targetDefaults when using buildable libs (#21667) 2024-02-07 11:55:21 +00:00
Juri de676e207f fix(nx-dev): launch page mobile experience 2024-02-07 11:16:12 +01:00
Victor Savkin 6485e3cc4a docs(core): document windows resource class 2024-02-06 17:08:01 -05:00
Jason Jean 7409125639 chore(repo): update nx to 18.0.2 (#21562) 2024-02-06 14:11:41 -05:00
Katerina Skroumpelou f4fa014ff6 docs(storybook): update docs about browserTarget (#21642) 2024-02-06 20:04:31 +02:00
Nikita Barsukov fa226c9a9a feat(bundling): bump rollup-plugin-typescript2 version (#20609) 2024-02-06 19:27:51 +02:00
Colum Ferry 448a83a116 fix(angular): ajv hoisting issue (#21641) 2024-02-06 21:21:12 +04:00
Rares Matei ebca8e24cf chore(repo): use the latest v3 image to avoid caching issues (#21648) 2024-02-06 11:55:44 -05:00
Zachary DeRose 9046eef903 docs(misc): launch nx tuesday announcement (#21645) 2024-02-06 10:18:11 -05:00
Miroslav Jonaš f79aabba46 fix(linter): adjust terminal run check for crystal (#21638) 2024-02-06 15:32:54 +01:00
Colum Ferry ab5137c639 feat(remix): add playwright option for e2eTestRunner (#21603) 2024-02-06 14:06:04 +00:00
Jack Hsu bf62661bb9 fix(webpack): require ForkTsCheckerWebpackPlugin only as required (#21629) 2024-02-05 18:04:39 -05:00
Nicholas Cunningham 7285253b8e fix(nextjs): Enable next e2e test (#21625) 2024-02-05 15:56:28 -07:00
Craigory Coppola b1253d8af6 fix(core): prevent target defaults from being discarded during merge process (#21624) 2024-02-05 16:54:08 -05:00
Philip Fulcher fb0df72de5 docs(nx-dev): improvements to launch nx page (#21621) 2024-02-05 14:53:55 -05:00
Jack Hsu 7086f5700e fix(core): remove logic to reload process with esm loader for Node 18 (#21623) 2024-02-05 14:33:42 -05:00
Altan Stalker 55d3055d0e docs(nx-cloud): add troubleshooting section for "ci execution failed" (#21622) 2024-02-05 19:32:08 +00:00
Jason Jean f950f9b68d docs(core): document NX_ADD_PLUGINS environment variable (#21565) 2024-02-05 14:08:55 -05:00
Leosvel Pérez Espinosa 758c1ab70e fix(angular): support inferred cypress targets in setup-mf generator (#21619) 2024-02-05 14:08:38 -05:00
Leosvel Pérez Espinosa 86ba07e2a8 cleanup(angular): re-add assertion to expect successful port kill in e2e test (#21620) 2024-02-05 14:06:58 -05:00
Leosvel Pérez Espinosa 0d9997a213 cleanup(testing): re-enable cypress e2e tests (#21604) 2024-02-05 13:30:54 -05:00
Jack Hsu bca5b70553 chore(misc): re-enable e2e-react-core tests (#21542) 2024-02-05 18:27:26 +00:00
Isaac Mann d83300a285 docs(core): update nx node matrix (#21608) 2024-02-05 13:18:58 -05:00
Katerina Skroumpelou 7513da3aca fix(nx-dev): redirect core-features page (#21616) 2024-02-05 19:58:50 +02:00
Isaac Mann 19fc320e20 docs(core): redirect for nx-agents (#21617) 2024-02-05 12:55:07 -05:00
Leosvel Pérez Espinosa 717d45f884 fix(misc): handle workspaces if no plugin selected in nx init and only generate files after prompts (#21606) 2024-02-05 12:49:53 -05:00
Nicholas Cunningham 371a1ed6b8 fix(node): Broken E2E tests (#21569) 2024-02-05 10:16:08 -07:00
Rares Matei f38ad96ec5 chore(repo): install lsof and other e2e deps (#21615) 2024-02-05 12:15:21 -05:00
Jack Hsu b97958c1b3 fix(core): pass the full resolved path of ts-node/esm when reloading the CLI (#21607) 2024-02-05 11:52:10 -05:00
Jack Hsu 44d33c243a fix(nextjs): move next/constants from top-level import to when it is needed (#21612) 2024-02-05 11:40:26 -05:00
Isaac Mann 140d22f7a3 docs(core): project crystal video (#21605) 2024-02-05 08:15:28 -08:00
Philip Fulcher a6ddf08201 docs(nx-dev): add launch nx announcements template (#21557)
Co-authored-by: Juri <juri.strumpflohner@gmail.com>
2024-02-05 15:41:04 +00:00
Laurence "DC5B" Lord a02af1615a Correct typo (#21597)
Co-authored-by: Isaac Mann <isaacplmann@gmail.com>
2024-02-05 10:18:06 -05:00
Leosvel Pérez Espinosa 04211785e8 fix(angular): fix wrong trailing comma in mf bootstrap code generation (#21600) 2024-02-05 15:33:40 +01:00
Pascal Brewing 48296b043d docs(core): add analogjs nx plugin to approved-plugins.json (#21080)
Co-authored-by: PASCAL BREWING <pascal.brewing@mercedes-benz.com>
2024-02-05 09:26:29 -05:00
Jack Hsu a524665073 chore(nextjs): remove tests that are unnecessary (#21566) 2024-02-05 08:57:18 -05:00
Miroslav Jonaš c1ede83d62 chore(linter): fix and reenable disabled eslint test (#21601) 2024-02-05 14:40:54 +01:00
3714 changed files with 197314 additions and 79420 deletions
+12 -7
View File
@@ -48,7 +48,7 @@ commands:
- run:
name: Install pnpm package manager (linux)
command: |
npm install --prefix=$HOME/.local -g @pnpm/exe@8.14
npm install --prefix=$HOME/.local -g @pnpm/exe@8
- when:
condition:
equal: [<< parameters.os >>, macos]
@@ -56,7 +56,7 @@ commands:
- run:
name: Install pnpm package manager (macos)
command: |
npm install -g @pnpm/exe@8.14
npm install -g @pnpm/exe@8
- run:
name: Install Dependencies
command: |
@@ -85,6 +85,8 @@ jobs:
NX_NATIVE_LOGGING: 'false'
NX_E2E_RUN_E2E: 'true'
NX_CI_EXECUTION_ENV: 'linux'
NX_CLOUD_DTE_V2: 'true'
NX_CLOUD_DTE_SUMMARY: 'true'
steps:
- checkout
- nx/set-shas:
@@ -93,9 +95,8 @@ jobs:
- run:
command: |
sudo apt-get update
sudo apt-get install -y ca-certificates lsof
sudo apt-get install -y ca-certificates lsof libvips-dev libglib2.0-dev libgirepository1.0-dev
- browser-tools/install-chrome
- browser-tools/install-chromedriver
- run-pnpm-install:
os: linux
- run:
@@ -114,8 +115,7 @@ jobs:
pnpm nx run-many -t check-imports check-commit check-lock-files check-codeowners documentation --parallel=1 --no-dte &
pids+=($!)
(pnpm nx affected --targets=lint,test,build --base=$NX_BASE --head=$NX_HEAD --parallel=3 &&
pnpm nx affected --target=e2e --base=$NX_BASE --head=$NX_HEAD --parallel=1) &
pnpm nx affected --targets=lint,test,build,e2e,e2e-ci --base=$NX_BASE --head=$NX_HEAD --parallel=3 &
pids+=($!)
for pid in "${pids[@]}"; do
@@ -158,7 +158,12 @@ jobs:
- run:
name: Run E2E Tests for macOS
command: |
pnpm nx affected -t e2e-macos --parallel=1 --base=$NX_BASE --head=$NX_HEAD
HAS_CHANGED=$(node ./scripts/check-react-native-changes.js $NX_BASE $NX_HEAD);
if $HAS_CHANGED; then
pnpm nx affected -t e2e-macos-ci --parallel=1 --base=$NX_BASE --head=$NX_HEAD
else
echo "Skip E2E tests for macOS as there are no changes in React Native projects."
fi
no_output_timeout: 45m
# -------------------------
+7
View File
@@ -0,0 +1,7 @@
FROM mcr.microsoft.com/devcontainers/typescript-node:20-bullseye
# Update the underlying (Debian) OS, to make sure we have the latest security patches and libraries like 'GLIBC'
RUN sudo apt-get update && sudo apt-get -y upgrade
# Update pnpm
RUN npm install -g pnpm@8.15.7
+4 -1
View File
@@ -3,7 +3,10 @@
{
"name": "NxDevContainer",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/typescript-node:20-bullseye",
"build": {
// Path is relative to the devcontainer.json file.
"dockerfile": "Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/rust:1": {}
},
-6
View File
@@ -1,11 +1,5 @@
#!/bin/sh
# Update the underlying (Debian) OS, to make sure we have the latest security patches and libraries like 'GLIBC'
sudo apt-get update && sudo apt-get -y upgrade
# Update pnpm
#npm install -g pnpm
# Install dependencies
pnpm install --frozen-lockfile
+6 -1
View File
@@ -17,6 +17,10 @@
{
"group": ["nx/src/plugins/js*"],
"message": "Imports from 'nx/src/plugins/js' are not allowed. Use '@nx/js' instead"
},
{
"group": ["**/native-bindings", "**/native-bindings.js", ""],
"message": "Direct imports from native-bindings.js are not allowed. Import from index.js instead."
}
]
}
@@ -24,7 +28,8 @@
"storybook/no-uninstalled-addons": [
"error",
{
"ignore": ["@nx/react/plugins/storybook"]
"ignore": ["@nx/react/plugins/storybook"],
"packageJsonLocation": "../../package.json"
}
]
},
-23
View File
@@ -1,23 +0,0 @@
---
name: "\U0001F680 Feature Request"
about: Suggest a new feature.
labels: "type: feature"
---
<!-- Please do your best to fill out all of the sections below! -->
<!-- Use this issue type for concrete suggestions, otherwise, open a discussion type issue instead. -->
- [ ] I'd be willing to implement this feature ([contributing guide](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md))
## Description
<!-- What is the behavior that you would like to see introduced? -->
## Motivation
<!-- Why do you believe this behavior would be beneficial? -->
## Suggested Implementation
<!-- How do you imagine this might work? -->
## Alternate Implementations
<!-- How else do you imagine this might work? -->
+10 -7
View File
@@ -1,14 +1,17 @@
blank_issues_enabled: false
contact_links:
- name: Read the community guidelines
about: "Please make sure you have read the submission guidelines before posting an issue"
url: https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-an-issue
- name: Want to start a discussion?
about: "Want to start a thread to discuss an idea? Use the discussions feature provided by GitHub."
url: https://github.com/nrwl/nx/discussions
- name: Have a question?
- name: "\U0001F680 Feature Request"
about: "Suggest a new feature to make Nx better"
url: https://github.com/nrwl/nx/discussions/new?category=feature-requests
- name: Start a Discussion
about: "Start a discussion to share your experience with Nx"
url: https://github.com/nrwl/nx/discussions/new/choose
- name: Join the Discord
url: https://go.nx.dev/community
about: "The Nx Official Discord Server is a great place for questions to be asked and answered. Please use the #forum if you need help with your workspace!"
- name: Are you looking for integration with a new tool?
url: https://nx.dev/community
about: "There are a lot of awesome Plugins for Nx provided by the community! Check here to see if there is a community plugin to integrate your tool."
- name: Read the community guidelines
about: "Please make sure you have read the submission guidelines before posting an issue"
url: https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-an-issue
+2
View File
@@ -4,6 +4,8 @@
<!-- 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 -->
+31 -52
View File
@@ -17,6 +17,7 @@ env:
permissions: { }
jobs:
preinstall:
if: ${{ github.repository_owner == 'nrwl' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
@@ -34,11 +35,11 @@ jobs:
name: Cache install (${{ matrix.os }}, node v${{ matrix.node_version }})
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install PNPM
run: |
npm install -g @pnpm/exe@8.14
npm install -g @pnpm/exe@8
- name: Set node
uses: actions/setup-node@v3
@@ -54,6 +55,11 @@ jobs:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ github.run_id }}
- name: Ensure Python setuptools Installed on Macos
if: ${{ matrix.os == 'macos-latest' }}
id: brew-install-python-setuptools
run: brew install python-setuptools
- name: Install packages
if: steps.cache-modules.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
@@ -86,6 +92,7 @@ jobs:
run: npx cypress install
e2e:
if: ${{ github.repository_owner == 'nrwl' }}
needs: preinstall
permissions:
contents: read
@@ -104,41 +111,34 @@ jobs:
- yarn
- pnpm
project:
- e2e-angular-core
- e2e-angular-extensions
- e2e-angular-module-federation
- e2e-angular
- e2e-cypress
- e2e-detox
- e2e-esbuild
- e2e-eslint
- e2e-expo
- e2e-gradle
- e2e-jest
- e2e-js
- e2e-lerna-smoke-tests
- e2e-next-core
- e2e-next-extensions
- e2e-next
- e2e-node
- e2e-nuxt
- e2e-nx-init
- e2e-nx-misc
- e2e-nx-run
- e2e-nx
- e2e-playwright
- e2e-plugin
- e2e-react-core
- e2e-react-module-federation
- e2e-react-extensions
- e2e-react
- e2e-react-native
- e2e-release
- e2e-remix
- e2e-rollup
- e2e-storybook
- e2e-storybook-angular
- e2e-vite
- e2e-vue
- e2e-web
- e2e-webpack
- e2e-workspace-create
- e2e-workspace-create-npm
include:
# os short names
- os: ubuntu-latest
@@ -151,11 +151,7 @@ jobs:
- os: macos-latest
os_timeout: 90
# codeowner groups
- project: e2e-angular-core
codeowners: 'S04SS457V38'
- project: e2e-angular-extensions
codeowners: 'S04SS457V38'
- project: e2e-angular-module-federation
- project: e2e-angular
codeowners: 'S04SS457V38'
- project: e2e-cypress
codeowners: 'S04T16BTJJY'
@@ -165,6 +161,8 @@ jobs:
codeowners: 'S04SJ6HHP0X'
- project: e2e-expo
codeowners: 'S04TNCNJG5N'
- project: e2e-gradle
codeowners: 'S04TNCNJG5N'
- project: e2e-jest
codeowners: 'S04T16BTJJY'
- project: e2e-js
@@ -173,25 +171,19 @@ jobs:
codeowners: 'S04TNCVEETS'
- project: e2e-eslint
codeowners: 'S04SYJGKSCT'
- project: e2e-next-core
codeowners: 'S04TNCNJG5N'
- project: e2e-next-extensions
- project: e2e-next
codeowners: 'S04TNCNJG5N'
- project: e2e-node
codeowners: 'S04SJ6HHP0X'
- project: e2e-nx-init
codeowners: 'S04SYHYKGNP'
- project: e2e-nx-misc
- project: e2e-nx
codeowners: 'S04SYHYKGNP'
- project: e2e-plugin
codeowners: 'S04SYHYKGNP'
- project: e2e-release
codeowners: 'S04SYHYKGNP'
- project: e2e-nx-run
codeowners: 'S04SYHYKGNP'
- project: e2e-react-core
codeowners: 'S04TNCNJG5N'
- project: e2e-react-extensions
- project: e2e-react
codeowners: 'S04TNCNJG5N'
- project: e2e-react-native
codeowners: 'S04TNCNJG5N'
@@ -203,8 +195,6 @@ jobs:
codeowners: 'S04SVQ8H0G5'
- project: e2e-playwright
codeowners: 'S04SVQ8H0G5'
- project: e2e-storybook-angular
codeowners: 'S04SVQ8H0G5'
- project: e2e-remix
codeowners: 'S04SVQ8H0G5'
- project: e2e-vite
@@ -217,8 +207,6 @@ jobs:
codeowners: 'S04SJ6PL98X'
- project: e2e-workspace-create
codeowners: 'S04SYHYKGNP'
- project: e2e-workspace-create-npm
codeowners: 'S04SYHYKGNP'
exclude:
# exclude react-native tests from ubuntu
- os: ubuntu-latest
@@ -229,11 +217,7 @@ jobs:
project: e2e-expo
# exclude non-CNW/Lerna tests from non-LTS node versions
- node_version: 18
project: e2e-angular-core
- node_version: 18
project: e2e-angular-extensions
- node_version: 18
project: e2e-angular-module-federation
project: e2e-angular
- node_version: 18
project: e2e-cypress
- node_version: 18
@@ -242,6 +226,8 @@ jobs:
project: e2e-esbuild
- node_version: 18
project: e2e-expo
- node_version: 18
project: e2e-gradle
- node_version: 18
project: e2e-jest
- node_version: 18
@@ -249,9 +235,7 @@ jobs:
- node_version: 18
project: e2e-eslint
- node_version: 18
project: e2e-next-core
- node_version: 18
project: e2e-next-extensions
project: e2e-next
- node_version: 18
project: e2e-node
- node_version: 18
@@ -259,17 +243,13 @@ jobs:
- node_version: 18
project: e2e-nx-init
- node_version: 18
project: e2e-nx-misc
project: e2e-nx
- node_version: 18
project: e2e-plugin
- node_version: 18
project: e2e-playwright
- node_version: 18
project: e2e-react-core
- node_version: 18
project: e2e-react-module-federation
- node_version: 18
project: e2e-react-extensions
project: e2e-react
- node_version: 18
project: e2e-react-native
- node_version: 18
@@ -280,8 +260,6 @@ jobs:
project: e2e-rollup
- node_version: 18
project: e2e-storybook
- node_version: 18
project: e2e-storybook-angular
- node_version: 18
project: e2e-vite
- node_version: 18
@@ -300,14 +278,14 @@ jobs:
name: ${{ matrix.os_name }}/${{ matrix.package_manager }}/${{ matrix.node_version }} ${{ join(matrix.project) }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Prepare dir for output
run: mkdir -p outputs
- name: Install PNPM
run: |
npm install -g @pnpm/exe@8.7.4
npm install -g @pnpm/exe@8
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v3
@@ -381,7 +359,7 @@ jobs:
- name: Run e2e tests
id: e2e-run
run: pnpm nx run-many -t e2e,e2e-macos -p ${{ matrix.project }}
run: pnpm nx run-many -t e2e-local -p ${{ matrix.project }}
timeout-minutes: ${{ matrix.os_timeout }}
env:
GIT_AUTHOR_EMAIL: test@test.com
@@ -399,6 +377,7 @@ jobs:
NX_E2E_VERBOSE_LOGGING: 'true'
NX_PERF_LOGGING: 'false'
NX_DAEMON: 'true'
NX_SKIP_LOG_GROUPING: 'true'
- name: Save matrix config in file
if: ${{ always() }}
@@ -429,7 +408,7 @@ jobs:
timeout-minutes: 15
process-result:
if: ${{ always() }}
if: ${{ always() && github.repository_owner == 'nrwl' }}
runs-on: ubuntu-latest
needs: e2e
outputs:
+29 -52
View File
@@ -17,6 +17,7 @@ env:
permissions: { }
jobs:
preinstall:
if: ${{ github.repository_owner == 'nrwl' }}
runs-on: windows-latest
strategy:
matrix:
@@ -27,7 +28,7 @@ jobs:
name: Cache install (node v${{ matrix.node_version }})
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
name: Install pnpm
@@ -43,7 +44,7 @@ jobs:
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
lookup-only: true
path: '**/node_modules'
@@ -62,9 +63,10 @@ jobs:
- name: Install Cypress
if: steps.cache-cypress.outputs.cache-hit != 'true'
run: npx cypress install
run: pnpm cypress install
e2e:
if: ${{ github.repository_owner == 'nrwl' }}
needs: preinstall
permissions:
contents: read
@@ -77,50 +79,44 @@ jobs:
package_manager:
- npm
project:
- e2e-angular-core
- e2e-angular-extensions
- e2e-angular-module-federation
- e2e-angular
- e2e-cypress
- e2e-esbuild
- e2e-eslint
- e2e-jest
- e2e-js
- e2e-lerna-smoke-tests
- e2e-next-core
- e2e-next-extensions
- e2e-next
- e2e-node
- e2e-nuxt
- e2e-nx-init
- e2e-nx-misc
- e2e-nx-run
- e2e-nx
- e2e-playwright
- e2e-plugin
- e2e-react-core
- e2e-react-module-federation
- e2e-react-extensions
- e2e-react
- e2e-release
- e2e-remix
- e2e-rollup
- e2e-storybook
- e2e-storybook-angular
- e2e-vite
- e2e-vue
- e2e-web
- e2e-webpack
- e2e-workspace-create
- e2e-workspace-create-npm
include:
# codeowner groups
- project: e2e-angular-core
codeowners: 'S04SS457V38'
- project: e2e-angular-extensions
codeowners: 'S04SS457V38'
- project: e2e-angular-module-federation
- project: e2e-angular
codeowners: 'S04SS457V38'
- project: e2e-cypress
codeowners: 'S04T16BTJJY'
- project: e2e-detox
codeowners: 'S04TNCNJG5N'
- project: e2e-esbuild
codeowners: 'S04SJ6HHP0X'
- project: e2e-expo
codeowners: 'S04TNCNJG5N'
- project: e2e-gradle
codeowners: 'S04TNCNJG5N'
- project: e2e-jest
codeowners: 'S04T16BTJJY'
- project: e2e-js
@@ -129,25 +125,21 @@ jobs:
codeowners: 'S04TNCVEETS'
- project: e2e-eslint
codeowners: 'S04SYJGKSCT'
- project: e2e-next-core
codeowners: 'S04TNCNJG5N'
- project: e2e-next-extensions
- project: e2e-next
codeowners: 'S04TNCNJG5N'
- project: e2e-node
codeowners: 'S04SJ6HHP0X'
- project: e2e-nx-init
codeowners: 'S04SYHYKGNP'
- project: e2e-nx-misc
- project: e2e-nx
codeowners: 'S04SYHYKGNP'
- project: e2e-plugin
codeowners: 'S04SYHYKGNP'
- project: e2e-release
codeowners: 'S04SYHYKGNP'
- project: e2e-nx-run
codeowners: 'S04SYHYKGNP'
- project: e2e-react-core
- project: e2e-react
codeowners: 'S04TNCNJG5N'
- project: e2e-react-extensions
- project: e2e-react-native
codeowners: 'S04TNCNJG5N'
- project: e2e-web
codeowners: 'S04SJ6PL98X'
@@ -157,8 +149,6 @@ jobs:
codeowners: 'S04SVQ8H0G5'
- project: e2e-playwright
codeowners: 'S04SVQ8H0G5'
- project: e2e-storybook-angular
codeowners: 'S04SVQ8H0G5'
- project: e2e-remix
codeowners: 'S04SVQ8H0G5'
- project: e2e-vite
@@ -171,16 +161,10 @@ jobs:
codeowners: 'S04SJ6PL98X'
- project: e2e-workspace-create
codeowners: 'S04SYHYKGNP'
- project: e2e-workspace-create-npm
codeowners: 'S04SYHYKGNP'
exclude:
# exclude non-CNW/Lerna tests from non-LTS node versions
- node_version: 18
project: e2e-angular-core
- node_version: 18
project: e2e-angular-extensions
- node_version: 18
project: e2e-angular-module-federation
project: e2e-angular
- node_version: 18
project: e2e-cypress
- node_version: 18
@@ -192,9 +176,7 @@ jobs:
- node_version: 18
project: e2e-eslint
- node_version: 18
project: e2e-next-core
- node_version: 18
project: e2e-next-extensions
project: e2e-next
- node_version: 18
project: e2e-node
- node_version: 18
@@ -202,17 +184,13 @@ jobs:
- node_version: 18
project: e2e-nx-init
- node_version: 18
project: e2e-nx-misc
project: e2e-nx
- node_version: 18
project: e2e-plugin
- node_version: 18
project: e2e-playwright
- node_version: 18
project: e2e-react-core
- node_version: 18
project: e2e-react-module-federation
- node_version: 18
project: e2e-react-extensions
project: e2e-react
- node_version: 18
project: e2e-web
- node_version: 18
@@ -221,8 +199,6 @@ jobs:
project: e2e-rollup
- node_version: 18
project: e2e-storybook
- node_version: 18
project: e2e-storybook-angular
- node_version: 18
project: e2e-vite
- node_version: 18
@@ -234,7 +210,7 @@ jobs:
name: ${{ matrix.project }} (v${{ matrix.node_version }})
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Prepare dir for output
run: mkdir -p outputs
@@ -279,9 +255,9 @@ jobs:
- name: Run e2e tests
id: e2e-run
run: pnpm nx run ${{ matrix.project }}:e2e
run: pnpm nx run ${{ matrix.project }}:e2e-local
shell: bash
timeout-minutes: 120
timeout-minutes: 180
env:
GIT_AUTHOR_EMAIL: test@test.com
GIT_AUTHOR_NAME: Test
@@ -297,6 +273,7 @@ jobs:
NX_E2E_VERBOSE_LOGGING: 'true'
NX_PERF_LOGGING: 'false'
NX_DAEMON: 'true'
NX_SKIP_LOG_GROUPING: 'true'
- name: Save matrix config in file
if: ${{ always() }}
@@ -326,7 +303,7 @@ jobs:
sudo: false # disable sudo for windows debugging
process-result:
if: ${{ always() }}
if: ${{ always() && github.repository_owner == 'nrwl' }}
runs-on: ubuntu-latest
needs: e2e
outputs:
+4 -4
View File
@@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
node-version: [18]
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -25,7 +25,7 @@ jobs:
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 7
version: 8
run_install: false
- name: Get pnpm store directory
@@ -46,8 +46,8 @@ jobs:
run: pnpm install --no-frozen-lockfile
- name: Run embeddings script
run: pnpm exec nx run tools-documentation-create-embeddings:run-node
run: pnpm exec nx run tools-documentation-create-embeddings:run-node
env:
NX_NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NX_NEXT_PUBLIC_SUPABASE_URL }}
NX_SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.NX_SUPABASE_SERVICE_ROLE_KEY }}
NX_OPENAI_KEY: ${{ secrets.NX_OPENAI_KEY }}
NX_OPENAI_KEY: ${{ secrets.NX_OPENAI_KEY }}
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
- uses: pnpm/action-setup@v2
with:
version: 8.2
version: 8
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v3
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
- name: Install PNPM
run: |
npm install -g @pnpm/exe@8.3.1
npm install -g @pnpm/exe@8
- name: Run a security audit
run: pnpm dlx audit-ci --critical --report-type summary
+280 -101
View File
@@ -1,24 +1,127 @@
name: publish
on:
# Automated schedule - canary releases from master
schedule:
- cron: "0 3 * * 2-6" # Tuesdays - Saturdays, at 3am UTC
# Manual trigger - PR releases or dry-runs (based on workflow inputs)
workflow_dispatch:
inputs:
pr:
description: "PR Number - If set, a real release will be created for the branch associated with the given PR number. If blank, a dry-run of the currently selected branch will be performed."
required: false
type: number
release:
types: [published]
types: [ published ]
# Dynamically generate the display name for the GitHub UI based on the event type and inputs
run-name: ${{ github.event.inputs.pr && format('PR Release for {0}', github.event.inputs.pr) || github.event_name == 'schedule' && 'Canary Release' || github.event_name == 'workflow_dispatch' && !github.event.inputs.pr && 'Release Dry-Run' || github.ref_name }}
env:
DEBUG: napi:*
NX_RUN_GROUP: ${{ github.run_id }}-${{ github.run_attempt }}
CYPRESS_INSTALL_BINARY: 0
NODE_VERSION: 18
PNPM_VERSION: 8.15.7 # Aligned with root package.json (pnpm/action-setup will helpfully error if out of sync)
jobs:
# We first need to determine the version we are releasing, and if we need a custom repo or ref to use for the git checkout in subsequent steps.
# These values depend upon the event type that triggered the workflow:
#
# - schedule:
# - We are running a canary release which always comes from the master branch, we can use default ref resolution
# in actions/checkout. The exact version will be generated within scripts/nx-release.ts.
#
# - release:
# - We are running a full release which is based on the tag that triggered the release event, we can use default
# ref resolution in actions/checkout. The exact version will be generated within scripts/nx-release.ts.
#
# - workflow_dispatch:
# - We are either running a dry-run on the current branch, in which case the version will be statica and we can use
# default ref resolution in actions/checkout, or we are creating a PR release for the given PR number, in which case
# we should generate an applicable version number within publish-resolve-data.js and use a custom ref of the PR branch name.
resolve-required-data:
name: Resolve Required Data
if: ${{ github.repository_owner == 'nrwl' }}
runs-on: ubuntu-latest
outputs:
version: ${{ steps.script.outputs.version }}
dry_run_flag: ${{ steps.script.outputs.dry_run_flag }}
success_comment: ${{ steps.script.outputs.success_comment }}
publish_branch: ${{ steps.script.outputs.publish_branch }}
ref: ${{ steps.script.outputs.ref }}
repo: ${{ steps.script.outputs.repo }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
# Default checkout on the triggering branch so that the latest publish-resolve-data.js script is available
- uses: actions/checkout@v4
# Set up pnpm and node so that we can verify our setup and that the NPM_TOKEN secret will work later
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
check-latest: true
# Ensure that the NPM_TOKEN secret is still valid before wasting any time deriving data or building projects
- name: Check NPM Credentials
run: npm whoami && echo "NPM credentials are valid" || (echo "NPM credentials are invalid or have expired." && exit 1)
- name: Resolve and set checkout and version data to use for release
id: script
uses: actions/github-script@v7
env:
PR_NUMBER: ${{ github.event.inputs.pr }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const script = require('${{ github.workspace }}/scripts/publish-resolve-data.js');
await script({ github, context, core });
- name: (PR Release Only) Check out latest master
if: ${{ steps.script.outputs.ref != '' }}
uses: actions/checkout@v4
with:
# Check out the latest master branch to get its copy of nx-release.ts
repository: nrwl/nx
ref: master
path: latest-master-checkout
- name: (PR Release Only) Check out PR branch
if: ${{ steps.script.outputs.ref != '' }}
uses: actions/checkout@v4
with:
# Check out the PR branch to get its copy of nx-release.ts
repository: ${{ steps.script.outputs.repo }}
ref: ${{ steps.script.outputs.ref }}
path: pr-branch-checkout
- name: (PR Release Only) Ensure that nx-release.ts has not changed in the PR being released
if: ${{ steps.script.outputs.ref != '' }}
env:
FILE_TO_COMPARE: "scripts/nx-release.ts"
run: |
if ! cmp -s "latest-master-checkout/${{ env.FILE_TO_COMPARE }}" "pr-branch-checkout/${{ env.FILE_TO_COMPARE }}"; then
echo "🛑 Error: The file ${{ env.FILE_TO_COMPARE }} is different on the ${{ steps.script.outputs.ref }} branch on ${{ steps.script.outputs.repo }} vs latest master on nrwl/nx, cancelling workflow. If you did not modify the file, then you likely just need to rebase/merge latest master."
exit 1
else
echo "✅ The file ${{ env.FILE_TO_COMPARE }} is identical between the ${{ steps.script.outputs.ref }} branch on ${{ steps.script.outputs.repo }} and latest master on nrwl/nx."
fi
build:
needs: [resolve-required-data]
if: ${{ github.repository_owner == 'nrwl' }}
strategy:
fail-fast: false
matrix:
settings:
- host: macos-latest
- host: macos-13
target: x86_64-apple-darwin
build: |
pnpm nx run-many --target=build-native -- --target=x86_64-apple-darwin
@@ -35,13 +138,20 @@ jobs:
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: |-
set -e &&
npm i -g pnpm@8.15.7 --force &&
pnpm --version &&
pnpm nx run-many --target=build-native -- --target=x86_64-unknown-linux-gnu
pnpm install --frozen-lockfile &&
pnpm nx run-many --verbose --target=build-native -- --target=x86_64-unknown-linux-gnu
- host: ubuntu-latest
target: x86_64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: set -e && pnpm nx run-many --target=build-native -- --target=x86_64-unknown-linux-musl
- host: macos-latest
build: |-
set -e &&
npm i -g pnpm@8.15.7 --force &&
pnpm --version &&
pnpm install --frozen-lockfile &&
pnpm nx run-many --verbose --target=build-native -- --target=x86_64-unknown-linux-musl
- host: macos-13
target: aarch64-apple-darwin
build: |
sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*;
@@ -55,15 +165,17 @@ jobs:
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
build: |-
set -e &&
npm i -g pnpm@8.15.7 --force &&
pnpm --version &&
pnpm nx run-many --target=build-native -- --target=aarch64-unknown-linux-gnu
pnpm install --frozen-lockfile &&
pnpm nx run-many --verbose --target=build-native -- --target=aarch64-unknown-linux-gnu
- host: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
setup: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf -y
build: |
pnpm nx run-many --target=build-native -- --target=armv7-unknown-linux-gnueabihf
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=/usr/bin/arm-linux-gnueabihf-gcc pnpm nx run-many --target=build-native -- --target=armv7-unknown-linux-gnueabihf
# Android (not needed)
# - host: ubuntu-latest
# target: aarch64-linux-android
@@ -79,7 +191,10 @@ jobs:
build: |-
set -e &&
rustup target add aarch64-unknown-linux-musl &&
pnpm nx run-many --target=build-native -- --target=aarch64-unknown-linux-musl
npm i -g pnpm@8.15.7 --force &&
pnpm --version &&
pnpm install --frozen-lockfile &&
pnpm nx run-many --verbose --target=build-native -- --target=aarch64-unknown-linux-musl
- host: windows-latest
target: aarch64-pc-windows-msvc
build: pnpm nx run-many --target=build-native -- --target=aarch64-pc-windows-msvc
@@ -87,16 +202,19 @@ jobs:
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
repository: ${{ needs.resolve-required-data.outputs.repo }}
ref: ${{ needs.resolve-required-data.outputs.ref }}
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup node
uses: actions/setup-node@v4
if: ${{ !matrix.settings.docker }}
with:
node-version: 18
node-version: ${{ env.NODE_VERSION }}
check-latest: true
cache: 'pnpm'
@@ -107,7 +225,7 @@ jobs:
targets: ${{ matrix.settings.target }}
- name: Cache cargo
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
@@ -116,29 +234,36 @@ jobs:
.cargo-cache
target/
key: ${{ matrix.settings.target }}-cargo-registry
- uses: goto-bus-stop/setup-zig@v2
if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }}
with:
version: 0.10.0
- name: Setup toolchain
run: ${{ matrix.settings.setup }}
if: ${{ matrix.settings.setup }}
shell: bash
- name: Setup node x86
if: matrix.settings.target == 'i686-pc-windows-msvc'
run: yarn config set supportedArchitectures.cpu "ia32"
shell: bash
- name: Install dependencies
if: ${{ !matrix.settings.docker }}
run: pnpm install --frozen-lockfile
timeout-minutes: 30
- name: Setup node x86
uses: actions/setup-node@v4
if: matrix.settings.target == 'i686-pc-windows-msvc'
with:
node-version: 18
node-version: ${{ env.NODE_VERSION }}
check-latest: true
cache: pnpm
architecture: x86
- name: Build in docker
uses: addnab/docker-run-action@v3
if: ${{ matrix.settings.docker }}
@@ -146,74 +271,84 @@ jobs:
image: ${{ matrix.settings.docker }}
options: --user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build
run: ${{ matrix.settings.build }}
- name: Build
run: ${{ matrix.settings.build }}
if: ${{ !matrix.settings.docker }}
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.settings.target }}
path: packages/**/*.node
path: |
packages/**/*.node
packages/**/*.wasm
if-no-files-found: error
build-freebsd:
if: ${{ github.repository_owner == 'nrwl' }}
runs-on: macos-13-large
name: Build FreeBSD
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
if: ${{ github.event_name != 'schedule' }}
- name: Build
id: build
if: ${{ github.event_name != 'schedule' }}
uses: cross-platform-actions/action@v0.22.0
env:
DEBUG: napi:*
RUSTUP_IO_THREADS: 1
with:
operating_system: freebsd
version: '13.2'
architecture: x86-64
environment_variables: DEBUG RUSTUP_IO_THREADS CI
shell: bash
run: |
env
whoami
sudo pkg install -y -f node libnghttp2 npm git
sudo npm install --location=global --ignore-scripts pnpm
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain stable
source "$HOME/.cargo/env"
echo "~~~~ rustc --version ~~~~"
rustc --version
echo "~~~~ node -v ~~~~"
node -v
echo "~~~~ pnpm --version ~~~~"
pnpm --version
pwd
ls -lah
whoami
env
freebsd-version
mkdir -p /Users/runner/work/_temp/_github_workflow
echo "{}" > /Users/runner/work/_temp/_github_workflow/event.json
pnpm install --frozen-lockfile --ignore-scripts
pnpm nx run-many --outputStyle stream --target=build-native -- --target=x86_64-unknown-freebsd
pnpm nx reset
rm -rf node_modules
rm -rf dist
echo "KILL ALL NODE PROCESSES"
killall node || true
echo "COMPLETE"
- name: Upload artifact
if: ${{ github.event_name != 'schedule' }}
uses: actions/upload-artifact@v3
with:
name: bindings-freebsd
path: packages/**/*.node
if-no-files-found: error
needs: [resolve-required-data]
if: ${{ github.repository_owner == 'nrwl' }}
runs-on: ubuntu-latest
name: Build FreeBSD
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
if: ${{ github.event_name != 'schedule' && !github.event.inputs.pr }}
with:
repository: ${{ needs.resolve-required-data.outputs.repo }}
ref: ${{ needs.resolve-required-data.outputs.ref }}
- name: Build
id: build
if: ${{ github.event_name != 'schedule' && !github.event.inputs.pr }}
uses: cross-platform-actions/action@v0.25.0
env:
DEBUG: napi:*
RUSTUP_IO_THREADS: 1
NX_PREFER_TS_NODE: true
PLAYWRIGHT_BROWSERS_PATH: 0
with:
operating_system: freebsd
version: '14.0'
architecture: x86-64
environment_variables: DEBUG RUSTUP_IO_THREADS CI NX_PREFER_TS_NODE PLAYWRIGHT_BROWSERS_PATH
shell: bash
run: |
env
whoami
sudo pkg install -y -f node libnghttp2 www/npm git
sudo npm install --location=global --ignore-scripts pnpm@8.15.7
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain stable
source "$HOME/.cargo/env"
echo "~~~~ rustc --version ~~~~"
rustc --version
echo "~~~~ node -v ~~~~"
node -v
echo "~~~~ pnpm --version ~~~~"
pnpm --version
pwd
ls -lah
whoami
env
freebsd-version
pnpm install --frozen-lockfile --ignore-scripts
pnpm nx run-many --verbose --outputStyle stream --target=build-native -- --target=x86_64-unknown-freebsd
pnpm nx reset
rm -rf node_modules
rm -rf dist
echo "KILL ALL NODE PROCESSES"
killall node || true
echo "COMPLETE"
- name: Upload artifact
if: ${{ github.event_name != 'schedule' && !github.event.inputs.pr }}
uses: actions/upload-artifact@v4
with:
name: bindings-freebsd
path: packages/**/*.node
if-no-files-found: error
publish:
if: ${{ github.repository_owner == 'nrwl' }}
@@ -222,7 +357,9 @@ jobs:
permissions:
id-token: write
contents: write
pull-requests: write
needs:
- resolve-required-data
- build-freebsd
- build
env:
@@ -231,51 +368,93 @@ jobs:
NPM_CONFIG_PROVENANCE: true
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
repository: ${{ needs.resolve-required-data.outputs.repo }}
ref: ${{ needs.resolve-required-data.outputs.ref }}
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
check-latest: true
cache: 'pnpm'
- name: Check NPM Credentials
run: npm whoami && echo "NPM credentials are valid" || (echo "NPM credentials are invalid or have expired." && exit 1)
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Download all artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: artifacts
# This command will appropriately fail if no artifacts are available
- name: List artifacts
run: ls -R artifacts
shell: bash
- name: Build Wasm
run: pnpm build:wasm
- name: Publish
env:
VERSION: ${{ needs.resolve-required-data.outputs.version }}
DRY_RUN: ${{ needs.resolve-required-data.outputs.dry_run_flag }}
PUBLISH_BRANCH: ${{ needs.resolve-required-data.outputs.publish_branch }}
run: |
git checkout -b publish/$GITHUB_REF_NAME
# If triggered by the cron, create a canary release
if [ "${{ github.event_name }}" = "schedule" ]; then
VERSION="canary"
else
# Otherwise, use the tag name (if triggered via release), or explicit version (if triggered via workflow_dispatch)
VERSION="${GITHUB_REF_NAME}"
fi
# If triggered via workflow_dispatch, perform a dry-run
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
DRY_RUN="--dry-run"
else
DRY_RUN=""
fi
echo ""
# Create and check out the publish branch
git checkout -b $PUBLISH_BRANCH
echo ""
echo "Version set to: $VERSION"
echo "DRY_RUN set to: $DRY_RUN"
echo ""
pnpm nx-release --local=false $VERSION $DRY_RUN
- name: Trigger Docs Release
- name: (Stable Release Only) Trigger Docs Release
# Publish docs only on a full release
if: ${{ !github.event.release.prerelease }}
run: |
# Publish docs only when publishing the latest version
if [ "$(git describe --tags `git rev-list --tags --max-count=1`)" = "$GITHUB_REF_NAME" ]; then
# We force recreate the branch in order to always be up to date and avoid merge conflicts within the automated workflow
git branch -f website
git push -f origin website
fi
if: ${{ !github.event.release.prerelease && github.event_name == 'release' }}
run: npx ts-node ./scripts/release-docs.ts
- name: (PR Release Only) Create comment for successful PR release
if: success() && github.event.inputs.pr
uses: actions/github-script@v7
env:
SUCCESS_COMMENT: ${{ needs.resolve-required-data.outputs.success_comment }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const successComment = JSON.parse(process.env.SUCCESS_COMMENT);
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: ${{ github.event.inputs.pr }},
body: successComment
});
pr_failure_comment:
# Run this job if it is a PR release, running on the nrwl origin, and any of the required jobs failed
if: ${{ github.repository_owner == 'nrwl' && github.event.inputs.pr && always() && contains(needs.*.result, 'failure') }}
needs: [resolve-required-data, build, build-freebsd, publish]
name: (PR Release Failure Only) Create comment for failed PR release
runs-on: ubuntu-latest
steps:
- name: Create comment for failed PR release
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# This script is intentionally kept inline (and e.g. not generated in publish-resolve-data.js)
# to ensure that an error within the data generation itself is not missed.
script: |
const message = `
Failed to publish a PR release of this pull request, triggered by @${{ github.triggering_actor }}.
See the failed workflow run at: https://github.com/nrwl/nx/actions/runs/${{ github.run_id }}
`;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: ${{ github.event.inputs.pr }},
body: message
});
+39 -106
View File
@@ -4,7 +4,7 @@ on:
name: Stale Bot workflow
permissions: {}
permissions: { }
jobs:
build:
@@ -16,163 +16,96 @@ jobs:
name: stale
runs-on: ubuntu-latest
steps:
# This handles issues that need more info
- name: stale-more-info-needed
id: stale-more-info-needed
uses: actions/stale@v3.0.13
uses: actions/stale@v9.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 14
days-before-close: 14
days-before-stale: 7
days-before-close: 21
stale-issue-label: "stale"
operations-per-run: 300
remove-stale-when-updated: true
only-labels: "blocked: more info needed"
stale-issue-message: |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
This issue has been automatically marked as stale because more information has not been provided within 7 days.
It will be closed in 21 days if no information is provided.
If information has been provided, please reply to keep it active.
Thanks for being a part of the Nx community! 🙏
# This handles PRs that need to be rebased
- name: stale-needs-rebase
id: stale-needs-rebase
uses: actions/stale@v3.0.13
uses: actions/stale@v9.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 14
days-before-close: 14
days-before-stale: 7
days-before-close: 21
stale-issue-label: "stale"
operations-per-run: 300
remove-stale-when-updated: true
only-labels: "blocked: needs rebased"
stale-issue-message: |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
This PR has been automatically marked as stale because it has not been rebased in 7 days.
It will be closed in 21 days if it is not rebased.
If the PR has been rebased or you are working on rebasing it, please reply to keep it active.
If you do not have time, please let us know and we can rebase it.
Thanks for being a part of the Nx community! 🙏
# This handles issues that do not have a repro
- name: stale-repro-needed
id: stale-repro-needed
uses: actions/stale@v3.0.13
uses: actions/stale@v9.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 14
days-before-close: 14
days-before-stale: 7
days-before-close: 21
stale-issue-label: "stale"
operations-per-run: 300
remove-stale-when-updated: true
only-labels: "blocked: repro needed"
stale-issue-message: |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
This issue has been automatically marked as stale because no reproduction was provided within 7 days.
Please help us help you. Providing a repository exhibiting the issue helps us diagnose and fix the issue.
Any time that we spend reproducing this issue is time taken away from addressing this issue and other issues.
This issue will be closed in 21 days if a reproduction is not provided.
If a reproduction has been provided, please reply to keep it active.
Thanks for being a part of the Nx community! 🙏
- name: stale-retry-with-latest
id: stale-retry-with-latest
uses: actions/stale@v3.0.13
uses: actions/stale@v9.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 14
days-before-close: 14
days-before-stale: 7
days-before-close: 21
stale-issue-label: "stale"
operations-per-run: 300
remove-stale-when-updated: true
only-labels: "blocked: retry with latest"
stale-issue-message: |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
This issue has been automatically marked as stale because no results of retrying on the latest version of Nx was provided within 7 days.
It will be closed in 21 days if no results are provided.
If the issue is still present, please reply to keep it active.
If the issue was not present, please close this issue.
Thanks for being a part of the Nx community! 🙏
# This handles issues are really old and were made with a previous major
- name: stale-bug
id: stale-bug
uses: actions/stale@v3.0.13
uses: actions/stale@v9.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 180
days-before-close: 14
days-before-close: 21
stale-issue-label: "stale"
operations-per-run: 300
remove-stale-when-updated: true
only-labels: "type: bug"
stale-issue-message: |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏
- name: stale-cleanup
id: stale-cleanup
uses: actions/stale@v3.0.13
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 180
days-before-close: 14
stale-issue-label: "stale"
operations-per-run: 300
remove-stale-when-updated: true
only-labels: "type: cleanup"
stale-issue-message: |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏
- name: stale-docs
id: stale-docs
uses: actions/stale@v3.0.13
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 180
days-before-close: 14
stale-issue-label: "stale"
operations-per-run: 300
remove-stale-when-updated: true
only-labels: "type: docs"
stale-issue-message: |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏
- name: stale-enhancement
id: stale-enhancement
uses: actions/stale@v3.0.13
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 250
days-before-close: 14
stale-issue-label: "stale"
operations-per-run: 300
remove-stale-when-updated: true
only-labels: "type: enhancement"
stale-issue-message: |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏
- name: stale-feature
id: stale-feature
uses: actions/stale@v3.0.13
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 250
days-before-close: 14
stale-issue-label: "stale"
operations-per-run: 300
remove-stale-when-updated: true
only-labels: "type: feature"
stale-issue-message: |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏
- name: stale-question
id: stale-question
uses: actions/stale@v3.0.13
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 45
days-before-close: 14
stale-issue-label: "stale"
operations-per-run: 300
remove-stale-when-updated: true
only-labels: "type: question / discussion"
stale-issue-message: |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
This issue has been automatically marked as stale because it hasn't had any activity for 6 months.
Many things may have changed within this time. The issue may have already been fixed or it may not be relevant anymore.
If at this point, this is still an issue, please respond with updated information.
It will be closed in 21 days if no further activity occurs.
Thanks for being a part of the Nx community! 🙏
+4 -1
View File
@@ -37,7 +37,7 @@ out
.angular
# Local dev files
.env
.env.local
.bashrc
.nx
@@ -46,6 +46,7 @@ out
# Fix for issue when working on the repo in a dev container
.pnpm-store
.nx/cache
.nx/workspace-data
.cargo/.package-cache
.cargo/bin/
@@ -55,3 +56,5 @@ out
.npm/
.profile
.rustup/
target
*.wasm
+17 -11
View File
@@ -1,7 +1,7 @@
launch-templates:
linux-medium:
resource-class: 'docker_linux_amd64/medium+'
image: 'ubuntu22.04-node20.9-v3'
image: 'ubuntu22.04-node20.11-v3'
env:
GIT_AUTHOR_EMAIL: test@test.com
GIT_AUTHOR_NAME: Test
@@ -11,30 +11,33 @@ launch-templates:
NPM_CONFIG_PREFIX: '/home/workflows/.npm-global'
init-steps:
- name: Checkout
uses: 'nrwl/nx-cloud-workflows/v1.1/workflow-steps/checkout/main.yaml'
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/checkout/main.yaml'
- name: Cache restore
uses: 'nrwl/nx-cloud-workflows/v1.1/workflow-steps/cache/main.yaml'
env:
KEY: 'pnpm-lock.yaml'
PATHS: |
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/cache/main.yaml'
inputs:
key: 'pnpm-lock.yaml'
paths: |
node_modules
~/.cache/Cypress
~/.cache/ms-playwright
~/.pnpm-store
BASE_BRANCH: 'master'
base-branch: 'master'
- name: Install e2e deps
script: |
sudo apt-get update
sudo apt-get install -y ca-certificates lsof
sudo apt-get install -y ca-certificates lsof libvips-dev libglib2.0-dev libgirepository1.0-dev
- name: Install Pnpm
script: |
npm install -g @pnpm/exe@8.7.4
npm install -g pnpm@8
- name: Pnpm Install
script: |
pnpm install --frozen-lockfile
- name: Install Cypress
script: pnpm exec cypress install
- name: Install Browsers
script: |
pnpm exec cypress install
pnpm exec playwright install
- name: Install Rust
script: |
@@ -49,3 +52,6 @@ launch-templates:
- name: Load Cargo Env
script: echo "PATH=$HOME/.cargo/bin:$PATH" >> $NX_CLOUD_ENV
- name: Install zip and unzip
script: sudo apt-get -yqq install zip unzip
+8 -1
View File
@@ -17,7 +17,12 @@ packages/nx/src/plugins/js/lock-file/__fixtures__/**/*.*
packages/**/schematics/**/files/**/*.html
packages/**/generators/**/files/**/*.html
packages/nx/src/native/**/*.rs
packages/nx/src/native/index.js
packages/nx/src/native/browser.js
packages/nx/src/native/nx.wasi-browser.js
packages/nx/src/native/nx.wasi.cjs
packages/nx/src/native/wasi-worker-browser.mjs
packages/nx/src/native/wasi-worker.mjs
packages/nx/src/native/native-bindings.js
packages/nx/src/native/index.d.ts
nx-dev/nx-dev/.next/
nx-dev/nx-dev/public/documentation
@@ -40,3 +45,5 @@ CODEOWNERS
/.nx/cache
.pnpm-store
/.nx/workspace-data
+2 -1
View File
@@ -1,4 +1,5 @@
{
"singleQuote": true,
"endOfLine": "lf"
"endOfLine": "lf",
"plugins": ["prettier-plugin-tailwindcss"]
}
+8 -12
View File
@@ -11,7 +11,7 @@ rust-toolchain @nrwl/nx-native-reviewers
# Docs Site + Graph
/docs @nrwl/nx-docs-reviewers
/docs/nx-cloud @StalkAltan @rarmatei @nrwl/nx-docs-reviewers
/graph/** @philipjfulcher @FrozenPandaz @bcabanes @MaxKless
/graph/** @philipjfulcher @FrozenPandaz @bcabanes @MaxKless @xiongemi
/images @nrwl/nx-docs-reviewers
/nx-dev/** @nrwl/nx-docs-reviewers
/typedoc-theme @nrwl/nx-docs-reviewers
@@ -22,9 +22,7 @@ rust-toolchain @nrwl/nx-native-reviewers
/docs/generated/packages/angular/** @nrwl/nx-angular-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/angular/** @nrwl/nx-angular-reviewers @nrwl/nx-docs-reviewers
/packages/angular/** @nrwl/nx-angular-reviewers
/e2e/angular-core/** @nrwl/nx-angular-reviewers
/e2e/angular-extensions/** @nrwl/nx-angular-reviewers
/e2e/angular-module-federation/** @nrwl/nx-angular-reviewers
/e2e/angular/** @nrwl/nx-angular-reviewers
/packages/angular/plugins/component-testing.ts @nrwl/nx-angular-reviewers @nrwl/nx-testing-tools-reviewers
/packages/angular/src/generators/cypress-component-configuration/** @nrwl/nx-angular-reviewers @nrwl/nx-testing-tools-reviewers
/packages/angular/src/generators/component-test/** @nrwl/nx-angular-reviewers @nrwl/nx-testing-tools-reviewers
@@ -35,12 +33,9 @@ rust-toolchain @nrwl/nx-native-reviewers
/docs/shared/packages/react/** @nrwl/nx-react-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/next/** @nrwl/nx-react-reviewers @nrwl/nx-docs-reviewers
/packages/react/** @nrwl/nx-react-reviewers
/e2e/react-core/** @nrwl/nx-react-reviewers
/e2e/react-module-federation/** @nrwl/nx-react-reviewers @coly010
/e2e/react-extensions/** @nrwl/nx-react-reviewers
/e2e/react/** @nrwl/nx-react-reviewers
/packages/next/** @nrwl/nx-react-reviewers
/e2e/next-core/** @nrwl/nx-react-reviewers
/e2e/next-extensions/** @nrwl/nx-react-reviewers
/e2e/next/** @nrwl/nx-react-reviewers
/packages/react/plugins/component-testing/** @nrwl/nx-react-reviewers @nrwl/nx-testing-tools-reviewers
/packages/react/src/generators/cypress-component-configuration/** @nrwl/nx-react-reviewers @nrwl/nx-testing-tools-reviewers
/packages/react/src/generators/component-test/** @nrwl/nx-react-reviewers @nrwl/nx-testing-tools-reviewers
@@ -134,7 +129,6 @@ rust-toolchain @nrwl/nx-native-reviewers
/docs/shared/packages/storybook/** @nrwl/nx-storybook-reviewers @nrwl/nx-docs-reviewers
/packages/storybook/** @nrwl/nx-storybook-reviewers
/e2e/storybook/** @nrwl/nx-storybook-reviewers
/e2e/storybook-angular/** @nrwl/nx-storybook-reviewers
## Devkit
/docs/generated/devkit/** @nrwl/nx-devkit-reviewers @nrwl/nx-docs-reviewers
@@ -142,7 +136,10 @@ rust-toolchain @nrwl/nx-native-reviewers
/packages/devkit/** @nrwl/nx-devkit-reviewers
/packages/devkit/index.ts @FrozenPandaz @vsavkin
/packages/devkit/public-api.ts @FrozenPandaz @vsavkin
/packages/devkit/nx.ts @FrozenPandaz @vsavkin
# Gradle
/packages/gradle/** @FrozenPandaz @xiongemi
/e2e/gradle/** @FrozenPandaz @xiongemi
# Nx-Plugin
/docs/generated/packages/plugin/** @nrwl/nx-devkit-reviewers @nrwl/nx-docs-reviewers
@@ -166,7 +163,6 @@ rust-toolchain @nrwl/nx-native-reviewers
/e2e/nx*/** @nrwl/nx-core-reviewers
/packages/workspace/** @nrwl/nx-core-reviewers
/e2e/workspace-create/** @nrwl/nx-core-reviewers
/e2e/workspace-create-npm/** @nrwl/nx-core-reviewers
/e2e/release/** @nrwl/nx-core-reviewers
# Misc
+7 -3
View File
@@ -76,13 +76,13 @@ Check out [this video for a live walkthrough](https://youtu.be/Tx257WpNsxc) or f
- Run `pnpm local-registry` in Terminal 1 (keep it running)
- Run `npm adduser --registry http://localhost:4873` in Terminal 2 (real credentials are not required, you just need to
be logged in. You can use test/test/test@test.io.)
- Run `pnpm nx-release 18.0.0 --local` in Terminal 2 - you can choose any nonexistent version number here, but it's recommended to use the next major
- Run `pnpm nx-release 20.0.0 --local` in Terminal 2 - you can choose any nonexistent version number here, but it's recommended to use the next major
- Run `cd ./tmp` in Terminal 2
- Run `npx create-nx-workspace@18.0.0` in Terminal 2
- Run `npx create-nx-workspace@20.0.0` in Terminal 2
If you have problems publishing, make sure you use Node 18 and NPM 8.
**NOTE:** To use this newly published local version, you need to make a new workspace, run `nx migrate` or change all of your target packages to this new version, eg: `"nx": "^18.0.0",` and re-run `pnpm i` in your testing project.
**NOTE:** To use this newly published local version, you need to make a new workspace, run `nx migrate` or change all of your target packages to this new version, eg: `"nx": "^20.0.0",` and re-run `pnpm i` in your testing project.
### Publishing for Yarn 2+ (Berry)
@@ -355,3 +355,7 @@ Closes #157
To simplify and automate the process of committing with this format,
**Nx is a [Commitizen](https://github.com/commitizen/cz-cli) friendly repository**, just do `git add` and
execute `pnpm commit`.
#### PR releases
If you are working on a particularly complex change or feature addition, you can request a dedicated Nx release for the associated 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.
Generated
+423 -686
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
(The MIT License)
Copyright (c) 2017-2023 Narwhal Technologies Inc.
Copyright (c) 2017-2024 Narwhal Technologies Inc.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
+1 -1
View File
@@ -29,7 +29,7 @@ A few links to help you get started:
- [Nx.Dev: Core Tutorials](https://nx.dev/getting-started/intro)
- [Recipe: Adding Nx to an Existing Monorepo](https://nx.dev/recipes/adopting-nx/adding-to-monorepo)
- [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
- [Blog Posts About Nx](https://nx.dev/blog)
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="./images/nx-courses-and-videos.svg"
width="100%" alt="Nx - Smart Monorepos · Fast CI"></a></p>
+22 -2
View File
@@ -29,6 +29,11 @@
"description": "Nx plugin integrations with Vite.",
"url": "https://nx-plugins.netlify.app/"
},
{
"name": "nx-serverless-cdk",
"description": "Create CDK applications and construct libraries. Test and debug infrastructure code and AWS Lambda functions locally.",
"url": "https://github.com/castleadmin/nx-plugins/tree/main/nx-serverless-cdk/plugin"
},
{
"name": "@ago-dev/nx-aws-cdk-v2",
"description": "An nx plugin for the aws-cdk v2.",
@@ -72,12 +77,12 @@
{
"name": "@nxext/ionic-react",
"description": "An Nx plugin for developing Ionic React applications and libraries",
"url": "https://github.com/nxext/nx-extensions/tree/main/packages/ionic-react"
"url": "https://github.com/nxext/nx-extensions-ionic/tree/main/packages/ionic-react"
},
{
"name": "@nxext/ionic-angular",
"description": "An Nx plugin for developing Ionic Angular applications and libraries",
"url": "https://github.com/nxext/nx-extensions/tree/main/packages/ionic-angular"
"url": "https://github.com/nxext/nx-extensions-ionic/tree/main/packages/ionic-angular"
},
{
"name": "@nxext/capacitor",
@@ -294,6 +299,11 @@
"description": "Nx plugin for working with shadcn/ui",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/shadcn-ui"
},
{
"name": "@nx-extend/docusaurus",
"description": "Nx plugin adding first class support for Docusaurus in your Nx workspace.",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/docusaurus"
},
{
"name": "@nativescript/nx",
"description": "Nx Plugin adding first class support for NativeScript in your Nx workspace",
@@ -468,5 +478,15 @@
"name": "@analogjs/platform",
"description": "Official plugin to add Analog to your Nx monorepo.",
"url": "https://analogjs.org/docs/integrations/nx"
},
{
"name": "@getlarge/nx-heroku",
"description": "Plugin to deploy and promote Nx apps on Heroku",
"url": "https://github.com/getlarge/nx-heroku"
},
{
"name": "@huge-nx/conventions",
"description": "Plugin to generate and manage Nx workspaces by adhering to established workspace conventions.",
"url": "https://github.com/jogelin/huge-nx"
}
]
+34 -1
View File
@@ -17,12 +17,18 @@ We are generally following the [Diataxis](https://diataxis.fr) model where docum
We also have different audiences in mind when writing docs:
👶 New user
👶 New user starting from scratch
- They know their framework of choice
- They have probably heard the term monorepo but don't really know what it is
- They're smart and eager to learn
👶 New user migrating an existing repo
- They know their framework of choice
- They know how npm workspaces work
- They're smart and eager to learn
👦 Intermediate User
- They know how to create an Nx repo or add Nx to an existing repo
@@ -177,6 +183,14 @@ To display a terminal command, use:
```
````
You can also add a title to the shell as follows:
````
```shell {% title="Build the app" %}
npx nx build
```
````
#### Terminal Output
You can display your terminal output with a dedicated component the same way you would show code.
@@ -402,3 +416,22 @@ Embed an Nx Graph visualization that can be panned by the user.
{% /graph %}
````
## Publishing Process
There are multiple versions of the `nx.dev` site.
- [canary.nx.dev](https://canary.nx.dev) contains the documentation on the `master` branch
- [nx.dev](https://nx.dev) contains the documentation as of the latest release of Nx to npm. The main site will not include reference documentation for APIs that have been merged to the codebase, but not yet released to the public.
- `[version].nx.dev` contains the documentation for that version of Nx. `[version]` in this case is the major version up to the current LTS version of Nx. So [18.nx.dev](https://18.nx.dev) will show the Nx documentation as of the last released version of Nx 18.
When a commit that contains documentation is merged into `master`, it will be immediately published to `canary.nx.dev`. Whenever a new release of Nx is published to npm, that documentation will then be available on the main site.
### Immediately Publishing Time-Sensitive Documentation
If you have a documentation change that should be published immediately, you'll need to create 2 PRs.
1. First, create a PR against `master` in the normal manner.
2. Your second PR needs to be made against the website branch with the latest major version of Nx. So your second PR can be created against `website-19` if the latest version of Nx is `19.1.0`. Once `website-19` is updated with your changes, the main `nx.dev` site will be updated.
Later, when Nx `19.1.1` is released, `website-19` will be overwritten with whatever is on `master` and the first PR you created will take effect.
+122
View File
@@ -0,0 +1,122 @@
---
title: Nx Cloud 3.0 — Faster Cache, More Powerful DTE, Better Ergonomics
slug: 'nx-cloud-3-0-faster-more-efficient-modernized'
authors: [Juri Strumpflohner]
cover_image: '/blog/images/2023-04-19/featured_img.webp'
tags: [nx, nx-cloud]
---
It has been almost 2 years since we released [Nx Cloud 2.0](https://nx.app/). Since then, it has saved over 400 years of computation by leveraging its distributed caching and task execution. And we keep adding 8 years every single week. Not only does this tremendously [impact our environment](https://dev.to/nx/helping-the-environment-by-saving-two-centuries-of-compute-time-4nep), but it also helps developers be more productive and companies save money.
In the last couple of months we have quadrupled the team and have done some amazing things. And we have some big plans for what is coming next. Heres all you need to know!
**Table of Contents**
- [New, Streamlined UI](#new-streamlined-ui)
- [Prefetching and Faster Cache Uploading](#prefetching-and-faster-cache-uploading)
- [DTE Just got Better](#dte-just-got-better)
- [Direct Integration With GitHub, GitLab and Bitbucket](#direct-integration-with-github-gitlab-and-bitbucket)
- [Enterprise Support](#enterprise-support)
- [New, Simplified Plans and Pricing Model](#new-simplified-plans-and-pricing-model)
- [Coming Next](#coming-next)
- [Learn more](#learn-more)
**Prefer a Video? Weve got you Covered!**
{% youtube src="https://www.youtube.com/embed/cG2hEI5L3qI?si=9frDSD8_HK1iTNEi" /%}
## New, Streamlined UI
This latest release of Nx Cloud comes with a new, streamlined design that offers users a more modern and visually appealing experience. This includes the main [Nx Cloud website](https://nx.app/), where we improved our messaging, including interactive visualizations to better explain some core concepts around remote caching and distributed task execution.
![](/blog/images/2023-04-19/bodyimg1.webp)
The Nx Cloud application — showing your runs, cache saved, and stats — also got a significant overhaul, making the UI more lightweight and easier to parse.
![](/blog/images/2023-04-19/bodyimg2.webp)
More UI-related updates and improvements are already underway.
## Prefetching and Faster Cache Uploading
![](/blog/images/2023-04-19/bodyimg3.webp)
At Nx, we are performance addicts! Especially when it comes to local development, every millisecond counts! In the latest update of the Nx CLI, we added the ability to **offload some of the remote cache management to the [Nx Daemon](/concepts/nx-daemon)**. As a result you no longer have to wait for the cache to upload. This saves valuable time, allowing the command to complete instantly and immediately providing you with the necessary link.
We also **prefetch cache results in the background** to have them ready when needed.
Both optimizations can save seconds.
## DTE Just got Better
![](/blog/images/2023-04-19/bodyimg4.webp)
[Distributed Task Execution (short DTE)](/ci/features/distribute-task-execution) is a core part of what makes Nx Cloud stand out compared to other solutions. And we made some significant improvements to both the ergonomics and speed.
**Identify failed tasks early** — You can now view information about the in-progress DTEs, allowing you to quickly identify and address any failed functions without waiting for the command to complete.
**Simplified CI setup** — We simplified the setup process for most CI systems, eliminating the need to pass environment variables manually. Instead, everything is automatically derived from the context.
**Improved performance and efficiency** — Nx Cloud now intelligently figures out which tasks will be cache hits before sending them to agents. Rather it can directly send them to the main job, reducing unnecessary round trips and drastically speeding up CI runs.
**Efficient agent management** — We have introduced a new command, `npx nx-cloud start-ci-run stop-agents-after=e2e`, that allows you to notify Nx Cloud when specific commands, such as long-running e2e tasks, have started. This helps Nx Cloud proactively identify and shut down agents that will not be needed, improving compute efficiency.
**Reduce fix costs** — Even though cache hits are basically free, spinning processes still have fixed costs. We fixed that (see what I did there) by leveraging a new Nx feature that allows to have a long-running process on an agent to which we can arbitrarily feed new tasks. This removed the DTE overheads and also improved the predictability of runs.
## Direct Integration With GitHub, GitLab and Bitbucket
Our GitHub integration has been enhanced. Now, the list of runs is updated in real-time as soon as they are created or their status changes, providing developers with up-to-date information directly on GitHub.
![](/blog/images/2023-04-19/bodyimg5.webp)
In addition to the GitHub, we expanded our Nx Cloud live status updates to work on GitLab and BitBucket.
![](/blog/images/2023-04-19/bodyimg6.webp)
## Enterprise Support
![](/blog/images/2023-04-19/bodyimg7.webp)
We have extensive experience working with Fortune 500 companies, helping them scale their development using monorepos. This has given us valuable insight into the unique security requirements of these companies. Our [Enterprise plan](/enterprise) reflects that allowing organizations to have a **fully self-contained version of Nx Cloud** that can be **hosted on their own servers** and comes with dedicated support from the Nx and Nx Cloud core team.
Weve recently made a couple of improvements to our enterprise offering.
- **Helm Charts** — We added a **Helm chart** to simplify the process of deploying Nx Cloud to on-premises infrastructure, allowing organizations to quickly set up and manage their own instance of Nx Cloud within their secure environment.
- **Stability improvements** — We significantly reworked our on-premises solution to be identical to our SaaS deployment. This revamp resulted in a more robust and reliable on-premises deployment of Nx Cloud, ensuring enterprise-grade performance and reliability.
- **SSO** — We now support AWS Identity and Access Management (IAM) for seamless integration with existing AWS environments and the SAML protocol for a more flexible single sign-on integration across various providers. This enables organizations to leverage their existing identity management systems for authentication and authorization.
Learn more at [enterprise](/enterprise).
## New, Simplified Plans and Pricing Model
Nx Cloud has evolved a lot since we first released it in 2020, and is changing even more in 2023. To better adapt to Nx Cloud being a critical CI tool, we changed our pricing model to be more consistent and predictable for CI workloads.
Nx Clouds previous pricing was based on time savings from Nx Cloud, which made sense when Nx Cloud was strictly a distributed caching service. The [new pricing model](https://nx.app/pricing) is based entirely on the number of CI pipeline executions per calendar month. We believe this is a simpler and more transparent model that should help you predict your costs far more easily.
![](/blog/images/2023-04-19/bodyimg8.webp)
Our Free plan allows one administrator and up to 300 CI pipeline executions per month. Our Pro plan allows more administrators, and uncapped CI pipeline executions, with a flat fee and incremental charges per 100 CI pipeline executions. The OSS plan comes with unlimited CI pipeline executions. Nx has been open source from the beginning and we care a lot about that ecosystem. So this is our contribution to help OSS projects and make their CI pipeline executions faster.
Finally, the **Enterprise plan** is for companies that want full control over where their data is hosted, get hands-on, dedicated support from the Nx & Nx Cloud team, and enterprise features such as SSO & SAML-based authentication support.
All these changes should allow developers to choose the plan that best suits their needs and budget more easily, ensuring a seamless and transparent experience regarding pricing and subscription management.
Learn more at [https://nx.app/pricing](https://nx.app/pricing).
## Coming Next
Weve got some big plans for Nx Cloud. You really want to write your CI script by focusing on what you want to achieve rather than thinking about making it fast. Were going to make this happen!
The current Distributed Task Execution (DTE) already goes a long way, but you still have to provision the agents by yourself. Providing the correct number of agents is crucial for maximizing efficiency and reducing idle time. And it is not even a static number but might depend on the actual run itself. Nx has extensive knowledge about the structure of the workspace and according tasks. We want to leverage that information. Imagine a setup where you have a roughly 20 line CI config for a repo with hundreds of developers and Nx Cloud automatically determines for each run the ideal number of agents required, provisions them, distributes all tasks efficiently and then disposes all agents again. All fully automatically. And it will be fast. To the point where you wouldnt even need your Jenkins, CircleCI etc at all.
In addition, we are actively exploring ways to provide advanced analytics for your workspace, including insights into the frequency and duration of specific tasks. This valuable information can help identify large tasks that could benefit from being broken down into smaller ones, leveraging caching and other speed improvements to optimize performance. Stay tuned for more to come!
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+338
View File
@@ -0,0 +1,338 @@
---
title: Nx Console gets Lit
slug: 'nx-console-gets-lit'
authors: [Max Kless]
cover_image: '/blog/images/2023-06-29/featured_img.webp'
tags: [nx, nx-console]
---
Over the last few weeks, we rebuilt one of Nx Consoles most liked features from the ground up: The Generate UI. It looks better, loads faster, and preliminary research shows using it makes you happier, too ;)
You can use it today by installing the latest version of Nx Console for VSCode and JetBrains IDEs! 🎉🎉🎉
- [Nx Console on the VSCode Marketplace](https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console)
- [Nx Console on the JetBrains Marketplace](https://plugins.jetbrains.com/plugin/21060-nx-console)
If youre curious to learn more about the rewrite and the motivations behind it, this is the blog post for you! Well touch on these topics and more:
- Why did we choose to rewrite?
- Whats Lit and why did we use it over Angular?
- How did the rewrite go and what Lit features were important for us?
- What does the performance look like before and after?
{% youtube src="https://www.youtube.com/embed/p455D4W7330?si=FRbiKJhGxT8dYzf9" /%}
## Background: Why Migrate from Angular to Lit?
### A Short History of Nx Console
Lets go back in time: Nx Console has been around for a while. [It first launched in 2018](https://blog.nrwl.io/announcing-the-first-stable-release-of-angular-console-the-ui-for-the-angular-cli-bb19093a92d4?source=friends_link&sk=d955094b2cb872a130b47c8040ec820e) — then called Angular Console — as a standalone Electron app which let you run Angular schematics and builders from a graphical interface. Of course, it was built with Angular and looked something like this:
![Screenshot of the original Angular Console electron app](/blog/images/2023-06-29/bodyimg1.webp)
In 2019, [it was ported to a VSCode extension](https://blog.nrwl.io/brand-new-ui-custom-vscode-task-support-more-in-angular-console-9-0-5e4d3a109fb9?source=friends_link&sk=47fd72d5700b4cb3de09e559c5524ce5) with the now familiar UI and support for the standalone app was dropped.
In 2020, support for the entire Nx ecosystem was added, it was renamed to Nx Console and an amazing transformation began: Today, Nx Console is much more than just a single form — it tightly integrates Nx into your IDE, gives you the overview of your projects that you need and puts your task-running just a click away.
### Rewriting in Lit
This evolution brought significant improvements to the usability of Nx Console and the value we could provide to developers, but not without presenting its own set of challenges. Inevitably, the codebase grew complex and convoluted over time — the context in which it ran changed, the scope of the product changed, yet the technology remained the same. Adding small features or fixing bugs became increasingly time consuming, and every PR compounded the problem.
The UI looked somewhat outdated and had been built with only VSCode in mind — which became painfully obvious when support for JetBrains IDEs was added. While the web-based nature of the Generate UI allowed us to reuse the code in the new environment, the design looked out of place.
In addition, we started questioning our usage of Angular. Angular is a great framework for building web apps, and in the original context of Angular Console, it made a lot of sense: A tool built by and for Angular engineers — of course its written in Angular. But things changed, and Angular started to feel overkill for what we needed. Angular has a huge number of features right out of the box. But for our simple form, we didnt need routing, http requests or modules to organize our code. The amount of boilerplate and overhead Angular introduces is significant.
So, ultimately, **we decided to pull the plug and rewrite the entire thing in [Lit](https://lit.dev/).**
Lit is a lightweight framework built on top of web components and “adds just what you need to be happy and productive: reactivity, declarative templates and a handful of thoughtful features to reduce boilerplate and make your job easier” (taken from their docs). We had used it before to [build the Nx Cloud view](https://blog.nrwl.io/nx-console-meets-nx-cloud-d45dc099dc5d?source=friends_link&sk=90215eb316ef332c1324f2d50cd3ad85) and were happy with the simple setup and great DX. So the decision to reuse it here was an easy one, since it allowed us to reuse code, build tooling and expertise. The rewrite also gave us the opportunity to improve the design for both supported IDEs and give the entire UI a clean, new coat of paint.
![Screenshot of the reworked generate ui](/blog/images/2023-06-29/bodyimg2.webp)
Before I dive deeper into specifics, lets have a look at the general architecture of Nx Console first.
## Nx Console Architectural Overview
Nx Console is composed of 3 core parts:
- The **nxls** is a language server based on the [Language Server Protocol (LSP)](https://microsoft.github.io/language-server-protocol/) and acts as the “brain” of Nx Console. It analyzes your Nx workspace and provides information on it, including code completion and more.
- The **Generate UI** is the form-based view for running Nx generators.
- The **platform-specific wrappers**. These are written in Typescript and Kotlin and connect the rest of Nx Console to IDE-specific APIs. Having the other parts separate greatly reduces the amount of duplicated code we have to write in order to support multiple IDEs
This architectures modularity meant we could quickly switch out the Generate UI for a new version without significantly impacting the rest of the codebase — only the parts that actually render the UI and communicate with it had to be adjusted slightly. It also allowed us to ensure backward compatibility: the old generate UI is still available via a feature toggle in the settings.
If you want to dive deeper, there are many more resources on the architecture of Nx Console and how its built:
- [In-depth blog post about expanding to JetBrains IDEs](https://blog.nrwl.io/expanding-nx-console-to-jetbrains-ides-8a5b80fff2d7?source=friends_link&sk=967080ea30bdbf9f8132f098a2cdd188)
- [Accompanying Youtube video by Zack DeRose](https://www.youtube.com/watch?v=xUTm6GDqwJM)
- [The Power of Nx Console — talk by Jon Cammisuli](https://www.youtube.com/watch?v=3C_9g9kt2KM)
## Migrating to Lit: Step by Step
To rebuild our UI, we first needed a new Lit app to work on. While theres no native Nx plugin for Lit, generating the code we need was still very straightforward:
`nx generate @nx/web:app --name generate-ui-v2`
This generates an entire project for us, with a `tsconfig.json`, `index.html`, `main.ts`, and a `project.json`, where our Nx-specific config lives.
I also installed a couple of dependencies:
- The `@nx/esbuild` plugin because I like fast build times 🏎️
- TailwindCSS because I dont like writing CSS 🤫
- `@vscode/webview-ui-toolkit` because it does all of the VSCode work for me 🤖
This is really where Nx shines, because it allows you to take these tools and quickly patch them together and build a pipeline that does exactly what you need. And it also allows you to think about your workspace visually. This is what this is what my task graph for building the Lit app ultimately looks like:
![Nx task graph for building the Lit webview](/blog/images/2023-06-29/bodyimg3.webp)
You can see three build steps:
- `generate-ui-v2:_build` uses esbuild to bundle my Lit components written in Typescript and spits out a `main.js` file
- `generate-ui-v2:extract-dependencies` copies the third party assets we need into the dist folder. Right now its just codicons `.css` and `.ttf` files.
- `generate-ui-v2:build` finally runs tailwind over the bundled code. This could also be done with `postCss` or a custom `esbuild` plugin but running tailwind directly is the easier, so why complicate things?
> 💡 There are different ways to generate this visualisation for your own workspaces:
>
> - In VSCode, use the Nx Project View or the `Nx: Focus task in Graph` action
> - In JetBrains IDEs, use the Nx Toolwindow or context menus
> - In the command line, run `nx build {{your project}} --graph`
In the bigger context of Nx Console, heres what happens when you build the VSCode extension:
![Nx task graph for building the VSCode extension](/blog/images/2023-06-29/bodyimg4.webp)
You can see that were still building both the new & old generate UI as well as the Nxls and the Nx Cloud webview before combining them all into one VSCode extension artifact.
### Building the Form
Lit is a very small library that provides useful abstractions over browser-native features like web components and messages. Heres what a simple Lit component, written with Typescript, looks like:
```ts {% fileName="main.ts" %}
@customElement('root-element')
export class Root extends LitElement {
render() {
return html`<p>Hello World</p>`;
}
}
```
```html {% fileName="index.html" %}
<!DOCTYPE html>
<html lang="en">
<body>
<script type="module" src="main.js"></script>
<root-element></root-element>
</body>
</html>
```
If you need to pass information up the DOM, you use normal events and you can set properties to send information to descendants. Check out the [Lit Docs](https://lit.dev/docs/components/rendering/) to learn more about how the render() method works, how to leverage reactivity, the shadow DOM and so much more.
> 💡 All code samples in this section have been adapted for brevity and clarity. So you wont find this exact code anywhere, but it demonstrates the concepts well.
### Communicating with the IDE — using Reactive Controllers
To communicate with the host IDE, we were able to reuse almost all the logic from the previous UI (for more details, see [Communicating with IntelliJ](https://blog.nrwl.io/expanding-nx-console-to-jetbrains-ides-8a5b80fff2d7?source=friends_link&sk=967080ea30bdbf9f8132f098a2cdd188#d151) from the last blog post). Instead of a service that exposes observables that our component can consume, we used a [Reactive Controller](https://lit.dev/docs/composition/controllers/). Controllers are a neat feature of Lit — they hook into a component and can request DOM updates on their behalf. This eliminates the need for observable streams and subscriptions while keeping the communication code self-contained. Look at this example:
```ts {% fileName="main.ts" %}
@customElement('root-element')
export class Root extends LitElement {
icc: IdeCommunicationController;
constructor() {
super();
this.icc = new IdeCommunicationController(this);
}
render() {
return html`${JSON.stringify(this.icc.generatorSchema)}`;
}
}
```
```ts {% fileName="ide-communication-controller.ts" %}
// ide-communication-controller.ts
export class IdeCommunicationController implements ReactiveController {
generatorSchema: GeneratorSchema | undefined;
constructor(private host: ReactiveControllerHost) {}
// ...
private handleMessageFromIde(message: InputMessage) {
// ...
this.generatorSchema = message.payload;
this.host.requestUpdate();
}
}
```
You can see that `root-element` can really just deal with rendering the form contents, delegating communicating with the IDE and when to update the DOM to the controller.
### Rendering the form fields — using Mixins
The core part of the UI is the form. We built all kinds of inputs: text fields, checkboxes, (multi-) select boxes and array fields. While those each have unique implementations, displaying them is also going to take a lot of repeated code. Every fields needs a label and description. Every field needs to know about its validation state, how dispatch change events and what aria attributes to set. In order to keep this code clean and DRY, we used [Class Mixins](https://lit.dev/docs/composition/mixins/). Mixins arent really a Lit-specific feature, but I dont see them used much in other frameworks. A mixin is essentially a factory that takes a class and returns another, modified class. Check out this example:
```ts {% fileName="field-mixin.ts" %}
const Field = (superClass) =>
class extends superClass {
// we can define (reactive) properties that every field is going to need
@property()
option: Option;
protected get fieldId(): string {
return `${this.option.name}-field`;
}
// we can define methods that should be available to all fields
dispatchValue(value: string) {
// ...
}
};
```
```ts {% fileName="field-wrapper-mixin.ts" %}
const FieldWrapper = (superClass) =>
class extends superClass {
// we can define a render() method so that fields are all rendered the same
protected render() {
return html` <label for="${this.fieldId}">${this.option.name}</label>
<p>${this.option.description}</p>
${this.renderField()}`;
}
};
```
```ts {% fileName="input-field.ts" %}
@customElement('input-field')
export class InputField extends FieldWrapper(Field(LitElement)) {
renderField() {
return html` <input
id="${this.fieldId}"
@input="${(e) => this.dispatchValue(e.target.value)}"
/>`;
}
}
```
You can see that each component and mixin deals with a specific subset of the overall logic, keeping our code cleanly separated and reusable. A checkbox, for example, is a special case because its layout on the page is slightly different — no problem, we simply wrote a CheckboxWrapper with some modifications without having to worry about changing the checkbox logic itself.
> 💡 Properly typing mixins is complicated so I left that part out. Refer to [Mixins in Typescript](https://lit.dev/docs/composition/mixins/#mixins-in-typescript) to learn more or [check out our source code on GitHub](https://github.com/nrwl/nx-console).
### Injecting Services & Data — Lit Context
If youre coming from the Angular world, you probably appreciate the great dependency injection (DI) mechanism they have. You can centrally define some services and reuse them across your app, without thinking about passing on props from component to component — the DI system takes care of it. Lit provides something similar via the []`@lit-labs/context`](https://lit.dev/docs/data/context/) package. Its based on the [Context Community Protocol](https://github.com/webcomponents-cg/community-protocols/blob/main/proposals/context.md) and similar to Reacts context API.
Under the hood, it still works with normal browser events, but it abstracts it away from you so you can easily share data and services across your app.
The Generate UI is rendered in both VSCode and JetBrains IDEs. In order to look appropriate, components need to know which environment theyre in and adjust styling accordingly. Instead of passing this information from component to component, we can make it available contextually! And with a proper mixin, reading the editor context only has to be implemented once, too.
Have a look at the following example:
```ts {% fileName="editor-context.ts" %}
export const editorContext = createContext<'vscode' | 'intellij'>(
Symbol('editor')
);
const EditorContext = (superClass) =>
class extends superClass {
@consume({ context: editorContext })
@state()
editor: 'vscode' | 'intellij';
};
```
```ts {% fileName="ide-communication-controller.ts" %}
export class IdeCommunicationController implements ReactiveController {
// ...
constructor(private host: ReactiveElement) {
const editor = isVscode() ? 'vscode' : 'intellij';
// provide the context to all DOM children of the host element
new ContextProvider(host, {
context: editorContext,
initialValue: editor,
});
}
}
```
```ts {% fileName="some-component.ts" %}
@customElement('some-component')
export class SomeComponent extends EditorContext(LitElement) {
render() {
return html`<p>I am rendered in ${this.editor}</p>`;
}
}
```
### VSCode Webview UI Toolkit
As we mentioned above, a big part of why we rewrote the UI is that it looked quite out of place in JetBrains IDEs. It was still useful, of course, but its important to make sure the form _feels_ right.
In VSCode, this is very easy to achieve, thanks to the [VSCode Webview UI Toolkit](https://github.com/microsoft/vscode-webview-ui-toolkit). Its a set of web components, provided by Microsoft, that are designed to look good and be used in VSCode webviews.
![Sample image of the VSCode Webview UI Toolkit showing the different components it provides](/blog/images/2023-06-29/bodyimg5.webp)
Using it, you get the native look, a11y, and theme-aware styling for free! Thanks to everyone who built it, its a huge help!
### E2E Testing with Cypress
One big upside of using a webview is the huge Javascript ecosystem is available to you! To make sure that no regressions are introduced later on, we use [Cypress](https://www.cypress.io/). We can mock the editor communication and provide different schemas, make sure the form is rendered correctly and the right messages are sent back to the IDE.
While theres no particular Lit integration for Cypress, the tool itself is framework agnostic so it still works perfectly fine. Using the [`@nx/cypress`](/nx-api/cypress) executors did most of the work for us so setup was pretty quick too.
### Results: Comparing Performance
Theres a number of different aspects to performance we can compare between the two implementations. The biggest one by far is not really quantifiable: The maintainability and looks of the new UI. In my opinion, it looks a lot fresher and more native in both environments. We got rid of a lot of legacy code and the new version is easier to reason about and work with.
But there are thing we _can_ measure, so lets talk numbers!
### Startup Time
It takes time to bootstrap a large framework like Angular, so skipping that, the UI should load quicker than before.
We measured the median time it took to render all options of the `@nx/angular:application` generator in both VSCode and IntelliJ. You can see that the results are pretty clear-cut, even though they are not hugely impactful.
Old UI (Angular)New UI (Lit)SpeedupVSCode65 ms39 ms~ 1.7xIntelliJ189 ms122 ms~ 1.5x
### Bundle Size
As mentioned earlier, Angular comes with a lot more features out-of-the-box than Lit, so it would make sense that the built bundle will be bigger.
We were able to reduce the bundle size (w/o compression) from about 733 kB to 282 kB, which comes out to about a 2,6x decrease. Unlike a website, where the bundle needs to be shipped to users when they load a page, Nx Console users only need to download it once when installing the plugin. This means were not affected by network speeds after installation, which makes the bundle size less critical.
> 💡 Because of a misconfiguration from a few Angular versions ago, the bundle size that we reported in:
{% tweet url="https://twitter.com/MaxKless/status/1671095858182381569" /%}
was overly bloated. We corrected it, but Lit still came out ahead in terms of size and rendering times.
### Build Time
While it might not be important to users of Nx Console, the time it takes to build the project makes a difference to us developers.
Since Lit is just javascript files that dont require a custom compiler or build tooling, we decided to use [`esbuild`](https://esbuild.github.io/) (via `@nx/esbuild`), which is written in Go and extremely fast. On the other hand, the old UI used the `@angular-builders/custom-webpack:browser` builder, which uses webpack under the hood.
We went from about 3.5 seconds to less than 2 seconds of build time, which is less of an improvement than we expected. Since we also have to run tailwind over our files, some of that additional `esbuild` speed seems to be relativized.
## Looking Ahead
Rebuilding the UI has paved the road to reduce a lot of the maintenance burden of Nx Console. It will allow us to move even quicker on building new features to provide the best developer experience possible for you.
Specifically, the updated architecture enabled us to build a (still secret and WIP) plugin feature for Nx Console. Just like Nx, there are always going to be things that are unique to your workspace. We want to make it easy for you to extend and modify Nx Console in ways that help you make the most of using it.
So keep your eyes peeled for announcements and let us know via GitHub or Twitter if you have any ideas! Wed love to chat.
## One more thing!
Nx Console is a tool by developers for developers and theres one thing we love — keyboard shortcuts. So of course we had to build some in. In addition to being keyboard-friendly and tabbable, you can do the following:
- `Cmd/Ctrl + Enter` to run the generator
- `Cmd/Ctrl + Shift + Enter` to start a dry run
- `Cmd/Ctrl + Shift + S` to focus the search bar and look for a specific option. Just `tab` to get back to the form
If the prettier UI and better performance havent convinced you, this surely will! 😉
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+611
View File
@@ -0,0 +1,611 @@
---
title: Qwikify your Development with Nx
slug: 'qwikify-your-development-with-nx'
authors: ['Colum Ferry']
cover_image: '/blog/images/2023-08-15/featured_img.png'
tags: [nx, changelog, release]
---
In the ever-evolving web development landscape, efficiency and modularity have become paramount. This is where [Nx]() and [Qwik](https://qwik.dev/) come into play.
Qwik is a modern web framework that focuses on application performance by reducing the amount of JavaScript that needs to be shipped to the browser. You can learn more about how Qwik achieves this with [Resumability in their docs](https://qwik.dev/docs/concepts/resumable/).
Nx is a powerful tool that helps you build extensible and maintainable codebases that scale as your application and team grows. Nx utilises computation cache and workspace analysis to ensure maximum efficiency and developer experience. You can [learn more about Nx here](/getting-started/why-nx).
In this blog post, well explore how to combine the strengths of Nx and Qwik to create a todo app. To do this, well take advantage of an Nx Plugin that was created by the Qwikifiers team to maximise the integration between Qwik and Nx, called [`qwik-nx`](https://github.com/qwikifiers/qwik-nx).
> You do not necessarily need to use an Nx Plugin for Qwik. Instead, you could use the [Qwik CLI](https://qwik.dev/docs/getting-started/#create-an-app-using-the-cli) to create your application and [add Nx later](/recipes/adopting-nx/adding-to-existing-project#install-nx-on-a-nonmonorepo-project).
> In this blog post we use the `qwik-nx` plugin to leverage better DX provided by the generators offered by the Plugin.
**Table of Contents**
- [Creating the Workspace](#creating-the-workspace)
- [Generate the App](#generate-the-app)
- [Generate a new Route](#generate-a-new-route)
- [Build a Basic UI](#build-a-basic-ui)
- [Generate a Library](#generate-a-library)
- [Add a Qwik Context](#add-a-qwik-context)
- [Using the Context](#using-the-context)
- [Adding a `routeLoader$` to load data on Navigation](#adding-a-routeloader-to-load-data-on-navigation)
- [Handle the Form Action to add todos](#handle-the-form-action-to-add-todos)
- [Improve the Architecture](#improve-the-architecture)
- [Conclusion](#conclusion)
- [Further Reading](#further-reading)
- [Learn more](#learn-more)
You can learn more about this integration in the video below:
{% youtube src="https://www.youtube.com/embed/SY22NaWHv0s?si=YrQp4qn7APU1f0U9" /%}
## Creating the Workspace
Lets start by setting up our development environment. Well create an Nx workspace and integrate Qwik into it. Begin by generating an empty integrated workspace:
```shell
npx create-nx-workspace@latest qwik-todo-app
```
![](/blog/images/2023-08-15/bodyimg1.webp)
> You can also use the `preset` created by the `qwik-nx` plugin by running `npx create-qwik-nx` or `npx -y create-nx-workspace@latest --preset=qwik-nx`. This will skip a few of the next steps by installing the appropriate dependencies and generating your Qwik app.
>
> The `create-qwik-nx` package is an example of creating an Install Package with Nx. You can learn more here: [https://nx.dev/extending-nx/recipes/create-install-package](/extending-nx/recipes/create-install-package)
Next, navigate into the workspace and install the `qwik-nx` plugin.
```shell
npm install --save-dev qwik-nx
```
> You can view a compatibility matrix for which version of `qwik-nx` works with each version of `nx` [here](https://github.com/qwikifiers/qwik-nx#qwik-nx--nx-compatibility-chart).
## Generate the App
One of the benefits of using an Nx Plugin is that it comes with additional features such as automatic migrations, executors to act on your code and generators to scaffold code (_like CodeMods_).
Now, lets use the application generator provided by `qwik-nx` to scaffold the todo application:
```shell
nx g qwik-nx:app todo
```
This will generate the starter project that Qwik itself provides in your Nx Workspace. It will also install all the necessary packages to build a Qwik application.
At this point, you can already run the `nx serve todo` and `nx build todo` commands to have a feel around of the application that was created.
## Generate a new Route
Qwik has another package called Qwik City that uses directory-based routing to handle navigation within your application. [Learn more about directory-based routing with Qwik City](https://qwik.dev/docs/qwikcity/).
The `qwik-nx` plugin can help generate new routes within our application. Lets use it to generate a route where we can store our todo logic.
```shell
nx g qwik-nx:route --name=todo --project=todo
```
After running this command, youll see a new directory and file created in your workspace:
![Create apps/todo/src/routes/todo/index.tsx](/blog/images/2023-08-15/bodyimg2.webp)
The newly created file should look like this:
```js {% fileName="apps/todo/src/routes/todo/index.tsx" %}
import { component$ } from '@builder.io/qwik';
export default component$(() => {
return <div>This is the todo</div>;
});
```
As you can see, its very simple, just a standard Qwik Component.
If you run `nx serve todo` and navigate to `http://localhost:4200/todo` you can see that the route works and the component renders the content correctly.
![Qwik displays the message "this is the todo"](/blog/images/2023-08-15/bodyimg3.webp)
## Build a Basic UI
We want to build a todo application, so lets add some UI elements to make this look more like an actual todo application.
Update `apps/todo/src/routes/todo/index.tsx` to match the following:
```js {% fileName="apps/todo/src/routes/todo/index.tsx" %}
import { component$ } from '@builder.io/qwik';
import { Form } from '@builder.io/qwik-city';
export default component$(() => {
return (
<div>
<h1>Todos</h1>
<div>
<label>
<input type="checkbox" /> {'My First Todo'}
</label>
</div>
<Form>
<input type="hidden" name="id" value={1} />
<input type="text" name="message" />
<button type="submit">Add</button>
</Form>
</div>
);
});
```
Youll see the page update and look like the following:
![Qwik now the heading, a labeled checkbox, and a formfield to add a todo](/blog/images/2023-08-15/bodyimg4.webp)
Awesome!
However, youll notice that when you click `Add`, nothing happens! Lets add some logic to store new todos.
## Generate a Library
Nx helps you organise your workspace in a modular fashion by creating workspace libraries that focus on specific functionality.
Instead of organising your features into subfolders of your application, with Nx, youll extract them into workspace libraries (libraries that are not intended to be published, but still used by other libraries and applications in your repository). This helps to create a much stronger boundary between modules and features in your application as libraries have a public API (the `index.ts` file), allowing you to control exactly what can be accessed by consumers.
> [Learn more about defining and ensuring project boundaries in the Nx docs.](/features/enforce-module-boundaries)
>
> By doing this, you start to build out a project graph for your workspace and your application. Defining your architecture in this manner also helps to reduce the areas in your application that each change affects.
>
> [Learn more about the Project Graph.](/concepts/mental-model#the-project-graph)
Using this feature of Nx, we can organise the state management of our todo application into its own library, separating the logic from the application itself.
Lets generate a new library with the help of `qwik-nx`.
```shell
nx g qwik-nx:lib data-access
```
![The list of files generated.](/blog/images/2023-08-15/bodyimg5.webp)
We do not need some of the files that were automatically generated so we can delete them:
```
libs/data-access/src/lib/data-access.tsx
libs/data-access/src/lib/data-access.css
libs/data-access/src/lib/data-access.spec.tsx
```
## Add a Qwik Context
Qwik uses [Contexts](https://qwik.dev/docs/components/context/) to help store state across both the server-side and client-side and across routes within the application.
Well use a Context to store the todos in the application, but first, lets create a file to store the TS Interfaces well use in our application.
Create `libs/data-access/src/lib/api.ts` and add the following:
```ts {% fileName="libs/data-access/src/lib/api.ts" %}
export interface Todo {
id: number;
message: string;
}
```
Next, lets create a new file `libs/data-access/src/lib/todo.context.tsx` and add the following content:
```tsx {% fileName="libs/data-access/src/lib/todo.context.tsx" %}
import {
component$,
createContextId,
Slot,
useContextProvider,
useStore,
} from '@builder.io/qwik';
import { Todo } from './api';
interface TodoStore {
todos: Todo[];
lastId: number;
}
export const TodoContext = createContextId<TodoStore>('todo.context');
export const TodoContextProvider = component$(() => {
const todoStore = useStore<TodoStore>({
todos: [],
lastId: 0,
});
useContextProvider(TodoContext, todoStore);
return <Slot />;
});
```
This will create our Context and set up a Store within our application to store the todos. Qwik takes advantage of signals to update state and inform the framework of which components need to be re-rendered when the state changes.
> [Learn more about how Qwik uses Signals.](https://qwik.dev/docs/components/state/)
Finally, lets update the public entry point to the library to expose our Context and Interface.
## Using the Context
Lets update the root page to add our Context Provider. Open `apps/todo/src/root.tsx` and add `TodoContextProvider` after `QwikCityProvider` in the component tree. Your file should look like the following:
```tsx {% fileName="apps/todo/src/root.tsx" %}
import { component$, useStyles$ } from '@builder.io/qwik';
import {
QwikCityProvider,
RouterOutlet,
ServiceWorkerRegister,
} from '@builder.io/qwik-city';
import { RouterHead } from './components/router-head/router-head';
import globalStyles from './global.css?inline';
import { TodoContextProvider } from '@qwik-todo-app/data-access';
export default component$(() => {
/**
* The root of a QwikCity site always start with the <QwikCityProvider> component,
* immediately followed by the document's <head> and <body>.
*
* Don't remove the `<head>` and `<body>` elements.
*/
useStyles$(globalStyles);
return (
<QwikCityProvider>
<TodoContextProvider>
<head>
<meta charSet="utf-8" />
<link rel="manifest" href="/manifest.json" />
<RouterHead />
</head>
<body lang="en">
<RouterOutlet />
<ServiceWorkerRegister />
</body>
</TodoContextProvider>
</QwikCityProvider>
);
});
```
Update `libs/data-access/src/index.ts` to match the following:
```ts {% fileName="libs/data-access/src/index.ts" %}
export * from './lib/todo.context';
export * from './lib/api';
```
Now that our Context is in place, lets use it in our todo route to manage our todos.
Update `apps/todo/src/routes/todo/index.tsx` to match the following:
```tsx {% fileName="apps/todo/src/routes/todo/index.tsx" %}
import { component$ } from '@builder.io/qwik';
import { Form } from '@builder.io/qwik-city';
import { TodoContext } from '@qwik-todo-app/data-access';
export default component$(() => {
const todoStore = useContext(TodoContext);
return (
<div>
<h1>Todos</h1>
{todoStore.todos.map((t) => (
<div key={`todo-${t.id}`}>
<label>
<input type="checkbox" /> {t.message}
</label>
</div>
))}
<Form>
<input type="hidden" name="id" value={1} />
<input type="text" name="message" />
<button type="submit">Add</button>
</Form>
</div>
);
});
```
Our store has no todos in it when the application starts up, so if you serve the application you will no longer see any todos listed. Lets fix that!
## Adding a `routeLoader$` to load data on Navigation
Qwik allows you to fetch data when a route is navigated to, allowing you to fetch data before the page is rendered. The data will be fetched on the server before the component is rendered and downloaded to the client.
> [Learn more about routeLoader$.](https://qwik.dev/docs/route-loader/)
It does this by providing a function called `routeLoader$`. Well use this function to preload our store with some todos that will theoretically exist in a database.
For this blog post, well create an in-memory db to store some initial todos.
Well start by updating our `libs/data-access/src/lib/api.ts` to add our in-memory DB.
```ts {% fileName="libs/data-access/src/lib/api.ts" %}
export interface Todo {
id: number;
message: string;
}
interface DB {
store: Record<string, any[]>;
get: (storeName: string) => any[];
set: (storeName: string, value: any[]) => boolean;
add: (storeName: string, value: any) => boolean;
}
export const db: DB = {
store: { todos: [] },
get(storeName) {
return db.store[storeName];
},
set(storeName, value) {
try {
db.store[storeName] = value;
return true;
} catch (e) {
return false;
}
},
add(storeName, value) {
try {
db.store[storeName].push(value);
return true;
} catch (e) {
return false;
}
},
};
```
Now that we have this, lets use it in our `/todo` route to load some data when the user navigates to `/todo`.
Update `apps/todo/src/routes/todo/index.tsx` to match the following:
```tsx {% fileName="apps/todo/src/routes/todo/index.tsx" %}
import { component$ } from '@builder.io/qwik';
import { Form, routeLoader$ } from '@builder.io/qwik-city';
import { TodoContext, db } from '@qwik-todo-app/data-access';
export const useGetTodos = routeLoader$(() => {
// A network request or db connection could be made here to fetch persisted todos
// For illustrative purposes, we're going to seed a rudimentary in-memory DB if it hasn't been already
// Then return the value from it
if (db.get('todos')?.length === 0) {
db.set('todos', [
{
id: 1,
message: 'First todo',
},
]);
}
const todos: Todo[] = db.get('todos');
const lastId = [...todos].sort((a, b) => b.id - a.id)[0].id;
return { todos, lastId };
});
export default component$(() => {
const todoStore = useContext(TodoContext);
const persistedTodos = useGetTodos();
useTask$(({ track }) => {
track(() => persistedTodos.value);
if (persistedTodos.value) {
todoStore.todos = persistedTodos.value.todos;
todoStore.lastId =
todoStore.lastId > persistedTodos.value.lastId
? todoStore.lastId
: persistedTodos.value.lastId;
}
});
return (
<div>
<h1>Todos</h1>
{todoStore.todos.map((t) => (
<div key={`todo-${t.id}`}>
<label>
<input type="checkbox" /> {t.message}
</label>
</div>
))}
<Form>
<input type="hidden" name="id" value={1} />
<input type="text" name="message" />
<button type="submit">Add</button>
</Form>
</div>
);
});
```
When you serve the application, youll see the first todo is fetched and rendered correctly!
## Handle the Form Action to add todos
Qwik also allows you to handle form actions on the server using the `routeAction$` API. Lets create the logic to add new todos to the store.
> [Learn more about `routeAction$`](https://qwik.dev/docs/action/)
Update `apps/todo/src/routes/todo/index.tsx`:
```tsx {% fileName="apps/todo/src/routes/todo/index.tsx" %}
import { component$ } from '@builder.io/qwik';
import { Form, routeLoader$ } from '@builder.io/qwik-city';
import { TodoContext, db } from '@qwik-todo-app/data-access';
export const useGetTodos = routeLoader$(() => {
// A network request or db connection could be made here to fetch persisted todos
// For illustrative purposes, we're going to seed a rudimentary in-memory DB if it hasn't been already
// Then return the value from it
if (db.get('todos')?.length === 0) {
db.set('todos', [
{
id: 1,
message: 'First todo',
},
]);
}
const todos: Todo[] = db.get('todos');
const lastId = [...todos].sort((a, b) => b.id - a.id)[0].id;
return { todos, lastId };
});
export const useAddTodo = routeAction$(
(todo: { id: string; message: string }) => {
const success = db.add('todos', {
id: parseInt(todo.id),
message: todo.message,
});
return { success };
},
zod$({ id: z.string(), message: z.string() })
);
export default component$(() => {
const todoStore = useContext(TodoContext);
const persistedTodos = useGetTodos();
const addTodoAction = useAddTodo();
useTask$(({ track }) => {
track(() => persistedTodos.value);
if (persistedTodos.value) {
todoStore.todos = persistedTodos.value.todos;
todoStore.lastId =
todoStore.lastId > persistedTodos.value.lastId
? todoStore.lastId
: persistedTodos.value.lastId;
}
});
return (
<div>
<h1>Todos</h1>
{todoStore.todos.map((t) => (
<div key={`todo-${t.id}`}>
<label>
<input type="checkbox" /> {t.message}
</label>
</div>
))}
<Form action={addTodoAction}>
<input type="hidden" name="id" value={todoStore.lastId + 1} />
<input type="text" name="message" />
<button type="submit">Add</button>
</Form>
{addTodoAction.value?.success && <p>Todo added!</p>}
</div>
);
});
```
Awesome! We can now add todos to our application!
However, you might have noticed that our file is starting to get very long. Not only that theres a lot of logic in the route file itself. Lets use Nx to separate the logic into the library we created earlier to keep logic collocated.
## Improve the Architecture
To separate the logic, create a new file `libs/data-access/src/lib/todos.ts` and move the logic for loading and adding todos into their own functions:
```ts {% fileName="libs/data-access/src/lib/todos.ts" %}
import { db, Todo } from './api';
export function getTodos() {
// A network request or db connection could be made here to fetch persisted todos
// For illustrative purposes, we're going to seed a rudimentary in-memory DB if it hasn't been already
// Then return the value from it
if (db.get('todos')?.length === 0) {
db.set('todos', [
{
id: 1,
message: 'First todo',
},
]);
}
const todos: Todo[] = db.get('todos');
const lastId = [...todos].sort((a, b) => b.id - a.id)[0].id;
return { todos, lastId };
}
export function addTodo(todo: { id: string; message: string }) {
const success = db.add('todos', {
id: parseInt(todo.id),
message: todo.message,
});
return { success };
}
```
Next, update `libs/data-access/src/index.ts`
```ts {% fileName="libs/data-access/src/index.ts" %}
export * from './lib/todo.context';
export * from './lib/api';
export * from './lib/todo';
```
Finally, lets update `apps/todo/src/routes/todo/index.tsx` to use our newly created functions:
```tsx {% fileName="apps/todo/src/routes/todo/index.tsx" %}
import { component$, useContext, useTask$ } from '@builder.io/qwik';
import {
Form,
routeAction$,
routeLoader$,
z,
zod$,
} from '@builder.io/qwik-city';
import { addTodo, getTodos, TodoContext } from '@acme/data-access';
export const useGetTodos = routeLoader$(() => getTodos());
export const useAddTodo = routeAction$(
(todo) => addTodo(todo),
zod$({ id: z.string(), message: z.string() })
);
export default component$(() => {
const todoStore = useContext(TodoContext);
const persistedTodos = useGetTodos();
const addTodoAction = useAddTodo();
useTask$(({ track }) => {
track(() => persistedTodos.value);
if (persistedTodos.value) {
todoStore.todos = persistedTodos.value.todos;
todoStore.lastId =
todoStore.lastId > persistedTodos.value.lastId
? todoStore.lastId
: persistedTodos.value.lastId;
}
});
return (
<div>
<h1>Todos</h1>
{todoStore.todos.map((t) => (
<div key={`todo-${t.id}`}>
<label>
<input type="checkbox" /> {t.message}
</label>
</div>
))}
<Form action={addTodoAction}>
<input type="hidden" name="id" value={todoStore.lastId + 1} />
<input type="text" name="message" />
<button type="submit">Add</button>
</Form>
{addTodoAction.value?.success && <p>Todo added!</p>}
</div>
);
});
```
If you run `nx serve todo` again, youll notice that our refactor will not have changed anything for the user, but it has made the codebase more manageable!
Now, if we need to update the logic for loading or adding todos, we only need to retest the library, and not the full application, improving our CI times!
![](/blog/images/2023-08-15/bodyimg6.webp)
## Conclusion
The collaboration between Nx and Qwik has led us to create a todo app that showcases efficient development practices and modular design. By centralizing route logic in a library, weve not only demonstrated the capabilities of Nx and Qwik but also highlighted how this approach can significantly improve cache and CI times.
This journey through Qwik and Nx demonstrates how thoughtful architecture and the right tools can significantly enhance your development experience. So go ahead, Qwikify your development and build amazing web applications with ease!
## Further Reading
- [Qwik](https://qwik.dev/)
- [qwik-nx](https://github.com/qwikifiers/qwik-nx)
- [Enforce Module Boundaries](/features/enforce-module-boundaries)
- [Nx Core Concepts](/concepts)
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+21
View File
@@ -0,0 +1,21 @@
---
title: Nx Raises $16M Series A
slug: 'nx-raises-16m-series-a'
authors: [Jeff Cross]
tags: [nx]
---
Victor and I are excited to announce that Nx has raised another $16M in a Series A funding round with Nexus Venture Partners and a16z! See our announcement video for more, and be sure to check out the [live stream of Nx Conf 2023](https://youtube.com/live/IQ5YyEYZw68?feature=share) tomorrow to see what were up to!
{% youtube src="https://www.youtube.com/embed/KuyYhC4ClW8?si=qoZL6i6X1E7wjChD" %}
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+498
View File
@@ -0,0 +1,498 @@
---
title: Nx Conf 2023 — Recap
slug: 'nx-conf-2023-recap'
authors: [Juri Strumpflohner]
cover_image: '/blog/images/2023-10-13/featured_img.webp'
tags: [nx, nx-conf]
---
The 3rd edition of [Nx Conf](/conf), this year live from New York City. If you missed the talks, no worries, weve got you covered. This article does a brief recap of all the presentations and has links to the individual recordings and slides.
{% youtube src="https://www.youtube.com/embed/P_W8MwX25a0?si=gpjul3hdqmOiBdev" /%}
## Keynote
**Speaker:** [Juri Strumpflohner](https://twitter.com/juristr) & [Victor Savkin](https://twitter.com/victorsavkin)
{% youtube src="https://www.youtube.com/watch?v=WSqivWlEDFw" /%}
Juri Strumpflohner (me 😅) opens the keynote. He focuses on the Nx ecosystem, how it is [much more than monorepos](/getting-started/why-nx) by helping you integrate your framework of choice (whether that is Angular, React, or Vue) with tooling such as ESLint, Playwright, Cypress, Webpack, ESBuild, Vite etc.
![](/blog/images/2023-10-13/bodyimg1.webp)
Such integration capabilities really help push the developer productivity, whether thats in single-project workspaces or monorepos.
Juri also dives deeper into efforts from the team to provide high quality educational content around Nx and its capabilities. The [Nx docs](/getting-started/intro) have been restructured to follow the [Diataxis](https://diataxis.fr/) framework, dividing content into into learning-, task-, understanding- and information-oriented sections.
![](/blog/images/2023-10-13/bodyimg2.webp)
This makes it easier to find keep the content organized and focused and makes it easier for the reader to choose between solution-oriented [recipes](/recipes) vs learning-oriented [tutorials](/getting-started/tutorials).
The Nx team not only produces written content, but also video content mainly on the [Nx YouTube Channel](https://www.youtube.com/@nxdevtools). Juri shows some of the growth stats, with the channel now having more than 14k subscribers and around 3.7k hours of watch time per month. The channel serves mostly short-form videos about new releases, highlighting new features as well as longer-form tutorial videos.
The Nx Community also got a special place in the keynote. Juri highlighted in particular the transition from the “Nrwl Community Slack” to the new “Nx Community” on Discord.
![](/blog/images/2023-10-13/bodyimg3.webp)
Discord is built for managing communities and will open up a series of features to come. Things like a built-in forum to ask questions, the ability to highlight Nx events (e.g. the Nx live stream) and having powerful automation and moderation tools. Since the launch a couple of weeks ago, already 1500+ members have signed up. If you didnt sign up yet, go to [https://go.nx.dev/community](https://go.nx.dev/community).
Juri also highlighted the [Nx Champions](/community) program that got launched this year which helps with efforts to grow the Nx community. The program features members that stood out in the Nx community by helping support others, producing content or speaking at conferences about Nx and related tech.
Finally there were also two **announcements**:
- the Nx team decided to move off Medium for a better publishing experience but mainly also to avoid the paywall, something that the team has no control over. The new blog is currently being built and will be hosted at [blog](/blog). This also allows to better resurface information by being able to integrate blog articles into the Nx docs search and make them also accessible to the Nx AI Assistant which was the 2nd announcement.
- the **Nx AI Assistant** is an experiment the team is running to use AI to improve discoverability on the Nx docs. The ChatGPT powered assistant allows to ask natural language questions and responds based on the Nx docs training data, also including links to the sources. Try it out at [ai-chat](/ai-chat) and use the feedback thumbs-up/down buttons to help improve it over time 🙏.
Also, Nx is open source: [https://github.com/nrwl/nx](https://github.com/nrwl/nx). Contribute! And while youre there, dont forget to give us a star 😃.
**Victor Savkin** began the second segment of the keynote discussing the hidden expenses that often plague large teams.
![](/blog/images/2023-10-13/bodyimg4.webp)
He emphasized that as an organization grows, so does the supporting work. This isnt limited to just communication and management. Every artifact, be it code, process, or otherwise, needs to be assimilated into the broader context. This supporting work becomes intricate and demanding. He pointed out that the remote work trend, while it started with a lot of momentum, struggles in larger corporations because it demands even more coordination and effort. In contrast, smaller entities often outshine their larger counterparts due to the reduced overhead of supporting work.
One of Victors main points was the potential of software developers. Given the right tools and environment, they can achieve remarkable feats. CI is one such tool.
![](/blog/images/2023-10-13/bodyimg5.webp)
The state of CI configuration, Victor explained, is essentially a meticulous blueprint of tasks for the CI tool. This blueprint defines everything from the number of machines to their precise roles. Historically, these processes were performed manually, with individuals running test cases and subsequently approving or rejecting them.
However, scaling CI is a challenge. In larger workspace, up to 50 agents is pretty common, all requiring careful coordination and configuration to ensure tasks run in the correct order.
![](/blog/images/2023-10-13/bodyimg6.webp)
This might be manageable in a static repository setup, but monorepos introduce an added layer of complexity. Here, static “CI recipes” just wont cut it. The result is either an overuse of computational resources, leading to waste of money, or a painfully slow CI.
Victor critiqued that most current CI setups are:
- Oriented towards machines
- Low-level in their configuration
- Maintenance-heavy
- Detached from developer intentions
- Challenging to implement with monorepos
The big question: how can we revolutionize CI? Victor then showcased a demo workspace and highlights where the complexity of setting up CI comes from:
![](/blog/images/2023-10-13/bodyimg7.webp)
Even running e2e tests on CI requires:
- Building the application to be tested to produce an artifact
- That usually requires first building all libraries the app depends on, in the correct order
- Once all libraries are built, the application itself can be build
- Finally e2e can be run on the application artifact
Notice, since we want to do this as fast as possible, we want to parallelize these operations across machines. This involves also taking care of transferring build artifacts between them.
This is where **Nx Cloud Workflows** shines. It enables developers to draft CI configurations at a far more abstract level. Instead of delving into the minutiae of tasks, developers specify **what** commands to execute, with the **how** being implicitly managed by Nx Cloud.
```yaml
env:
NODE_OPTIONS: '--max_old_space_size=4096'
setup:
- name: Git Checkout
uses: 'nx-cloud-steps/checkout'
- name: Npm Install
uses: 'nx-cloud-steps/npm-install'
steps:
- name: CI Checks
parallel-scripts: |
nx affected -t build e2e --parallel=1
nx affected -t test lint --parallel=3
```
This elevated abstraction is possible because Nx Cloud & Nx are intimately familiar with the workspace, understanding the interdependencies between projects and tasks.
![](/blog/images/2023-10-13/bodyimg8.webp)
Beyond simplifying CI configurations, Nx Cloud Workflows helps optimize computational resource use. Agents are instantiated dynamically based on the projects requirements.
![](/blog/images/2023-10-13/bodyimg9.webp)
Victor highlighted that most current CI setups:
- Consistently utilize a predetermined number of agents, irrespective of the actual needs of the PR
- Possess non-reusable agents since each is tailored to a specific task, like building or testing
- Struggle with granular retries
As a metaphor Victor mentions that **Nx Cloud Workflows is to CI what S3 is to file uploads.**
![](/blog/images/2023-10-13/bodyimg10.webp)
Sounds interesting? Watch the entire talk below:
{% youtube src="https://www.youtube.com/watch?v=WSqivWlEDFw" /%}
## Nx Cloud Workflows: Next-Gen CI with First-Class Monorepo Support
**Speaker:** Simon Critchley
[Slides](https://docs.google.com/presentation/d/18EHfZ4UUtnAlzl15Ul_GPsr5lxNFtEEFPuT1uvxIEAk/edit?usp=sharing)
{% youtube src="https://youtu.be/JG1FWfZFByM?si=pNQNCLsbn5U0uSFB" /%}
Simon Critchley (Senior Software Architect at Nx) dives into the more technical details of the newly announced **Nx Cloud Workflows** (which is in private beta as of this writing).
![](/blog/images/2023-10-13/bodyimg11.webp)
Apart from the distributed caching, Nx Cloud already offers [DTE (Distributed Task Execution)](/ci/features/distribute-task-execution), which is a mechanism to seamlessly distribute tasks across various machines to achieve a high degree of parallelism. Up until now it was on you to configure your existing CI in a way to provision machines (agents) to Nx Cloud DTE. This required some fine-tuning to understand the best level of parallelism given the underlying monorepo and tasks that need to be run. If you have too many machines, itll be wasteful, if you have to few your CI will be slower.
Nx Cloud Workflow is an advancement of the DTE mechanism, where machines can be automatically provisioned and scaled based on the tasks that need to be run. Essentially it is a replacement for your existing CI but way smarter because it is able to leverage the knowledge it has about the Nx workspace, historical data and can thus do a series of optimizations. Traditional CI systems are running low-level commands on machines. Nx Cloud Workflows is task oriented instead: you tell it to run builds, tests, e2e, linting on the affected projects of the Nx workspace and it figures out how to split them up into fine-grained tasks and then distributes them among dynamically provisioned agents.
From a developers perspective, Nx Cloud Workflows are written in Yaml (or alternatively in JSON which is handy if you need to generate them). The format is very similar to existing CI providers to make sure the knowledge you have easily transfers. If you want an example, were dog-fooding Nx Cloud Workflows on the Nx repo (note the config will change as the product progresses): [https://github.com/nrwl/nx/blob/master/.nx/workflows/agents.yaml](https://github.com/nrwl/nx/blob/master/.nx/workflows/agents.yaml)
Simon then dives way deeper into the underlying architecture. In particular, how scheduling in Kubernetes works, which is used at the infrastructure level for Nx Cloud Workflows.
![](/blog/images/2023-10-13/bodyimg12.webp)
Workflow scheduling is handled by Kubernetes, specifically through a “Workflow Controller” that interacts with the K8s API Server and triggers Kubernetes Pods. Each Pod contains a Workflow executor and sidecar containers. All containers in the Nx Cloud workflow share a workspace volume for collaborative access. This allows for interesting optimizations in terms of sharing `node_modules` and restoring cache results.
![](/blog/images/2023-10-13/bodyimg13.webp)
The Workflow executor, written in Go, is responsible for receiving and executing workflow steps, capturing output, buffering logs, and communicating with the Workflow Controller. It also exposes its own grpc API for distributed locking, file system cache operations, and setting output parameters for each step, ensuring efficient workflow execution.
Nx Cloud Workflow is in its early development phase. The Kubernetes scheduler supports Docker based executors (basically any Docker image can be used as build image).
![](/blog/images/2023-10-13/bodyimg14.webp)
Windows, macOS and Linux is currently in development which will use a Cloud VM scheduler on the cloud of your choice.
## United by Nxcellent DX
**Speaker:** [Michael Hladky](https://twitter.com/Michael_Hladky)
[Slides](https://docs.google.com/presentation/d/1F6_x3Jiu_3b9tZpxQnCrU60Eb1FhYR8E5jVnb1t7DjA/edit?usp=sharing)
{% youtube src="https://youtu.be/i0UdoImryJQ?si=a5lx6VnS__qhiyex" /%}
Michael talks about how to leverage Nx to migrate multiple repositories into a monorepo to streamline development and increase developer productivity. He goes through
- how a project gets started
- how to prep moving to a monorepo from a polyrepo situation
- how to do the move in parallel
- how to measure the progress
The project usually starts with an architectural audit. That involves a detailed analysis of the underlying codebase, also including an executive summary for non technical folks. Once the audit is done, the actual move is planned and prepared. A part of that is to define “Nx migration goals”, like
- Single Version Policy
- Improved Maintenance
- Shared Infrastructure
- Shared Architecture
- Efficient Task Runs
- Frictionless Code-Sharing
- Frequent Deployments
- Decouple Deployment
To prioritize which ones to address first, Michael uses the following metaphor:
![](/blog/images/2023-10-13/bodyimg15.webp)
The important part here is to understand why “apples get bad” in the first place. Is it the harvesting process?
Once the priorities are defined and roadmap laid out, the goal is to **move in parallel.**
As part of that move the following gets produced:
- Migration Guide
- Training Program
- Communication Strategy
- Impact Measurement
The migration guide defines where to start, what the company goals are, how the deliveries will be integrated into the existing process and how the interaction with the various teams will happen.
The training program is there to tackle the bottleneck of missing knowledge, right from the beginning. Each stage of the process will have a different training content and collect feedback.
Finally the impact measurement; Nx Cloud already has graphs to measure how much time got saved in CI due to the improvements made. Michael mentions they go further, also measuring communication and productivity.
An interesting part is also how they perform the repository synching (from polyrepo to monorepo). They leverage an Nx plugin that
- contains shared build logic
- has rules to run that produce actionable feedback about what is needed to sync/align the polyrepo repository s.t. it can be merged into the monorepo
- it also allows to track progress and produce according reporting of where the company is at
Sounds interesting? Watch the full talk below:
{% youtube src="https://www.youtube.com/watch?v=i0UdoImryJQ" /%}
## Redefining Projects with Nx: A Dive into the New Inference API
**Speaker:** [Craigory Coppola](https://twitter.com/enderagent)
[Slides](https://craigory.dev/presentations/view/nx-conf-2023-inference/#1)
Demo Repo:
{% github-repository url="https://github.com/AgentEnder/inference-demo" /%}
{% youtube src="https://www.youtube.com/watch?v=bnjOu7iOrMg" /%}
Craigory did a deep dive into the new Nx inference API. This is particularly interesting if youre developing [Nx plugins](/extending-nx/intro/getting-started) or if you have leverage/build some more advanced automation for your Nx workspace.
What is project inference:
- how Nx reads your project configuration
- introduced between v13.3 and v14
- initially to support package-based monorepos which use package.json scripts rather than `project.json`. Generalizing the project config reading mechanism also allowed to define an API that community plugins can leverage and which allows to integrate even languages outside the JS ecosystem into Nx (e.g. where projects are just defined differently, such as .Net, Java, Python,..)
Inference API v1
- `projectFilePatterns` - identify files that represent the root of a project
- `registerProjectTargets` - takes a project file and converts to a list of targets that Nx knows how to run
Shortcomings have been
- strict 11 mapping between project files and projects
- the logic of finding proj files and targets had to be decoupled which introduced potential failure points
- no way to add dynamic metadata to a project
Project graph API v2
- `createNodes` - finds graph nodes based on files on disk
- `createDependencies` - finds edges to be added to the graph
Still 2 parts, but theres no overlap between these two and they have very specific purposes.
`createNodes` is a tuple composed of:
- `projectFilePattern`
- `CreateNodesFunction` It can return a map of projects and external nodes, so there's no more the shortcoming of a 1-1 as it was in v1 API. With this new setup multiple plugins might detect the same project. Nx merges the configuration that has been identified. Kinda what happens right now if you mix `package.json` and `project.json` targets in an Nx workspace.
Craigory demos the inference API by building a spell checking plugin for Nx.
`createDependencies` replaces `processProjectGraph`. It is more constrained but mainly because things like adding nodes should be done in a different function now (e.g. `createNodes`). This has also advantages for Nx itself, as it knows all nodes will have been created after the `createNodes` has terminated.
This API is still marked as experimental, next steps will be
- mark as stable
- remove v1 API after deprecation period
- plugin authors should start looking into the new API, provide feedback and think about migration scenarios
## Package-based to Integrated: One Small Step or One Giant Leap?
**Speaker:** [Isaac Mann](https://twitter.com/MannIsaac)
[Slides](https://drive.google.com/file/d/1V1ocFIjYkRrcNXWuvUK1T8dQEceDcjvw/view?pli=1)
Repo:
{% github-repository url="https://github.com/isaacplmann/space-station-tracker/tree/final" /%}
Watch on YouTube:
{% youtube src="https://www.youtube.com/watch?v=nY0_o7zWBLM" /%}
Isaac initiated his talk by drawing an analogy between software development and the moon landing. While Neil Armstrong is often singularly celebrated for setting foot on the moon, Isaac emphasized that the monumental achievement was the collective effort of countless individuals on the ground crew, from engineers to support staff.
> Isaac: Nx wants to be that indispensable ground support crew for developers, allowing them to push the boundaries of software development.
Currently, Nx offers support for two predominant monorepo styles: package-based and integrated.
### Package-based Monorepos:
- These are tailored for flexibility and innovation.
- Packages within this setup can have diverse configurations.
- Every package boasts its individual node_modules and dependencies.
- Crucially, each can be upgraded independently, offering a high degree of autonomy.
### Integrated Monorepos:
- These are structured to prioritize consistency and maintainability.
- Updates within this framework are automated, and the setup adheres to a single-version policy.
Isaac then drew parallels between the Apollo program and the package-based mindset. The Apollo missions were evolutionary in nature, constantly pushing the envelope and embracing innovation with each successive mission. However, this trailblazing approach wasnt without its perils, as evidenced by tragic accidents. This experimental approach was feasible because the core team, responsible for creating the setup, remained consistent throughout the projects duration.
In contrast, Isaac likened the International Space Station (ISS) to the integrated mindset. The ISS epitomizes the challenges of coordination, given its international collaboration involving numerous countries. Emphasizing longevity, the ISS necessitates that every new crew member be proficient in operating its intricate machinery.
Shifting gears, Isaac delved into a hands-on demonstration. He outlined the process of transitioning from a package-based monorepo to an integrated one, including demoing:
- Initializing Nx with `nx init`.
- Establishing new projects to facilitate type sharing across applications.
- Harnessing the power of the Nx graph visualization to navigate and understand the project structure.
- Employing the module boundary rule, ensuring constraints are maintained in the revamped structure.
- Devising a novel Nx generator, streamlining the process of setting up new libraries within the workspace.
- Finally, he showcased the seamless upgrade mechanism, ensuring the workspace is always aligned with the latest version.
## Nxt Level Publishing
**Speaker:** [James Henry](https://twitter.com/MrJamesHenry)
[Slides](https://main--idyllic-dieffenbachia-3699ec.netlify.app/1)
Watch on YouTube:
{% youtube src="https://www.youtube.com/watch?v=p5qW5-2nKqI" /%}
James Henry unveils the new versioning and publishing functionality that is now built into Nx itself.
Nx has always given you the building blocks to do integrate the versioning and publishing; you could easily use Lerna with Nx, or changesets, release-it as well as a series of Nx Community plugins
The nx core team decided to go into this problem space and provide an opinionated approach that is easy to use within existing Nx workspaces; something that works and scales; also something that works outside the JS ecosystem which Nx can also be used with
New command `nx release`
- `nx release version` to determine and apply version updates
- `nx release` changelog generate a CHANGELOG.md file and optional GitHub releases based on git commits
- `nx release` publish takes a newly versioned project and publishes them to a remote registry (e.g. NPM)
This new command is not tight to `package.json` files but is general purpose; clearly publishing JS/TS packages is the main use case right now in Nx
Important to note that all the existing plugins are still valid and will still be going forward.
James goes forward demoing how `nx release` works in a simple NPM package: [jump directly into the video](https://www.youtube.com/watch?si=xoIW0Q-mQWTGgrek&t=411&v=p5qW5-2nKqI&feature=youtu.be).
Nx release can be added to any npm package. All thats needed is the `nx` and `@nx/js` package and a `nx: {}` node in the `package.json`.
Nx release has a dry-run mode; `nx release version --dry-run`. This will output a diff of what version would be created and on which `package.json` files (if there are multiple).
The same mechanism also works for the `changelog` command, e.g. `nx release changelog --dry-run`. In addition to just dry-run, the `changelog` command also has an `--interactive` mode that allows to get the generated changelog in an interactive editor where you can adjust and add extra stuff.
James then moves on to show how the release process works in a monorepo scenario using pnpm workspaces, where there are multiple NPM packages that need to be published: [jump to the video](https://www.youtube.com/watch?si=BvFvRQjgtwOxu-Dv&t=777&v=p5qW5-2nKqI&feature=youtu.be).
The monorepo has a `pkg-a` and `pkg-b` where there's a relationship between them as follows: `pkg-a --> pkg-b`.
If the `version` command is used in such scenario, it will also be applied to the dependent packages (`pkg-b`) since Nx knows about the dependencies via the project graph.
A nice feature is also that the changelog will...
- automatically group first by type (e.g. features grouped together, fixes etc)
- within each type grouping it will be grouped by scope such as pkg-a etc which will be alphabetized
- if theres a fix on the entire repo thatll come first before the per-package changes
`nx release changelog --create-release=github` allows to also automatically push the changelog to a Github release.
When running `nx release publish`, Nx also takes into account the right order of how the packages should go on NPM. Like if there's a relationship `pkg-a --> pkg-b`, Nx automatically detects such dependency and will go and publish pkg-b first and then `pkg-a` which depends on it. That to make sure that even if there's a network error in between packages, you'd still not break anything.
Future roadmap:
- ability to customize how the release works by defining it in `nx.json`
- “release groups” will allow to group packages and define whether versions should be in sync or versioned independently; filter by projects, or even just publish a subset of projects of a workspace
- publishing also automatically takes into account the provenance data on NPM
## Lightning Talk: What if your stories were — already — your e2e tests?
**Speaker:** [Katerina Skroumpelou](https://twitter.com/psybercity)
[Slides](https://drive.google.com/file/d/1XY8tefqqcM4k4swNPhlSrJiKxurMGiup/view)
Repo
{% github-repository url="https://github.com/mandarini/storybook-play" /%}
[Live Demo](https://storybook-play.vercel.app/?path=/story/app--primary)
Watch on YouTube:
{% youtube src="https://www.youtube.com/watch?v=SWlvsDNXCsQ" /%}
Katerina starts by introducing the concept of UI testing for error detection, usability verification, regression prevention but also for validating the user journey and making sure the software is reliability.
Nx had support to use Storybook for doing component-level tests, both using a Cypress e2e setup as well as Cypress component tests. This is where Nx would fill in to launch Storybook to render a single component and then launch Cypress and run dedicated tests against that served component.
Meanwhile Storybook has introduced so-called [Interaction Tests](https://storybook.js.org/docs/writing-tests/interaction-testing) which allow you to do something similar.
You can read more on [our docs](https://storybook.js.org/docs/writing-tests/interaction-testing). Or check out our corresponding video on Youtube:
{% youtube src="https://www.youtube.com/watch?v=SaHoUx-TUs8" /%}
## Lightning Talk: Nx Cloud Demo
**Speaker:** [Johanna Pearce](https://twitter.com/jhannapearce)
Watch on YouTube:
{% youtube src="https://www.youtube.com/watch?v=xc6fJpwk4Lo" /%}
Johanna gives us a tour through the Nx Cloud UI. So theres not much to say other than [go watch the talk](https://www.youtube.com/watch?v=xc6fJpwk4Lo&feature=youtu.be) :)
## From DIY to DTE — An Enterprise Experience
**Speaker:** Adrian Baran
[Slides](https://docs.google.com/presentation/d/1LPgCuYoVEIJqqhk8TLq4RAcHrJ5phJuiHHEGA3y_aws/edit?pli=1#slide=id.g25ac4b0c8f6_0_72)
{% youtube src="https://www.youtube.com/watch?v=MsUN0wQHPAs" /%}
Adrian Baran, a Senior Software Engineer at Cisco, embarked on his talk by presenting the status quo of their monorepo which encompasses approximately 150 projects at the start of the experiment.
![](/blog/images/2023-10-13/bodyimg16.webp)
Their CI workflow is powered by CircleCI. For the purpose of clarity, Adrian zoomed in on the frequently executed tasks: `build`, `lint`, and `test`. To execute these tasks, they leverage the [Nx affected](/features/run-tasks#run-tasks-on-projects-affected-by-a-pr) command to avoid running all commands on all projects.
![](/blog/images/2023-10-13/bodyimg17.webp)
Despite that, on average CI runs on PRs still lingered around the 1-hour mark. The immediate remedy? Harnessing CircleCI to parallelize tasks across multiple machines, while continuing to utilize Nx affected. Adrian wrote about that journey in a blog post last year, titled [Nx Affected + CircleCI Parallelism = Faster CI/CD Pipelines](https://medium.com/@abaran30/nx-affected-circleci-parallelism-faster-ci-cd-pipelines-b4edc4caaaac).
They ended up with a loooot of parallelism:
![](/blog/images/2023-10-13/bodyimg18.webp)
The outcome was promising though — they witnessed a significant reduction, approximately 75%, in execution time, even in scenarios where all projects were influenced by a PR. Done, right?
However, as their monorepo burgeoned to encompass 400+ projects, the DIY solution began to show its limitations. The incessant parallelization implied the addition of more agents, leading to escalating costs. Furthermore, they observed considerable variability in task durations.
![](/blog/images/2023-10-13/bodyimg19.webp)
Their workaround was to manually allocate specific tasks to distinct agents. This method in addition to capping on a max number of agents helped keep costs under control, but regrettably, it also compromised performance due to the lowered parallelism.
This is when Cisco looked into running an [Nx Enterprise](/enterprise) pilot, specifically with the goal of adopting [DTE](/ci/features/distribute-task-execution). In the 2nd part of the talk, Adrian outlined their journey of setting up DTE, starting with the generation of the initial CI setup:
```shell
nx g @nx/workspace:ci-workflow --ci=circleci
```
They tuned the generated configuration, but failed to get it properly running, many of the issues leading to resource exhaustion. As a result, they went the route of going on a 11 mapping setup between DIY and DTE. That made sure the DTE setup was as close as possible and allowed for a gradual transition approach, which proved invaluable, allowing them to maintain stability whilst progressively migrating to DTE.
The comparative analysis of their DIY solution versus DTE revealed roughly equivalent performance metrics. However, the DTE framework shone in its simplicity, maintainability, and resource efficiency, achieving similar outcomes with a 75% reduction in resource utilization.
![](/blog/images/2023-10-13/bodyimg20.webp)
### Adrians Key Insights:
- DTE setup warrants a dual-pronged strategy: an immediate plan for initiation and a long-term vision for transition. Notably, Nx DTE supports incremental adoption.
- Patience is paramount during the tuning phase to determine the optimal number of agents.
- While results might vary, Adrian humorously assures that one can always bank on the Nx team for support. 😅
## Vanquishing Deployment Dragons with Nx wizardry
**Speaker:** [Miroslav Jonas](https://twitter.com/meeroslav)
[Slides](https://speakerdeck.com/meeroslav/vanquishing-deployment-dragons-with-nx-wizardry)
Watch on YouTube:
{% youtube src="https://www.youtube.com/watch?v=jGF8vo2ChfI" /%}
Theres not much to say here. Lean back and [immerse yourself into the world of dragons and wizards.](https://www.youtube.com/watch?v=jGF8vo2ChfI)
## Optimizing your OSS infrastructure with Nx Plugins
**Speaker:** [Brandon Roberts](https://twitter.com/brandontroberts)
[Slides](https://github.com/brandonroberts/nx-conf-2023/blob/main/nx-oss-infrastructure.pdf)
Watch on YouTube:
{% youtube src="https://www.youtube.com/watch?v=bNuXH25CTO0" /%}
Brandon discussed his work on the open-source tool [Analog](https://analogjs.org/) and how Nx Plugins are crucial to its development.
He introduced Analog, shedding light on its foundational ecosystem and the its core features.
![](/blog/images/2023-10-13/bodyimg21.webp)
Nx plays a crucial role in helping integrate and maintain these different tools:
![](/blog/images/2023-10-13/bodyimg22.webp)
How? Brandon dives straight into it by explaining how Nx plugins in particular can be useful, explaining:
- features of Nx plugins such as generators, executors, automated migrations, presets and how to use them just locally to automate your workspace
- how to create a new plugin
- the anatomy of a generator and how they can be useful in scaffolding new setups, but also integrating technology, like adding tRPC to your stack, etc.
- similarly Nx executors provide a thin abstraction layer over the actual commands, allowing the plugin developer to update the underlying tooling without necessarily disrupting the end user
- most importantly allowing to write automatic migrations he can leverage with Analog, like running `nx migrate @analogjs/platform@latest` to update a given workspace automatically to the latest version, across potentially breaking changes
Brandon highlighted a pivotal aspect for OSS package/framework authors: the power to not just assimilate into pre-existing Nx workspaces via custom Nx plugins but also to steer the entire workspace setup process. This is particularly beneficial when tailored setups specific to individual use cases are required. By leveraging an [Nx preset](/extending-nx/recipes/create-preset), one can achieve this tailored configuration. Brandon also touched upon the possibility of advancing further by constructing an [install package](/extending-nx/recipes/create-install-package) through Nx.
## Level Up Your Productivity with Nx Console
**Speaker:** [Jonathan Cammisuli](https://twitter.com/jcammisuli) & [Max Kless](https://twitter.com/MaxKless)
[Slides](https://github.com/Cammisuli/nx-conf-2023/tree/main/tools/presentation)
Watch on YouTube:
{% youtube src="https://www.youtube.com/watch?v=TTjVcWCdwVY" /%}
Jon and Max are the masterminds behind [Nx Console](/getting-started/editor-setup), the Nx IDE extension for Code and JetBrains.
They mention the release of the JetBrains IDE support earlier this year and give a big shoutout to [Issam](https://github.com/iguissouma) who was the original author of the Nx Console Webstorm community plugin and who helped a lot with the official Nx Console version for JetBrains IDE.
Jon and Max demo the new IntelliJ version of Nx console and how it properly integrates as well as how they wrote the new UI completely from the ground up [using Lit](/blog/nx-console-gets-lit).
Clearly they did not spare showing off the awesome new graph capabilities built into Nx Console that allow you to directly navigate to files.
![](/blog/images/2023-10-13/bodyimg23.webp)
## Thats a wrap
If you enjoyed these, [subscribe to our YouTube channel](https://www.youtube.com/@nxdevtools) where we keep releasing educational content and fun videos.
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+287
View File
@@ -0,0 +1,287 @@
---
title: 'Nx 17 has Landed'
slug: 'nx-17-release'
authors: ['Juri Strumpflohner', 'Zack DeRose']
cover_image: '/blog/images/2023-10-20/featured_img.png'
tags: [nx, design]
---
Were excited to announce the release of Nx version 17!
This article will cover the main things you need to know to get the most out of Nx 17!
Heres a Table of Contents so you can skip straight to the updates you care about the most:
- [It's a Vue-tiful Day for Nx](#its-a-vuetiful-day-for-nx)
- [Enhancements to Module Federation Support](#enhancements-to-module-federation-support)
- [More Consistent Generator Paths](#more-consistent-generator-paths)
- [The NEW Nx AI Chatbot](#the-new-nx-ai-chatbot)
- [More Seamless Integration With Nx Cloud](#more-seamless-integration-with-nx-cloud)
- [`nx.json` Simplification](#simplification)
- [Nx Repo Begins Dog-Fooding Nx Workflows](#nx-repo-dogfooding-nx-workflows)
- [Task Graphing Improvements](#task-graphing-improvements)
- [`@nx/linter` Renames to `@nx/eslint`](#renamed-to)
- [New Experimental Feature: Nx Release](#new-experimental-feature-nx-release)
- [Experimental: Nx Project Inference API v2](#experimental-nx-project-inference-api-v2)
- [20k Github Stars!!](#20k-github-stars)
**Prefer a video?**
{% youtube src="https://www.youtube.com/embed/1Z0iA9K1o8M?si=9XxIboXSZ5yxFpIt" /%}
---
## Its a Vue-tiful Day for Nx!
Ever since we added Vite as a first-class citizen to Nx workspaces (see `@nx/vite`), we started falling in love with the Vue community. The only logical next step: Nx now provides a brand new Vue plugin that is being maintained by the Nx team! (And we're already working on a [Nuxt](https://nuxt.com/) plugin 🤫)
The first place you might notice this new support is in the `create-nx-workspace` script:
![](/blog/images/2023-10-20/bodyimg1.webp)
This option will create a new Nx workspace with a fresh Vue application, all set up and ready to develop! To add new Vue projects to your existing Nx workspaces, add our new @nx/vue package as a dev dependency to your workspace, e.g.:
```shell
> npm add -D @nx/vue
```
And youll have access to Nx generators so that you can generate Vue applications, libraries, components, and more in your workspace:
![](/blog/images/2023-10-20/bodyimg2.gif)
Were very excited for this support to land, and were eager to get it into our users hands and see what Nx can do to help Vue developers so we can continue to refine our support and make Vue with Nx an excellent developer experience.
If youre eager to learn more, make sure to check out our new [Vue standalone tutorial](/getting-started/tutorials/vue-standalone-tutorial).
## Enhancements to Module Federation Support
Nx already had great support for Module Federation — Nx 17 improves on this support:
### NEW: Typesafe Config
Projects created with Nxs generators for module federation will now be created with a `module-federation.config.ts` file (as opposed to a `.js` file). A new `ModuleFederationConfig` interface is also exported from the `@nx/webpack` plugin.
### Better Typesafety Across Modules
Nx 17 improves type-safety across modules, so proper type-safety is currently supported across dynamic imports.
![](/blog/images/2023-10-20/bodyimg3.gif)
### NEW GENERATOR: Federate ANYTHING.
The `@nx/react` and `@nx/angular` now include a `federate-module` generator. This will allow you to create a federated module from any Nx project.
To run this generator, use the command:
```shell
> nx g federate-module <module name> --path=<path to module to be exposed> --remote=<name of remote exposing module>
```
This will add a new module to the `exposes` map in the specified `remote` application, such that it can be consumed by a `host` application.
### Managing Module Versions
Nx now supports targeted versioning for federated modules.
To create versions for a given project, you can use the `version` property of that project's `package.json` file and then build that project to create the version locally.
Then, when consuming this library, you can use the `shared` method of the `ModuleFederationConfig`:
```ts
import { ModuleFederationConfig } from '@nx/webpack';
const config: ModuleFederationConfig = {
name: 'my-remote',
exposes: {
'./Module': 'apps/my-remote/src/app/remote-entry/entry.module.ts',
},
remotes: ['federated-is-odd'],
shared: (libName, configuration) => {
if (libName === 'is-odd') {
return {
singleton: true,
strictVersion: true,
requiredVersion: '0.0.1',
};
}
return configuration;
},
};
export default config;
```
This config will ensure that version `0.0.1` of the `is-odd` is used.
## More Consistent Generator Paths
Similar to the [adjustments we made in 16.8](https://www.youtube.com/watch?v=bw8pRh0iC4A&t=14s) for most of our project-creating generators, v17 brings updates to how component generators work. These updates aim to give you more control over the name and file location of your components.
Towards this end, weve added a new `--nameAndDirectoryFormat` option that you can set to either `as-provided` or `derived`.
When set to `as-provided`, the generator will use the `name` option for the name of your component and the `directory` option to determine where on your file system to add the component. `as-provided` will be used by default if none is specified.
When set to `derived`, the generator will try to determine where to create your component based on the `project` option - which will mainly operate how component generators do now.
In addition, component generators now follow any given casing for component files. For example, lets say we have an integrated monorepo with a react application called “my-app” and want to add a “Home” component. With Nx 17, you can run the command:
```shell
> nx g component Home --directory=apps/my-app/src/app
```
And a `Home.tsx` file will be added in the `apps/my-app/src/app` directory.
You can now also build your directory path right into the generator command. For example, the same “Home” component would be created via:
```shell
> nx g component apps/my-app/src/app/Home
```
Finally, generators will now factory in your current working directory, so you can also create this “Home” component via:
```shell
> cd apps/my-app/src/app
> nx g component Home
```
## The NEW Nx AI ChatBot
Weve added a new AI ChatBot to our docs site. You can access it now at [https://nx.dev/ai-chat](/ai-chat).
![](/blog/images/2023-10-20/bodyimg4.gif)
This feature is still in beta, so please use the thumbs up/thumbs down buttons to provide feedback on whether the chatbot is accurate and helpful!
## More Seamless Integration With Nx Cloud
After running the `nx migrate` command to upgrade to Nx 17 and using Nx Cloud, you may have observed the removal of `nx-cloud` from your dev dependencies. Don't worry - Nx Cloud is not only still around but thriving. Instead of having a standalone package, we've integrated the Nx Cloud communication layer directly into the `nx` package. This ensures a seamless connection whenever you opt in and eliminates potential version misalignment concerns with our API endpoint.
## `nx.json` Simplification
Our Nx Cloud updates come alongside configuration changes in your `nx.json` file and project configuration.
Specifically, weve added an optional `nxCloudAccessToken` to the `nx.json` file - as long as a token is provided here, we'll make sure that you take advantage of the currently deployed version of Nx Cloud when running commands with Nx.
Weve also removed the need to specify `cacheableOperations` at the task-runner level. From now on, every `target` configured in your `project.json` can be defined as cacheable using the `cache` property.
```json {% fileName="nx.json" %}
{
"targetDefaults": {
"build": {
"cache": true,
...
}
}
}
```
If you use the `nx migrate` command, all updates will be handled for you using the `targetDefaults` in your `nx.json` file. [More in the docs.](/features/cache-task-results)
Weve been working hard at reducing and simplifying all the configuration required for your Nx workspaces. Checkout our latest guide on how to [Reduce Repetitive Configuration](/recipes/running-tasks/reduce-repetitive-configuration) for more, and stay tuned as weve got new efforts underway to make this simplification even more appealing!
## Nx Repo Dog-Fooding Nx Workflows
At Nx Conf in New York City, we unveiled the next big step for Nx: **Nx Workflows**.
If you missed it, Simon Critchley walks you through in his [Nx Conf](/blog/nx-conf-2023-recap) talk:
{% youtube src="https://www.youtube.com/embed/JG1FWfZFByM?si=7_NzxJP8nA7RbFhl" /%}
Put simply, Nx Workflows represents Nx entering the CI provider arena, where Nx can now provide you with Cloud Computation to run your CI tasks. This creates the foundation for a whole new class of Nx Cloud features that were excited to work on in the coming cycles.
The Nx repo itself is now “dog-fooding” this latest feature (dog-fooding refers to using our tool in our own projects, or “eating our own dog food”), and you can see how its going now on our [public Nx Cloud workspace](https://staging.nx.app/orgs/62d013d4d26f260059f7765e/workspaces/62d013ea0852fe0a2df74438/overview).
![](/blog/images/2023-10-20/bodyimg5.webp)
Nx Workflows are still in the experimental phase. Were running pilots with our enterprise clients and are excited to open this up for everyone soon!
## Task Graphing Improvements
Task Caching in Nx is based on a set of “input” files calculated for a given task. You can specify specific files or patterns of files in your project.json for a particular task or in the `targetDefaults` of your `nx.json` to set the default file sets for your inputs.
There have been some difficulties in determining precisely which files were included and which werent for a given task. This is where our latest update to the task graph comes in:
![](/blog/images/2023-10-20/bodyimg6.webp)
You can open this graph using the command:
```shell
> nx graph
```
And then selecting “Task” from the “Project”/”Task” graph dropdown in the top left. Clicking on a specific task now allows you to see a comprehensive list of all files that were factored in as inputs for this task:
![](/blog/images/2023-10-20/bodyimg7.webp)
## `@nx/linter` Renamed to `@nx/eslint`
After running `nx migrate`, you may have noticed that the `@nx/linter` plugin was removed and replaced with `@nx/eslint`.
In Nx 17, we removed any remaining traces of `tslint` from our linter package, so this is mainly a simple rename to more accurately describe the package (and to remove any confusion that this package is intended to support linting for other languages/platforms).
## New Experimental Feature: Nx Release
`nx release` is a new top level command on the Nx CLI which is designed to help you with versioning, changelog generation, and publishing of your projects:
- `nx release version` - Determine and apply version updates to projects and their dependents
- `nx release changelog` - Generate CHANGELOG.md files and optional Github releases based on git commits
- `nx release publish` - Take the freshly versioned projects and publish them to a remote registry
`nx release` is still experiment and therefore subject to change, but the Nx repo itself is now using these commands to version itself, as well as generate changelogs, [Github releases](https://github.com/nrwl/nx/releases/tag/17.0.3), and publish our packages to npm.
As we solidify this command, we intend to bring robust support for various versioning and publishing strategies, as well as built-in support for publishing packages or modules to a variety of languages, registries, and platforms.
For more [checkout our API docs](/nx-api/nx/documents/release), and be sure to catch James Henrys announcement of this new command at [Nx Conf](/blog/nx-conf-2023-recap):
{% youtube src="https://www.youtube.com/embed/p5qW5-2nKqI?si=FzpGMJwPVINc1hgL" /%}
## Experimental: Nx Project Inference API v2
At Nx, were OBSESSED with building a better, more robust experience for our developers. Towards this end, were now in [v2 of our Project Inference API](/extending-nx/recipes/project-graph-plugins).
This API is a way of extending the Nx project graph, which can be particularly helpful for extending Nx to support other languages, allowing Nx to determine where to find and draw boundaries around projects in your workspace. A great example is our very own [Vue plugin](/getting-started/tutorials/vue-standalone-tutorial).
Interestingly, v2 includes support for dynamic targets as well. This opens up exciting new doors to reducing configuration, and we hope to expand on this to better support our first-party plugins in the near future.
For most developers, the main thing you need to know is that plugins may now add additional targets that you wont see in your `project.json` file. To see your actual project configuration, you can now use the command:
```shell
> nx show project <project_name>
```
For plugin authors, check out the [v2 documentation](/extending-nx/recipes/project-graph-plugins) to see how you can take advantage of the new API to deliver a better experience to your users.
## 20k Github Stars!!
Nx is SOOO CLOSE to 20,000 stars on github! If Nx has been helpful to you, [please help us get there](https://github.com/nrwl/nx)!
![](/blog/images/2023-10-20/bodyimg8.webp)
## How to Update Nx
Nx is known to [help you automatically migrate](/features/automate-updating-dependencies) to the new version (including potentially breaking changes). To update simply run:
```shell
> npx nx migrate latest
```
This will update your Nx workspace dependencies, configuration and code to the latest version. After updating your dependencies, run any necessary migrations:
```shell
> npx nx migrate --run-migrations
```
## Wrapping up
Thats all for now folks! Were just starting up a new iteration of development on Nx, so be sure to subscribe to our [YouTube channel](https://www.youtube.com/@nxdevtools) to get updates when new features land! Until next time, KEEP WORKING HARD!
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+624
View File
@@ -0,0 +1,624 @@
---
title: State Management Nx React Native/Expo Apps with TanStack Query and Redux
slug: 'state-management-nx-react-native-expo-apps-with-tanstack-query-and-redux'
authors: [Emily Xiong]
image: '/blog/images/2023-11-08/featured_img.webp'
tags: [nx, React Native]
---
There are currently countless numbers of state management libraries out there. This blog will show you how to use state management for React Native in Nx monorepo with [TanStack Query](https://tanstack.com/query/latest) (which happens to use [Nx on their repo](https://cloud.nx.app/orgs/6412ca9d1c251d000efa21ba/workspaces/6412c827e6da5d7b4a0b1fe3/overview)) and Redux.
This blog will show:
- How to set up these libraries and their dev tools
- How to build the sample page below in React Native / Expo with state management
- How to do unit testing
It will call an API and show a cat fact on the page, allowing users to like or dislike the data.
![](/blog/images/2023-11-08/bodyimg1.webp)
Github repo: [https://github.com/xiongemi/nx-expo-monorepo](https://github.com/xiongemi/nx-expo-monorepo)
---
## Before We Start
From [TanStack Query documentation](https://tanstack.com/query/latest/docs/framework/react/guides/does-this-replace-client-state), it says:
- [TanStack Query](https://tanstack.com/query/latest/docs/framework/react/overview) is a **server-state** library.
- [Redux](https://redux.js.org/) is a client-state library.
What is the difference between the server state and the client state?
In short:
- Calling an API, dealing with asynchronous data-> server state
- Everything else about UI, dealing with synchronous data -> client state
## Installation
To use **[TanStack Query / React Query](https://tanstack.com/query/latest)** for the server state, I need to install:
- Library: [@tanstack/react-query](https://tanstack.com/query/latest)
- Dev tools: [@tanstack/react-query-devtools](https://tanstack.com/query/latest/docs/framework/react/devtools)
I will use **Redux** for everything else.
- Library: [redux](https://github.com/reduxjs/redux), react-redux, @reduxjs/toolkit
- Dev tools: [@redux-devtools/extension](https://github.com/zalmoxisus/redux-devtools-extension)
- Logger: [redux-logger](https://github.com/LogRocket/redux-logger), [@types/redux-logger](https://www.npmjs.com/package/@types/redux-logger)
- Storage: [redux-persist](https://github.com/rt2zz/redux-persist), [@react-native-async-storage/async-storage](https://github.com/react-native-async-storage/async-storage)
To install all the above packages:
```shell
#npm
npm install @tanstack/react-query @tanstack/react-query-devtools redux react-redux @reduxjs/toolkit @redux-devtools/extension redux-logger @types/redux-logger redux-persist @react-native-async-storage/async-storage --save-dev
#yarn
yarn add @tanstack/react-query @tanstack/react-query-devtools redux react-redux @reduxjs/toolkit @redux-devtools/extension redux-logger @types/redux-logger redux-persist @react-native-async-storage/async-storage --dev
#pnpm
pnpm add @tanstack/react-query @tanstack/react-query-devtools redux react-redux @reduxjs/toolkit @redux-devtools/extension redux-logger @types/redux-logger redux-persist @react-native-async-storage/async-storage --save-dev
```
## Server State with React Query
### Setup Devtools
First, you need to add React Query / TanStack Query in the `App.tsx`:
```tsx
import React from 'react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import { Platform } from 'react-native';
const App = () => {
const queryClient = new QueryClient();
return (
<QueryClientProvider client={queryClient}>
{Platform.OS === 'web' && <ReactQueryDevtools />}
...
</QueryClientProvider>
);
};
export default App;
```
Note: the [React Query Devtools](https://tanstack.com/query/latest/docs/framework/react/devtools) currently do not support react native, and it only works on the web, so there is a condition: `{ Platform.OS === web && <ReactQueryDevtools />}.`
For the react native apps, in order to use this tool, you need to use [react-native-web](https://necolas.github.io/react-native-web/) to interpolate your native app to the web app first.
If you open my Expo app on the web by running `nx start cats` and choose the options `Press w │ open web`, you should be able to use the dev tools and see the state of my react queries:
![](/blog/images/2023-11-08/bodyimg2.webp)
Or you can run npx nx serve cats to launch the app in a web browser and debug from there.
### Create a Query
What is a query?
> “A query is a declarative dependency on an asynchronous source of data that is tied to a unique key. A query can be used with any Promise-based method (including GET and POST methods) to fetch data from a server.” [(https://tanstack.com/query/v4/docs/react/guides/queries)](https://tanstack.com/query/v4/docs/react/guides/queries)
Now lets add our first query. In this example, it will be added under `lib/queries` folder. To create a query to fetch a new fact about cats, run the command:
```shell
# expo workspace
npx nx generate @nx/expo:lib use-cat-fact --directory=queries
# react-native workspace
npx nx generate @nx/react-native:lib use-cat-fact --directory=queries
```
Or use [Nx Console](/recipes/nx-console):
![](/blog/images/2023-11-08/bodyimg3.webp)
Now notice under libs folder, `use-cat-fact` folder got created under `libs/queries`:
![](/blog/images/2023-11-08/bodyimg4.webp)
If you use React Native CLI, just add a folder in your workspace root.
For this app, lets use this API: [https://catfact.ninja/](https://catfact.ninja/). At `libs/queries/use-cat-fact/src/lib/use-cat-fact.ts`, add code to fetch the data from this API:
```ts
import { useQuery } from '@tanstack/react-query';
export const fetchCatFact = async (): Promise<string> => {
const response = await fetch('https://catfact.ninja/fact');
const data = await response.json();
return data.fact;
};
export const useCatFact = () => {
return useQuery({
queryKey: ['cat-fact'],
queryFn: fetchCatFact,
enabled: false,
});
};
```
Essentially, you have created a custom hook that calls useQuery function from the TanStack Query library.
### Unit Testing
If you render this hook directly and run the unit test with the command `npx nx test queries-use-cat-fact`, this error will show up in the console:
```shell
Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
```
To solve this, you need to wrap your component inside the renderHook function from `@testing-library/react-native` library:
1. **Install Library to Mock Fetch**
Depending on which library you use to make HTTP requests. (e.g. fetch, axios), you need to install a library to mock the response.
- If you use `fetch` to fetch data, you need to install `jest*fetch-mock`.
- If you use `axios` to fetch data, you need to install `axio*-mock-adapter`.
For this example, since it uses `fetch`, you need to install `jest-fetch-mock`:
```shell
#npm
npm install jest-fetch-mock --save-dev
#yarn
yard add jest-fetch-mock --dev
```
You also need to mock `fetch` library in `libs/queries/use-cat-fact/test-setup.ts`:
```ts
import fetchMock from 'jest-fetch-mock';
fetchMock.enableMocks();
```
2. **Create Mock Query Provider**
In order to test out `useQuery` hook, you need to wrap it inside a mock `QueryClientProvider`. Since this mock query provider is going to be used more than once, lets create a library for this wrapper:
```shell
# expo library
npx nx generate @nx/expo:library test-wrapper --directory=queries
# react native library
npx nx generate @nx/react-native:library test-wrapper --directory=queries
```
Then a component inside this library:
```shell
# expo library
npx nx generate @nx/expo:component test-wrapper --project=queries-test-wrapper
# react native library
npx nx generate @nx/react-native:component test-wrapper --project=queries-test-wrapper
```
Add the mock `QueryClientProvider` in `libs/queries/test-wrapper/src/lib/test-wrapper/test-wrapper.tsx`:
```tsx
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import React from 'react';
export interface TestWrapperProps {
children: React.ReactNode;
}
export function TestWrapper({ children }: TestWrapperProps) {
const queryClient = new QueryClient();
return (
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
);
}
export default TestWrapper;
```
3. **Use Mock Responses in Unit Test**
Then this is what the unit test for my query would look like:
```tsx
import { TestWrapper } from '@nx-expo-monorepo/queries/test-wrapper';
import { renderHook, waitFor } from '@testing-library/react-native';
import { useCatFact } from './use-cat-fact';
import fetchMock from 'jest-fetch-mock';
describe('useCatFact', () => {
afterEach(() => {
jest.resetAllMocks();
});
it('status should be success', async () => {
// simulating a server response
fetchMock.mockResponseOnce(
JSON.stringify({
fact: 'random cat fact',
})
);
const { result } = renderHook(() => useCatFact(), {
wrapper: TestWrapper,
});
result.current.refetch(); // refetching the query
expect(result.current.isLoading).toBeTruthy();
await waitFor(() => expect(result.current.isLoading).toBe(false));
expect(result.current.isSuccess).toBe(true);
expect(result.current.data).toEqual('random cat fact');
});
it('status should be error', async () => {
fetchMock.mockRejectOnce();
const { result } = renderHook(() => useCatFact(), {
wrapper: TestWrapper,
});
result.current.refetch(); // refetching the query
expect(result.current.isLoading).toBeTruthy();
await waitFor(() => expect(result.current.isLoading).toBe(false));
expect(result.current.isError).toBe(true);
});
});
```
If you use `axios`, your unit test would look like this:
```tsx
// If you use axios, your unit test would look like this:
import { TestWrapper } from '@nx-expo-monorepo/queries/test-wrapper';
import { renderHook, waitFor } from '@testing-library/react-native';
import { useCatFact } from './use-cat-fact';
import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
// This sets the mock adapter on the default instance
const mockAxios = new MockAdapter(axios);
describe('useCatFact', () => {
afterEach(() => {
mockAxios.reset();
});
it('status should be success', async () => {
// simulating a server response
mockAxios.onGet().replyOnce(200, {
fact: 'random cat fact',
});
const { result } = renderHook(() => useCatFact(), {
wrapper: TestWrapper,
});
result.current.refetch(); // refetching the query
expect(result.current.isLoading).toBeTruthy();
await waitFor(() => expect(result.current.isLoading).toBe(false));
expect(result.current.isSuccess).toBe(true);
expect(result.current.data).toEqual('random cat fact');
});
it('status should be error', async () => {
mockAxios.onGet().replyOnce(500);
const { result } = renderHook(() => useCatFact(), {
wrapper: TestWrapper,
});
result.current.refetch(); // refetching the query
expect(result.current.isLoading).toBeTruthy();
await waitFor(() => expect(result.current.isLoading).toBe(false));
expect(result.current.isError).toBe(true);
});
});
```
Notice that this file imports `TestWrapper` from `@nx-expo-monorepo/queries/test-wrapper`, and it is added to `renderHook` function with `{ wrapper: TestWrapper }`.
Now you run the test command `nx test queries-use-cat-fact`, it should pass:
```shell
PASS queries-use-cat-fact libs/queries/use-cat-fact/src/lib/use-cat-fact.spec.ts (5.158 s)
useCatFact
✓ status should be success (44 ms)
✓ status should be error (96 ms)
```
### Integrate with Component
Currently `userQuery` returns the following properties:
- `isLoading` or `status === 'loading'` - The query has no data yet
- `isError` or `status === 'error'` - The query encountered an error
- `isSuccess` or `status === 'success'` - The query was successful and data is available
Now with components controlled by the server state, you can leverage the above properties and change your component to follow the below pattern:
```ts
export interface CarouselProps {
isError: boolean;
isLoading: boolean;
isSuccess: boolean;
}
export function Carousel({
isSuccess,
isError,
isLoading,
}: CarouselProps) {
return (
<>
{isSuccess && (
...
)}
{isLoading && (
...
)}
{isError && (
...
)}
</>
);
}
export default Carousel;
```
Then in the parent component, you can use the query created above:
```tsx
import { useCatFact } from '@nx-expo-monorepo/queries/use-cat-fact';
import { Carousel } from '@nx-expo-monorepo/ui';
import React from 'react';
export function Facts() {
const { data, isLoading, isSuccess, isError, refetch, isFetching } =
useCatFact();
return (
<Carousel
content={data}
isLoading={isLoading || isFetching}
isSuccess={isSuccess}
isError={isError}
onReload={refetch}
>
...
);
}
```
If you serve the app on the web and open the [React Query Devtools](https://tanstack.com/query/v4/docs/framework/react/devtools), you should be able to see the query I created `cat-fact` and data in the query.
![](/blog/images/2023-11-08/bodyimg5.webp)
---
## Redux
### Create a Library
First, you need to create a library for redux:
```shell
# expo library
npx nx generate @nx/expo:lib cat --directory=states
# react native library
npx nx generate @nx/react-native:lib cat --directory=states
```
This should create a folder under libs:
![](/blog/images/2023-11-08/bodyimg6.webp)
### Create a State
For this app, it is going to track when users click the like button, so you need to create a state called `likes`.
![](/blog/images/2023-11-08/bodyimg7.webp)
You can use the [Nx Console](/recipes/nx-console) to create a redux slice:
![](/blog/images/2023-11-08/bodyimg8.webp)
Or run this command:
```shell
npx nx generate @nx/react:redux likes --project=states-cat --directory=likes
```
Then update the redux slice at `libs/states/cat/src/lib/likes/likes.slice.ts`:
```ts
import {
createEntityAdapter,
createSelector,
createSlice,
EntityState,
} from '@reduxjs/toolkit';
export const LIKES_FEATURE_KEY = 'likes';
export interface LikesEntity {
id: string;
content: string;
dateAdded: number;
}
export type LikesState = EntityState<LikesEntity>;
export const likesAdapter = createEntityAdapter<LikesEntity>();
export const initialLikesState: LikesState = likesAdapter.getInitialState();
export const likesSlice = createSlice({
name: LIKES_FEATURE_KEY,
initialState: initialLikesState,
reducers: {
like: likesAdapter.addOne,
remove: likesAdapter.removeOne,
clear: likesAdapter.removeAll,
},
});
/*
* Export reducer for store configuration.
*/
export const likesReducer = likesSlice.reducer;
export const likesActions = likesSlice.actions;
const { selectAll } = likesAdapter.getSelectors();
const getlikesState = <ROOT extends { likes: LikesState }>(
rootState: ROOT
): LikesState => rootState[LIKES_FEATURE_KEY];
const selectAllLikes = createSelector(getlikesState, selectAll);
export const likesSelectors = {
selectAllLikes,
};
```
Every time the “like” button gets clicked, you want to store the content of what users liked. So you need to create an entity to store this information.
```ts
export interface LikesEntity {
id: string;
content: string;
dateAdded: number;
}
```
This state has 3 actions:
- like: when users click like
- remove: when users cancel the like
- clear: when users clear all the likes
### Root Store
Then you have to add the root store and create a transform function to stringify the redux state:
```html
<script src="https://gist.github.com/xiongemi/5f364d84f89b647dcaaf7e5437ea789c.js"></script>
```
### Connect Redux State with UI
Then in `apps/cats/src/app/App.tsx`, you have to:
- wrap the app inside the `StoreProvider` with the root store to connect with the Redux state.
- wrap the app inside `PersistGate` to persist the redux state in the storage
```tsx
import React from 'react';
import AsyncStorage from '@react-native-async-storage/async-storage';
import { PersistGate } from 'redux-persist/integration/react';
import {
createRootStore,
transformEntityStateToPersist,
} from '@nx-expo-monorepo/states/cat';
import { Loading } from '@nx-expo-monorepo/ui';
import { Provider as StoreProvider } from 'react-redux';
const App = () => {
const persistConfig = {
key: 'root',
storage: AsyncStorage,
transforms: [transformEntityStateToPersist],
};
const { store, persistor } = createRootStore(persistConfig);
return (
<PersistGate loading={<Loading />} persistor={persistor}>
<StoreProvider store={store}>...</StoreProvider>
</PersistGate>
);
};
export default App;
```
In your component where the like button is located, you need to dispatch the like action. I created a file at `apps/cats/src/app/facts/facts.props.ts`:
```ts
import {
likesActions,
LikesEntity,
RootState,
} from '@nx-expo-monorepo/states/cat';
import { AnyAction, ThunkDispatch } from '@reduxjs/toolkit';
const mapDispatchToProps = (
dispatch: ThunkDispatch<RootState, void, AnyAction>
) => {
return {
like(item: LikesEntity) {
dispatch(likesActions.like(item));
},
};
};
type mapDispatchToPropsType = ReturnType<typeof mapDispatchToProps>;
type FactsProps = mapDispatchToPropsType;
export { mapDispatchToProps };
export type { FactsProps };
```
Now you have passed the `like` function to the props of the facts component. Now inside the facts component, you can call the like function from props to dispatch the like action.
### Debugging
To debug redux with Expo, I can simply open the Debugger Menu by entering “d” in the console or in the app, then choose the option “Open JS Debugger”.
![](/blog/images/2023-11-08/bodyimg9.webp)
Then you can view my redux logs in the JS Debugger console:
![](/blog/images/2023-11-08/bodyimg10.webp)
Or you can run `npx nx serve cats` to launch the app in web view. Then you can use Redux Devtools and debug the native app like a web app:
![](/blog/images/2023-11-08/bodyimg11.webp)
---
## Summary
Here is a simple app that uses TanStack Query and Redux for state management. These 2 tools are pretty powerful and they manage both server and client state for you, which is easy to scale, test, and debug.
Nx is a powerful monorepo tool. Together with Nx and these 2 state management tools, it will be very easy to scale up any app.
- TanStack Query site: [https://tanstack.com/query/latest](https://tanstack.com/query/latest)
- Official @nx/expo plugin: [/nx-api/expo](/nx-api/expo)
- Official @nx/react-native plugin: [/nx-api/react-native](/nx-api/react-native)
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+315
View File
@@ -0,0 +1,315 @@
---
title: Nx Docs AI Assistant
slug: 'nx-docs-ai-assistant'
authors: [Katerina Skroumpelou]
cover_image: '/blog/images/2023-11-21/featured_img.webp'
tags: [nx, docs, AI]
---
## Introduction
The [Nx Docs AI Assistant](/ai-chat) is a tool designed to provide users with answers straight from the Nx documentation. In this article I will explain how it is built, and how we ensure accuracy and relevance.
In the end of this document I have added a [“glossary”](#glossary) of terms that are used throughout this document.
## Why have an AI assistant for documentation?
First of all, lets answer this simple question: why do you need an AI assistant for a documentation site in the first place? Using an AI assistant for documentation search and retrieval can offer a number of benefits for both users and authors. For users, the challenges of navigating through a large volume and density of documentation are alleviated. Unlike static keyword matching, AI enables more personalized and contextual search, allowing for more complex or sophisticated queries beyond simple keywords. This creates a dynamic feedback loop where users can ask follow-up questions, mix and combine documents, and ultimately enjoy an enhanced user experience that goes beyond basic documentation retrieval.
For authors, a docs AI assistant provides valuable insights into user behavior. It can identify the questions users are frequently asking, pointing to areas where more documentation may be needed. Additionally, if the AI consistently provides unsatisfactory or incorrect responses to certain queries, it could highlight unclear or lacking portions of the documentation. This not only allows for targeted improvements but also makes more parts of the documentation easily accessible to users through intelligent linking. Overall, it can enrich user interaction and help with future content strategy.
## The Nx Docs AI Assistant Workflow
### Overview
In a nutshell, the Nx Docs AI Assistant works in the following way:
1. Split our docs into smaller chunks
2. Create an [embedding](#embeddings) for each chunk
3. Save all these embeddings in [Postgres using pgvector (Supabase!)](https://supabase.com/docs/guides/database/extensions/pgvector)
4. Get question from the user
5. Create embedding for users question
6. Perform a vector similarity search on your database — bring back all the chunks of your documentation that are similar to the users question
7. Use the [GPT chat completion](https://platform.openai.com/docs/guides/text-generation/chat-completions-api) function. Pass a prompt, the users question and the retrieved chunks from the docs. GPT will then try to extract the relevant facts from these chunks, in order to formulate a coherent answer.
This is based on the Web Q&A Tutorial from OpenAI [(https://platform.openai.com/docs/tutorials/web-qa-embeddings)](https://platform.openai.com/docs/tutorials/web-qa-embeddings) and Supabases Vector Search example [(https://supabase.com/docs/guides/ai/examples/nextjs-vector-search)](https://supabase.com/docs/guides/ai/examples/nextjs-vector-search).
Its important to note here that we are not “training the model on our docs”. The model is pretrained. We are just giving the model parts of our docs which are relevant to the users question, and the model creates a coherent answer to the question. Its basically like pasting in ChatGPT a docs page and asking it “how do I do that?”. Except in this case, were first searching our documentation and giving GPT only the relevant parts (more about how we do that later in this article), which it can “read” and extract information from.
## Step 1: Preprocessing our docs
Every few days, we run an [automated script that will generate embeddings](https://github.com/nrwl/nx/blob/76306f0bedc1297b64da6e58b4f7b9c39711cd82/.github/workflows/generate-embeddings.yml) (numeric/vector representations of words and phrases) for our documentation, and store these embeddings in Supabase. As mentioned above, this step has 3 parts:
### Split our docs into smaller chunks
Most of this code follows the example from [Supabases Clippy](https://github.com/supabase-community/nextjs-openai-doc-search). It breaks the markdown tree into chunks, it keeps the heading and it also creates a checksum, to keep track of changes.
Ref in the code: [https://github.com/nrwl/nx/blob/0197444df5ea906f38f06913b2bc366e04b0acc2/tools/documentation/create-embeddings/src/main.mts#L66](https://github.com/nrwl/nx/blob/0197444df5ea906f38f06913b2bc366e04b0acc2/tools/documentation/create-embeddings/src/main.mts#L66)
This part is copied from: [https://github.com/supabase-community/nextjs-openai-doc-search/blob/main/lib/generate-embeddings.ts](https://github.com/supabase-community/nextjs-openai-doc-search/blob/main/lib/generate-embeddings.ts)
```js
export function processMdxForSearch(content: string) {
// …
const mdTree = fromMarkdown(content, {});
const sectionTrees = splitTreeBy(mdTree, (node) => node.type === 'heading');
// …
const sections = sectionTrees.map((tree: any) => {
const [firstNode] = tree.children;
const heading =
firstNode.type === 'heading' ? toString(firstNode) : undefined;
return {
content: toMarkdown(tree),
heading,
slug,
};
});
return {
checksum,
sections,
};
}
```
### Create an embedding for each chunk
Using `openai.embeddings.create` function with the model “text-embedding-ada-002” we are creating an embedding for each chunk.
Ref in the code: [https://github.com/nrwl/nx/blob/76306f0bedc1297b64da6e58b4f7b9c39711cd82/tools/documentation/create-embeddings/src/main.mts#L314](https://github.com/nrwl/nx/blob/76306f0bedc1297b64da6e58b4f7b9c39711cd82/tools/documentation/create-embeddings/src/main.mts#L314)
```js
const embeddingResponse = await openai.embeddings.create({
model: 'text-embedding-ada-002',
input,
});
```
### Save all these embeddings in Postgres using pgvector, on Supabase.
Store this embedding in Supabase, in a database that has already been created, following the steps mentioned here:
[https://supabase.com/docs/guides/ai/examples/nextjs-vector-search?database-method=dashboard#prepare-the-database](https://supabase.com/docs/guides/ai/examples/nextjs-vector-search?database-method=dashboard#prepare-the-database)
Essentially, we are setting up two PostgreSQL tables on Supabase. Then, we are inserting the embeddings into these tables.
Ref in code: [https://github.com/nrwl/nx/blob/master/tools/documentation/create-embeddings/src/main.mts#L327](https://github.com/nrwl/nx/blob/master/tools/documentation/create-embeddings/src/main.mts#L327)
```js
const { data: pageSection } = await supabaseClient
.from('nods_page_section')
.insert({
page_id: page.id,
slug,
heading,
longer_heading,
content,
url_partial,
token_count,
embedding,
}); // …
```
## Step 2: User query analysis and search
When a user poses a question to the assistant, we calculate the embedding for the users question. The way we do that is, again, using openai.embeddings.create function with the model text-embedding-ada-002.
Ref in code: [https://github.com/nrwl/nx/blob/76306f0bedc1297b64da6e58b4f7b9c39711cd82/nx-dev/nx-dev/pages/api/query-ai-handler.ts#L58](https://github.com/nrwl/nx/blob/76306f0bedc1297b64da6e58b4f7b9c39711cd82/nx-dev/nx-dev/pages/api/query-ai-handler.ts#L58)
```js
const embeddingResponse: OpenAI.Embeddings.CreateEmbeddingResponse =
await openai.embeddings.create({
model: 'text-embedding-ada-002',
input: sanitizedQuery + getLastAssistantMessageContent(messages),
});
```
The assistant compares the query embedding with these documentation embeddings to identify relevant sections. This comparison is essentially measuring how close the querys vector is to the documentation vectors. The closer they are, the more related the content. The way this works is that it sends the users question embedding to Supabase, to a PostgreSQL function, which runs a vector comparison between the users question embedding and the stored embeddings in the table. The PostgreSQL function returns all the similar documentation chunks.
The function that is used uses the dot product between vectors to calculate similarity. For normalized vectors, the dot product is equivalent to cosine similarity. Specifically, when two vectors A and B are normalized (i.e., their magnitudes are each 1), the cosine similarity between them is the same as their dot product. The OpenAI embeddings are normalized to length 1, so cosine similarity and dot product will produce the same results.
Ref in code: [https://github.com/nrwl/nx/blob/76306f0bedc1297b64da6e58b4f7b9c39711cd82/nx-dev/nx-dev/pages/api/query-ai-handler.ts#L70](https://github.com/nrwl/nx/blob/76306f0bedc1297b64da6e58b4f7b9c39711cd82/nx-dev/nx-dev/pages/api/query-ai-handler.ts#L70)
```js
const { data: pageSections } = await supabaseClient.rpc('match_page_sections', {
embedding,
// …
});
```
## Step 3: Generating a Response
With the relevant sections (documentation chunks) identified and retrieved, GPT (the generative AI) steps in. Using the relevant sections as context and following a systematic approach, GPT crafts a response.
This approach the AI is instructed to use (in the **prompt**) is the following:
- Identify CLUES from the query and documentation.
- Deduce REASONING based solely on the provided Nx Documentation.
- EVALUATE its reasoning, ensuring alignment with Nx Documentation.
- Rely on previous messages for contextual continuity.
### Ensuring Quality
If theres no matching section in the documentation for a query, the script throws a “no_results” error. So, after the initial search in the docs (PostgreSQL function), if the search returns no results (no vectors found that are similar enough to the users question vector), the process stops, and our Assistant replies that it does not know the answer.
### The use of useChat function
Its necessary here to clarify that we use the useChat [(https://sdk.vercel.ai/docs/api-reference/use-chat)](https://sdk.vercel.ai/docs/api-reference/use-chat) function of the [Vercel AI SDK](https://sdk.vercel.ai/docs/introduction). This function, as mentioned in the docs, does the following:
> It enables the streaming of chat messages from your AI provider, manages the state for chat input, and updates the UI automatically as new messages are received.
It essentially takes care of the following things:
1. You dont have to worry about manually creating a “messages” array to store your “conversation” (messages you exchange) with the GPT endpoint
2. You dont have to manually implement the streaming functionality in your UI
Then, in your React component, you can call this function directly, and get the messages object from it, to render your messages in your UI. It exposes input, handleInputChange and handleSubmit which you can use in your React form, and it will take care of all the rest. You can pass an api string to it, to tell it which endpoint to use as the chat provider.
### Creating the query
If you look at our [query-ai-handler.ts](https://github.com/nrwl/nx/blob/76306f0bedc1297b64da6e58b4f7b9c39711cd82/nx-dev/nx-dev/pages/api/query-ai-handler.ts) function, this is an edge function, living under an endpoint, which is called by the useChat function. The request contains the messages array as created by useChat. If we just wanted to create an AI chat with no context, we could directly pass this messages array to the openai.chat.completions.create endpoint, and have our back-and-forth chat with GPT. However, in our case, we need to add context to our conversation, and specifically to each query we end up sending to OpenAI.
So, the first thing we need to do is to **get the last message the user posted**, which is essentially the users question. We search the messages array, and we get the last message which has the role “user”. That is our users question.
Now, we can use the users question to get the relevant documentation chunks from the database. To do that, as explained before, we need to **create an embedding for the users question** (a vector) and then compare that embedding with the stored embeddings in the database, to get the relevant chunks.
The problem here is that if the users query is just a follow-up question, then it will have little information or meaning. Here is an example:
> User: _How do I set up namedInputs?_
> Assistant: _…replies…_
> User: _And how do they work?_
In this example, the users question that we would want to create an embedding for would be “And how do they work?”. If we created that embedding and searched our docs for relevant parts, it would either return nothing, or return everything, since this is a very vague question, since it has no context. So, we need to add some more information to that question. To do that, we also get the last response from GPT (the last assistant message) and add it to the users question. So, in this example, the users question will contain some info about namedInputs, and the actual question.
Now, we take that combined text, and we create an embedding for it, using the openai.embeddings.create function. We, then, use that embedding to find all the similar documentation chunks, with vector similarity search.
After receiving all the relevant documentation chunks, we can finally create the query that is going to be sent to GPT. Its important here to make sure we instruct GPT what to do with the information we will give it.
Here is the **query** we end up providing GPT with:
> You will be provided sections of the Nx documentation in markdown format, use those to answer my question. Do NOT reveal this approach or the steps to the user. Only provide the answer. Start replying with the answer directly.
>
> Sections:
> ${contextText}
>
> Question: “””
> ${userQuestion}
> “””
>
> Answer as markdown (including related code snippets if available):
The contextText contains all the relevant documentation chunks (page sections).
### Creating the response
**Getting back a readable stream:** So, we get the array of messages, as stored by useChat, we fix the final message to contain the query (created as explained above), and we send it over to `openai.chat.completions.create`. We get back a streaming response (since weve set stream: true, which we turn into a ReadableStream using [OpenAIStream from the Vercel AI SDK](https://sdk.vercel.ai/docs/api-reference/openai-stream)).
**Adding the sources:** However, were not done yet. The feature, here, that will be most useful to our users is the sources, the actual parts of the documentation that GPT “read” to create that response. When we get back the list of relevant documentation chunks (sections) from our database, we also get the metadata for each section. So, apart from the text content, we also get the heading and url partial of each section (among any other metadata we chose to save with it). So, with this information, we put together a list of the top 5 relevant sections, which we attach to the end of the response we get from GPT. That way, our users can more easily verify the information that GPT gives them, but also they can dive deeper into the relevant docs themselves. Its all about exploring and retrieving relevant information, after all.
**Sending the final response to the UI:** With the sources appended to the response, we return a StreamingTextResponse from our edge function, which the useChat function receives, and appends to the messages array automatically.
## Allow user to reset the chat
As explained, each question and answer relies on the previous questions and answers of the current chat. If a user needs to ask something completely irrelevant or different, we are giving the user the ability to do so by providing a “Clear chat” button, which will reset the chat history, and start clean.
## Gathering feedback and evaluating the results
Its very important to gather feedback from the users and evaluate the results. Any AI assistant is going to give wrong answers, because it does not have the ability to critically evaluate the responses it creates. It relies on things it has read, but not in the way a human relies on them. It generates the next most probable word (see glossary for generative AI below). For that reason, its important to do the following things:
1. Inform users that they should always double-check the answers and do not rely 100% on the AI responses
2. Provide users with feedback buttons and/or a feedback form, where they can evaluate whether a response was good or bad. At Nx we do that, and we also associate each button click with the question the user asked, which will give us an idea around which questions the AI gets right or wrong.
3. Have a list of questions that you ask the AI assistant, and evaluate its responses internally. Use these questions as a standard for any changes made in the assistant.
## Wrapping up
In this guide, weve explored the intricacies of the Nx Docs AI Assistant, an innovative tool that enhances the experience of both users and authors of Nx documentation. From understanding the need for an AI assistant in navigating complex documentation to the detailed workflow of the Nx Docs AI Assistant, we have covered the journey from preprocessing documentation to generating coherent and context-aware responses.
Lets see at some key takeaways:
**Enhanced User Experience:** The AI assistant significantly improves user interaction with documentation by offering personalized, context-aware responses to queries. This not only makes information retrieval more efficient but also elevates the overall user experience.
**Insights for Authors:** By analyzing frequently asked questions and areas where the AI struggles, authors can pinpoint documentation gaps and areas for improvement, ensuring that the Nx documentation is as clear and comprehensive as possible.
**OpenAI API utilization:** The use of embeddings, vector similarity search, and GPTs generative AI capabilities demonstrate a sophisticated approach to AI-driven documentation assistance. This blend of technologies ensures that users receive accurate and relevant responses.
**Continuous Learning and Improvement:** The systems design includes mechanisms for gathering user feedback and evaluating AI responses, which are crucial for ongoing refinement and enhancement of the assistants capabilities.
**Transparency and User Trust:** By openly communicating the limitations of the AI and encouraging users to verify the information, the system fosters trust and promotes responsible use of AI technology.
**Accessibility and Efficiency:** The AI assistant makes Nx documentation more accessible and navigable, especially for complex or nuanced queries, thereby saving time and enhancing productivity and developer experience.
## Future steps
OpenAI released the Assistants API, which takes the burden of chunking the docs, creating embeddings, storing the docs in a vector database, and querying that database off the shoulders of the developers. This new API offers all these features out of the box, removing the need to create a customized solution, as the one explained above. Its still in beta, and it remains to be seen how its going to evolve, and if its going to overcome some burdens it poses at the moment. You can [read more about the new Assistants API in this blog post](https://pakotinia.medium.com/openais-assistants-api-a-hands-on-demo-110a861cf2d0), which contains a detailed demo on how to use it for documentation q&a.
## Glossary
### Core concepts
I find it useful to start by explaining what some terms — which are going to be used quite a lot throughout this blog post — mean.
### Embeddings
#### What they are
In the context of machine learning, embeddings are a type of representation for text data. Instead of treating words as mere strings of characters, embeddings transform them into **vectors** (lists of numbers) in a way that captures their meanings. In embeddings, vectors are like digital fingerprints for words or phrases, converting their essence into a series of numbers that can be easily analyzed and compared.
#### Why they matter
With embeddings, words or phrases with similar meanings end up having **vectors** that are close to each other, making it easier to compare and identify related content.
### Generative AI
#### What it is
Generative AI, the technology driving the Nx Docs AI Assistant, is a subset of AI thats trained, not just to classify input data, but to generate new content.
#### How it works
Generative AI operates like a sophisticated software compiler. Just as a compiler takes in high-level code and translates it into machine instructions, generative AI takes in textual prompts and processes them through layers of neural network operations, resulting in detailed and coherent text outputs. Its like providing a programmer with a high-level task description, and they write the necessary code to achieve it, except here the programmer is the AI, and the code is the generated text response.
#### What Does “Generation” Mean in AI Context?
In AI, especially with natural language processing models, “generation” refers to the process of producing sequences of data, in our case, text. Its about creating content that wasnt explicitly in the training data but follows the same patterns and structures.
#### How Does GPT Predict the Next Word?
For our Nx Docs AI assistant we use GPT. GPT, which stands for “Generative Pre-trained Transformer”, works using a predictive mechanism. At its core, its trained to predict the next word in a sentence. When you provide GPT with a prompt, it uses that as a starting point and keeps predicting the next word until it completes the response or reaches a set limit.
Its like reading a sentence and trying to guess the next word based on what youve read so far. GPT does this but by using a massive amount of textual data it has seen during training, enabling it to make highly informed predictions.
### Context and Prompting — their role in AI models
#### Context
In the context of AI, “context” refers to the surrounding information, data, or conditions that provide a framework or background for understanding and interpreting a specific input, ensuring that the AIs responses or actions are relevant, coherent, and meaningful in a given situation
#### Prompts
The prompt acts as an initial “seed” that guides the AIs output. While the AI is trained on vast amounts of text, it relies on the prompt for context. For example, a prompt like “tell me about cats” might result in a broad answer, but “summarize the history of domesticated cats” narrows the models focus.
By refining prompts, users can better direct the AIs response, ensuring the output matches their intent. In essence, the prompt is a tool to direct the AIs vast capabilities to a desired outcome.
### The GPT Chat Completion Roles
### System
The “System” role typically sets the “persona” or the “character” of the AI. It gives high-level instructions on how the model should behave during the conversation. We start the instructions with “You are a knowledgeable Nx representative.” We also instruct the model about the format of its answer: “Your answer should be in the form of a Markdown article”. You can read the full instructions on GitHub.
#### User
The “User” role is straightforward. This is the input from the end-user, which the AI responds to. The users query becomes the User role message. This role guides what the AI should be talking about in its response. Its a direct prompt to the AI to generate a specific answer. In our case, we take the users query, and we add it in a longer prompt, which specific steps the model must follow (as explained above). That way, the model focuses on the specific steps weve laid out, making it the immediate context for generating the answer. This is one more step towards more accurate answers based on our documentation only. Inside the prompt, which has the instructions, and the users query, we always add the context text as well, which are the relevant parts that are retrieved from the Nx Documentation.
#### Assistant
This role, in the context of OpenAIs chat models, is the response of the AI. Previous Assistant responses can be included in the chat history to provide context, especially if a conversation has back-and-forth elements. This helps the model generate coherent and contextually relevant responses in a multi-turn conversation.
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+336
View File
@@ -0,0 +1,336 @@
---
title: Unit Testing Expo Apps With Jest
slug: 'unit-testing-expo-apps-with-jest'
authors: [Emily Xiong]
cover_image: '/blog/images/2023-11-22/featured_img.webp'
tags: [nx, unit testing]
---
In my latest [blog](https://dev.to/nx/step-by-step-guide-to-creating-an-expo-monorepo-with-nx-3b17), I successfully navigated through the steps of setting up an Expo Monorepo with [Nx](). The next challenge? Testing! This blog dives into:
- Crafting effective unit tests for Expo components utilizing Jest
- Addressing common issues encountered during unit testing
Repo:
{% github-repository url="https://github.com/xiongemi/nx-expo-monorepo" /%}
## Stacks
Heres my setup
- Testing framework: [jest](https://jestjs.io/)
- Testing library: [@testing-library/react-native](https://callstack.github.io/react-native-testing-library/)
- Jest Preset: [jest-expo](https://www.npmjs.com/package/jest-expo)
## Writing and Running Unit Tests
When you use Nx, it not only configures and sets up Jest, but also creates a default unit test for every expo component that is being generated. Heres what that looks like:
```typescript
import { render } from '@testing-library/react-native';
import React from 'react';
import Loading from './loading';
describe('Loading', () => {
it('should render successfully', () => {
const { root } = render(<Loading />);
expect(root).toBeTruthy();
});
});
```
To run all unit tests for a given project, use:
```shell
npx nx test <project-name>
```
Heres the output of running this for my example app:
![terminal output](/blog/images/2023-11-22/bodyimg1.webp)
When it comes to writing tests, the [React Native Testing Library](https://callstack.github.io/react-native-testing-library/docs/api-queries) is a game-changer for writing cleaner unit tests in React Native applications. Its intuitive query API simplifies the process of selecting elements within your components, making it straightforward to write more maintainable and readable tests. You mark elements with a `testID`
```html
<Headline testID="title">{film.title}</Headline>
```
Then in the test file, you can use the function `getByTestId` to query `testID`:
```typescript
const { getByTestId } = render(<your component>);
expect(getByTestId('title')).toHaveTextContent(...);
```
You can find more options for querying elements on the official React Native Testing Library docs: [https://callstack.github.io/react-native-testing-library/docs/api-queries](https://callstack.github.io/react-native-testing-library/docs/api-queries).
## Troubleshooting Common Issues When Writing Tests
However, unit tests do not always pass. Here are some common errors I ran into and how to resolve them.
### **Error: AsyncStorage is null.**
I am using the library `@react-native-async-storage/async-storage`, and I got the below error when running unit testing:
```shell
\[@RNC/AsyncStorage\]: NativeModule: AsyncStorage is null.
To fix this issue try these steps:
• Rebuild and restart the app.
• Run the packager with \`--reset-cache\` flag.
• If you are using CocoaPods on iOS, run \`pod install\` in the \`ios\` directory and then rebuild and re-run the app.
• If this happens while testing with Jest, check out docs how to integrate AsyncStorage with it: https://react-native-async-storage.github.io/async-storage/docs/advanced/jest
If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-async-storage/async-storage/issues
5 | import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
6 | import { Platform } from 'react-native';
> 7 | import AsyncStorage from '@react-native-async-storage/async-storage';
```
The issue is that `@react-native-async-storage/async-storage` library can only be used in `NativeModule`. Since unit testing with Jest only tests JS/TS file logic, I need to mock this library.
In the apps test-setup.ts file, add the below lines:
```typescript
jest.mock('@react-native-async-storage/async-storage', () =>
require('@react-native-async-storage/async-storage/jest/async-storage-mock')
);
```
## Error: Could not find “store”
I am using Redux for state management, and I got this error for my stateful components:
```
Could not find "store" in the context of "Connect(Bookmarks)". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to Connect(Bookmarks) in connect options.
```
To fix this, the simple way is to mock a redux store. I need to install [redux-mock-store](https://github.com/reduxjs/redux-mock-store) and its typing:
{% tabs %}
{% tab label="npm" %}
```shell
npm install redux-mock-store @types/redux-mock-store --save-dev
```
{% /tab %}
{% tab label="yarn" %}
```shell
yarn add redux-mock-store @types/redux-mock-store --dev
```
{% /tab %}
{% /tabs %}
Then I can create a mock store using this library like the below code:
```typescript
import configureStore, { MockStoreEnhanced } from 'redux-mock-store';
const mockStore = configureStore<any>(\[\]);
let store: MockStoreEnhanced<any>;
beforeEach(() => {
store = mockStore({});
store.dispatch = jest.fn();
});
```
For example, one of my stateful components unit test will become:
```typescript
import React from 'react';
import { render } from '@testing-library/react-native';
import { Provider } from 'react-redux';
import configureStore, { MockStoreEnhanced } from 'redux-mock-store';
import { RootState, initialRootState } from '@nx-expo-monorepo/states/cat';
import Bookmarks from './bookmarks';
describe('Bookmarks', () => {
const mockStore = configureStore<RootState>(\[\]);
let store: MockStoreEnhanced<RootState>;
beforeEach(() => {
store = mockStore(initialRootState);
store.dispatch = jest.fn();
});
it('should render successfully', () => {
const { container } = render(
<Provider store={store}>
<Bookmarks />
</Provider>
);
expect(container).toBeTruthy();
});
});
```
The above code will apply the initial redux state to my components.
### Error: No QueryClient set
Because I use [TanStack Query](https://tanstack.com/query/latest) , when I run unit tests, I have this error:
```
No QueryClient set, use QueryClientProvider to set one
```
This error occurred because I used `useQuery` from `@tanstack/react-query` in my component; however, in this unit test, the context of this hook is not provided.
To solve this, I can just mock the `useQuery` function:
```typescript
import * as ReactQuery from '@tanstack/react-query';
jest.spyOn(ReactQuery, 'useQuery').mockImplementation(
jest.fn().mockReturnValue({
data: 'random cat fact',
isLoading: false,
isSuccess: true,
refetch: jest.fn(),
isFetching: false,
isError: false,
})
);
```
### Error: Couldnt find a navigation object
If you use `@react-navigation` library for navigation, and inside your component, there are hooks from this library like `useNavigation` and `useRoute`, you are likely to get this error:
```
Couldn't find a navigation object. Is your component inside NavigationContainer?
```
The fix this, I need to mock the `@react-nativgation/native` library. In the apps test-setup.ts file, I need to add:
```typescript
jest.mock('@react-navigation/native', () => {
return {
useNavigation: () => ({
navigate: jest.fn(),
dispatch: jest.fn(),
setOptions: jest.fn(),
}),
useRoute: () => ({
params: {
id: '123',
},
}),
};
});
```
### SyntaxError: Unexpected token export
I got this error when using a library with ECMAScript Module (ESM), such as `[udid](https://github.com/uuidjs/uuid)`:
```
/Users/emilyxiong/Code/nx-expo-monorepo/node\_modules/uuid/dist/esm-browser/index.js:1
({"Object.<anonymous>":function(module,exports,require,\_\_dirname,\_\_filename,jest){export { default as v1 } from './v1.js';
^^^^^^
SyntaxError: Unexpected token 'export'
5 | import { connect } from 'react-redux';
6 | import 'react-native-get-random-values';
> 7 | import { v4 as uuidv4 } from 'uuid';
```
Jest does not work with ESM out of the box. The simple solution is to map this library to the CommonJS version of this library.
In the apps `jest.config.ts`, there should be an option called `moduleNameMapper`. The library I used is called `uuid`, so I need to add the map `uuid: require.resolve(uuid)` under `moduleNameMapper`. So when the code encounters imports from `uuid` library, it will resolve the CommonJS version of it:
```typescript
module.exports = {
moduleNameMapper: {
uuid: require.resolve('uuid'),
},
};
```
Alternatively, I can also mock this library in the test files:
```typescript
import { v4 as uuidv4 } from 'uuid';
jest.mock('uuid', () => {
return {
v4: jest.fn(() => 1),
};
});
```
## Error: Jest encountered an unexpected token
I got this error when I was importing from a library such as [react-native-vector-icons](https://github.com/oblador/react-native-vector-icons):
```
console.error
Jest encountered an unexpected token
Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.
Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.
By default "node\_modules" folder is ignored by transformers.
Here's what you can do:
• If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
• If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
• To have some of your "node\_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
• If you need a custom transformation specify a "transform" option in your config.
• If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
You'll find more details and examples of these config options in the docs:
https://jestjs.io/docs/configuration
For information about custom transformations, see:
https://jestjs.io/docs/code-transformation
```
To fix this, add this library name to `transformIgnorePatterns` in the app's jest.config.ts.
What is `transformIgnorePatterns`? The `transformIgnorePatterns` allows developers to specify which files shall be transformed by Babel. `transformIgnorePatterns` is an array of regexp pattern strings that should be matched against all source file paths before the transformation. If the file path matches any patterns, it will not be transformed by Babel.
By default, Jest will ignore all the files under node_modules and only transform the files under the projects src.
However, some libraries such as `react-native-paper` or `react-native-svg`, the library files are in `.ts` or `.tsx`. These files are not compiled to `js`. So I need to add these libraries' names to `transformIgnorePatterns`, so these libraries will be transformed by Babel along with my project. source file. The default generated `jest.config.js` already has:
```
transformIgnorePatterns: \[
'node\_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.\*|@expo-google-fonts/.\*|react-navigation|@react-navigation/.\*|@unimodules/.\*|unimodules|sentry-expo|native-base|react-native-svg)',
\]
```
If I have an error related to a library with an unexpected token, I need to check whether they are compiled or not.
- If this library source files are already transformed to `.js`, then its name should match regex, so it would be ignored, so it will NOT be transformed.
- If this library source files are NOT transformed to `.js` (e.g. still in `.ts` or `.tsx`), then its name should NOT match regex, so it will be transformed.
## Summary
Here are some common errors that I will probably run into while doing unit testing. The solution to most problems is to find a way to mock a library that is not relevant to my component logic.
With Nx, you do not need to explicitly install any testing library, so you can dive right in and focus on writing the tests rather than spending time on setup.
## Learn more
- [Add Cypress, Playwright, and Storybook to Nx Expo Apps](https://medium.com/@emilyxiong/add-cypress-playwright-and-storybook-to-nx-expo-apps-1d3e409ce834)
- 🧠 [Nx Docs](/getting-started/intro)
- 👩‍💻 [Nx GitHub](https://github.com/nrwl/nx)
- 💬 [Nx Community Discord](https://go.nx.dev/community)
- 📹 [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- 🚀 [Speed up your CI](https://nx.app/)
+215
View File
@@ -0,0 +1,215 @@
---
title: Nx 17.2 Update
slug: 'nx-17-2-release'
authors: [Zack DeRose]
cover_image: '/blog/images/2023-12-20/featured_img.png'
tags: [nx, changelog, release]
---
Its been a bit since we launched [Nx 17](/blog/nx-17-release)! In this article, well go over some of the new developments and improvements that have landed in Nx 17.2:
- [Nx Closes In On 4 Million Weekly NPM Downloads!!](#nx-closes-in-on-4-million-weekly-npm-downloads)
- [New Simplified Project Configuration On the Way](#new-simplified-project-configuration-on-the-way)
- [Rust for Speed, Typescript for Extensibility](#rust-for-speed-typescript-for-extensibility)
- [Module Federation Updates](#module-federation-updates)
- [Nx Release Updates](#nx-release-updates)
- [Angular 17 (AND NgRx 17) Support](#angular-17-and-ngrx-17-support)
- [Smart Monorepos — Fast CI](#smart-monorepos-fast-ci)
- [New Canary Releases](#new-canary-releases)
- [Upcoming Release Livestream](#upcoming-release-livestream)
- [Automatically Update Nx](#automatically-update-nx)
## Nx Closes In On 4 Million Weekly NPM Downloads!!
2023 has been a great year for Nx! We worked with a lot of the teams out there building fantastic open source tools. And you can see the results: we made [Vite](https://vitejs.dev/) a first class citizen in many of our Nx plugins, we added support for [Rspack](https://www.youtube.com/watch?v=jGTE7xAcg24), streamlined our Node experience by adding an Nx team maintained [Fastify plugin](https://www.youtube.com/watch?si=P5MPIiD_mxTpQStY&v=LHLW0b4fr2w&feature=youtu.be), support for Storybook interaction testing, welcomed Playwright to the family and much more, continuing our missing to push developer productivity to the limits!
And our downloads on NPM keep confirming this. We are about to cross 4 million downloads per week.
![](/blog/images/2023-12-20/bodyimg1.webp)
If this made you curious, keep an eye on [our blog](/blog) or [X/Twitter](https://twitter.com/nxdevtools) as were going to release a 2023 year recap blog post next week.
## New Simplified Project Configuration On the Way
Adoption is crucial, and simplicity is the driver for adoption. Last year we heavily optimized how you can use Nx in an existing project. Just drop the `nx` package (or run `nx init`) and that's it. Nx understands your workspace and efficiently runs your `package.json` scripts.
Using Nx at that level is definitely useful as you get intelligent parallelization, task pipelines and caching. But it is just the tip of the iceberg of what Nx is actually capable of. Nx plugins provide much more, especially in terms of DX and developer productivity by taking away some of the burden of configuring your monorepo tooling. But many devs new to Nx found it harder to get started with them initially and incrementally migrating to Nx plugins wasnt as straightforward as wed wanted it to be.
This is something thats gonna change drastically in 2024. And weve layed the first cornerstone for that. But it is behind a feature flag still as were streamlining the last bits. The goal?
- Going almost configuration-less (good defaults, you customize when you need to)
- Allowing easy drop-in of Nx plugins into existing workspaces (provides immediate productivity gains, but stays out of your way)
This opens up a series of possibilities which were already super excited about. Youll hear more about this in the new year ;)
## Rust for Speed, Typescript for Extensibility
At Nx, weve heavily embraced Typescript from the beginning, and weve been very happy with that decision.
If youve been paying attention to previous release announcements though, youve probably noticed that weve been moving more and more of the computationally intensive and performance critical pieces of the core of Nx from Typescript to Rust.
That trend continues in Nx 17.2 with Nx [using Rust for its task hashing by default](https://github.com/nrwl/nx/pull/19617). Theres no adjustments needed for this change, and Nx will continue to behave the same way, just faster!
{% tweet url="https://twitter.com/victorsavkin/status/1724464283227234420" /%}
## Module Federation Updates
Module Federation has been a particularly hot topic lately, and 17.2 is coming in with some great enhancements to Nxs already best-in-class support for Module Federation!
To start, weve greatly reduced the CPU and memory used for standing up your Module Federation “web” locally. These enhancements should be great news to larger workspaces using a Module Federation approach, where there were heavy CPU and memory costs to serving your entire federation locally.
We accomplished these improvements by batching any applications that are not being watched for changes (listed with the `--devRemotes` option) to a single server, rather than a unique server for each application. We also parallelized the builds of these static applications when you start up your serve! You can now use the `--parallel={number}` option to specify how many builds you want going at any given time.
In addition to performance improvements, weve brought the concept of dynamic federation to our React module federation support. Dynamic federation allows a host application to dynamically load remotes via the manifest file.
You can generate your react module federation workspace now to use dyanmic federation via the `--dynamic` flag:
```shell
nx generate @nx/react:host acme --remotes=nx --dynamic
```
Or you can use the utility itself by importing from `@nx/react/mf`:
```ts
import { loadRemoteModule } from '@nx/react/mf';
```
Lastly, we have an [example repo](https://github.com/jaysoo/nx-react-vite-module-federation) available now to illustrate how to create a plugin for Module Federation using Nx with Vite! This is something that we are monitoring and may provide an out-of-the-box solution to this in a future release!
## Nx Release Updates
Nx 17 launched with the new `nx release` capability in the Nx CLI. Since then we've been streamlining the experience, accounting for various edge cases and release scenarios. (extensive docs are being worked on rn ;)
To give you full flexibility, in 17.2, weve added a programmatic API, which will allow you to easily write custom release scripts:
```ts
import { releaseChangelog, releasePublish, releaseVersion } from 'nx/release';
(async () => {
const { workspaceVersion, projectsVersionData } = await releaseVersion({
specifier: 'minor',
});
await releaseChangelog({
versionData: projectsVersionData,
version: workspaceVersion,
});
await releasePublish();
process.exit(0);
})();
```
This script above demonstrates how you can use this API to create your own script for updating your workspaces version, then creating a changelog, and then publishing your package!
Weve also added first class support for independently released projects, meaning you can now target a specific project for release with the `--projects` command. For example, you can create a new version for just one project in your workspace with the command:
```shell
nx release version patch --project=my-project
```
## Angular 17 (AND NgRx 17) Support
![](/blog/images/2023-12-20/bodyimg2.webp)
[Angular](https://angular.dev/) is in the middle of [a HUGE renaissance](https://blog.angular.dev/introducing-angular-v17-4d7033312e4b), between their new logo, new docs site, and introduction of some awesome features like Signals.
Nx is here to support the transition! Nx has always been a great fit for Angular, and now supports Angular 17 as well as NgRx 17.
To automatically migrate existing workspaces to Angular v17, run the commands:
```shell
nx migrate latest
nx migrate --run-migrations
```
You can also use the `--interactive` flag if you want to migrate your workspace to the latest version of Nx while staying on your current version of Angular:
```shell
> nx migrate latest --interactive
✔ Do you want to update to TypeScript v5.2? (Y/n) · true
✔ Do you want to update the Angular version to v17? (Y/n) · false
> NX The migrate command has run successfully.
- package.json has been updated.
- migrations.json has been generated.
> NX Next steps:
- Run 'nx migrate --run-migrations'
```
## Smart Monorepos — Fast CI
We just gave our Nx homepage a small facelift, including a new tagline, subtagline and illustration to better reflect Nxs mission statement.
![](/blog/images/2023-12-20/bodyimg3.webp)
When you enter the monorepo space, having good local development experience and tooling to support you is one thing, scaling is the other. And scaling comes with multiple challenges, from scaling teams working on the monorepo to maintaining high throughput on CI.
The latter is a common headache and weve seen companies struggle. With Nx were moving into the direction of becoming your e2e solution for monorepos, where we dont just cover your local dev experience, but also provide robust and scalable solutions on CI.
![](/blog/images/2023-12-20/bodyimg4.webp)
Were super excited to have launched “Nx Agents” to Early Access. If you havent seen Victors video yet about how he reduced e2e tests from 90 minutes to 10, then make sure to [check it out](/ci/features/distribute-task-execution).
**“Nx Agents”** are the next iteration of DTE, providing a more flexible, cost effective and more performant approach to distribution on CI. This includes things like being able to dynamically allocate machines based on the size of the PR and flaky task detection and re-running. Also, it can be configured with a single line:
```yaml
- name: Start CI run
run: 'npx nx-cloud start-ci-run --distributes-on="8 linux-medium-js"'
...
```
You can run Nx Agents on any CI provider. If youre curious, [sign up for early access](https://go.nx.dev/nx-agents-ea)!
## New Canary Releases
Weve added a new npm release tag: canary!
![](/blog/images/2023-12-20/bodyimg5.webp)
This canary release is created via a [cron job](https://github.com/nrwl/nx/blob/master/.github/workflows/publish.yml#L5C61-L5C61) that will regularly publish the current contents of the master branch of Nx.
You can give the canary version a try new for a new workspace using the command:
```shell
npx create-nx-workspace@canary
```
This should be useful for previewing new not-yet released features!
## Upcoming Release Livestream
{% youtube src="https://www.youtube.com/embed/OXXTUjSO1hs?si=iDFETYdpg-0BrAIP" title="Nx 17.2 Release Livestream" /%}
Were going live in January with the Nx team to go over these updates as well! Be sure to click the link to get notified when we go live! And feel free to come with your questions in the chat!
## Automatically Update Nx
Updating Nx and its plugins is easy as we ship an [automated migration command](/features/automate-updating-dependencies).
```shell
npx nx migrate latest
```
After updating your dependencies, run any necessary migrations.
```shell
npx nx migrate --run-migrations
```
## Wrapping up
Thats all for now folks! Were just starting up a new iteration of development on Nx, so be sure to subscribe to our [YouTube channel](https://www.youtube.com/@nxdevtools) to get updates when new features land! Until next time, KEEP WORKING HARD!
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+392
View File
@@ -0,0 +1,392 @@
---
title: Nx — Highlights of 2023
slug: 'nx-highlights-of-2023'
authors: [Juri Strumpflohner, Victor Savkin, Zack DeRose]
cover_image: /blog/images/2023-12-28/featured_img.png
tags: [nx, nx-cloud]
---
It is that time again: getting flooded by Year of Review blog posts. We did it last year, and we should do it again! So here we go, and be warned, 2023 was massive!!
**Table of Contents**
- [Top 10 Nx Highlights of 2023](#top-10-nx-highlights-of-2023)
- [TypeScript for Extensibility — Rust for Speed](#typescript-for-extensibility-rust-for-speed)
- [First Class Vite Support](#first-class-vite-support)
- [Nxt Level Publishing](#nxt-level-publishing)
- [Improved Node Backend Development: Fastify and Docker](#improved-node-backend-development-fastify-and-docker)
- [Nx Console support for IntelliJ](#nx-console-support-for-intellij)
- [Playwright for e2e testing](#playwright-for-e2e-testing)
- [TypeScript Packaging and Batch Mode](#typescript-packaging-and-batch-mode)
- [Nx team maintained Vue plugin](#nx-team-maintained-vue-plugin)
- [Extending Nx: Local Generators, Build your Own CLI, Verdaccio Support](#extending-nx-local-generators-build-your-own-cli-verdaccio-support)
- [Module Federation](#module-federation)
- [Many OSS repos adopt Nx](#many-oss-repos-adopt-nx)
- [Nx Community](#nx-community)
- [New Content & Improved Docs](#new-content-improved-docs)
- [New Tagline: Smart Monorepos — Fast CI](#new-tagline-smart-monorepos-fast-ci)
- [Nx Conf](#nx-conf)
- [Looking ahead — 2024](#looking-ahead-2024)
- [Solving CI](#solving-ci)
- [Solving the Simplicity vs Power Dilemma](#solving-the-simplicity-vs-power-dilemma)
## Top 10 Nx Highlights of 2023
We shipped a ton of features in 2023. You can find all our release blog posts and release-related info here: [https://nx.dev/changelog](/changelog) or check out our [Dev.to collection](https://dev.to/nx).
We've picked out 10 highlights for you.
### TypeScript for Extensibility — Rust for Speed
At Nx, weve heavily embraced Typescript from the beginning and weve been very happy with that decision. Nx also stands as the [fastest JS monorepo tool](https://github.com/vsavkin/large-monorepo) available, demonstrating that adopting TypeScript does not necessarily compromise speed. However, we dont stop here. To push the boundaries further, we started to rewrite the most performance critical and computationally intensive parts of the Nx core in Rust.
Our initial focus was on [rewriting the task hasher](https://dev.to/nx/nx-158-rust-hasher-nx-console-for-intellij-deno-node-and-storybook-27ng#rustifying-the-nx-hasher), previously reliant on Git with a Node fallback. This shift to Rust brings a noticeable performance boost, particularly in large repositories, while maintaining the same user experience.
Following this, we revamped the TypeScript dependency resolution, observing an almost 5x speed increase with our Rust-based approach over the traditional TSC method.
{% tweet url="https://twitter.com/juristr/status/1726977598218199302" /%}
Such enhancements are especially crucial for the efficient [project graph calculation](/features/explore-graph). As we continue to evolve Nx, Rust will play a key role in optimizing performance-critical components. This strategic use of Rust complements our ongoing commitment to TypeScript, ensuring Nx remains as extensible and powerful as ever.
### First Class Vite Support
Vite is rapidly transforming the landscape of frontend development! Its refreshing simplicity and innovative approach have made a significant mark in the developer community. What truly stands out is not just Vites technological aspect but also how its team approaches and grows the community around the tool. Vite stands for speed and community, values that deeply resonate with us here at Nx.
Our collaboration with our friends in the Vite core team has been incredibly fruitful. Vite is not just compatible but a first-class option with many of Nxs frontend plugins. When you create a new Nx powered React workspace, Vite (and [Vitest](https://vitest.dev/)) are your default options.
![](/blog/images/2023-12-28/bodyimg1.webp)
We also built some powerful code generators that not only facilitate a seamless [transition from Webpack to Vite](/nx-api/vite/generators/configuration#nxviteconfiguration) but also pave the way for an effortless [migration from a CRA-based setup](/recipes/adopting-nx/adding-to-existing-project) to a modern Nx + Vite based workspace. To see this process in action, [check out this short video](https://www.youtube.com/watch?v=zvYb7XCLQzU).
[AnalogJS](https://analogjs.org/) — the fullstack Angular meta-framework which also heavily builds on top of Vite — is using the `@nx/vite` plugin to power its Angular and Nx based workspaces.
We also spoke at both editions of [ViteConf](https://viteconf.org/23/). If youre curious check out [Juris talk about High Speed Monorepos](https://www.youtube.com/watch?si=A5Nkg3rxe3DlODc4&v=TiU-hdn7_To&feature=youtu.be) and this years talk by [Katerina on Streamlining your Vite dev flow with Nx](https://www.youtube.com/watch?si=A5Nkg3rxe3DlODc4&v=TiU-hdn7_To&feature=youtu.be).
### Nxt Level Publishing
Open source libraries and frameworks share a common necessity: the need to develop multiple packages cohesively and efficiently while managing their versioning and publishing to NPM. Nx has emerged as a go-to choice for handling such open source monorepos (as well explore further in the next section of this blog post). Until recently, one area Nx did not address directly was versioning and release management. Traditionally, this gap has been filled with tools like [release-it](https://github.com/release-it/release-it), [changesets](https://github.com/changesets/changesets), or custom Node scripts, similar to our approach in the Nx repository.
However, many in our community have expressed a desire for a more native, integrated experience for versioning and publishing, akin to what Lerna offers. In response to this feedback, weve introduced [the “nx release” command](/features/manage-releases), a solution designed to seamlessly integrate these processes into the Nx workflow.
James Henry gave a deep dive talk of an early version of it at this years Nx Conf:
{% youtube src="https://www.youtube.com/embed/p5qW5-2nKqI" /%}
Since its introduction, the “nx release” feature has significantly evolved, leveraging the power of the Nx project graph to effectively understand inter-package dependencies. This understanding is crucial as it allows for:
- Versioning packages offering support for both independent and “locked” versioning strategies.
- Releasing packages in the correct sequence, ensuring dependency integrity.
Beyond these core functionalities, the feature also includes a robust grouping mechanism, supports semantic versioning, and changelog generation. Additionally, it provides various release targets, such as GitHub and NPM. For those having special requirements, the [programmatic API](/features/manage-releases#using-the-programmatic-api-for-nx-release) offers maximum flexibility.
### Improved Node Backend Development: Fastify and Docker
Colocating frontend and backend code within the same monorepo has become a popular practice. It greatly facilitates cross-functional teams and helps ensure end-to-end type safety. Although you can use [other backend stacks](https://www.nx-dotnet.com/) with Nx, Node is a popular backend companion for JS based frontends. We had support for [Express](https://expressjs.com/) and [NestJS](https://nestjs.com/) backend for a while.
This year we added another popular option: [Fastify](https://fastify.dev/). Known for its high performance, excellent developer experience, and useful built-in features like logging, Fastify aligns well with Nxs modular software design principles. Its extensible and modular nature complements the Nx philosophy perfectly.
{% youtube src="https://www.youtube.com/embed/LHLW0b4fr2w?si=WeTqm5msQxssQ_d3" /%}
In tandem with Fastify, weve also introduced [Docker support](https://youtu.be/LHLW0b4fr2w?feature=shared) for Node deployments.
### Nx Console support for IntelliJ
Nx Console has evolved from an experimental side project of the Nx team to a core part for enhancing your productivity when working in a monorepo. Being integrated right into your editor it can provide useful information and functionality right where you need it, whether thats running commands, [providing contextual autocomplete support](https://twitter.com/juristr/status/1653032530474565638) or the ability to explore the project and task graph.
![](/blog/images/2023-12-28/bodyimg2.webp)
This year we not only added a lot of new features to Nx Console, but also rewrote its [internals](/blog/nx-console-gets-lit) which paved the way to expand Nx Console to other code editors: **JetBrains IDEs.**
Yes, this means you can now use the latest Nx Console directly in your [Webstorm IDE](https://www.jetbrains.com/webstorm/). Read the [announcement blog post](https://blog.nrwl.io/expanding-nx-console-to-jetbrains-ides-8a5b80fff2d7) for all the details or go ahead and install Nx Console if you didnt already:
- [Nx Console for VSCode](https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console)
- [Nx Console for IntelliJ](https://plugins.jetbrains.com/plugin/21060-nx-console)
### Playwright for e2e testing
2023 saw Nx introduce official support for [Playwright](https://playwright.dev/) — a popular testing tool from Microsoft.
In this video, Zack DeRose explains how you can use Playwright to test both a single web application, as well as stand up a full-stack system — including a backend server and a frontend application — and write and run tests using Playwright:
{% youtube src="https://www.youtube.com/embed/k1U3PuBrZFQ" /%}
The repo for this video can also be found [here](https://github.com/nrwl/tic-tac-toe-playwright).
Generally, Playwright fits in the Nx ecosystem as a tool that developers can use as a possible alternative to Cypress — a popular e2e testing tool that Nx has supported for a long time now! In addition to publishing an official [@nx/playwright package](https://www.npmjs.com/package/@nx/playwright), running the command to create a new workspace will now prompt for Playwright as an option for React, Angular, and Vue stacks:
```shell
$ npx create-nx-workspace@latest
> NX Let's create a new workspace [https://nx.dev/getting-started/intro]
✔ Which stack do you want to use? · react
✔ What framework would you like to use? · none
✔ Integrated monorepo, or standalone project? · integrated
✔ Which bundler would you like to use? · vite
? Test runner to use for end to end (E2E) tests …
Cypress [ https://www.cypress.io/ ]
Playwright [ https://playwright.dev/ ]
None
```
Similar options will appear when using Nx generators to create new frontend web applications for an existing workspace.
### TypeScript Packaging and Batch Mode
TypeScript has won. It has become the prevalent way of writing modern JavaScript applications. And we kept improving our support to streamline development and polish some of the rough edges. Like properly defining secondary package entry points. You can define them in the `package.json`, but both creating these entries but especially maintaining them can be quite painful.
```
{
"exports": {
"./package.json": "./package.json",
".": "./src/index.js",
"./foo": "./src/foo.js",
"./bar": "./src/bar.js"
}
}
```
So in [v16.8](https://blog.nrwl.io/nx-16-8-release-e38e3bb503b5#7b41) we added the ability to automatically have these generated for you by defining the `additionalEntryPoints` and `generateExportsField` when using the `@nx/js` plugin.
```
// packages/my-awesome-lib/project.json
{
"name": "my-awesome-lib",
"targets": {
"build": {
"executor": "@nx/js:tsc",
...
"options": {
"main": "packages/my-awesome-lib/src/index.ts",
...
"additionalEntryPoints": ["packages/my-awesome-lib/src/foo.ts"],
"generateExportsField": true
},
},
...
}
}
```
Similarly we improved the ability to package your TS libraries in multiple formats (ESM and CJS). When using the `@nx/rollup` plugin, all you need to do is define the `format` property in your config:
```
// packages/my-awesome-lib/project.json
{
"name": "my-awesome-lib",
"targets": {
"build": {
"executor": "@nx/rollup:rollup",
...
"options": {
"main": "packages/my-awesome-lib/src/index.ts",
...
"format": ["esm", "cjs"],
"additionalEntryPoints": ["packages/my-awesome-lib/src/foo.ts"],
"generateExportsField": true
},
},
...
}
}
```
Heres a video that walks you through:
{% youtube src="https://www.youtube.com/embed/Vy4d0-SF5cY?si=mHatqRPRqHAK0X9o" /%}
But we wouldnt be talking about Nx if we didnt also look into speeding up TypeScript compilation for large monorepos. We called it “[batch mode](/showcase/benchmarks/tsc-batch-mode)”. When enabling batch mode, Nx leverages the underlying [project graph](/features/explore-graph) to generate TypeScript project references behind the scenes for you, to fully leverage TS incremental building. The results are amazing. According to [our benchmarks](https://github.com/nrwl/large-ts-monorepo), batch mode has the potential to speed up Typescript compilation by up to 5x for large monorepos.
![](/blog/images/2023-12-28/bodyimg3.gif)
### Nx team maintained Vue plugin
After adding Vite as a first-class citizen of Nx workspaces, it was only a matter of time before Nx started offering official support to Vue!
Vue is currently the second most popular frontend framework (according to npm downloads) behind React and slightly ahead of Angular.
![](/blog/images/2023-12-28/bodyimg4.webp)
The first place your might notice Nxs support for Vue is in the `create-nx-workspace` script:
![](/blog/images/2023-12-28/bodyimg5.webp)
The option above will create a new Nx workspace with a fresh new Vue application, all set up and ready to develop! To add new Vue projects to an existing Nx workspace, you can also add our `@nx/vue` package as a dev dependency to your workspace:
```shell
% npm add -D @nx/vue
```
And youll then have access to Nx generators so you can create Vue applications, libraries, and more in your workspace!
![](/blog/images/2023-12-28/bodyimg6.gif)
Checkout out our [Vue standalone tutorial](/getting-started/tutorials/vue-standalone-tutorial) for more, as well as our [Vue API docs](/nx-api/vue), and stay tuned as Nx prepares to offer more Vue support (including support for [Nuxt](https://nuxt.com/), a full-stack framework built around Vue) in the near future!
### Extending Nx: Local Generators, Build your Own CLI, Verdaccio Support
Extensibility is at the heart of Nx, serving as the cornerstone of its flexibility. It enables the Nx core team to continually expand capabilities through dedicated plugins and simultaneously paves the way for a rich array of [community plugin contributions](/plugin-registry). Furthermore, Nxs adaptable nature is particularly beneficial for large enterprises, as it allows for the creation of custom automation solutions, specifically tailored to meet their unique organizational needs.
In 2023 we kept improving Nxs extensibility, unifying the Nx plugin development model and how you develop workspace-local automations. You can now scaffold a new plugin into your Nx workspace and run it right away which makes it an interesting approach to automate your monorepo.
{% youtube src="https://www.youtube.com/embed/myqfGDWC2go?si=q6_9JReS1nF8d3pZ" /%}
When creating automations with Nx you cannot just enhance existing Nx workspaces, but also develop a complete [Nx preset](/extending-nx/recipes/create-preset) that controls the entire appearance of an Nx workspace. Basically your own, personalized `create-nx-workspace`. You can publish and then use your preset like:
```shell
npx create-nx-workspace myrepo --preset=@yourpkg/nx-preset
```
We wanted to make building on top of Nx even more pleasant, allowing you to introduce your own branding by [building your own CLI with Nx](https://www.youtube.com/watch?v=ocllb5KEXZk). The [Qwik-Nx](https://github.com/qwikifiers/qwik-nx) repo is a great example where they allow you to scaffold a new Nx workspace for Qwik development with:
```shell
npx create-qwik-nx
```
And finally, we extracted our own [Verdaccio](https://verdaccio.org/) setup that weve been using to run our e2e tests in the [Nx repo](https://github.com/nrwl/nx) s.t. you can use it for your own plugin development as well. Check out [this video](https://www.youtube.com/watch?v=t1c925TzrzE) for a walkthrough on how this works.
### Module Federation
[Module Federation](https://medium.com/swlh/webpack-5-module-federation-a-game-changer-to-javascript-architecture-bcdd30e02669) is an exciting new feature of Webpack 5 that has gained a significant amount of interest in 2023.
Simply put, Module Federation allows a Javascript application running in a browser to dynamically load code from another application hosted at a different url, while facilitating optimal loading of shared dependencies.
This is an exciting development as it allows a paradigm shift in how you can architect, build, and deploy Javascript applications! And this is especially exciting for monorepo fans, as Nx has best-in-class support for module federation that makes a Module Federation approach easy to adopt and simple to understand!
Currently, our `@nx/angular` and `@nx/react` plugins both have generators to [create a “host” application](/recipes/module-federation/create-a-host) that will load and consume federated modules from [“remote” applications](/recipes/module-federation/create-a-remote), which you can also generate using Nx. Then, by running a simple command with Nx, you can serve all applications required for your host application with the command:
```shell
nx serve host-application --devRemotes=remote-application
```
Where in the example above your host application is named “host-application” and a remote application that you want live updates on as youre developing is named “remote-application”.
Throughout 2023, weve continued to increase Nxs support and general dev experience around Module Federation, including [adding a generator to federate an existing module](/recipes/module-federation/federate-a-module), improving the local developer experience by improving local webserver performance, and introducing the concept of [Dynamic Module Federation](/recipes/angular/dynamic-module-federation-with-angular#advanced-angular-micro-frontends-with-dynamic-module-federation) which will allow you to dynamically specify the location of your remote applications via a “module-federation.manifest.json” file!
At Nx, were excited about the Module Federation support we offer for our users, and think that it has many interesting applications when paired with Nxs CI capabilities, in particular allowing for [much shorter build times](/concepts/module-federation/faster-builds-with-module-federation#faster-builds-with-module-federation) especially for larger Angular applications.
## Many OSS repos adopt Nx
By simply installing the `nx` package (or initializing with `nx init` in any project or monorepo), you already get some cool features:
- Advanced task scheduling, including task pipelines and parallel execution.
- Efficient caching mechanisms.
> If you want to learn more about such setup, make sure to check out our blog post on [how to adopt Nx on a npm/yarn/pnpm workspace](https://dev.to/nx/setup-a-monorepo-with-pnpm-workspaces-and-speed-it-up-with-nx-1eem) or the corresponding [video version](https://www.youtube.com/watch?si=0XH6Sp025xM3Rru5&v=ngdoUQBvAjo&feature=youtu.be).
Numerous open-source packages are adopting Nx in this lightweight manner. It enables them to maintain their existing setup while notably enhancing the local developer experience (DX) in task execution and accelerating processes on CI.
I picked out some of the more well-known OSS repos that started using Nx this year:
[**Tanstack**](https://tanstack.com/) — Tanstack has evolved to an entire ecosystem consisting of the famous [Tanstack (or React) Query](https://github.com/tanstack/query), [Tanstack Table](https://github.com/tanstack/table), now also [Tanstack Router](https://github.com/tanstack/router) and [Tanstack Form](https://github.com/tanstack/form). It started with Tanstack Query, which adopted Nx and Nx Cloud. [Zack talked about this collab with Dominik](https://www.youtube.com/watch?v=NvPXK6DVZGE), and we also had [Dominik](https://twitter.com/TkDodo) on our [Nx live stream](https://www.youtube.com/live/IbU6b6s0H1Q?si=0QZexPwulLXB9FIN). Now, all the above-mentioned Tanstack libs have adopted Nx, and theres more coming.
[**Sentry JavaScript**](https://github.com/getsentry/sentry-javascript/) — Sentry, renowned for its comprehensive solutions in frontend monitoring and error logging, recently adopted Nx for their [official JavaScript SDK](https://github.com/getsentry/sentry-javascript/). This move integrates Nxs capabilities into their monorepo, containing packages for popular frontend and Node.js backend integrations. They also published a blog post on [the benefits theyve seen following the adoption of Nx in their monorepo](https://sentry.engineering/blog/reduce-ci-time-with-nx-caching) (hint: reducing CI times by 35%).
[**RxJS**](https://github.com/ReactiveX/rxjs) — The library for reactive programming in JavaScript. It is widely popular, with over 40 million downloads/week on NPM. RxJS only recently adopted Nx, not only leveraging speed improvements via caching, but also leveraging Nxs latest `nx release` feature to publish packages to NPM.
[**AnalogJS**](https://analogjs.org/) — Analog is a full-stack Angular meta-framework that brings exciting features to Angular, like faster Vite setup, support for both server-side and static rendering, and easy file-based routing. Analog uses an Nx monorepo for its development and also uses [Nxs DevKit](/extending-nx/intro/getting-started) to create tools that work great in both Nx and Angular CLI workspaces.
[**Qwikifier**](https://github.com/qwikifiers/qwik-nx) — The Qwikifiers community built a dedicated Nx plugin to combine the power of Qwik and Nx. Their repo is a great example of building Nx plugins and [using Nx to build your own CLI](/extending-nx/recipes/create-install-package).
[**Builder.io Mitosis**](https://github.com/BuilderIO/mitosis) — [BuilderIO](https://www.builder.io/) has an ambitious compiler project that allows you to write a component once and then compile it to different frameworks. Check out their [mind-blowing demo page](https://mitosis.builder.io/?outputTab=G4VwpkA%3D). They adopted Nx to [coordinate task dependencies](/concepts/task-pipeline-configuration) and speed up their CI builds.
[**Ghost**](https://github.com/TryGhost/Ghost) — Are you into blogging? You might want to look at [Ghost](https://ghost.org/). They were using Lerna in the past and migrated to a fully Nx-powered workspace.
And these are just some of them that joined in 2023. If I missed some cool ones (which Im pretty sure), [ping me](https://twitter.com/juristr) and let me know!
## Nx Community
Nx has a huge community! Were lucky to have so many folks rooting for Nx, whether on socials, talking at conferences, writing blog posts or [creating awesome plugins](/plugin-registry).
**Nx Champions** — This year we finally launched which we had planned for a long time. Our [Nx Champions](/community) program.
![](/blog/images/2023-12-28/bodyimg7.webp)
These are individuals who stood out for their contributions and passion for helping within the Nx community. We wanted to build a more connected relationship with these folks and have a channel to gather more direct feedback as well. Get to know [all of our champions](/community).
**New Discord server** — Around September we also switched over from our previous Nx Slack community to a brand new [**Nx community Discord**](https://go.nx.dev/community), which is already 2,600 members and counting. Discord is popular among OSS communities and allows new folks to join easily. In addition, we now have a dedicated forum integrated, as well as a couple of useful automations. More coming next year!
Make sure [you join](https://go.nx.dev/community)!
## New Content & Improved Docs
Our [Youtube channel](https://www.youtube.com/@nxdevtools) has grown to over 15k subscribers and peaks of 65k views a month. We love to provide educational video content, so make sure to subscribe! It got a little silent towards the end of the year, but weve been working a lot behind the scenes. So stay tuned!
We also poured a lot of [effort into the docs](/getting-started/intro). We restructured them following the [Diataxis](https://diataxis.fr/) to make pages less overwhelming and more structured based on their type of content. Youll find
- [**Concept docs**](/concepts) — which explain some of the inner workings and mental model behind certain features. Like [how caching works](/concepts/how-caching-works).
- [**Recipes**](/recipes) — which are solution oriented. You already know how to cook, we provide the exact recipe for it.
- [**Tutorials**](/getting-started/tutorials) — for when you just want to sit down and follow along, step by step to learn how to use Nx in a certain context.
- [**Reference**](/reference) and [**API docs**](/nx-api) — pure, raw and to the point.
We created a brand new [“Why Nx”](/getting-started/why-nx) page explaining the overall architecture of Nx including a [brand new video](https://www.youtube.com/watch?v=-_4WMl-Fn0w) giving you a holistic overview of what Nx is capable of.
We also refreshed our [entry pages](/getting-started/intro), including dedicated examples of using Nx with popular stacks:
![Examples include Express, Vue, Next, Nuxt, Rract Native, Rust, Go, Storybook, and more.](/blog/images/2023-12-28/bodyimg8.webp)
You can also browse them in the [nx-recipes](https://github.com/nrwl/nx-recipes) GitHub repository.
{% tweet url="https://twitter.com/juristr/status/1736023402933318011" /%}
{% tweet url="https://twitter.com/juristr/status/1726977598218199302" /%}
And obviously, we jumped on the AI train as well. A couple of months ago, we added the [Nx Assistant](/ai-chat). A ChatGPT-powered interface trained on our docs. [Katerina](https://twitter.com/psybercity) wrote about it [on our blog](/blog/nx-docs-ai-assistant). The AI chat allows to interactively ask questions about Nx and will give you relevant answers from our docs (including linking to the sources).
## New Tagline: Smart Monorepos — Fast CI
Nx stands out for its flexibility, accommodating for both monorepo and non-monorepo project structures. This approach allows users to begin with simpler project configurations, leveraging the benefits of Nxs robust tooling, and later, when the need arises, seamlessly [migrate to a monorepo](/recipes/tips-n-tricks/standalone-to-integrated).
However, Nxs true strength becomes most apparent at scale, typically within a monorepo setup. We wanted to capture it in our new tagline: **Smart Monorepos — Fast CI**.
{% twitter url="https://twitter.com/juristr/status/1734558895547568634" /%}
Setting up an efficient and maintainable CI process for monorepos can be a complex task, so weve also made it a focal point in our new tagline. Nx expands beyond the local development experience, helping you set up an efficient CI process. Were publicly launching [Nx Agents](/ci/features/distribute-task-execution) to add seamless distribution to your CI pipeline, and more are coming in 2024.
As part of that, we also restructured our docs to have a section entirely dedicated to CI: [https://nx.dev/ci](/ci/intro/ci-with-nx).
## Nx Conf
We did it again! The second in-person Nx Conf was a resounding success, this time set against the vibrant backdrop of the Big Apple.
![](/blog/images/2023-12-28/bodyimg9.webp)
Theres not much to say. Check out some of the amazing talks. I did a [Nx Conf 2023 recap blog post](/blog/nx-conf-2023-recap).
## Looking ahead — 2024
Although we shipped a lot in 2023, in many ways 2023 was about preparing for what we are planning to ship in Q1 2024.
### Solving CI
Legacy CI systems are a performance and productivity bottleneck if you use a powerful build system like Nx. Big tech companies know it and thats why their CI systems look nothing like Circle or Jenkins. Weve been narrowing this gap over the years, but only this year we finally built a turn-key CI solution that gives you great performance, scalability, dev ergonomics, and must better cost efficiency.
It has three components:
- [**Nx Cach**](/ci/features/remote-cache): Built-in local and remote caching to speed up your tasks and save you time and money. Available now.
- [**Nx Agents**](/ci/features/distribute-task-execution): A single line to enable distributed computation, across multiple machines. Fully managed agents, dynamically allocated based on PR size. Available early Feb.
- **Nx Workflows**: Next generation, fully managed CI solution with distribution at its core, designed from the ground up for monorepos. _Available later in 2024._
Optimal parallelization and distribution, using the right numbers of agents for each PR, rerunning flaky tests, splitting and distributing large test suites, handling dependencies between tasks across machines — are just some of the things we can now handle automatically for you. Turn it on and enjoy the speed.
### Solving the Simplicity vs Power Dilemma
Balancing simplicity and power is the trickiest part of the dev tools design. Simple onboarding for small projects or handling the biggest enterprise systems? Two years ago we solved this problem by giving you a choice between the package-based setup (a more powerful version of something like Turborepo) and the integrated setup (we manage your whole monorepo in the most optimal way). But now we believe we have a much better solution, where you have both, the simplicity of the former with the power of the latter. So you no longer have to choose.
We took inspiration from VSCode. Any project you open in VSCode will work right away: it is simple, and you dont need to configure anything. If you install say a Playwright plugin, VSCode becomes aware of Playwright. It can run and debug your tests right in the editor. Thats what the Nx experience is going to be like. Any project, any tool will work right away. But if you — for instance — install the Playwright plugin, Nx will become aware of Playwright and will be able to cache test runs in the most optimal way and distribute your e2e tests across machines for best efficiency. All the benefits with none of the costs.
The whole team is excited about it as the new experience feels much more elegant.
As always, we try very hard not to break folks, so all your current workspaces will keep working, and we will [provide automatic migrations](/features/automate-updating-dependencies) to bring you to this new way of using Nx.
Exciting stuff! So keep an eye on our channels, and subscribe if you havent already ;)
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools)
- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
@@ -0,0 +1,188 @@
---
title: What if Nx Plugins Were More Like VSCode Extensions
slug: 'what-if-nx-plugins-were-more-like-vscode-extensions'
authors: [Juri Strumpflohner]
cover_image: '/blog/images/2024-02-05/featured_img.png'
tags: [nx, releases]
reposts: []
---
Enhance, but dont interfere! Thats the ideal! And this is how extensions work in VSCode (or Webstorm). You can use VSCode without any extension and get some basic functionality, or you can add an extension on top to enhance your experience and, ideally, increase your productivity.
Table of Contents
- [Adding Nx to an Existing Monorepo](#adding-nx-to-an-existing-monorepo)
- [Project Crystal](#project-crystal)
- [Project Crystal Plugins in an Nx Monorepo](#project-crystal-plugins-in-an-nx-monorepo)
- [Inferred Targets](#inferred-targets)
- [Visualizing Inferred Targets](#visualizing-inferred-targets)
- [More Transparency and a Single Source of Truth](#more-transparency-and-a-single-source-of-truth)
- [Enhancing existing Monorepos with Nx Plugins](#enhancing-existing-monorepos-with-nx-plugins)
- [This is just the Beginning](#this-is-just-the-beginning)
- [Learn more](#learn-more)
---
**Prefer a video? Weve got you covered!**
{% youtube src="https://www.youtube.com/embed/wADNsVItnsM?si=sQ3-Dlx6KBRBUMkE" title="What if Nx Plugins Were More Like VSCode Extensions" /%}
Also, make sure to check out [Launch Nx Conf](/launch-nx) on Thursday, Feb 8th, where well have more in-depth talks about Project Crystal as well as other exciting features around Nx and Nx Cloud.
---
Take, for instance, the Playwright plugin. You install it, and itll automatically detect the Playwright config file and enhance your workspace by providing quick run buttons alongside your tests or even a dedicated Test Explorer window.
![](/blog/images/2024-02-05/bodyimg1.webp)
_The Playwright VSCode extension enhancing the developer experience_
## Adding Nx to an Existing Monorepo
You can add Nx to an existing npm/yarn/pnpm monorepo quite straightforwardly. You run:
```shell
npx nx@latest init
```
Youll get an `nx` package installed and an `nx.json` allowing you to define [task dependencies](/recipes/running-tasks/defining-task-pipeline) and caching. With that, you're now able to run commands like `nx build <your project>` or nx `run-many -t build test` to run all `build` and `test` targets in your workspace in parallel. Nx will read and use your existing `package.json` scripts. I've written an in-depth [blog post about adopting Nx in such a scenario](https://dev.to/nx/setup-a-monorepo-with-pnpm-workspaces-and-speed-it-up-with-nx-1eem).
This is the most lightweight setup you can get while still getting some improvements via Nx regarding faster task running and more intelligent parallelization. But, you need to deal with the remaining of the monorepo setup.
## Project Crystal
Nx always had more to offer, though, which it mainly did through its plugins. Theyre optional but usually something youd get set up when creating a new workspace with `create-nx-workspace`. Nx Plugins are extremely powerful, helping you not only create and configure new monorepos, but also taking away the burden of integrating various tooling as well as providing features for enforcing consistency and helping with maintainability. These aspects are fundamental in enterprise settings, where Nx Plugins have proven to help teams successfully manage their monorepos.
However, this is a balancing act. More abstraction and automation means more support but also potentially a learning curve and giving up some low-level control. It also requires a slightly more significant upfront investment when migrating to an Nx plugin-powered monorepo.
**These are things we wanted to solve**, and **Project Crystal** is the first step in that direction.
![](/blog/images/2024-02-05/bodyimg2.webp)
Some of the main objectives of Project Crystal are to...
- make Nx plugins more transparent
- reduce the amount of configuration required
- allow Nx plugins to be drop-in enhancements in existing npm/yarn/pnpm monorepos
- allow for a migration to an Nx plugin-powered monorepo
## Project Crystal Plugins in an Nx Monorepo
> Note: starting with Nx 18, Project Crystal will be active for new workspaces only. You can opt-in to use them though.
When you create a new Nx workspace using
```shell
npx create-nx-workspace myorg
```
... and you choose an “integrated monorepo” youll get the usual setup powered by Nx Plugins and all the features and benefits that come with them. Where youll see Project Crystal in action is when you open a `project.json` file, which will most likely look like the following:
```json {% fileName="project.json" }
{
"name": "reactapp",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/reactapp/src",
"projectType": "application",
"targets": {},
"tags": []
}
```
### Inferred Targets
Starting with Nx 18 and Project Crystal, we dont generate any targets anymore, but the corresponding Nx plugin instead [infers them](/concepts/inferred-tasks). If we open the `nx.json`, you'll see a new property, `plugins`:
```json {% fileName="nx.json" %}
{
...
"plugins": [
{
"plugin": "@nx/vite/plugin",
"options": {
"buildTargetName": "build",
"previewTargetName": "preview",
"testTargetName": "test",
"serveTargetName": "serve",
"serveStaticTargetName": "serve-static"
}
},
{
"plugin": "@nx/eslint/plugin",
"options": {
"targetName": "lint"
}
},
{
"plugin": "@nx/cypress/plugin",
"options": {
"targetName": "e2e",
"componentTestingTargetName": "component-test"
}
},
...
],
...
}
```
Notice the options property defining the names of the potentially inferred targets for each plugin. These targets will be generated dynamically s.t. you can still run `nx build reactapp` even though there's no `build` target explicitly defined in the `project.json` of your `apps/reactapp` project.
This dramatically reduces the redundancy of repeatedly configuring the same tasks (e.g., Jest or Vitest tasks) throughout your various projects. Instead, with this new approach, you get the defaults, and if you need to override them, you can still define them in your `project.json` file as you were accustomed to before.
### Visualizing Inferred Targets
Dynamically inferred targets help with the maintainability aspect and reduce the configuration overhead overall. But how do we know which targets are available for a given project?
Option 1 is to run the following command:
```shell
npx nx show project reactapp --web
```
This opens your browser with the following view:
![Browser view reads "reactapp, root: apps/reactapp, type: application" and shows a list of targets.](/blog/images/2024-02-05/bodyimg3.webp)
_Browser view of the inferred targets_
Option 2 is [Nx Console](/getting-started/editor-setup), which is an extension for VSCode as well as IntelliJ (Webstorm etc.). It comes with a project detail view, as shown below, as well as “Codelens” features that enhance your configuration files with context-based information and features.
![](/blog/images/2024-02-05/bodyimg4.webp)
_Nx Console showing the inferred targets in a dedicated view_
## More Transparency and a Single Source of Truth
We also wanted the new approach to plugins to be closer to the actual CLI tool of the framework youre using. If you have a React + Vite project, `nx build` should be as close as possible to the `vite build` while still providing the enhancements around caching configuration.
And this is what happens. Behind the scenes, the plugin configures caching with inputs and outputs and task dependencies (e.g., `^build`) but then mostly pipes through to the Vite CLI (in this particular case), Remix, Next CLI, etc.
![](/blog/images/2024-02-05/bodyimg5.webp)
Furthermore, the framework-specific config — in the example of Vite, the `vite.config.ts` - is the single source of truth from which Nx infers configuration such as caching. If you change your Vite `build.outDir`, Nx automatically picks that up and uses that as the caching output directory.
## Enhancing existing Monorepos with Nx Plugins
As mentioned earlier, one of the key goals of Project Crystal was to improve the adoption story of Nx Plugins, which implicitly also helps with migrating to Nx plugin-based monorepos. By reducing the config footprint of an Nx plugin and by automatically inferring tasks from existing framework configs, weve moved in a direction where plugins have become much more of a drop-in approach.
Starting with Nx 18, if you now run `nx init` on an existing npm/yarn/pnpm workspace, you'll also get asked about installing plugins based on the setup you have in your monorepo.
![](/blog/images/2024-02-05/bodyimg6.webp)
_Asking about installing plugins based on your monorepo tooling_
You can also obviously start with no plugin at all and incrementally add them as you go and feel comfortable using the new `add` command:
```shell
npx nx add @nx/vite
```
## This is just the Beginning
We just released Project Crystal, so this is just the beginning of it. While weve moved many of our existing Nx plugins to adopt the new approach, there are still some more refinements to be done in the coming weeks. But we are excited about the possibilities Project Crystal enables for Nx and its adoption story going forward, making Nx plugins more approachable, transparent, and lightweight.
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
@@ -0,0 +1,190 @@
---
title: Introducing @nx/nuxt Enhanced Nuxt.js Support in Nx
slug: 'introducing-nx-nuxt-enhanced-nuxt-js-support-in-nx'
cover_image: '/blog/images/2024-02-06/featured_img.png'
authors: ['Katerina Skroumpelou']
tags: [devtools, javascript, monorepos, nuxt]
---
We're excited to introduce a new way to enhance your [Nuxt](https://nuxt.com/) development workflow! After the Vue plugin, we're introducing our new Nx plugin for Nuxt, `@nx/nuxt`. Designed for Nuxt developers and existing Nx users alike, this integration brings the best of both worlds into your development ecosystem, enabling you to leverage Nx's powerful capabilities seamlessly within your Nuxt projects.
## Why Consider Nx for Your Nuxt Projects?
Using Nx with your Nuxt.js projects presents the following advantages:
- **Monorepo Management**: Simplify the management of multiple projects within a single repository, facilitating code sharing and reducing overhead.
- **Modular Development**: Break down your Nuxt app into manageable, independent modules that can be developed, tested, and deployed in isolation.
- **Enhanced Caching**: Accelerate your development with Nx's intelligent caching, automatically configured for your Nuxt projects.
- **Nx generators**: Nx provides generators for scaffolding new Nuxt applications, with support for Jest, Storybook, and e2e test generation with Cypress or Playwright.
- **Automated upgrades**: Nx offers a set of migrators that help you upgrade your projects.
## Getting Started with Nx and Nuxt.js
Whether you're initiating a new project or integrating into an existing one, `@nx/nuxt` offers a straightforward setup process:
### Starting a New Nx Workspace with Nuxt
Creating a new Nx workspace optimized for Nuxt is as simple as running:
```shell
npx create-nx-workspace@latest --preset=nuxt
```
Our setup wizard will guide you through the initial configuration, ensuring your workspace is tailored to your needs:
```shell
npx create-nx-workspace@latest
> NX Let's create a new workspace [/getting-started/intro)/getting-started/intro]
✔ Where would you like to create your workspace? · my-org
✔ Which stack do you want to use? · vue
✔ What framework would you like to use? · nuxt
✔ Integrated monorepo, or standalone project? · integrated
✔ Application name · my-app
✔ Test runner to use for end to end (E2E) tests · playwright (also cypress)
✔ Default stylesheet format · scss (also css, less)
✔ Set up CI with caching, distribution and test deflaking · github
```
This command will create a new Nx workspace with a single Nuxt application, complete with essential features and ready for development.
## Enhancing an Existing Nuxt Project with Nx
Integrating Nx into an existing Nuxt.js project has never been easier, with the help of the `nx init` command. This command will add Nx to your project without the need to disrupt your current setup.
### How It Works
When you run `nx init` in your existing Nuxt.js project, Nx does the following:
- **Installs @nx/nuxt**: Adds the necessary Nx and @nx/nuxt dependencies to your project, enabling Nx's features while keeping your existing setup intact.
- **Understands Existing Configurations**: Nx automatically recognizes your nuxt.config.js or nuxt.config.ts file, ensuring that all your custom configurations, scripts, and commands are preserved and utilized.
- **Minimal Configuration**: Only a minimal `nx.json` file is added to your project. This file is used to configure the `@nx/nuxt` plugin if needed, but in most cases, your existing Nuxt.js configurations will suffice.
To begin the integration process, simply navigate to the root of your existing Nuxt.js project and run:
```shell
npx nx init
```
This approach offers several key benefits for teams looking to adopt Nx:
- **Zero Disruption**: Your project will continue to use its existing configurations, and the existing configuration entrypoint files. There's no need to learn new configuration syntaxes or reconfigure your project to start using Nx.
- **Immediate Value**: Instantly gain access to Nx's powerful developer tools and build system, without significant changes to your project.
- **Future Flexibility**: As your project grows, Nx is ready to scale with you. You can gradually adopt more Nx features and plugins over time, at a pace that suits your team.
## Using Nx to run your Nuxt app
Nx scans your workspace to look for Nuxt configuration files (eg. `nuxt.config.ts`). It uses these files to understand where your Nuxt projects live, and uses them to set up tasks that can be invoked through Nx, like `serve` and `build`. So, in your Nx workspace, you can then run:
```shell
nx serve my-nuxt-app
```
and
```shell
nx build my-nuxt-app
```
and these commands will call the `nuxt` CLI under the hood, enhanced with Nx's features.
You can see a visual representation of your task dependencies by running
```shell
nx graph
```
![Task graph - build](/blog/images/2024-02-06/bodyimg1.png)
You can also see how Nx configures your tasks, by running:
```shell
nx show project my-nuxt-app --web
```
![Project details](/blog/images/2024-02-06/bodyimg2.png)
![Project details - individual task details](/blog/images/2024-02-06/bodyimg3.png)
### Using Nx Console
You get access to all these features through our VSCode and WebStorm [Nx Console extension](/getting-started/editor-setup).
You can use Nx Console to visualize tasks, and understand where each inferred task (like `build` and `serve` in Nuxt's case) is coming from, with our codelens-like feature, as an alternative to the `--web` flag on the `nx show project` command.
Nx Console is also very convenient for generating code and running tasks, since it offers a graphical user interface for all the amazing features of the Nx CLI.
## What Does Nx Bring to Your Nuxt Development?
With `@nx/nuxt`, your Nuxt projects gain automatic recognition of `build` and `serve` processes. There's no need to deal with unfamiliar configurations; Nx intuitively understands your Nuxt project structure and optimizes accordingly.
### Modularize and Scale with Ease
One of the most compelling aspects of using Nx with Nuxt.js is the ability to modularize large applications into manageable libraries or components. This not only makes your codebase more organized and maintainable but also significantly enhances your development workflow and CI processes.
#### Breaking Down a Monolithic Nuxt App
Large Nuxt applications can become challenging to maintain and scale over time. By adopting Nx, you can structure your Nuxt app as a collection of smaller, focused libraries. Each library can encapsulate specific functionalities or features, such as UI components, utilities, or business logic.
#### Independent Development and Testing
This modular structure allows teams to work on different aspects of the application in parallel, reducing bottlenecks and improving collaboration. Furthermore, you can run tests, linters, and other checks independently for each library, making your development process more efficient and targeted.
For instance, if you want to create a new Vue UI library, you can use the following command:
```shell
nx generate @nx/vue:lib my-shared-ui
```
This command creates a my-shared-ui library within your workspace, which can then be used across your Nuxt app and potentially other applications within the same workspace.
#### Enhancing CI with Modular Builds
On the CI front, Nx's modular approach makes things much faster. You can configure your CI pipeline to build, test, and deploy only the affected libraries and applications, thanks to Nx's advanced dependency graph analysis. This results in faster CI runs and more efficient resource utilization.
#### Sharing Code Between Applications
Nx's workspace model facilitates code sharing between projects, which is particularly useful in monorepos containing multiple front-end projects. With Nx, sharing UI components, utilities, or services between these applications becomes straightforward.
To share code, simply import the library into your Nuxt and Vue applications as needed. Nx takes care of the rest, ensuring that dependencies are correctly managed and that your applications remain buildable and testable.
Imagine a scenario where your workspace contains a Nuxt application for your public-facing website and a Vue application for an internal tool. You can create a shared library for common UI components, such as buttons, inputs, and modals, and use these components in both applications. This not only reduces duplication but also ensures consistency across your projects.
```ts
// Importing a shared UI component in your Nuxt app
import { MyButton } from '@my-org/my-shared-ui';
```
```ts
// Importing the same component in your Vue app
import { MyButton } from '@my-org/my-shared-ui';
```
### Visualizing Your Project Structure
Nx provides a clear overview of your project's structure and dependencies, making it easier to manage complex applications. The Nx Console extension for VSCode, for instance, offers a graphical interface to visualize and run tasks, enhancing your development experience.
In your workspace, you can run
```shell
nx graph
```
and see the structure of your projects:
![A project graph](/blog/images/2024-02-06/bodyimg4.png)
## Embracing Nx in Your Nuxt Journey
Whether you're starting a new Nuxt project or looking to enhance an existing one, Nx offers a compelling set of tools and features to streamline your development process. From modularization to caching, the integration of Nx into your Nuxt projects promises a more efficient, scalable, and enjoyable development experience. By embracing Nx's capabilities in your Nuxt development, you're not just optimizing your current workflow; you're future-proofing your development process. As your projects grow and evolve, Nx's modular architecture and powerful tooling will continue to provide value, making your development experience more enjoyable and productive.
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [X / Twitter](https://twitter.com/nxdevtools) - [LinkedIn](https://www.linkedin.com/company/nrwl)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Community Discord](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app)
+127
View File
@@ -0,0 +1,127 @@
---
title: Fast, Effortless CI
slug: 'fast-effortless-ci'
authors: [Isaac Mann]
cover_image: '/blog/images/2024-02-07/featured_img.png'
tags: [nx, nx-cloud, release]
reposts: []
---
## From 90-minute to 10-minute CI Pipelines
{% youtube src="https://www.youtube.com/embed/_FSHQIwITic?si=GaAz4B0nYUEzVftN" title="Fast, Effortless CI" /%}
> TL;DR; Nx is releasing a new product called Nx Agents that dramatically improves the speed and maintainability of your CI pipeline.
In 2014, the state of the art for running tests and builds in your repository were tools like Gulp and Grunt. They were good enough to get the job done, but they were fundamentally **low-level** build tools. That is, they did exactly what they were programmed to do and no more. That approach works well in a single project where the configuration does not change frequently, but becomes problematic in a monorepo environment where there are multiple applications and multiple teams working in the same repository.
Nx was created in 2017 to address this problem. Nx is a build system that operates on a **higher level** where developers define the relationships between tasks and then Nx to decides the optimal way to run those tasks. In the same way, developers can define the inputs and outputs of tasks, then Nx automatically caches those task results. Developers tell Nx what a task does and then Nx can decide how best to run that task.
With [Nx Agents](/ci/features/distribute-task-execution), Nx is applying this same mindset to the problem of slow and costly CI pipelines. Nx gives you both **Smart Monorepos** and **Fast CI**.
## Why is CI So Hard?
Just like build tools from the last decade, CI pipelines are defined in a low-level, machine-oriented way. Each step in the pipeline is defined explicitly. It is up to the CI developer to ensure that all pre-requisites are available for each new step in the pipeline. If tasks need to be run in parallel on multiple machines, all the assets needed by each of those tasks need to be copied over to those machines before the tasks are run. Then, if the task dependencies ever change, the CI pipeline configuration needs to be updated to account for those changes.
The script below is a very simple example with only three tasks and one file being shared between them, but you can already see the complexity inherent in the system.
```yaml
jobs:
build_base:
steps:
- run: npm run build-base
- name: Save assets for use by other jobs
uses: actions/upload-artifact@v4
with:
name: base_output
path: base/output.ts
build_app1:
needs: build_base
steps:
- name: Download base output
uses: actions/download-artifact@v4
with:
name: base_output
- run: npm run build-app1
build_app2:
needs: build_base
steps:
- name: Download base output
uses: actions/download-artifact@v4
with:
name: base_output
- run: npm run build-app2
```
At any point in the future, if a task is added to the system or there is a change to the output files of build_base, this pipeline will need to be updated.
## A Build System That Runs Your CI
Part of the reason CI is so difficult to maintain is that it has no knowledge of your repository. Your CI provider cant optimize your pipeline because it doesnt even know the language youre using, let alone relationships between your projects. A build system, on the other hand, must know all that information in order to properly function.
The key that unlocks all the power of Nx Agents is this architectural shift:
> Rather than the traditional approach where your CI provider invokes a build tool, the Nx build system will manage your CI pipeline.
Nx already knows how your repository is structured and the best way to run tasks locally. Nx can use that exact same knowledge to run tasks in the best way on multiple machines in CI.
## Distribute Tasks with Nx Agents
When using Nx Agents, distributing tasks across multiple machines becomes as simple as running those tasks on your local machine. This is because any task artifacts will automatically be copied to the agent machines where they are needed.
Instead of explicitly defining what order to run tasks, your CI pipeline only needs to tell Nx **what** needs to be accomplished and Nx will figure out **how** best to do it.
![](/blog/images/2024-02-07/bodyimg1.webp)
The pipeline configuration below will work no matter how many projects are in the repository or how complex the dependencies between those projects are.
```yaml
jobs:
main:
# Tell Nx Cloud how many agents to use and the name of the last task
- run: |
nx-cloud start-ci-run \
--distribute-on="3 linux-medium-js" \
--stop-agents-after="e2e-ci"
# Run tasks the same way you would locally
- run: nx affected -t lint test build --parallel=3
- run: nx affected -t e2e-ci --parallel=1
```
The only reason to modify this file is if you need to change the number of agent machines or there is another type of task that needs to run in CI.
The `linux-medium-js` name in the CI configuration refers to a built-in launch template that Nx provides. If you can not find a template in [the default list](https://github.com/nrwl/nx-cloud-workflows/blob/main/launch-templates/linux.yaml) that meets your needs, you can provide your own. [With a single yaml file](/ci/reference/launch-templates), you can set up your agent environment in exactly the way you want with your own launch template.
## Dynamically Allocate Agents
Nx understands that some CI pipelines need more resources than others. To account for this, Nx Agents gives you the ability to [define three different classes of agent allocation configurations](/ci/features/dynamic-agents). You can use fewer agents for smaller PRs and more agents for larger PRs. This allows you to save money where possible and use the full power of Nx Agents when needed.
![](/blog/images/2024-02-07/bodyimg2.webp)
## Automatically Split E2E Tasks by File
Typically, e2e tests are the tasks that take the longest in CI. In order to take advantage of parallelization and task distribution, these large tasks would need to be split into smaller tasks, but doing this manually would involve duplicating a lot of configuration code and making sure to keep that configuration synchronized. Nx 18s [Project Crystal](/blog/what-if-nx-plugins-were-more-like-vscode-extensions) allows you to [automatically create separate Cypress and Playwright tasks](/ci/features/split-e2e-tasks) for each spec file in the e2e project. These individual tasks can all be triggered by running the `e2e-ci` task. What was once a tedious manual process can now be done for you automatically.
![](/blog/images/2024-02-07/bodyimg3.webp)
## Identify and Re-run Flaky Tasks
There are some tasks that will fail or succeed in CI without any changes to the tasks code. These are flaky tasks and in order to merge a change in unrelated code, developers need to manually re-run the entire pipeline until that flaky task succeeds. Because Nx is already tracking inputs and outputs of tasks, it knows when a task is flaky. Now, Nx Cloud will [automatically re-run a flaky task if it fails](/ci/features/flaky-tasks), without a developer needing to manually trigger it.
![](/blog/images/2024-02-07/bodyimg4.webp)
## Run Some Tasks on Another CI Provider
If you have a task that cant be run on Nx Agents for some reason, you can easily [flag it to run directly on the main CI job](/ci/reference/nx-cloud-cli#enablingdisabling-distribution). Add a `--no-agents` flag to the command and Nx will not run it on an agent.
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
@@ -0,0 +1,322 @@
---
title: Versioning and Releasing Packages in a Monorepo
slug: 'versioning-and-releasing-packages-in-a-monorepo'
authors: [Juri Strumpflohner]
cover_image: '/blog/images/2024-02-09/featured_img.png'
tags: [nx, nx-cloud, releases, changelog]
---
When it comes to publishing NPM packages, there are a bunch of libraries and utilities out there that help with the process. Many of them are tricky when it comes to properly configuring them in a monorepo.
Nx already has all that knowledge, and it can leverage the information it has about your project dependencies and relationships to optimize your task runs.
Heres the structure of our current example workspace were going to refer to in this article:
![@tuskdesign/demo relies on @tuskdesign/forms and @tuskdesign/buttons, and @tuskdesign/forms also depends on @tuskdesign/buttons](/blog/images/2024-02-09/bodyimg1.webp)
As you can see `@tuskdesign/forms` relies on `@tuskdesign/buttons` and as such has to consider that when running versioning and publishing.
> **Note:** it is worth mentioning that the Nx community has also stepped up in the past and created jscutlery/semver, a package that adds semantic versioning and publishing to your Nx workspace. Make sure to check that out as well.
---
**Prefer a video?**
{% youtube src="https://www.youtube.com/embed/KjZKFGu3_9I?si=L-8oRzy-hV-WF_pS" title="Versioning and Releasing Packages in a Monorepo" /%}
---
## Table Of Contents
- [Adding Nx](#adding-nx)
- [Installing the JavaScript/TypeScript versioning Package](#installing-the-javascripttypescript-versioning-package)
- [Running Nx Release](#running-nx-release)
- [Excluding Packages](#excluding-packages)
- [Running the Versioning and Changelog Generation](#running-the-versioning-and-changelog-generation)
- [Versioning using Conventional Commits](#versioning-using-conventional-commits)
- [Generating a GitHub Release](#generating-a-github-release)
- [Programmatic Mode](#programmatic-mode)
- [Wrapping Up](#wrapping-up)
- [Learn more](#learn-more)
## Adding Nx
You can add Nx to your existing monorepo workspace using the following command:
```shell
pnpm dlx nx@latest init
```
(use `npx nx@latest init` in a NPM workspace)
This brings up a couple of questions including whether to install [Project Crystal plugins](/blog/what-if-nx-plugins-were-more-like-vscode-extensions).
![](/blog/images/2024-02-09/bodyimg2.webp)
It gives you some additional benefits ([you can read more here](/blog/what-if-nx-plugins-were-more-like-vscode-extensions)), but you dont have to as it is not required for Nx Release.
## Installing the JavaScript/TypeScript versioning Package
Nx Release is made to handle the versioning and publishing of any package. For now, the Nx team provides the JS/TS package publishing approach, which comes with the `@nx/js`. You could provide your own implementation, like for Cargo, NuGet etc.
```shell
pnpm add @nx/js -w
```
_(We use the `-w` flag to install it at the monorepo root level)_
## Running Nx Release
Once youre set-up, you can already go ahead and run the following command:
```shell
pnpm nx release --dry-run
```
This command will do the versioning, changelog generation, and publishing steps together. Note the `--dry-run` simply simulating a run.
![](/blog/images/2024-02-09/bodyimg3.webp)
Youll get asked whether you want to release a major, pre-major, minor… release or choose an exact version.
Once this runs through, you might hit the following error:
![Error message that reads: "> NX Unable to determine the previous git tag. If this is the first release of your workspace, use the --first-release option or set the "release.changelog.automaticFromRef" config property in nx.json to generate a changelog from the first commit. Otherwise, be sure to configure the "release. releaseTagPattern" property in nx.json to match the structure of your repository's git tags.](/blog/images/2024-02-09/bodyimg4.webp)
Since Nx Release has never been run on this repository, it cannot figure out the historical information, for instance, to generate the changelog starting from previous git tags. Re-run the command with `--first-release`
```shell
pnpm nx release --dry-run --first-release
```
If you inspect the console output, you can see that:
- it would increment the version in the package.json
- update the pnpm (or npm) lockfile
- stage the changes with git
- creates a `CHANGELOG.md` file
- git commits everything
- git tags the commit using the version
The dry-run mode also nicely previews all `package.json` changes in a git diff style:
![](/blog/images/2024-02-09/bodyimg5.png)
Note, if you want to get even more insights into what is happening when running the command, you can use the `--verbose`, which will also print the actual git commands.
## Excluding Packages
If you look closely at the dry-run logs, you may notice that Nx Release bumped the version on all of our packages:
- `@tuskdesign/forms`
- `@tuskdesign/buttons`
- `@tuskdesign/demo`
![](/blog/images/2024-02-09/bodyimg6.png)
While we want to have it bumped on the `forms` and `buttons` packages, the `demo` is just for us to test things in the workspace. In this particular workspace, Nx Release doesn't have a way to distinguish what is an app and what is a library/package. Note, if you're in an Nx-generated workspace that uses Nx Plugins, you'd potentially have that classification in the `project.json` files.
In our particular scenario, let's exclude `@tuskdesign/demo` as follows:
```json {% fileName="nx.json" %}
{
...
"release": {
"projects": ["*", "!@tuskdesign/demo"]
}
}
```
You can also explicitly list the packages to be released individually. Or, as shown above, include all (`*`) and exclude the private package.
If you re-run the `nx release` command, you'll see that `@tuskdesign/demo` will be ignored now.
## Running the Versioning and Changelog Generation
Once you have configured the excluded packages, feel free to go ahead and run the command without `--dry-run:`
```
pnpm nx release --first-release
```
You can skip the release part when prompted for now. Check how the workspace got updated, incrementing the `package.json` version property and updating the version on the package dependency definition, i.e. the `@tuskdesign/buttons` version got updated in the `@tuskdesign/forms` package.json.
## Versioning using Conventional Commits
Instead of manually confirming the next version each time, we can use a versioning strategy: [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) is a commonly adopted approach for publishing packages.
To configure conventional commits with Nx Release, go to the `nx.json` and adjust it as follows:
```json {% fileName="nx.json" %}
{
...
"release": {
"projects": ["*", "!@tuskdesign/demo"],
"version": {
"conventionalCommits": true
}
}
}
```
If you now run...
```shell
pnpm nx release --dry-run
```
... you'll notice that it doesn't pick up any changes because it leverages conventional commit, and we haven't changed anything yet.
![](/blog/images/2024-02-09/bodyimg7.webp)
Lets go ahead and change something in our `@tuskdesign/buttons` package and then commit it as follows:
```shell
git commit -am 'feat(buttons): add new background shadow'
```
Now re-run the `nx release command` (don't forget the `--dry-run`). You'll see how it chooses `v1.2.0` as our new version (we had `v1.1.0` previously), given we added a new feature (denoted by the `feat(...)` conventional commit).
![](/blog/images/2024-02-09/bodyimg8.webp)
It also generates a nice `CHANGELOG.md` for us:
```shell
## 1.2.0 (2024-02-09)
### 🚀 Features
- **buttons:** add new background shadow
### ❤️ Thank You
- Juri
## 1.1.0 (2024-02-09)
This was a version bump only, there were no code changes.
```
## Generating a GitHub Release
Instead of just generating a `CHANGELOG.md` entry in our repository you can also opt-in for creating a Github release (here's the example of the [Nx repository](https://github.com/nrwl/nx/releases)).
```json {% fileName="nx.json" %}
Use the `createRelease` property and set it to `github`.
{
...
"release": {
"projects": ["*", "!@tuskdesign/demo"],
"version": {
"conventionalCommits": true
},
"changelog": {
"workspaceChangelog": {
"createRelease": "github"
}
}
}
}
```
To see the working, you need to make sure to:
- push the repo to GitHub
- make some change so you can run the `nx release` command again and get a changelog generated
- now also get a GH release created
Note, you can still use `--dry-run` and it'd show you the URL where the GitHub release would be created. You can also use the `--skip-publish` to skip the NPM publishing.
## Programmatic Mode
As youve seen, you can use `nx release` right away with minimal configuration. However, we are very well aware that many real-world scenarios are more complex, you want/need more control over when the version is happening, when the changelog generation kicks in and so on. This is why we also introduced a **programmatic API.**
This approach gives you full control to embed Nx Release into your current release flow. Theres a nice [example script in our docs](/features/manage-releases#using-the-programmatic-api-for-nx-release) that can help you get started.
Create a file — I call it `release.ts` - at the root of my workspace. Nx Release obviously doesn't care how the file is called or where you place it. You can also go with plain JS.
Heres the [example script from our docs](/features/manage-releases#using-the-programmatic-api-for-nx-release):
```ts
import { releaseChangelog, releasePublish, releaseVersion } from 'nx/release';
import * as yargs from 'yargs';
(async () => {
const options = await yargs
.version(false) // don't use the default meaning of version in yargs
.option('version', {
description:
'Explicit version specifier to use, if overriding conventional commits',
type: 'string',
})
.option('dryRun', {
alias: 'd',
description:
'Whether or not to perform a dry-run of the release process, defaults to true',
type: 'boolean',
default: true,
})
.option('verbose', {
description:
'Whether or not to enable verbose logging, defaults to false',
type: 'boolean',
default: false,
})
.parseAsync();
const { workspaceVersion, projectsVersionData } = await releaseVersion({
specifier: options.version,
dryRun: options.dryRun,
verbose: options.verbose,
});
await releaseChangelog({
versionData: projectsVersionData,
version: workspaceVersion,
dryRun: options.dryRun,
verbose: options.verbose,
});
// The returned number value from releasePublish will be zero if all projects are published successfully, non-zero if not
const publishStatus = await releasePublish({
dryRun: options.dryRun,
verbose: options.verbose,
});
process.exit(publishStatus);
})();
```
You can invoke it with [tsx](https://github.com/privatenumber/tsx) or [tsnode](https://www.npmjs.com/package/ts-node).
```
pnpm dlx tsx release.ts
```
Notice by default in the script we have `dry-run` enabled as a more cautious approach to not accidentally publish something as we keep editing and trying our programmatic setup.
From here on you have full control and can pretty much do whatever works best for your workspace setup. Common examples include:
- moving files to a common root-level `dist/` folder and version and release them from there. This is pretty common to avoid messing with your src files and swapping versions there, allowing you to always depend on the latest local packages for instance.
- setting up fully automated releases on CI, including enabling provenance support. Our docs have [more details on how to set that up](/recipes/nx-release/publish-in-ci-cd) or check out the linked talk above which goes through those steps.
## Wrapping Up
With this release of Nx Release it is fully ready to be used. Make sure to check out our docs on [Managing Releases](/features/manage-releases) as well as our [release-related recipes](/recipes/nx-release).
Here are some example repositories already leveraging Nx release:
- [Our own Nx Repo](https://github.com/nrwl/nx/blob/master/scripts/nx-release.ts)
- [RxJS repo](https://github.com/ReactiveX/rxjs/tree/master/scripts)
- [Typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/blob/main/tools/release/release.mts)
- [Watch the live stream](https://www.youtube.com/watch?v=lYNa6Ct4RkY) with [Kent](https://twitter.com/kentcdodds) and [James](https://twitter.com/MrJamesHenry) as they enable Nx Release on the [EpicWeb workshop app repository](https://github.com/epicweb-dev/kcdshop)
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [X / Twitter](https://twitter.com/nxdevtools) — [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+148
View File
@@ -0,0 +1,148 @@
---
title: Launch Nx Week Recap
slug: 'launch-nx-week-recap'
authors: [Zack DeRose]
cover_image: '/blog/images/2024-02-15/featured_img.png'
tags: [nx, nx-cloud, releases, changelog]
---
We just finished wrapping up [Launch Nx Week](/launch-nx), which ran from February 59, including a full conference on Thursday!
In this article, were going to recap all the things launched during Launch Nx Conf, as well as all the talks given during the conference! Heres a set of links so you can fast-forward to the stuff youre most interested in if you want!
**Prefer a video?**
{% youtube src="https://www.youtube.com/embed/Ed1ZCNqWF1Q?si=m8LRyeJy_ZbCODJP" title="Launch Nx Week Recap" /%}
---
- [Nx 18.0 && Project Crystal](#nx-180-project-crystal)
- [Project Crystal — By Juri Strumpflohner](#conference-talk-project-crystal)
- [Project Crystal + .NET in Action — By Craigory Coppola](#conference-talk-project-crystal-net-in-action)
- [New Plugin: @nx/nuxt](#new-plugin-nxnuxt)
- [Nx Agents](#nx-agents-launched)
- [Nx Agents Walkthrough: Effortlessly Fast CI Built for Monorepos — By Rares Matei](#conference-talk-nx-agents-walkthrough-effortlessly-fast-ci-built-for-monorepos)
- [Solving E2E Tests — By Altan Stalker](#conference-talk-solving-e2e-tests)
- [Tusky](#tusky)
- [Nx Release](#nx-release-is-stable)
- [Releasing Nx Release — By James Henry](#conference-talk-releasing-nx-release)
## Nx 18.0 && Project Crystal
Exciting news!! Weve broken our standard release cadence of publishing a new major version every 6 months to release Nx 18, just 3 months after releasing Nx 17 in December 2024.
Juri announced launched Project Crystal with this video:
{% youtube src="https://www.youtube.com/embed/Ed1ZCNqWF1Q?si=m8LRyeJy_ZbCODJP" title="Nx Project Crystal" /%}
The short version is: Nx project crystal means Nx plugins make your codebases work more seemlessly with less config.
For the long version, checkout this blog post by Juri where he describes [how Nx plugins are now more like VsCode Extentions](/blog/what-if-nx-plugins-were-more-like-vscode-extensions)!
And dont miss our two conference talks on this subject:
### Conference Talk: Project Crystal
**Speaker:** [Juri Strumpflohner](https://twitter.com/juristr) | [slides](https://drive.google.com/file/d/1q6M0drdssU7Zb-4Y_f99fuupuOl1KYQN/view)
{% youtube src="https://www.youtube.com/embed/PzCgpM7qtTU?si=U5aEC7XjeS1NeKbT" title="Juri Conference Talk Project Crystal" /%}
### Conference Talk: Project Crystal + .NET in Action
**Speaker:** [Craigory Coppola](https://twitter.com/enderagent) | [slides](https://docs.google.com/presentation/d/1uveIe6HB7xwSkh7FBGZfF8Unh5YZzm5X/edit?usp=sharing&ouid=109667724870581513512&rtpof=true&sd=true) | [example repo](https://github.com/AgentEnder/nx-launch-conf-demos)
{% youtube src="https://www.youtube.com/embed/fh-yzOuQGE8?si=a-XRXJfaBCerz3i-" title="Craigory Conference Talk Project Crystal + .Net" /%}
## New Plugin: @nx/nuxt
On Tuesday we launched our newest plugin, and our first plugin to be :gem:crystalized:gem: from its very beginning: @nx/nuxt!
Zack explains Nuxt and how to use the new plugin in this video:
{% youtube src="https://www.youtube.com/embed/1L-bDvEemoc?si=wHQvuTDfXFs3vjaC" title="Zack explaining new plugin @nx/nuxt" /%}
To add @nx/nuxt to your codebase, use the command:
```shell
> nx add @nx/nuxt
```
Huge thanks to [Katerina](https://twitter.com/psybercity) for her work on the plugin, and Nuxt maintainer, [Daniel Roe](https://twitter.com/danielcroe), for helping to guide the project!
Zack, Katerina, and Daniel got together to live code a working tic-tac-toe app using the new Nuxt plugin and [partykit](https://www.partykit.io/) in this livestream:
{% youtube src="https://www.youtube.com/embed/uHwUxFYX2DY?si=lyYg3XPIx688k8HY" title="@nx/nuxt with Nuxt maintainer, Daniel Roe!" /%}
## Nx Agents Launched
Nx Agents are here!! We launched Nx Agents on Wednesday, and it climbed into the top 20 on [Product Hunt](https://www.producthunt.com/products/nx-cloud#nx-agents)!
Were very excited about Nx Agents because we think that in its current state, Continuous Integration/Deployment is broken, and we think that Nx paired with Nx Agents fixes Continuous Integration. Zack explains more in this video:
{% youtube src="https://www.youtube.com/embed/_FSHQIwITic?si=jDpwTVXLYFXiHEm0" title="Nx Agents" /%}
Be sure to also checkout the [blog post from Isaac on Nx Agents](/blog/fast-effortless-ci), including explanations of exclusive features like auto-detection and retrying for flaky tasks and automatically splitting lengthy end-to-end tests!
You can [signup for Nx Agents NOW](https://nx.app/products/agents#content), and find out [more of the details in our docs](/ci/features/distribute-task-execution)!
Rares and Altan are on the team building Nx Cloud, and during the conference, they dove deeper into some of these topics:
### Conference Talk: Nx Agents Walkthrough: Effortlessly Fast CI Built for Monorepos
**Speaker:** [Rares Matei](https://twitter.com/__rares) | [slides](https://drive.google.com/file/d/1k-cGCJUMP4axcCWoeih8n3dvo1oO_i_X/view?usp=sharing) | [example repo](https://github.com/rarmatei/shops-workflows/pulls) | [failed runs example](https://cloud.nx.app/cipes/65b27cf6d3ef5934decad746?utm_source=pull-request&utm_medium=comment) | [nx agents full run](https://cloud.nx.app/cipes/65b38179d3ef5934dede74c2?utm_source=pull-request&utm_medium=comment)
{% youtube src="https://www.youtube.com/embed/XS-exYYP_Gg?si=skZTGYPEVJG7BrYZ" title="Nx Agents Walkthrough" /%}
### Conference Talk: Solving E2E Tests
**Speaker:** [Altan Stalker](https://twitter.com/StalkAltan)
{% youtube src="https://www.youtube.com/embed/EO_tGa0Nx1s?si=3AvGaJkJaCeEjz1r" title="Solving E2E Tests" /%}
## Tusky
Thursday, we had a surprise announcement for our newest product on Nx Cloud: Tusky.
{% youtube src="https://www.youtube.com/embed/Xfvv09wSoM8?si=jnzyLHtdWBLwx_U0" title="Tusky" /%}
Tusky is an Artificial Intelligence for your codebase, and it will be available on Nx Cloud soon — starting in Spring of 2024.
In the teaser video, you can see some ways Tusky will be integrated into Nx Cloud to provide explainations on failed tasks, or cache misses.
The more exciting features of Tusky though includes the ability to perfectly optimize the number of agents used per PR — even spinning up and tearing down agents mid-pipeline! This is a huge optimization for task distribution, and will help optimize both walltime of your CI, as well as compute costs!
Tusky will also be able to provide organizational-level insights to your codebase, including automatically detecting development groups (like lines of business) inside your codebase based on commit history, and providing statistical insights on their commit patterns. Were also excited about Tusky being able to make suggestions on things you can do to further optimize your codebase — like generating a PR to introduce [Codeowners](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners) to the repo!
## Nx Release Is Stable
Versioning and publishing packages is always a bit tricky. Mix in the added complexity of having multiple packages — sometimes with different versioning or publishing strategies — inside the same codebase, and things can get weird quick!
For a long time, Nx has been purposefully versioning and publishing agnostic, but given our time spent as [stewards of Lerna](https://blog.nrwl.io/lerna-is-dead-long-live-lerna-61259f97dbd9) (the OG Javascript monorepo tool), weve been able to take alot of that experience and finally feel confident creating our own versioning and publishing implementation.
Therefore, weve been working on a new command to the Nx CLI: [nx release](/recipes/nx-release/get-started-with-nx-release#get-started-with-nx-release). We launched this on Friday of our Launch Nx week!
Juri goes into [full details in this blog post](/blog/versioning-and-releasing-packages-in-a-monorepo), and James Henry — our Director of Engineering and the primary engineer responsible for both maintaining Lerna and creating Nx Release — expands further in his conference talk:
### Conference Talk: Releasing Nx Release
**Speaker:** [James Henry](https://twitter.com/MrJamesHenry) | [example repo](https://github.com/JamesHenry/nx-release-cmd)
{% youtube src="https://www.youtube.com/embed/KjZKFGu3_9I?si=83DjaHhpBSP7NP4n" title="Releasing Nx Release" /%}
## Wrapping up
Juri, Zack, and Victor wrapped up the week with a livestream recapping the launches from the week — including answering your questions live:
{% youtube src="https://www.youtube.com/embed/xjLrFvEcxZw?si=O70JD4NgseP0lknA" title="Launch Nx Week Wrap Up" /%}
Thats all for now folks! Were just starting up a new iteration of development on Nx, so be sure to subscribe to [our YouTube channel](https://www.youtube.com/@nxdevtools) to get updates when new features land! Until next time, KEEP WORKING HARD!
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+105
View File
@@ -0,0 +1,105 @@
---
title: Monorepos - Why Speed Matters
slug: 'monorepos-why-speed-matters'
authors: ['Katerina Skroumpelou', 'Jeff Cross']
tags: [nx, nxdevtools, speed, ci]
cover_image: '/blog/images/2024-03-20/featured_img.png'
---
In the ever-evolving landscape of software development, efficiency and speed are vital. As projects grow in complexity, developers and teams need tools that can keep up without sacrificing quality or performance.
Nx is a suite of powerful tools designed to optimize your development workflow, which sets the [building blocks for a fast CI](/ci/concepts/building-blocks-fast-ci). Nx is always innovating in many ways to make developers lives easier, but this post is exclusively focused on the things Nx has done in the past year to make development faster and faster.
## Why speed matters
The ability to iterate quickly and efficiently is vital for any software project. Speed in the development process offers several critical advantages:
- **Faster feedback loops:** Quick iterations mean immediate feedback, allowing teams to adapt, learn, and improve their work on the fly.
- **Reduced time to market:** Accelerating the development process can significantly cut down the overall time to market, providing a competitive edge which reclaims revenue that would have otherwise been lost.
- **Decreased developer frustration:** [No more waiting for builds and tests to complete](/ci/concepts/reduce-waste). A streamlined workflow keeps morale high and productivity higher.
If youre using Nx already, youre already familiar with
- [**Affected**](/ci/features/affected) - identifying and running tasks only on projects impacted by code changes,
- [**Nx Replay**](/ci/features/remote-cache) - our powerful cache and
- [**Nx Agents**](/ci/features/distribute-task-execution) - the concept of [Parallelization and Distribution](/ci/concepts/parallelization-distribution).
But lets see all the extra things we did this past year to make everything faster.
## Speed at the core
### Rustifying Nx
The Nx daemon has seen significant enhancements, notably through the use of Rust to calculate file hashes behind the scenes. This improvement not only speeds up the start-up times but also optimizes performance even without the daemon, especially on CI environments where the daemon isn't used. The benchmark results at [this repo](https://github.com/vsavkin/large-monorepo) showcase the remarkable speed improvements, making Nx competitive with native code solutions while maintaining the accessibility and flexibility of Node.js. Nx is still Node-first, so contributions are easier and only the most performance-critical parts of Nx are native code.
### **Task Hasher and archive file innovations**
The introduction of a task hasher written in Rust, alongside the use of an archive file to store workspace file hashes (`.nx/cache`), has significantly reduced the need for repetitive file system accesses. This innovation means that running multiple Nx commands in CI is much faster, as file hashing becomes unnecessary after the initial run.
**The Archive file**
The archive file is a binary file that contains the workspace file hashes with their last modified time. Every time Nx starts (ie, running `nx run project:target`) it gets all the files with their last modified time, and compares it to the archive. If the file exists in the archive, then Nx does not access the file system to read the file to hash (reading individual files is slower than just getting a list of files from a directory). So running multiple nx commands in CI is quick to start because Nx does not need to constantly hash files.
### Nx Replay
![](/blog/images/2024-03-20/bodyimg1.webp)
Nx Replay enables caching and reusing of task results. Its our well known Nx remote cache! It allows developers to avoid re-running expensive tasks by retrieving the cached results from a remote cache. This significantly improves build and test performance, as well as developer productivity. Nx Replay is also critical to the functioning of Nx Agents, which rely on the remote cache to ensure that the results of a task will be shared with every agent that needs them. By using Nx Replay, developers can optimize their workflows and reduce the time spent waiting for tasks to complete.
With Nx Replay, you can see significant speed improvements in your CI pipelines for modified PRs. Whats also important is that if a task has been executed in CI, a developer running that same task locally can reuse the task result instead of actually running the task. So you will also see improvements locally.
### **Nx Agents**
![](/blog/images/2024-03-20/bodyimg2.avif)
[Nx Agents](/ci/features/distribute-task-execution) represent the pinnacle of task distribution optimization, ensuring that tasks are executed as efficiently as possible based on the specific requirements of each change. Some features that make up this effort are:
- [Easy integration with existing providers](/ci/features/distribute-task-execution#cicd-guides)
- Distribution is handled on the Nx Cloud infrastructure and all you need is a single line. Whats more, all results are played back to your original CI provider script which triggers the Nx Cloud distribution, so that you can make use of the resulting artifacts
- [Efficient task distribution](/ci/features/dynamic-agents)
- Save compute resources and reduce costs, minimizing idle time and compute waste
- Dynamic sizing based on PR size
- [Tusky](https://nx.app/products/tusky) - our AI solution - coming soon
- You set your desired cost/speed ratio, and you forget about any more configuration. We ensure maximum speed up to limits you set yourself.
You can read more about Nx Agents [here](https://nx.app/products/agents#content).
### **Atomizer**
The [Atomizer](/ci/features/split-e2e-tasks) splits your Cypress or Playwright e2e tests by file. This significantly enhances granularity for caching, parallel execution, and flaky test identification. This granular approach ensures that individual test results can be cached and only the necessary tests rerun, greatly reducing CI pipeline times and facilitating more accurate flaky test detection.
{% youtube src="https://www.youtube.com/watch?v=0YxcxIR7QU0" /%}
### **Addressing flaky tests with test deflaking**
Flaky tests can be a significant bottleneck in the CI process. Nx tackles this issue head-on by intelligently [re-running only the flaky tasks](/ci/features/flaky-tasks), rather than the entire pipeline. This approach not only saves time but also provides developers with more confidence in their CI pipeline's reliability.
![](/blog/images/2024-03-20/bodyimg3.avif)
Nx creates a hash of all the inputs for a task whenever it is run. If it encounters a task that fails with a particular set of inputs and then succeeds with those same inputs, Nx knows for a fact that the task is flaky.
## New Nx features that tie in with our core speed improvements
### Module Federation
With the help of Nx and the Module Federation setup that Nx offers, you can split up large Angular apps into smaller “vertical slices”. This can significantly speed up your builds and app startup time. Nx has revolutionized the use of Module Federation, especially in how static remotes are built and served. We make use of Nxs task orchestration, allowing users to fine tune the number of builds happening in parallel to improve local startup time, manage machine resources better, allow for scaling.
### First-Class Playwright support
With first-class support for Playwright through **`@nx/playwright`**, Nx offers out-of-the-box generators to run Playwright tests efficiently. This integration is especially powerful with features like Atomizer, enhancing the testing process's speed and reliability.
## Conclusion
Nx provides an unparalleled toolkit for developers and teams looking to optimize their development workflows, and we keep making it faster. By intelligently leveraging modern technologies and innovative optimizations, Nx delivers speed, efficiency, and reliability, allowing teams to focus on what matters most: building great software.
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [X / Twitter](https://twitter.com/nxdevtools)
- [LinkedIn](https://www.linkedin.com/company/nrwl)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Community Discord](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app)
+189
View File
@@ -0,0 +1,189 @@
---
title: Reliable CI. A new execution model fixing both flakiness and slowness
slug: 'reliable-ci-a-new-execution-model-fixing-both-flakiness-and-slowness'
authors: [Victor Savkin]
cover_image: '/blog/images/2024-03-21/featured_img.png'
tags: [nx, nx-cloud, releases]
---
The proverbial slow and flaky CI isnt the failure of the developers or even the testing tools. Its the failure of the CI execution model we relied on for the last 20 years.
**By switching from the old CI model, implemented as a graph of VMs, to the new one, implemented as a graph of tasks, we can solve both the flakiness and slowness.**
In this blog post Ill explore why this is the case, and how you can do it by using Nx Cloud.
---
## History of CI
Its easy to forget that Continuous Integration has been around for only 20 years. For reference, UI frameworks have been around since the 1970s.
![](/blog/images/2024-03-21/bodyimg1.webp)
The innovation in the CI space has been primarily in where the CI process is described and how the configuration is written. How the CI actually works has largely remained the same.
## How CI works
A traditional CI execution is a directed acyclic graph (DAG) of virtual machines (VMs). Each VM (often called a job) installs dependencies, restores NPM cache, and then runs the necessary steps to verify that, say, some tests pass.
![](/blog/images/2024-03-21/bodyimg2.webp)
**This CI execution is a distributed process, and a poorly designed one. It works reasonably well only when the number of jobs/VMs is very small and falls apart when the number gets larger.**
---
## Why does the current system not work?
**Every distributed system needs efficient communication between nodes and the ability to tolerate failure.**
The traditional CI execution model offers **very basic** means of communication: the status code propagation and ad-hoc ways of uploading/downloading files. Because the communication is effortful, in practice, **its either not done at all or very minimally.**
To understand why the traditional CI execution model fails to handle failures, lets review the types of failures we can have.
Failures can be:
- hard _(npm fails to install, nothing can run)_
- soft _(a test takes a lot longer than it should because, perhaps, due to an out-of-memory issue)_
Focusing on the latter is just as important as focusing on the former. **Slow CI is broken CI.**
Tasks can fail:
- legitimately _(a broken build)_
- for external reasons _(npm install fails cause npm is down)_
- for unknown reasons _(a flaky test)_
**The traditional CI execution model doesnt tolerate any of these failures.**
## Problem in numbers
Lets see how varying a few parameters affects the probability of the CI execution failing.
| Number of VMS | Avg Tests per VM | Flaky Test Probability | Slow Test Probability | Broken CI Builds (Flaky) | Slow CI Builds |
| ------------- | ---------------- | ---------------------- | --------------------- | ------------------------ | -------------- |
| 5 | 10 | 0.1% | 0.3% | 5% | 15% |
| 10 | 10 | 0.1% | 0.3% | 10% | 26% |
| 50 | 10 | 0.1% | 0.3% | 39% | 78% |
| 5 | 10 | 0.5% | 1% | 23% | 41% |
| 10 | 10 | 0.5% | 1% | 40% | 65% |
| 50 | 10 | 0.5% | 1% | 92% | 99% |
**The result is much worse than most intuitively expect.** For instance, assuming that an **e2e test has 1 in 1000 chance (0.1%) of failing** for a flaky reason, when the number of e2e tests reaches 500, **the probability of the CI failing for a flaky reason reaches 39%**, and the vast majority of CI executions are slowed down. Note, this is an exceptionally stable test suite. The bottom part of the table is more representative of a typical e2e suite, and the CI becomes “broken” at a much smaller scale.
One can try to fix it by increasing the robustness of the tests, but at some point, doing this is costly. If an e2e test has a 10% chance of a flaky failure, its relatively easy to bring this number to 1%. Going from 1% to 0.5% is harder. Going from 0.5% to 0.1% is exceptionally hard and may be practically impossible. Testing complex systems is simply a difficult task.
This is the formula for the failed CI run:
![100 * (1-chanceThatTestRunsWithoutFlakes ^ (avgTestsPerVm * numberOfVms))](/blog/images/2024-03-21/bodyimg3.webp)
**As you can see, as the number of tests grows, the exponent will make more and more CI executions fail for flaky reasons. In this model, the only way to combat it is by increasing $chanceThatTestRunsWithoutFlakes$, but the more tests you have, the more challenging this becomes.** That's why a lot of projects move away from e2e tests or run them nightly (where they always fail).
**It's not the team's fault. It's simply a losing battle with the current CI execution model.**
We focused on the tests but the issue is more general.
VMs sometimes fail to execute their setup steps (e.g., some package fails to install), and in this model it results in a failed CI execution.
One of the setup steps can take a lot longer. Because the probabilities multiply, when the number of agents is high enough, this will happen frequently and will slow down a large number of CI executions. This is the formula for this case:
![100 * (1-chanceSetupIsFast ^ numberOfVms)](/blog/images/2024-03-21/bodyimg4.webp)
For instance, with 50 agents, if there is a **1% chance that NPM install will take an extra 5 minutes, 40% of CI executions will be affected by it**, and your CI execution time goes from, say, **20m to 25m**. The slowness doesn't amortize across agents.
---
## Solution: Change the model
**There is only that much gain to be had by optimizing the effectiveness and robustness of small units. Instead, we should focus on creating the systems we can use to achieve incredible performance and resilience with ordinary small units.**
The CI model above has a fundamental problem: it is static. It defines a fixed number of VM, where each has a unique job to do. The VMs aren't interchangeable. If one of them fails or is slow, no other VM can help it.
Nx Cloud introduces an entirely different model. Instead of the graph of VMs, the CI execution is expressed as a graph of tasks.
By adding the following line…
```shell
npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js"
```
... you are telling Nx Cloud to create five Nx Agents to execute all the tasks from all the commands that will follow.
![](/blog/images/2024-03-21/bodyimg5.webp)
**Nx Agents** are essentially VMs, but they are different from the ones in the traditional CI execution model.
You can imagine the **traditional CI** model as a team where every member is given a **unique set of tasks.** If a team member gets sick, their work won't be completed, and the **CI execution will fail.** If a team member is slow, **no one can help them.** Everyone will just have to wait for them to complete their assignment.
The **Nx Agent model** is a team where the **work doesn't get assigned ahead of time.** Instead, there is a pile of work in the middle of the room, and every **team member can take any piece of work** and do it. Once they are done with one piece of work, they can take another one. If a member gets sick, **a slightly smaller team can complete the job.** If a member is **slow**, the **other members will split the work.** In practice, it is even better than this. If an Nx Agent fails, another one will be started in its place.
![](/blog/images/2024-03-21/bodyimg6.webp)
## Solution in numbers
Let's examine the two cases above.
First, `npm install` **failing will not break the build.** Nx Cloud will simply spawn another Nx Agent in its place.
The slowness of the `npm install` will affect the CI execution but in a very different way because it will be **amortized across agents.** So with 50 agents executing, adding 5 minutes to an `npm install` of one of the agents, will only increase the CI execution time by 6 seconds _(5 _ 60 / 50)\*.
Second, **[Nx Cloud knows what specific tests are flaky](/ci/features/flaky-tasks), and if they fail, it will rerun them on a separate agent.** Rerunning them on a separate agent is crucial. Often flaky failures will continue to fail when rerun on the same agent.
This is the formula:
![chanceThatTestRunsWithoutFlakesUsingNx = 1-(1-chanceThatTestRunsWithoutFlakes) ^ numberOfTries](/blog/images/2024-03-21/bodyimg7.webp)
If we examine the case above, where the test flaky happened 1 in 1000, two retries will result in _1 - (10.999)^3^ = 0.999999999_, which **brings the likelihood of the CI failing for a flaky reason to 0.000005%.**
**The Nx Cloud model handles both hard and soft failures. Your agents can crush or be slow - doesn't matter. Your tests can fail or be slow - doesn't matter. Your CI will complete fast.**
---
## Can we fix the traditional model?
It's possible to make the traditional CI model more reliable but the solution isn't adequate for large workspaces.
For instance, in principle, it is possible to add retrying logic to every CI step. It's cumbersome and widely-used CI steps (e.g., popular Github Actions) don't do it. But even if you manage to wrap every step, this isn't bulletproof because many failures are unrecoverable.
**Slow setup steps simply cannot be fixed or amortized.**
One can add rerunning the same e2e test multiple times on the same machine to deal with flakes but there are numerous problems with this.
**One of the most common reasons why e2e tests are flaky is because they create side effects.** For instance, they can create records in the db. They have some logic to clean it up, but it is imperfect. Or tests can assume that some fixture will be modified once. Ideally, this would never happen, but in practice it happens all the time. **Nx Cloud will always retry the same task on a different agent to avoid this problem.**
**Don't forget, you actually need to know which tests are flaky. Most of your failures will be legitimate so rerunning all the tests will make you CI slow. And those reruns cannot be amortized.**
There are other practical problems. If you have enough VMs, rebuilding the app under test on each of them becomes impractical, so you need to build it once and send it to all your VMs. Your e2e tests have to be partitioned into small units to allow for efficient distribution. And the list of problems goes on.
**The traditional CI model is not really fixable because it makes no assumptions about its execution steps and, as a result, it cannot do anything automatically.**
**The Nx Cloud model only works when your build system and CI are built for each other.** The CI needs to know the task graph, what a task requires, what files it creates. Without this information, nothing can be distributed, nothing can be rerun or deflaked. Nx and Nx Cloud (with Nx Agents) fit together. Nx can run tasks locally or can pass this metadata to Nx Cloud which will orchestrate the same computation across many VMs. Nx Cloud will move the right files to the right agents, split large e2e test suites, and deflake the tests automatically. This only works because of the assumptions made by the CI and the build tool.
---
## Performance
The focus of this post is robustness. But the Nx Cloud model is also significantly faster and more efficient. Because Nx Agents are interchangeable, Nx Cloud will use a different number of agents depending on the size of the code change. It can split the work more effectively across agents, reduce the number of npm installs required, split large e2e suites into smaller units and more.
## Summary
The spirit of this post is similar to Alan Kay's quote, "A change of perspective is worth 80 IQ points". By changing the CI execution model, Nx Cloud makes some difficult, almost unsolvable, problems easy.
---
You can learn more about Nx Cloud on [nx.app](https://nx.app) and Nx open source on [nx.dev]().
**Nx Cloud Pro includes a 2-month free trial** that is definitely worth trying out if you're curious what Cloud Pro can do for your CI. You can try out Nx Agents, e2e test splitting, deflaking and more. [Learn more about Nx Cloud Pro.](https://nx.app/campaigns/pro)
We also have a **Pro for Startups** plan which offers agents that are 3.5x cheaper than analogous VMs on CircleCI or Github Actions. [Learn more about Nx Pro for Startups.](https://nx.app/campaigns/pro-for-startups)
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [X / Twitter](https://twitter.com/nxdevtools)
- [LinkedIn](https://www.linkedin.com/company/nrwl)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Community Discord](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app)
+218
View File
@@ -0,0 +1,218 @@
---
title: Manage Your Gradle Project using Nx
slug: 'manage-your-gradle-project-using-nx'
authors: ['Emily Xiong']
cover_image: '/blog/images/2024-04-19/featured_img.png'
tags: [nx, gradle, how-to]
---
Heres my situation: I have a Gradle workspace with multiple Gradle libraries. How do I easily view the relationships between different libraries? I have a monorepo workspace with both Gradle and Javascript libraries, how do I manage these libraries of different tech stacks?
We are very excited to announce our support for Gradle with our new plugin: `@nx/gradle`.
The Nx Gradle plugin registers Gradle projects in your Nx workspace. It allows Gradle tasks to be run through Nx. Nx effortlessly makes your [CI faster](/ci/intro/ci-with-nx).
> **Note:** this plugin is currently experimental.
This blog will show you:
- [What is Nx?](#what-is-nx)
- [How to add Nx to a Gradle workspace](#how-to-add-nx-to-a-gradle-workspace)
- [How to add @nx/gradle to an existing Nx workspace](#how-to-add-nxgradle-to-an-existing-nx-workspace)
---
## What is Nx?
Before we start, lets answer this question: what is Nx and why should we use it?
From [nx.dev](): “Nx is a build system with built-in tooling and advanced CI capabilities. It helps you maintain and scale monorepos, both locally and on CI.” It sounds good, what benefits does it bring?
Nx adds the following features to your workspace:
- [Cache task results](/features/cache-task-results): By storing task outputs in a cache, subsequent runs can skip redundant computations and reuse previously calculated results, significantly speeding up build processes. Nx intelligently manages this caching mechanism, invalidating the cache automatically when relevant inputs change.
- [Distribute task execution](/ci/features/distribute-task-execution): Nx CI efficiently distributes tasks across multiple machines for faster build times. It uses a distributed task execution algorithm to intelligently divide and assign tasks to available resources, minimizing redundant work and maximizing parallelism.
- [Run only tasks affected by a PR](/ci/features/affected): Nx identifies changes made since a specified base commit or branch, and then selectively runs tasks (like tests, linting, or builds) related to those changes.
- [Interactively explore your workspace](/features/explore-graph): Nx allows developers to visualize and understand the dependencies and relationships within their projects.
![Example Nx Graph](/blog/images/2024-04-19/bodyimg1.webp)
---
## How to add Nx to a Gradle Workspace?
Now we understand the benefits of Nx, now lets set it up. The setup is pretty easy, just need to run one command.
In the workspace, run the below command:
```shell
npx nx@latest init
```
In the terminal, it should output:
```shell
Setting Nx up installation in `.nx`. You can run Nx commands like: `./nx --help`
CREATE nx.json
UPDATE .gitignore
CREATE .nx/nxw.js
CREATE nx.bat
CREATE nx
NX Recommended Plugins:
Add these Nx plugins to integrate with the tools used in your workspace.
✔ Which plugins would you like to add? Press <Space> to select and <Enter> to submit. · @nx/gradle
added 111 packages, and audited 112 packages in 2s
21 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
✔ Installing @nx/gradle@latest...
✔ Initializing @nx/gradle...
```
Thats it! Now we have Nx in our Gradle project.
### Example: Gradle Init
If you create your Gradle workspace using gradle init, by running `npx nx@latest init`, you will get:
![](/blog/images/2024-04-19/bodyimg2.webp)
It adds a .nx folder in the workspace root and nx executable files. Now you can run commands using ./nx (or nx.bat for Windows machines).
For example, you can run Gradle tasks using Nx now:
```shell
# macos/linux
./nx <gradle task> <gradle project>
# windows
nx.bat <gradle task> <gradle project>
```
If you build your Gradle library using the command `./gradlew :app:build` or `gradlew.bat :app:build`, you can run `./nx build app` or `nx.bat build app` to build your Gradle library.
Now you can an alternative way to run Gradle tasks, how can we leverage Nx?
### Nx Graph
To see the project graph, run the below command:
```shell
# macos/linux
./nx graph
# windows
nx.bat graph
```
![](/blog/images/2024-04-19/bodyimg3.webp)
### Run Only Tasks Affected by a PR
As mentioned before, Nx enables the ability to run only the tasks affected by a specific PR by running the below command:
```shell
# macos/linux
./nx affected -t <task>
# windows
nx.bat affected -t <task>
```
For example, when you run `nx affected -t build`, Nx uses your git information to determine the files you changed in your PR. Nx determines the list of projects in the workspace that can be affected by this change and only runs the build task against changed files.
You can also visualize the affected projects highlighted using the [Nx graph](/features/explore-graph). Simply run:
```shell
# macos/linux
./nx affected:graph
# windows
nx.bat affected:graph
```
### Nx Console
Furthermore, instead of running the command in terminal, you can use the editor tool [Nx Console](/getting-started/editor-setup). Anything you can do with Nx, you can do with Nx Console.
![Screencap of Nx Console UI](/blog/images/2024-04-19/bodyimg4.webp)
To download:
- [**Nx Console - Visual Studio Marketplace**](https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console)
- [**Nx Console - IntelliJ IDEs Plugin | Marketplace**](https://plugins.jetbrains.com/plugin/21060-nx-console)
---
## How to add @nx/gradle to an existing Nx workspace?
If you have an existing Nx workspace, to add `@nx/gradle`, just run:
```shell
npx nx add @nx/gradle
```
That is it, it will add `@nx/gradle` plugin to your Nx workspace.
You can view inferred tasks for Gradle project in your workspace, open the [project details view](/features/explore-graph#explore-projects-in-your-workspace) in Nx Console or run `nx show project my-project --web` in the command line.
For all the interred tasks, you can run using Nx instead of Gradle:
```shell
nx <gradle task> <gradle project> [options]
```
For example, if you run `./gradlew :app:build` or `gradlew.bat :app:build` using Gradle command, to run using Nx: `nx build app`.
### How @nx/gradle Infers Tasks
The `@nx/gradle` plugin will create an Nx project for each Gradle configuration file present. Any of the following files will be recognized as a Gradle configuration file:
- `gradle.build`
- `gradle.build.kts`
### @nx/gradle Configuration
The `@nx/gradle` is configured in the plugins array in `nx.json`:
```json {% fileName="nx.json" %}
{
"plugins": [
{
"plugin": "@nx/gradle",
"options": {
"testTargetName": "test",
"classesTargetName": "classes",
"buildTargetName": "build"
}
}
]
}
```
Once a Gradle configuration file has been identified, the targets are created with the name you specify under `testTargetName`, `classesTargetName`, or `buildTargetName` in the `nx.json` plugins array. The default names for the inferred targets are `test`, `classes`, and `build`.
---
## Summary
Here is how to set up Nx with the Gradle workspace. Hopefully, this gives you a good insight into how to get started with Gradle with Nx. The plugin is currently experimental, you can submit GitHub issues: [https://github.com/nrwl/nx/issues](https://github.com/nrwl/nx/issues).
---
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+238
View File
@@ -0,0 +1,238 @@
---
title: Nx 19.0 Release!!
slug: 'nx-19-release'
authors: ['Zack DeRose']
cover_image: '/blog/images/2024-05-08/nx-19-thumbnail.png'
tags: [nx, release]
---
Hey folks!
It's been awhile since February, where in the midsts our big launch week, we launched Nx 18. Nx 18 introduced the biggest new enhancement to Nx to date: Project Crystal.
[![Project Crystal](/blog/images/2024-02-05/featured_img.png)](/blog/what-if-nx-plugins-were-more-like-vscode-extensions)
You can read more on project crystal [here](/blog/what-if-nx-plugins-were-more-like-vscode-extensions). The main thing to know though is that Project Crystal adjusts the idea of Nx plugins, so that the mere presence of the plugin in your Nx Workspace removes the need to maintain any configuration for most cases.
Nx 18 was a significant departure for us in several ways - maybe the most noteworthy was that we broke our years-long cadence of releasing a new major version every 6 months.
Nx 19 represents a return to form, matching the reliable 6-month schedule. Nx 19 is releasing now 6 months from when Nx 17 released, making Nx 18 a special case to match the impact that Project Crystal had on Nx as a whole.
Here's the rundown of the major things we'll cover in this update:
- [NEW PLUGIN: @nx/gradle](#new-plugin-nxgradle)
- [Nx Atomizer Enhancements](#nx-atomizer-enhancements)
- [Associated Technologies Added To Tasks](#associated-technologies-added-to-tasks)
- [Generators to Convert to Project Crystal](#generators-to-convert-to-project-crystal)
- [BREAKING CHANGE: Updating Bundled Environment Variables: `NX_` to `NX_PUBLIC_`](#breaking-change-updating-bundled-environment-variables-to)
- [General Crystal Polishing](#general-crystal-polishing)
- [Nx Cloud Updates!](#nx-cloud-updates)
- [More Miscellaneous Updates!](#more-miscellaneous-updates)
- [New Conference: Monorepo World 2024](#new-conference-monorepo-world-2024)
- [Wrapping Up, And A Heartfelt Thank You](#wrapping-up-and-a-heartfelt-thank-you)
- [Learn More](#learn-more)
**Prefer a video?**
{% youtube
src="https://youtu.be/U6eO8-w9DR0"
title="Nx 19.0 Has Landed!!"
width="100%" /%}
---
## NEW PLUGIN: @nx/gradle
[![NEW PLUGIN: @nx/gradle](/blog/images/2024-04-19/featured_img.png)](/blog/manage-your-gradle-project-using-nx)
We've launched a new first-party plugin for Gradle!
Emily, the engineer that worked on this effort, posted an entire article where you can find the full details [here](/blog/manage-your-gradle-project-using-nx).
Thanks to the benefits of Project Crystal - which allows us to determine information to create Nx Tasks based on the way your Gradle projects are setup - by adding this plugin, it makes it easy to add Gradle into an existing workspace without needing any Nx-specific configuration.
In addition, you can now find [a new tutorial on using Nx with Gradle](/getting-started/tutorials/gradle-tutorial) which will expand on the [Spring framework](https://spring.io/)'s tutorial for multi-module projects and show you how Nx further enhances the developer experience of that workspace. This tutorial takes you all the way through setting up your CI pipeline with Nx Cloud, so be sure to check it out!
As an editorial note, this Gradle plugin is a big step for Nx, as it represents the first major step we're taking outside of the Javascript ecosystem. This has always been the goal: to robustly support monorepos and full-stack development, even across language and ecosystem barriers. We're using this Gradle plugin internally for our closed-sourced projects (in particular Nx Cloud) and in [Nx Console](https://github.com/nrwl/nx-console/blob/master/package.json#L74) and we're very proud of this plugin and all that it represents.
## Nx Atomizer Enhancements
The Nx Atomizer launched in Nx 18 with Project Crystal. Essentially, "Atomizer" is the name we use to describe how Nx will automatically shard your e2e tests in your CI pipelines via our first party plugins. You can find out more information in the video below:
{% youtube
src="https://youtu.be/0YxcxIR7QU0"
title="10x Faster e2e Tests!"
width="100%" /%}
While the Atomizer was great for reducing the time of end-to-end tests in CI pipelines, one unfortunate trade-off of the Atomizer was that rather than having a single task to represent your end-to-end validation tasks, you instead had a collection of tasks. This tended to clutter up tools when viewing your Nx Tasks. It also wasn't very clear which tasks belonged to which group!
We've addressed this in Nx 19 by introducing the concept of Task Grouping inside of our tooling.
Now, when running the command:
```shell
nx show project nx-dev-e2e --web
```
You'll see the following in the project view:
![Nx Show Project Web View](/blog/images/2024-05-08/grouping-web-view.webp)
Notice how all tasks are now appropriately grouped in the `E2E (CI)` group!
You can also find the same enhancements in Nx Cloud. Below is a view of all tasks in the [CI pipeline](https://staging.nx.app/runs/ctbAZfiLy3):
{% video-player src="/documentation/blog/media/2024-05-08/nx-cloud-atomizer-groupings.mp4" alt="Showing the Atomizer in Nx Cloud" link="https://staging.nx.app/runs/ctbAZfiLy3" /%}
Notice how all e2e groups are collapsed by default to give a concise view, while allowing you to expand to see how each individual task is progressing!
Project Crystal is gathering the information to group your tasks, so this is automatically inferred for you based on the actual contents of your workspace. You can see this information by running the command:
```shell
nx show project nx-dev-e2e --json | jq
```
![Show Project JSON view](/blog/images/2024-05-08/show-project-json.webp)
All Nx Plugins that support this concept of "Atomization" will do this automatically for you, and if you are writing a custom plugin for your own tool or special use-case, you can implect this inferrence to group your targets in Nx and Nx Cloud tooling as well. We'll be adding more documentation on how to implement this in your own plugins in the future.
## Associated Technologies Added To Tasks
We've added icons for associated technologies on tasks in the project detail web view:
![Technology icons in Project Detail View](/blog/images/2024-05-08/icon-in-project-detail-view.gif)
And in Nx Cloud:
![Technology icons in Nx Cloud](/blog/images/2024-05-08/nx-cloud-icons.gif)
This will help easily identify at-a-glance the technology your tasks are associated with. All this is supported out of the box by our plugins and you should see this as soon as updating to Nx 19.
To see how we support this new feature, checkout the json view of our project again:
```shell
nx show project e2e-angular --json | jq
```
![Highlighting target metadata](/blog/images/2024-05-08/highlight-target-metadata.webp)
## Generators to Convert to Project Crystal
As part of Nx 19, we've included generators to our Playwright, Cypress, and ESLint plugins to allow you to easily convert your projects to opt into Project Crystal features!
To convert your workspace, you can use the command:
```shell
nx generate convert-to-inferred
```
Before running this command you could expect your project detail view to look like this:
```shell
nx show project my-react-app-e2e --web
```
![Before Conversion](/blog/images/2024-05-08/before-conversion.webp)
And after running the generator, you can expect your project detail view to look like this:
![After Conversion](/blog/images/2024-05-08/after-conversion.webp)
Notice that in addition to reducing the configuration in your `project.json` file, this generator will also turn on the Nx Atomizer for your Cypress and Playwright projects, so Nx will allow sharding for your end-to-end tasks in CI based on the tests present in your workspace going forward. Note that Nx Agents are very highly highly encouraged as a way of taking advantage of this sharding capability.
As a note, if you cannot see `e2e-ci` tasks after converting your cypress projects, you can [take a closer look here](/nx-api/cypress/documents/overview#splitting-e2e-tasks-by-file) at how to configure them correctly.
## BREAKING CHANGE: Updating Bundled Environment Variables: `NX_` to `NX_PUBLIC_`
An important update for folks using environment variables in their builds!
Previously, when building your projects in an Nx workspace, our builds were setup to include any environment variables prefixed with `NX_` and include them in the built artifact so they would be accessible there. This is often used for setting things like urls for different versions of external services to hit - for example, sending requests to your local development server while developing, but pointing to the production service for your production build.
Going forward, these environment variables will need to be prefixed with `NX_PUBLIC_`. This is a security consideration - by requiring a more specific prefix we're making sure that no secrets end up in your production builds unintentionally!
Because of the nature of this change we will NOT be providing an automatic migration. So be sure to manually update any environment variables that you want bundled into your builds from `NX_` to `NX_PUBLIC_`.
## General Crystal Polishing
Along with the features above (many of which further build upon Nx Project Crystal), we've done quite a bit since Nx 18 to polish the features that we introduced with Project Crystal.
Since Nx 18 release, we also started using Project Crystal inside of the Nx repo itself (as well as in Nx Console and in our closed-source monorepo as well). This has allowed us to find many improvements we can make, as well as issues we can fix.
You can find a full list of fixes and features applied in this major release [here](https://github.com/nrwl/nx/releases/tag/19.0.0).
{% video-player src="/documentation/blog/media/2024-05-08/fixes.mp4" alt="A display listing the Github changelog" /%}
With Project Crystal landed now, we're also adjusting our priorities to place a higher importance on stability. You should see this reflected in Nx 19.
As a note, we had noticed an increase in the rate of Github issues since Nx 18 launched. Previously, we had not allocated enough time to handling these issues. To address this, our team is going to be doubling the amount of time focusing on maintainence.
In addition - we are adding more process to make the triage of these issues more efficient. Github issues will now be assigned directly to specific members of the Nx Core Team. The main intention of this change is to increase the efficiency of the time that we do spend on addressing issues.
## Nx Cloud Updates!
[![The Nx Cloud Dashboard](/blog/images/2024-05-08/nx-cloud-dashboard.webp)](https://nx.app/#deep-understanding)
We've got some cool stats to share from our users regarding the benefits of [Nx Cloud](https://nx.app), our premium CI service. The three areas we've identified as the critical aspects of a CI provider are: speed, cost, and reliablity. In these areas we've seen:
- **speed**: Reported 30% - 70% faster CI
- **cost**: Reported 40% - 75% reduction in CI costs
- **reliability**: Nx Cloud's automatic detection and retrying of flaky tests makes the issue of flaky tests largely go away entirely. You can read more on [our thoughts on reliability here](/blog/reliable-ci-a-new-execution-model-fixing-both-flakiness-and-slowness).
In February, we launched two big enhancements to Nx Cloud: the [Atomizer](/ci/features/split-e2e-tasks) and [Nx Agents](https://nx.app/products/agents#content).
Since then, the Atomizer has received a nice UI update (as we had seen earlier):
{% video-player src="/documentation/blog/media/2024-05-08/nx-cloud-atomizer-groupings.mp4" alt="Showing the Atomizer in Nx Cloud" link="https://staging.nx.app/runs/ctbAZfiLy3" /%}
Since February, we also revamped our task distribution algorithms. This has resulted in a 5-20% (depending on the repo) increase in both speed and cost efficiency for our users.
If you are interested in trying Nx Cloud, go to [https://nx.app](https://nx.app).
## More Miscellaneous updates!
We've been updating our docs site. We've tweeked the search to make it more helpful, updated navigation, and as you can tell since you're reading it, we've moved our blog to [nx.dev/blog](blog) as well.
We've also added a page for [Nx Enterprise](/enterprise):
[![Nx Enterprise Site](/blog/images/2024-05-08/nx-enterprise-site.webp)](/enterprise)
And! We've revamped our newsletter, written by our CTO, Victor Savkin. [Subscribe here](https://go.nx.dev/nx-newsletter) to start receiving it!
## NEW CONFERENCE: Monorepo World 2024
[![NEW CONFERENCE: Monorepo World 2024](/blog/images/2024-05-08/welcome-to-monorepo-world-2024.webp)](https://monorepo.world)
We've got a new conference coming up: [Monorepo World 2024](https://monorepo.world)!
This conference will cover all things dealing with monorepos, and we're excited to host it at the Computer History Museum in Mountain View, California this October 7th!
You can [reserve your tickets now](https://ti.to/nx-conf/monorepoworld2024)! In person tickets start at $300 a piece for Early Bird (open until May 31), and online attendance is free.
The [Call for Speakers](https://sessionize.com/monorepo-world) is open now, and will close on June 20, 2024.
We'll be excited to see y'all there!
## Wrapping Up, And A Heartfelt Thank You
That's it for now!
I did want to take a moment to give a heartfelt thank you to everyone out there. If you weren't aware, I had something of a [personal tragedy](https://twitter.com/zackderose/status/1759695615573864758) in February, not long after our big launch week.
[![My Sadie.](/blog/images/2024-05-08/sadie.webp)](https://twitter.com/zackderose/status/1759695615573864758)
For me, this blogpost represents the beginning of my return to Nx, and to the larger dev community.
To everyone out there - your kindness and care meant more to me than you could know. I intend to return that the positivity and care you invested in me in those dark days back as best I can. So here's looking forward to hard work, more releases, and better days to come.
With Many Thanks,
Zack
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+176
View File
@@ -0,0 +1,176 @@
---
title: 'Nx 19.5: StackBlitz, New Features, And More!!'
slug: 'nx-19-5-adds-stackblitz-new-features-and-more'
authors: ['Zack DeRose']
cover_image: '/blog/images/2024-07-25/nx-19-5-thumbnail.png'
tags: [nx, release]
---
## Table of Contents
In this blog post:
- [StackBlitz Support](#stackblitz-support)
- [NEW: Pattern Support for `targetDefaults`](#new-pattern-support-for-targetdefaults)
- [NEW: Individual Targets Can Now Opt Out of Parallelism](#new-individual-targets-can-now-opt-out-of-parallelism)
- [Experimental: Gradle Test Atomization](#experimental-gradle-test-atomization)
- [Support for React 19 (rc) and Angular 18.1](#support-for-react-19-rc-and-angular-181)
- [NEW: Nx Cloud Hobby Tier](#new-nx-cloud-hobby-tier)
- [Automatically Update Nx](#automatically-update-nx)
- [Monorepo World Conference Speakers to Be Announced Soon!!](#monorepo-world-conference-speakers-to-be-announced-soon)
## StackBlitz Support!!
Nx now has support for Stackblitz. This means that you can create a StackBlitz with a whole Nx Workspace inside of it and run all Nx capabilities from their embedded terminal.
[![Nx Workspace in Stackblitz](/blog/images/2024-07-25/react-app-in-stackblitz.jpg)](https://stackblitz.com/edit/stackblitz-webcontainer-api-starter-cwruaw?file=apps%2Freact-app%2Fsrc%2Fapp%2Fapp.tsx)
[Check out the example](https://stackblitz.com/edit/stackblitz-webcontainer-api-starter-cwruaw?file=apps%2Freact-app%2Fsrc%2Fapp%2Fapp.tsx) above - you can use the standard command in the terminal:
```shell
> nx serve react-app
```
to develop your application inside of the stackblitz.
We're excited for this as it opens up many interesting use-cases, including easier ways of sharing examples, better opportunities for reproduction of issues or bugs, and potential for us to use embedded examples in our documentation in the future.
Web Assembly (or WASM) is the underlying technology being used here, so in addition to stackblitz any other tools built on a node context should now work as well.
## NEW: Pattern Support for `targetDefaults`
When using the Atomizer features of plugins like [`@nx/playwright`](/nx-api/playwright) and [`@nx/cypress`](/nx-api/cypress), you end up creating tasks with dynamic but predictable names.
![Tasks Created With Atomizer](/blog/images/2024-07-25/e2e-task-names.jpg)
Notice how the `e2e-ci--src/example.spec.ts` and `e2e-ci--src/test.spec.ts` tasks here are created by the `@nx/playwright` plugin based on the playwright spec files present in your workspace.
We've now added pattern matching to `targetDefaults` task names as a way to target these dynamic tasks.
The following will set all such tasks to depend on their `build` task:
```json
{
"targetDefaults": {
"e2e-ci--**/*": {
"dependsOn": ["build"]
}
}
}
```
Note that our plugins will set sensible configurations here out of the box when creating new workspaces using our generators.
Read more about [reducing configuration with `targetDefaults`](/recipes/running-tasks/reduce-repetitive-configuration#reduce-configuration-with-targetdefaults) and [how you can define task pipelines with `targetDefaults`](/features/run-tasks#defining-a-task-pipeline).
## NEW: Individual Targets Can Now Opt Out of Parallelism
One of our goals in changing the landscape of CI is to make CI more declarative - defining the what rather than the how.
Unfortunately, to accomodate for port collisions on end-to-end test, we've long adjusted our generated ci script to look like this:
```yml
- run: npx nx affected -t lint test build
- run: npx nx affected --parallel 1 -t e2e-ci
```
This is unfortunately more imperative, as we are starting to give instructions on how to run and order your CI, rather than defining what to run in our CI. In addition, these instructions will still run `lint`, `test`, and `build` targets first and wait until they all complete before then running `e2e-ci` - which leaves some inefficiencies on the table.
To address this, all tasks now support a `parallelism` property. By setting this property to `false`, you can now inform the Nx task runner to not attempt to run a certain task in parallel. This way we can define parallelism as a property of a task, and move our task running to be more declarative again.
Both our `@nx/playwright` and `@nx/cypress` plugins will now set `targetDefaults` for atomized tests to turn off `parallelism` from now on:
```json
{
// ...
"targetDefaults": {
"e2e-**/*": {
// ...
"parallelism": false
}
}
}
```
This way we can simply run the command:
```shell
> nx run-many --targets=lint,test,e2e-ci,build
```
And in CI, Nx Agents will allow all tasks to run in parallel on the same machine, except for the atomized end-to-end tasks, which will only run in isolation.
Learn more about how you can [Parallelize Tasks Across Multiple Machines Using Nx Agents](/ci/intro/tutorials/github-actions#parallelize-tasks-across-multiple-machines-using-nx-agents):
{% youtube
src="https://youtu.be/0YxcxIR7QU0"
title="Faster e2e Tests!"
width="100%" /%}
## Experimental: Gradle Test Atomization
Our new [`@nx/gradle` plugin](/nx-api/gradle) now supports Test Atomization out of the box.
![Gradle Atomized](/blog/images/2024-07-25/gradle-atomized.jpg)
This means that as you add tests in your gradle projects, we'll automatically create a new task for each test class, allowing you to distribute the execution of these tasks in your CI pipeline, just like with our `@nx/playwright` and `@nx/cypress` plugins.
## Support for React 19 (rc) and Angular 18.1
Nx 19.5 adds support for the React 19 release candidate and updated our Angular package to support the latest Angular minor version: 18.1.
When using our `@nx/angular` package, we'll automatically update you to the latest angular version when you run our migration. Using the `--interactive` flag you can choose to opt in or out of the latest Angular version:
```shell
> nx migrate latest --interactive
✔ Do you want to update to TypeScript v5.5? (Y/n) · true
✔ Do you want to update the Angular version to v18.1? (Y/n) · true
Fetching @angular/core@18.1.2
NX The migrate command has run successfully.
```
Our `@nx/react` package will now create new React applications using version 18.3, and we now support the new experimental `reactCompiler`. Users can install the [`babel-plugin-react-compiler` package](https://www.npmjs.com/package/babel-plugin-react-compiler) and you can follow [this guide for how to enable it with Nx](/recipes/react/react-compiler#react-compiler-with-nx).
Note that due to the extent of breaking changes coming with React 19, we will not be providing a automated migration to React 19 via [`nx migrate`](/nx-api/nx/documents/migrate).
## Automatically Update Nx
As always - updating Nx and its plugins is easy as we ship an [automated migration command](/features/automate-updating-dependencies).
```shell
npx nx migrate latest
```
After updating your dependencies, run any necessary migrations.
```shell
npx nx migrate --run-migrations
```
## NEW: Nx Cloud Hobby Tier
Our new expanded Hobby Tier now adds trial support for all features AND includes credits to run Nx Agents.
Sample the entire suite of features to see its impact on your organization. Start with everything, scale when you need more.
[![Nx Cloud Tiers](/blog/images/2024-07-25/start-with-everything-scale-when-you-need.jpg)](https://nx.app/pricing#plan-details)
Checkout the [plan details page](https://nx.app/pricing#plan-details) for more info, and see how Nx Cloud can help you!
## Monorepo World Conference Speakers to Be Announced Soon!!
[![Monorepo World](/blog/images/2024-07-25/monorepo-world.jpg)](https://monorepo.world)
The [Monorepo World conference](https://monorepo.world) is coming up soon on October 7, 2024 at the Computer History museum in Mountain View, California.
[Get your tickets now](https://ti.to/nx-conf/monorepoworld2024), consider [requesting access to the invite-only Enterprise Summit on October 8](https://ti.to/nx-conf/monorepoworld2024), and be sure to stay tuned as we'll be announcing speakers soon!
## Learn more
- [Nx Docs](/getting-started/intro)
- [X/Twitter](https://twitter.com/nxdevtools) -- [LinkedIn](https://www.linkedin.com/company/nrwl/)
- [Nx GitHub](https://github.com/nrwl/nx)
- [Nx Official Discord Server](https://go.nx.dev/community)
- [Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
- [Speed up your CI](https://nx.app/)
+56
View File
@@ -0,0 +1,56 @@
[
{
"name": "Juri Strumpflohner",
"image": "/blog/images/Juri Strumpfloner.jpeg",
"twitter": "juristr",
"github": "juristr"
},
{
"name": "Colum Ferry",
"image": "/blog/images/Colum Ferry.jpeg",
"twitter": "FerryColum",
"github": "Coly010"
},
{
"name": "Emily Xiong",
"image": "/blog/images/Emily Xiong.jpeg",
"twitter": "xiongemily",
"github": "xiongemi"
},
{
"name": "Isaac Mann",
"image": "/blog/images/Isaac Mann.jpeg",
"twitter": "mannisaac",
"github": "isaacplmann"
},
{
"name": "Katerina Skroumpelou",
"image": "/blog/images/Katerina Skroumpelou.jpeg",
"twitter": "psybercity",
"github": "mandarini"
},
{
"name": "Max Kless",
"image": "/blog/images/Max Kless.jpeg",
"twitter": "MaxKless",
"github": "MaxKless"
},
{
"name": "Victor Savkin",
"image": "/blog/images/Victor Savkin.jpeg",
"twitter": "victorsavkin",
"github": "vsavkin"
},
{
"name": "Zack DeRose",
"image": "/blog/images/Zack DeRose.jpeg",
"twitter": "zackderose",
"github": "ZackDeRose"
},
{
"name": "Jeff Cross",
"image": "/blog/images/Jeff Cross.jpeg",
"twitter": "jeffbcross",
"github": "jeffbcross"
}
]
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 KiB

Some files were not shown because too many files have changed in this diff Show More