Compare commits

...

1561 Commits

Author SHA1 Message Date
Nicholas Cunningham 34d5919d48 chore(react): Update description for --minimal to be clearer 2024-06-07 11:26:24 -06: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
Philip Fulcher 7ca576bfb7 fix(core): nx cloud prompt during migrate doesn't skip connection (#21588)
Co-authored-by: Philip Fulcher <philipfulcher@Philips-MacBook-Air.local>
2024-02-04 10:00:30 -07:00
MaxKless cc282b2d9c docs(core): add recipe on console & project details view integration (#21577) 2024-02-03 21:50:18 -05:00
Philip Fulcher 9ccdb706a2 docs(nx-dev): add launch nx to mobile menu 2024-02-03 16:12:07 +01:00
Isaac Mann 61436a64ef docs(core): inferred targets (#21167)
Co-authored-by: Katerina Skroumpelou <mandarini@users.noreply.github.com>
Co-authored-by: Colum Ferry <cferry09@gmail.com>
Co-authored-by: Emily Xiong <xiongemi@gmail.com>
Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
Co-authored-by: Victor Savkin <mail@vsavkin.com>
Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-02-03 00:14:05 -05:00
Jason Jean 26a815c7df chore(core): add one off exception for next.js (#21572) 2024-02-02 23:46:02 -05:00
Jonathan Cammisuli 7623471bd9 fix(core): handle spaces when launching nxFork (#21571) 2024-02-02 21:22:47 -05:00
Miroslav Jonaš f309b259d6 feat(core): add e2e to ci workflows (#21487) 2024-02-02 18:20:39 -05:00
Leosvel Pérez Espinosa 197e670366 cleanup(testing): fix cypress e2e tests (#21551)
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2024-02-02 18:03:52 -05:00
Jonathan Cammisuli d9b4cb28cb chore(misc): fix e2es for cache and run (#21561) 2024-02-02 16:57:20 -05:00
Miroslav Jonaš bc6e58fcf9 fix(core): fix missing nxCloud error message on ci workflows (#21564) 2024-02-02 16:47:21 -05:00
Emily Xiong 90d0453e58 fix(expo): set port for e2e (#21559) 2024-02-02 16:30:36 -05:00
Jonathan Cammisuli cb3da6c244 chore(misc): disable rollup tests (#21563) 2024-02-02 21:02:24 +00:00
Jack Hsu ce8272371e chore(misc): re-enable convert-to-monorepo test to test without Nx plugins for now (#21544) 2024-02-02 15:08:20 -05:00
Miroslav Jonaš 5a818e346d feat(core): improve the commented dte message on ci-workflows (#21524) 2024-02-02 15:06:02 -05:00
Katerina Skroumpelou 433d5f2c85 chore(nextjs): better error & TODO explanation for failing e2e (#21525) 2024-02-02 15:00:19 -05:00
Colum Ferry 369ed35894 fix(react): app generator should handle crystal workspaces (#21537) 2024-02-02 19:32:48 +00:00
Nicholas Cunningham b076d728e7 fix(nextjs): vite workspace libs (#21553) 2024-02-02 19:12:14 +00:00
James Henry be1b36b227 fix(nextjs): nextjs standalone playwright linting (#21555) 2024-02-02 23:06:58 +04:00
Juri Strumpflohner e69e4d52e8 fix(nx-dev): typos on launch-nx website (#21552) 2024-02-02 14:05:24 -05:00
MaxKless 8460ee0d32 fix(graph): fix openen project details with expanded target from external api (#21548) 2024-02-02 13:31:28 -05:00
Jack Hsu d7de79e3c8 feat(core): add fallback flow to nx init when no plugins are detected (#21538) 2024-02-02 13:29:49 -05:00
Jack Hsu 1393b85fc3 chore(misc): re-enable tests (#21540) 2024-02-02 13:26:44 -05:00
Craigory Coppola 4a5a92fb49 fix(core): target defaults from specifier should not be clobbered by name based target defaults (#21539) 2024-02-02 12:55:38 -05:00
Jason Jean 727e15b4a4 chore(core): fix and re-enable failing extra test (#21543) 2024-02-02 12:51:58 -05:00
Rares Matei a5687d092c chore(repo): use latest workflows config (#21521) 2024-02-02 12:27:53 -05:00
Miroslav Jonaš 7739ce013b feat(core): add log lines grouping for GH Actions (#21357) 2024-02-02 17:52:05 +01:00
Jason Jean 6e4bf8cbf2 fix(core): do not watch temporary vite files (#21514) 2024-02-02 11:40:02 -05:00
Craigory Coppola 2e956191a1 feat(core): add migration to disable adding plugins automatically in existing workspaces (#21508)
Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
2024-02-02 11:37:31 -05:00
Ian Chadwick 9a9bd2abd3 fix(vite): deep file resolution in nx-tsconfig-paths.plugin.ts (#21513) 2024-02-02 18:33:50 +02:00
Jonathan Cammisuli 87443ad29c fix(core): remove the full workspace path with node_modules from the path env variable when running run-scripts (#21532) 2024-02-02 11:32:32 -05:00
Emily Xiong d1bf692704 fix(js): package type is module should emit esm (#21473) 2024-02-02 11:31:31 -05:00
Jack Hsu e85f700f52 fix(webpack): fix webpack plugin issues and e2e tests (#21531) 2024-02-02 11:27:40 -05:00
Isaac Mann 7c231e34fb fix(core): module federation migration for project with no targets (#21536) 2024-02-02 10:50:13 -05:00
Jack Hsu 3ec71fa9d6 fix(nest): ensure dependencies are installed when generating nest libraries (#21534) 2024-02-02 10:41:38 -05:00
Craigory Coppola 2753565551 fix(core): handle negative patterns better when specified in pnpm-workspaces (#19983) 2024-02-02 10:31:11 -05:00
Katerina Skroumpelou a4aa805c15 fix(react): extensions - vite e2e test (#21530) 2024-02-02 10:16:00 -05:00
Colum Ferry da0f06f21a fix(react): setup-ssr generator should not read the graph for a project that doesnt exist (#21522) 2024-02-02 14:35:27 +00:00
Leosvel Pérez Espinosa 6b6d19a0ff cleanup(angular): fix e2e test case (#21519) 2024-02-02 15:32:36 +01:00
James Henry 4916b8e72f chore(repo): only run steps within publish.yml if not on fork (#21527) 2024-02-02 18:20:15 +04:00
Joel Klint ae104a8e9c chore(core): nx plugin submission @nx-iac/aws-cdk (#20081)
Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-02-02 09:18:05 -05:00
Tycho Bokdam fafd0a8cfc chore(core): nx plugin submissions @nx-extend/react-email (#20854) 2024-02-02 09:09:53 -05:00
Miroslav Jonaš a0ae902e4e fix(linter): prevent dep-checks leaking when used outside nx (#21404) 2024-02-02 14:22:52 +01:00
Miroslav Jonaš 35b5ca756e fix(linter): remove reportUnusedDisableDirectives for flat config (#21405) 2024-02-02 14:22:32 +01:00
Philip Fulcher 3505fc628e docs(nx-dev): update social image for launch nx (#21461) 2024-02-02 04:57:25 -08:00
Philip Fulcher 8ecf8a1928 docs(nx-dev): add CoC to Launch Nx (#21465) 2024-02-02 04:56:53 -08:00
Jack Hsu f6d2dccd62 feat(linter): add option for @nx/dependency-checks to update workspace dependencies using local file paths (#20157)
Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
2024-02-02 14:51:49 +02:00
Leosvel Pérez Espinosa c38440e85f docs(angular): improve dev-server executor docs (#21434) 2024-02-02 12:00:18 +01:00
Leosvel Pérez Espinosa 3b5f4a21ce fix(angular): handle indexHtmlTransformer option in dev-server correctly (#21520) 2024-02-02 12:00:03 +01:00
Miroslav Jonaš d6d7b1c689 feat(core): move distribution to beginning of generated ci workflows (#21483) 2024-02-02 09:48:17 +01:00
Jason Jean 396ffc4636 feat(core): enable project crystal by default (#21403)
Co-authored-by: Katerina Skroumpelou <sk.katherine@gmail.com>
Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
Co-authored-by: Colum Ferry <cferry09@gmail.com>
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Emily Xiong <xiongemi@gmail.com>
Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
2024-02-02 03:40:59 -05:00
Jack Hsu 05b0848eb5 feat(devkit): add loadConfigFile function for plugins to use (#21511) 2024-02-01 22:46:04 -05:00
Nicholas Cunningham ea5befbbbc fix(core): Update Nx Welcome to include nx show project (#21509) 2024-02-01 17:45:21 -07:00
Craigory Coppola 322ecf7a08 fix(core): nx build --graph file.json should work in subdirectories (#19858) 2024-02-01 19:41:06 -05:00
Craigory Coppola c4b9a82319 fix(core): target defaults should be able to apply to multiple targets with the same executor (#21438) 2024-02-01 19:30:43 -05:00
Nicholas Cunningham 2781800e36 fix(react-native): Application generator failing (#21507) 2024-02-01 15:57:49 -07:00
Jack Hsu 79648bc484 fix(testing): add support for generating and loading cypress config in ESM format (#21471) 2024-02-01 17:29:08 -05:00
Jonathan Cammisuli 09abd39ecc fix(core): do not run pty in run-script when we're not TTY (#21496) 2024-02-01 14:22:58 -05:00
Austin Fahsl f21b86cff2 fix(release): skip lock file update if yarn classic (#21489) 2024-02-01 11:02:01 -07:00
MaxKless 65ba819019 fix(graph): don't show open config button on nx.dev & refactor tooltips (#21463) 2024-02-01 16:47:26 +00:00
Katerina Skroumpelou ed4761d121 fix(nuxt): change nuxi to nuxt (#21484) 2024-02-01 11:07:51 -05:00
Simeon Cheeseman ec4f7c5532 feat(linter): add error and warning statistics (#18313) 2024-02-01 10:48:32 -05:00
Miroslav Jonaš 934c5e0a68 chore(core): improve slightly grammar on nx connect message (#21482) 2024-02-01 16:07:51 +01:00
Miroslav Jonaš c753838c81 fix(linter): ensure flat config generator works for pcv3 plugin (#21485) 2024-02-01 16:06:52 +01:00
Altan Stalker 8762c38bb9 feat(core): support --use-agents and --no-agents (#21472) 2024-01-31 17:48:22 -05:00
Jonathan Cammisuli 8d4869dd8a fix(core): always remove cursor reset in terminal output for Windows (#21467) 2024-01-31 15:39:48 -05:00
Emily Xiong 65e86eacac feat(react-native): upgrade react native to 0.73 (#20896) 2024-01-31 15:38:02 -05:00
Jason Jean d43d5365c8 chore(repo): use large macos 13 agents for freebsd (#21468) 2024-01-31 15:28:29 -05:00
Nicholas Cunningham 1d87707f54 fix(core): Add missing migration from playwright (#21448) 2024-01-31 13:22:18 -07:00
Lukas 857a07d87d fix(misc): use caret for semver version (#18140) 2024-01-31 19:48:38 +02:00
orig 2a0dec8253 docs(misc): fixed a typo on nx-release recipe (#21453) 2024-01-31 12:20:18 -05:00
Thomas Dekiere 143d481371 docs(core): add git instruction to fetch new remote (#19747) 2024-01-31 19:16:23 +02:00
Colum Ferry fbca31ac37 fix(module-federation): ensure incorrect tsconfig path mappings are not used #21391 (#21416) 2024-01-31 17:06:58 +00:00
Colum Ferry f0f5039962 fix(module-federation): ensure the static remotes env var is used for task hashing #21390 (#21414) 2024-01-31 17:06:12 +00:00
Emily Xiong a9378415bf fix(graph): fix expand when using external api (#21433) 2024-01-31 11:51:20 -05:00
Mihail Golban babd361cb8 fix(nest): exclude react-specific packages when generating nx nest monorepo (#21153)
Co-authored-by: Mihail Golban <mihail.golban@proovia.co.uk>
2024-01-31 18:47:44 +02:00
andreasmoller25 ecddfe1065 fix(webpack): correctly handle data URIs with escaped quotes in style… (#20988) 2024-01-31 18:47:31 +02:00
Remco Krams e4b1ab6c61 fix(testing): fix config references to js files (#21018) 2024-01-31 18:45:48 +02:00
Leosvel Pérez Espinosa 90b60f2b0c fix(misc): set $schema in nx.json generated during nx init (#21455) 2024-01-31 10:41:05 -05:00
James Henry b8a82cfa7c chore(repo): bump cross-platform-actions to latest (#21459) 2024-01-31 18:45:03 +04:00
zenvanexus 665935fb60 feat(nextjs): upgrade Next.js 14.0.3 (#20334) 2024-01-31 14:07:41 +00:00
Jack Hsu 7a83e12234 feat(core): add support for loading .ts files using ESM (#21268) 2024-01-31 13:49:06 +00:00
Phillip Barta f0d93d0e43 fix(core): update axios to address CVE-2023-45857 (#20493) 2024-01-31 15:22:01 +02:00
Miroslav Jonaš 7ed534f92b fix(linter): make eslint mandatory dependency (#21406) 2024-01-31 11:58:58 +04:00
Jonathan Cammisuli 1327904190 fix(core): do not append node_module paths in run-script executor (#21445) 2024-01-30 17:53:44 -05:00
Craigory Coppola d44e7de5dc fix(linter): make target default migrations a bit more robust (#21446) 2024-01-30 22:49:49 +00:00
Jonathan Cammisuli 3b815348b9 fix(core): include typescript package when calculating project hashes (#21285) 2024-01-30 17:24:43 -05:00
Denis Frenademetz abafedf8e5 fix(core): new generator not skipping package installation (#17927) 2024-01-30 17:11:44 -05:00
Craigory Coppola deb0f1a492 chore(repo): bump deprecation messages to v19 (#21430) 2024-01-30 16:29:05 -05:00
Craigory Coppola ce465dcff4 fix(core): remove misleading message at front of error (#21443) 2024-01-30 16:28:03 -05:00
Juri Strumpflohner 06fbde64c8 feat(nx-dev): more logos & announcement banner (#21444) 2024-01-30 21:49:32 +01:00
Craigory Coppola eeb930c5a8 fix(angular): should not log invalid extension includedScripts (#21441) 2024-01-30 15:27:01 -05:00
Altan Stalker b505262148 chore(repo): run set-shas orb before invoking start-ci-run (#21437) 2024-01-30 15:01:01 -05:00
Juri Strumpflohner 250816cdc1 fix(nx-dev): launch week agenda minor fixes (#21419) 2024-01-30 20:59:24 +01:00
Dmitry Zakharov 8ee8f3ffc3 chore(repo): bump @babel/core plugin-transform-runtime to 7.23.2 (#20952) 2024-01-30 13:50:29 -05:00
wout junius 946c6a745d feat(devkit): improving error handeling read target options (#20336) 2024-01-30 18:25:31 +00:00
Stefan Schneider 81be1e5419 docs(misc): fix typo in troubleshoot-installation.md (#20472) 2024-01-30 17:57:40 +00:00
Phillip Barta 153905d4ec cleanup(bundling): remove unused dependency fast-glob from @nx/rollup (#20494) 2024-01-30 19:53:42 +02:00
Tobbb 2f5bca065b feat(react-native): add useTransformReactJSX babel config to generators (#19170) 2024-01-30 19:48:43 +02:00
Miroslav Jonaš 647f41f395 feat(core): improve nx connect success message (#21295) 2024-01-30 12:41:42 -05:00
Miloš Lajtman 1d10023810 fix(react): import SupportedStyles type from correct path (#20239) 2024-01-30 19:37:00 +02:00
Adam Hunter 77a5c9eaa8 fix(nx-dev): remove unmatched bracket. updates warning description (#19481) 2024-01-30 19:34:22 +02:00
Jan Pretzel 82a0d613d2 fix(bundling): consider index/folder imports in manual file resolution (#19030) 2024-01-30 19:24:51 +02:00
Leosvel Pérez Espinosa eb1cab2b6c fix(nextjs): lazy load plugin import (#21426) 2024-01-30 18:09:30 +01:00
Benjamin Kroeger cd2d9495b7 fix(vue): do not add @vue/tsconfig dependency (#19873)
Signed-off-by: Benjamin Kroeger <benjamin.kroeger@gmail.com>
2024-01-30 09:58:19 -07:00
James Henry c286a6e799 fix(linter): restore rules to match previous @typescript-eslint/recommended (#21424) 2024-01-30 20:56:56 +04:00
PowerSupply bfb0520930 docs(misc): typo in encryption.md (#20682) 2024-01-30 18:35:25 +02:00
Smoothieewastaken fa16307c4f docs(misc): fixed typos (#19951) 2024-01-30 18:34:55 +02:00
beeman a9974d3f25 docs(misc): change http:// to https:// (#19534) 2024-01-30 11:33:13 -05:00
Leosvel Pérez Espinosa 7a77b0d6a7 feat(angular): add generator to convert targets to use the esbuild-based application executor (#21333) 2024-01-30 17:27:00 +01:00
Indermohan Singh c46c28694f docs(astro): fix the generate library command (#21249) 2024-01-30 18:26:46 +02:00
Webber Wang ddb049bb5a docs(misc): typo in enforce-module-boundaries (#19408) 2024-01-30 16:16:00 +00:00
Colum Ferry 0b3e1f6ec4 feat(core): log to guide users to show details after project generation (#21350) 2024-01-30 10:58:49 -05:00
MaxKless 8a294b1823 fix(graph): repair externalApiService usage broken after refactor (#21422) 2024-01-30 08:13:12 -07:00
Eduardo Barros 940fa628ce fix(nx-dev): fix hero text typo (#20937) 2024-01-30 10:10:07 -05:00
Leosvel Pérez Espinosa 230e6c06cc chore(nx-dev): add missing projects to playwright config (#21423) 2024-01-30 15:56:57 +01:00
Christian Käslin 8b371b09d6 fix: nestjs lib generator pass skipPackageJson flag to js lib generator (#20442) 2024-01-30 09:28:36 -05:00
Vinit Neogi d147604c7f feat(vite): allow passing path to custom tsconfig file when skipTypeCheck is false (#19784) 2024-01-30 16:14:53 +02:00
Vinit Neogi 85b3a5f3b9 fix(vite): prevent vite:build copying package.json when generatePackageJson false (#19780) 2024-01-30 16:13:33 +02:00
Leosvel Pérez Espinosa 875143b330 fix(misc): prevent ts-node from reading tsconfig when registering transpiler (#21381) 2024-01-30 15:07:03 +01:00
Philip Fulcher 476fabe251 docs(nx-dev): add community partners to launch nx (#21372) 2024-01-30 05:35:40 -08:00
Yoann Chocteau 4be9f443c5 docs(angular): remove --project - use --directory (#19991) 2024-01-30 07:32:32 -05:00
Leosvel Pérez Espinosa 1640a671f0 fix(angular): fix dev-server validation for esbuildMiddleware (#21413) 2024-01-30 12:17:55 +00:00
Zac Bristow 169a3f56c5 fix(js): allow inlined libs without imports (#20649) 2024-01-30 11:53:09 +02:00
Miloš Lajtman bb3cf3a862 fix(linter): remove extend of @angular-eslint/recommended--extra config (#18465) 2024-01-30 00:18:09 +01:00
Michal Jez f9009e909f feat(core): don't clear NX_BASE or NX_HEAD (#20125) 2024-01-30 00:11:26 +01:00
Nicholas Cunningham d31b951bd1 fix(nextjs): Add missing support swc for custom server (#21401) 2024-01-29 14:13:55 -07:00
Jason Jean 7a62f4156c chore(repo): update nx to 17.3.0-rc.1 (#21360) 2024-01-29 15:34:30 -05:00
James Henry e335b9f6ea fix(release): ensure non-zero exit code is propagated, change missing target handling (#21388) 2024-01-29 15:34:11 -05:00
Jason Jean 9913148d41 chore(repo): bump the binning agents provisioning (#21398) 2024-01-29 14:33:34 -05:00
Austin Fahsl 69636ad7ba fix(release): do not restart the daemon when skipLockFileUpdate is set (#21389) 2024-01-29 23:07:16 +04:00
Craigory Coppola c811be5131 fix(core): address some wonkiness when merging command and run-commands (#21315) 2024-01-29 13:03:37 -05:00
Kaden Wilkinson 8274f3419d fix(devkit): fix extractLayoutDirectory typescript types to better reflect allowed params and return value (#15339) 2024-01-29 13:01:14 -05:00
Ryan Parsley 2cb241a69f docs(linter): fix typo (#20259) 2024-01-29 17:26:35 +00:00
daiscog ec38a58a9f fix(js): fix missing top-level dependencies in publishable libs (#17730) 2024-01-29 12:23:23 -05:00
Colum Ferry 1ea09adaa3 fix(remix): tsconfigs were being incorrectly generated causing errors #21002 (#21387) 2024-01-29 17:15:23 +00:00
Colum Ferry 911f8d600a feat(remix): add nx welcome component (#21383) 2024-01-29 17:14:52 +00:00
Yiping d08fe46059 docs(vue): replace incorrect "React" in Vue doc. (#20930)
Co-authored-by: Yiping <YipingRuan@users.noreply.github.com>
2024-01-29 17:14:26 +00:00
Austin Fahsl 5369f5d527 docs(release): add recipe for publishing in github actions (#21370) 2024-01-29 08:10:05 -07:00
Leosvel Pérez Espinosa c9f75acc0e fix(angular): update setup-ssr generator to support the outputPath object variant (#21385) 2024-01-29 15:31:50 +01:00
Miroslav Jonaš 17b09b9ba1 fix(repo): fix version calculation on nx-release (#21382) 2024-01-29 16:48:26 +04:00
Julius Mackowiak 391d22607e docs(core): fix typo (#21200) 2024-01-29 07:37:32 -05:00
Jason Jean 1040dbdd4e fix(core): fix conflicting types from merge conflict (#21371) 2024-01-27 14:28:02 -05:00
Emily Xiong 1bd2e0e639 fix(core): fix compilerOptions may not exist (#21364) 2024-01-26 22:55:03 -05:00
Emily Xiong 73d37cc58c feat(core): pass down help to run-commands (#21331) 2024-01-26 21:39:55 -05:00
Nicholas Cunningham 79a7e79eb2 fix(vite): PCV3 multiple targets (#21366) 2024-01-26 19:15:20 -07:00
Jason Jean 00dbd14368 fix(core): fix sending sigint to child tasks with the new psuedo tty … (#21369)
Co-authored-by: Jonathan Cammisuli <jon@cammisuli.ca>
2024-01-26 19:05:04 -05:00
Jason Jean e1bb8bccf1 fix(core): do not create new targets from target defaults when packag… (#21365) 2024-01-26 17:57:54 -05:00
Jack Hsu b4029e09ed feat(misc): hide unpublished links in project details view (#21362) 2024-01-26 15:52:23 -05:00
Jack Hsu 4ed74a44a9 fix(angular): update autoprefixer migration to the right file (#21363) 2024-01-26 14:50:06 -05:00
Austin Fahsl 9c81328b81 fix(release): disable workspace changelogs in config when not valid (#21341) 2024-01-26 21:51:29 +04:00
Colum Ferry c2e0c3da8f docs(core): update wording around guiding user to graph (#21348) 2024-01-26 17:22:50 +00:00
Nicholas Cunningham bf6f78f792 fix(vite): PCV3 Plugin update to use resolveConfig (#21287) 2024-01-26 12:06:45 -05:00
Jack Hsu 89c5188df3 feat(webpack): simplify inferred webpack-cli command (#21340) 2024-01-26 12:00:18 -05:00
James Henry c577f48cea fix(release): only add nx-release-publish to public packages (#21338) 2024-01-26 11:56:54 -05:00
Katerina Skroumpelou f7f745f87f fix(nuxt): add all target names when adding vite plugin (#21332) 2024-01-26 11:29:10 -05:00
Colum Ferry f59ceea3af fix(core): clarify error log when a project exists in a directory (#21355) 2024-01-26 16:15:25 +00:00
MaxKless 12d7caa099 cleanup(graph): misc project details view enhancements (#21311) 2024-01-26 16:00:58 +00:00
Miroslav Jonaš 7ab0de8f68 fix(core): yargs array-like prompts initial field is number (#21349) 2024-01-26 10:46:05 -05:00
Leosvel Pérez Espinosa 4b88f48a18 feat(angular): support angular 17.1.0 (#20556) 2024-01-26 10:43:16 -05:00
Miroslav Jonaš fc8cca44c5 chore(repo): print version at the end of nx-release script (#21346) 2024-01-26 17:03:38 +04:00
Jack Hsu 2faaaf3a19 feat(cypress): simplify inferred cypress command (#21337) 2024-01-25 17:03:05 -05:00
Jason Jean f4011ec92d fix(core): exit with sigint when sigint is received (#21336) 2024-01-25 16:13:51 -05:00
Rares Matei 5208d6d694 chore(repo): reenable env var propagation (#21147) 2024-01-25 10:57:08 -05:00
Colum Ferry 8bc8d696e5 feat(core): guide users to view the graph after nx init (#21303) 2024-01-25 10:54:55 -05:00
Colum Ferry a1c0434650 feat(workspace): update readme to point people to the graph (#21325) 2024-01-25 10:54:17 -05:00
Emily Xiong 4a4917b628 fix(graph): fix 404 when / in name (#21318) 2024-01-25 10:35:56 -05:00
Miroslav Jonaš 66e8ec3e2a feat(core): improve generated CI workflows (#21324) 2024-01-25 19:09:36 +04:00
Miroslav Jonaš 269fa1a75f fix(core): remove deprecated recursive rmdir with rm -rf (#21327) 2024-01-25 14:05:39 +00:00
Johanna Pearce e4daf33601 fix(devkit): update the ci generators to use the correct launch template (#21304)
Also changes all instances of --distributes-on to --distribute-on.
2024-01-25 10:04:02 +00:00
Jack Hsu 06f726a075 fix(js): add @swc/helpers when initializing js plugin since it is needed by other plugins (#21316) 2024-01-25 09:51:48 +01:00
Leosvel Pérez Espinosa c7b44a4958 fix(misc): await async function invocations (#21299) 2024-01-25 09:30:01 +01:00
Austin Fahsl fc30d1be96 fix(release): fix --first-release with conventional commits and independent projects (#21320) 2024-01-25 11:17:09 +04:00
Emily Xiong 4e0c60e636 feat(core): support args to be an array for command (#21290) 2024-01-24 23:14:50 -05:00
Leosvel Pérez Espinosa 70fd808d9c fix(misc): do not print formatting errors while setting up nx cloud in nx init (#21302) 2024-01-24 17:03:03 -05:00
Austin Fahsl d9c53e14fc chore(release): add nx release recipes (#21294) 2024-01-24 14:33:39 -07:00
Philip Fulcher 81d8428583 docs(nx-dev): update time zone information for Launch Nx (#21291) 2024-01-24 16:31:58 -05:00
Isaac Mann 11445ab36d fix(nx-dev): table of contents with code (#21173) 2024-01-24 15:56:51 -05:00
Altan Stalker 434d72aaf0 chore(repo): enable dynamic changesets (#21314) 2024-01-24 14:57:27 -05:00
Jack Hsu 7b680ec68c feat(docs): add {% project-details %} as a tag in markdown docs (#21288)
Co-authored-by: Colum Ferry <cferry09@gmail.com>
Co-authored-by: Isaac Mann <isaacplmann@gmail.com>
2024-01-24 12:53:03 -05:00
Miroslav Jonaš 292d407536 cleanup(core): remove repeat of addNewLine after logCommand (#21305) 2024-01-24 17:46:36 +00:00
Katerina Skroumpelou 63018c9631 fix(storybook): add storybook-static to gitignore for pcv3 (#21309) 2024-01-24 11:53:42 -05:00
Katerina Skroumpelou fb89c09b2f fix(storybook): throw if no project name for angular (#21308) 2024-01-24 18:02:54 +02:00
Miroslav Jonaš 53297cc939 fix(core): fix socket dir removal for macos (#21306) 2024-01-24 10:39:58 -05:00
Emily Xiong e5740a2b30 feat(core): use runCommand for runScript (#21292) 2024-01-24 10:17:55 -05:00
James Henry bba9600d6e feat(release): allow overriding generator and generatorOptions per project (#21298) 2024-01-24 10:17:12 -05:00
Craigory Coppola 066c39ef9c feat(core): reveal --web flag on show project (#21293) 2024-01-24 10:16:11 -05:00
Austin Fahsl b6b14ddaf4 feat(release): global stageChanges option & changelog fixes (#21223) 2024-01-24 07:07:29 -07:00
Leosvel Pérez Espinosa a628c025d2 fix(angular): support scoped project names and entrypoints in library secondary entrypoint generator (#21300) 2024-01-24 13:31:34 +00:00
Katerina Skroumpelou e9493fbdd2 fix(vue): import vue libs in other libs - fix ts2307 (#21297) 2024-01-24 15:24:16 +02:00
Austin Fahsl 1257d73c0c chore(release): fix yarn berry e2e test (#21289) 2024-01-24 16:29:18 +04:00
MaxKless 6326b11cec fix(core): properly disconnect daemon & reject promise (#21283) 2024-01-24 06:44:16 -05:00
Austin Fahsl 096cefb109 feat(release): update lockfile after version command (#21107) 2024-01-23 11:22:16 -07:00
Colum Ferry 6164481d57 fix(remix): use twStyles as import to prevent conflicts (#21276) 2024-01-23 16:28:59 +00:00
Emily Xiong 3333ef4968 fix(expo): fix externalDependencies for expo plugin (#21213) 2024-01-22 17:44:00 -05:00
James Henry 3d4238a405 fix(release): filtering publish by project or group should exclude task deps (#21231) 2024-01-22 14:00:14 -05:00
Leosvel Pérez Espinosa e4758358b0 feat(misc): optionally update package.json scripts in init generators (#21204) 2024-01-22 13:51:41 -05:00
Dmitriy Stepanenko c1238aad5e feat(angular): support esbuild middleware functions (#21048) 2024-01-22 18:34:02 +01:00
Craigory Coppola cb5eeb7475 feat(core): forward stdin to commands started via rust (#21195)
Co-authored-by: Jonathan Cammisuli <jon@cammisuli.ca>
2024-01-22 12:25:52 -05:00
Katerina Skroumpelou 33e13910b1 fix(core): accept vue as preset in cnw (#21262) 2024-01-22 12:22:33 -05:00
Isaac Mann e2a819ef18 docs(core): nx agents guide clean up (#21241)
Co-authored-by: Rares Matei <matei.rar@gmail.com>
2024-01-22 11:59:59 -05:00
Leosvel Pérez Espinosa 87256aae66 cleanup(angular): simplify package executor adjustments for angular v17 (#20869) 2024-01-22 10:33:39 -05:00
Colum Ferry 9fea60b3b2 fix(remix): required property in schema should be project (#21258) 2024-01-22 10:25:39 -05:00
Leosvel Pérez Espinosa 892345d039 feat(misc): identify and set up more nx core plugins during nx init (#21254) 2024-01-22 15:28:34 +01:00
jiayi 07a237f242 fix(angular): run function is not called in setup-ssr/application-builder (#21157)
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2024-01-22 13:00:54 +01:00
James Henry 85c82e0b24 fix(release): versionPrefix should default to auto (#21256) 2024-01-22 14:38:48 +04:00
Craigory Coppola 06717de590 feat(core): move target defaults handling to nx plugin (#21104) 2024-01-19 18:22:11 -05:00
Jack Hsu 2e2dada8c0 fix(graph): correct value when inputs/outputs are copied (#21245) 2024-01-19 15:31:33 -05:00
Colum Ferry b97037ebd1 feat(graph): show open config button in graph web (#21181)
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2024-01-19 14:05:09 -05:00
Colum Ferry 8bd20e5928 feat(graph): add tooltips to project details view (#21205) 2024-01-19 14:04:14 -05:00
Leosvel Pérez Espinosa a7dccc584f fix(misc): install required deps during nx init without overriding existing versions (#21237) 2024-01-19 14:03:59 -05:00
Nicholas Cunningham 7ddc3136ba chore(nextjs): Remove env variable warning message (#21238) 2024-01-19 10:32:12 -07:00
Leosvel Pérez Espinosa 866e8bcffe fix(misc): identify usage of playwright correctly when running nx init (#21236) 2024-01-19 12:12:01 -05:00
Nicholas Cunningham 605d65acd2 fix(nextjs): custom server unable to run production builds (#21222) 2024-01-19 09:51:19 -07:00
James Henry 6684c1f3a3 feat(release): support version prefix for dependents (#21209) 2024-01-19 10:42:28 -05:00
Leosvel Pérez Espinosa ccac566064 fix(misc): install nx when no plugins selected during nx init (#21228) 2024-01-19 10:41:40 -05:00
Aditya Mathur dd5f3c8d17 docs(misc): standardize all the install commands with different pm (#21226) 2024-01-19 15:21:42 +01:00
Miroslav Jonaš 4700df62be fix(linter): update eslint plugins for @typescript-eslint v6 naming (#21221)
Co-authored-by: Steven Rathbauer <gh.rathpc@gmail.com>
Co-authored-by: James Henry <james@henry.sc>
2024-01-19 14:16:18 +04:00
MaxKless b5ffb85874 fix(graph): refresh pdv periodically in watch mode (#21218)
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2024-01-18 17:59:10 -05:00
Katerina Skroumpelou 66929530b1 feat(graph): hover to see source & more UI updates (#21182)
Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-01-18 17:34:54 -05:00
Jason Jean 8f6eed11d4 fix(js): set the unsafeHttpWhitelist when the set has any items (#21216) 2024-01-18 14:20:41 -05:00
Miroslav Jonaš d45a13e4fa feat(core): extend nxCloud prompt to include basic CI workflow options (#21094) 2024-01-18 14:12:31 -05:00
Leosvel Pérez Espinosa f98a16ff57 feat(misc): update minimatch version used across packages (#21207) 2024-01-18 19:08:15 +01:00
MaxKless e4e7f54bfb fix(graph): take vscode light/dark theme into account (#21208) 2024-01-18 12:04:03 -05:00
James Henry e97910914e feat(release): add formal entrypoint for programmatic API at nx/release (#21211) 2024-01-18 11:29:49 -05:00
MaxKless ddebb4d4f3 feat(graph): allow expanding target when opening pdv from external api (#21189) 2024-01-18 10:57:32 -05:00
Vadim Zhamkov 7192141c44 feat(react): Add playwright support to generators (#21150)
Co-authored-by: Vadim Zhamkov <vad-js@nebius.com>
2024-01-18 10:56:54 -05:00
Jonathan Cammisuli 67ca5f85ed chore(repo): update nx to the latest beta (#21191) 2024-01-18 10:52:47 -05:00
Miroslav Jonaš cbcd2ecddc fix(linter): fix import of chalk for reporting (#21201) 2024-01-18 15:23:25 +01:00
Miroslav Jonaš 331fbe64b1 fix(nx-dev): align button sizes on hero (#21163) 2024-01-18 14:55:11 +01:00
Miroslav Jonaš e8464cca9e feat(core): update ci-workflow generator (#21141) 2024-01-18 14:47:36 +01:00
Miroslav Jonaš c452a1f7c5 fix(linter): add links to docs to rules (#21199) 2024-01-18 14:47:10 +01:00
Jack Hsu 8ccf327b1a feat(graph): decouple graph client from nx.dev <Fence> component (#21186) 2024-01-17 21:00:36 -05:00
Miroslav Jonaš 192d36f493 chore(repo): bump pnpm and nx-orb versions (#21143) 2024-01-18 00:11:43 +01:00
Craigory Coppola 0752eff1c6 fix(core): ensure connect-to-nx-cloud works with lerna workspaces (#20895)
Co-authored-by: James Henry <james@henry.sc>
2024-01-17 17:06:58 -05:00
Jason Jean cd01ec685e chore(graph): fix the vh of the project graph shell (#21192) 2024-01-17 16:09:31 -05:00
Jason Jean 1ffd6731dc feat(core): add target defaults in configuration generators rather th… (#21105) 2024-01-17 16:02:47 -05:00
James Henry 38307fa6fb feat(release): support conventionalCommits shorthand for version config (#21187) 2024-01-17 16:01:29 -05:00
Leosvel Pérez Espinosa 28438bb810 feat(core): add the "add" cli command (#20976) 2024-01-17 20:22:16 +00:00
Emily Xiong 6141f44203 feat(core): add keepExistingVersions to all packages (#21169) 2024-01-17 14:22:58 -05:00
Nicholas Cunningham 544a2c4975 fix(testing): Inline projects inside playwright.config.ts (#21188) 2024-01-17 13:34:34 -05:00
Nicholas Cunningham c43b22dc88 feat(nextjs): Standalone projects now default to src (#21010) 2024-01-17 11:22:51 -07:00
Jason Jean 49cff89908 feat(misc): add layout for project details view (#21172) 2024-01-17 13:02:45 -05:00
Julien Simonet ea3c2426d3 fix(js): ensure result is valid before attempting to close it during rollup watch 2024-01-17 12:35:21 -05:00
Philip Fulcher 0775c72fbd docs(nx-dev): hiding community partners link for now (#21185) 2024-01-17 09:56:09 -07:00
Philip Fulcher bd0be6ae58 docs(nx-dev): add launch nx page (#21135) 2024-01-17 09:40:57 -07:00
Craigory Coppola e503810d57 feat(core): read name from package.json if present and no inference plugin provides name (#21125) 2024-01-17 11:29:52 -05:00
MaxKless c685321ced chore(core): revert pnpm lockfileVersion to 6.0 (#21183) 2024-01-17 10:45:28 -05:00
Miroslav Jonaš 1df9088e72 fix(nx-dev): do not open official plugins in new tab (#21179) 2024-01-17 09:34:30 -05:00
Katerina Skroumpelou 01ae336eea fix(storybook): handle output-dir properly for outputs (#21168) 2024-01-17 09:07:12 -05:00
Miroslav Jonaš d966d21b96 docs(nx-dev): add pnpm and simplify examples on eslint landing page (#21178) 2024-01-17 14:14:29 +01:00
Rares Matei 92a4861b27 docs(nx-cloud): update enterprise release notes (#21140) 2024-01-17 13:34:56 +01:00
Austin Fahsl 8f2dee0500 feat(release): add fallback for currentVersionResolver in the version step (#21155) 2024-01-17 13:36:33 +04:00
Jason Jean d4f3e63a4c feat(core): create a new function to run child processes via rust (#21070)
Co-authored-by: Jonathan Cammisuli <jon@cammisuli.ca>
Co-authored-by: Emily Xiong <xiongemi@gmail.com>
2024-01-17 02:56:59 -05:00
Emily Xiong 78a4df8d26 feat(react-native): generate pod install target (#21166) 2024-01-16 17:42:25 -05:00
MaxKless e38b0bb6f4 feat(graph): rework pdv target section & remove unused code (#21159) 2024-01-16 20:12:34 +00:00
Jack Hsu 253c0ff2ab feat(devkit): add a flag to keep existing versions when calling addDependenciesToPackageJson (#21123) 2024-01-16 14:24:14 -05:00
James Henry f02492301a fix(release): default changelog git commit and tag true (#21129) 2024-01-16 22:00:52 +04:00
Miroslav Jonaš 16b3f14891 docs(nx-dev): fix ci format record command (#21158) 2024-01-16 16:12:17 +01:00
Katerina Skroumpelou db1dfbd473 docs(vue): remove showcase for vue and nuxt (#21145) 2024-01-16 17:08:43 +02:00
Miroslav Jonaš fb8bd760df chore(nx-dev): bump copywright year (#21148) 2024-01-16 10:06:44 -05:00
Leosvel Pérez Espinosa 047dc22aed cleanup(misc): clean up init generators (#21088) 2024-01-16 15:29:44 +01:00
Colum Ferry dcef077032 feat(remix): add init generator (#21146) 2024-01-16 13:44:38 +00:00
Colum Ferry 0f691d5ff0 chore(graph): cleanup missed console.log from debug (#21160) 2024-01-16 13:21:30 +01:00
Miroslav Jonaš 42aefd87d0 fix(nx-dev): increase shorts video size to show volume control (#21142) 2024-01-15 13:08:40 -08:00
Jack Hsu 4a2a45438b feat(core): use Nx plugins and inferred targets when running "nx init" (#20872) 2024-01-15 15:55:38 -05:00
Jonathan Cammisuli c10af4d9d1 fix(core): handle invalid group glob groups (#21027) 2024-01-15 14:34:46 -05:00
Nicholas Cunningham c7c5a6d058 fix(nextjs): PCV3 with Cypress and Playwright should work with standalone Next.js Projects (#21103) 2024-01-15 10:08:33 -07:00
Miroslav Jonaš d344b563be chore(repo): fix Max`s photo size on readme (#21149) 2024-01-15 17:02:12 +01:00
MaxKless b559931339 chore(misc): add myself to graph codeowners & core members (#21139) 2024-01-15 10:39:10 -05:00
Rares Matei 9747eead55 chore(repo): revert env var propagation (#21131)
Co-authored-by: Colum Ferry <cferry09@gmail.com>
2024-01-15 09:23:35 -05:00
Miroslav Jonaš 78fe9546be docs(nx-dev): add missing permissions to GH CI example (#21137) 2024-01-15 04:50:38 -08:00
Colum Ferry 1d2bfde11a fix(remix): import of config file should invalidate cache (#21121) 2024-01-12 19:17:39 +00:00
Colum Ferry 9559f7e7ac feat(remix): use esm config file (#21111) 2024-01-12 19:00:51 +00:00
Colum Ferry b6cbb2ac6d feat(remix): remove projects prompt from artifact generators (#21112) 2024-01-12 18:46:10 +00:00
Colum Ferry 08bc36691f feat(remix): generate vitest file instead vite.config (#21100) 2024-01-12 18:27:21 +00:00
Colum Ferry 1f308bf736 feat(remix): add createNodes support for target inference (#21073) 2024-01-12 16:55:46 +00:00
Emily Xiong 633dcfba00 bugfix(webpack): merge alias webpack (#21098) 2024-01-12 10:47:31 -05:00
Juri Strumpflohner cd2258e5e3 chore(nx-dev): add banner for nx webinar (#21115) 2024-01-12 10:36:46 -05:00
Colum Ferry 95a41f8492 fix(remix): legacy package pointing to incorrect readme (#21113) 2024-01-12 10:22:28 -05:00
Rares Matei d0f598d81d chore(repo): use prebuilt base image tag for nx agent (#21095) 2024-01-12 12:15:38 +00:00
MaxKless b97c869279 feat(graph): add nx console data loader (#20744) 2024-01-11 15:42:57 -05:00
James Henry b60ae51100 chore(repo): update to nx 17.3.0-beta.2 (#21090) 2024-01-11 15:23:44 -05:00
Jason Jean 5d9b4c5224 feat(testing): add jest create-nodes plugin (#20045) 2024-01-11 14:54:04 -05:00
Isaac Mann 595a7743b6 docs(core): rename distributed cache to remote cache (#21061) 2024-01-11 18:14:44 +00:00
Austin Fahsl b9192cdcf2 feat(release): enable git operations by default (#21082) 2024-01-11 10:37:03 -07:00
Katerina Skroumpelou a564ca0211 feat(storybook): nodes plugin (#20562) 2024-01-11 09:21:04 -05:00
Katerina Skroumpelou e5a22a94c6 fix(vite): do not add test target if test is not defined (#21076) 2024-01-11 12:20:08 +02:00
Edouard Bozon 3c8db4eedf docs(core): improve run commands in parallel section (#21083)
Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
Co-authored-by: Altan Stalker <stalkeraltan@gmail.com>
2024-01-11 10:32:07 +01:00
Zachary DeRose b93dd1c577 docs(angular): adding schematic and builder interop (#21081) 2024-01-11 00:11:27 -05:00
Dmitriy Stepanenko a42d9ab6dd fix(core): formatter should not fail when absolute paths are provided as "--files" (#20331) 2024-01-10 13:30:17 -05:00
Katerina Skroumpelou 7da53c026e fix(vite): replaceFile and fileReplacement fixes (#21077) 2024-01-10 18:53:34 +02:00
Victor Savkin 5e9a362c11 chore(repo): propagate env vars from circle to cloud agents automatically 2024-01-10 11:25:32 -05:00
Miroslav Jonas 67b5bd6c9f feat(core): remove prompt from nx connect command 2024-01-10 14:37:53 +01:00
Miroslav Jonaš 20dcc97099 fix(nx-dev): standardize nx cloud naming (#21059) 2024-01-10 13:09:42 +01:00
Jack Hsu 6307a831d9 fix(js): allow inlineable dependency to be added to externals (#21051) 2024-01-09 18:32:46 +00:00
Emily Xiong 40cbae2fae docs(core): add exec doc (#21046)
Co-authored-by: Isaac Mann <isaacplmann@gmail.com>
2024-01-09 10:34:04 -05:00
Miroslav Jonaš 8ac54d8bea fix(nx-dev): fix heading size and improve contrast (#21057) 2024-01-09 16:15:01 +01:00
Emily Xiong b9ce219e70 feat(detox): add createNodes for detox (#21016) 2024-01-09 10:03:51 -05:00
Katerina Skroumpelou c79377e735 fix(vite): only import vite dynamically (#21050) 2024-01-09 15:48:32 +01:00
Austin Fahsl 2a669f6f43 feat(release): conventional commits support for independent projects (#21012) 2024-01-09 18:43:08 +04:00
Isaac Mann b57adf8430 docs(core): nx replay rename (#21060) 2024-01-09 09:29:34 -05:00
Austin Fahsl 00de2d5f90 fix(release): stage changes when versioning with --projects argument (#21054) 2024-01-09 17:58:54 +04:00
Miroslav Jonaš 03257e2503 feat(linter): move common options to target defaults (#20583) 2024-01-09 09:12:47 +00:00
Emily Xiong 2360918e53 feat(expo): support createNodes for expo (#21014) 2024-01-08 18:12:14 -05:00
Emily Xiong 2b652a4c07 feat(react-native): add support for createNodes in react native (#21013) 2024-01-08 16:16:43 -05:00
Katerina Skroumpelou ce81133162 fix(vite): build executor watch (#21042) 2024-01-08 20:46:02 +02:00
Benjamin Cabanes bae3358e2e chore(nx-dev): change nx cache to nx replay in home (#21034) 2024-01-08 08:16:42 -08:00
Isaac Mann 530711db1a docs(core): remember card flips (#21041) 2024-01-08 09:38:22 -05:00
Leosvel Pérez Espinosa 2ee326c1cc fix(angular): support scheduling inferred angular cli builder targets (#21019) 2024-01-08 15:34:11 +01:00
Miroslav Jonas 69523f1eed fix(nx-dev): fix text colors 2024-01-08 09:53:04 +01:00
Miroslav Jonas 48bcb534fb fix(nx-dev): improve styles 2024-01-08 09:53:04 +01:00
Isaac Mann 8bd78ca7a4 docs(core): change to p tag 2024-01-08 09:53:04 +01:00
Isaac Mann 1ddd9ae61b docs(core): update tips ui 2024-01-08 09:53:04 +01:00
Isaac Mann 2960ba45d5 docs(core): update ui 2024-01-08 09:53:04 +01:00
Isaac Mann ab5379eb26 docs(core): new year tips 2024-01-08 09:53:04 +01:00
Isaac Mann 49a8d84023 feat(nx-dev): rectangle cards 2024-01-08 09:53:04 +01:00
Isaac Mann e7dcce057b feat(nx-dev): modals and flip cards 2024-01-08 09:53:04 +01:00
Isaac Mann 868721a157 feat(nx-dev): new year challenge 2024-01-08 09:53:04 +01:00
Isaac Mann 54bae6588a feat(nx-dev): new year challenge (#20639) 2024-01-05 16:25:07 +01:00
Nicholas Cunningham a04eb74203 fix(nextjs): Add support for mjs next config file (#21007) 2024-01-04 17:49:59 -07:00
James Henry 3093de1ea5 fix(release): update error message check for npm dist-tags (#20995) 2024-01-05 02:18:22 +04:00
James Henry 34c68c0a20 chore(repo): simplify nx release config (#20994) 2024-01-04 14:46:22 -05:00
Leosvel Pérez Espinosa fd8668007a chore(repo): add codeowners entry for playwright docs (#20879) 2024-01-04 14:45:59 -05:00
James Henry dfe418e8cc fix(release): do not set extra v on GitHub release, improve GH API error handling (#20999) 2024-01-04 10:43:32 -05:00
Leosvel Pérez Espinosa 3d1899e5cc fix(misc): ignore .nx/cache when running nx init in an angular cli project (#21000) 2024-01-04 07:59:03 -05:00
Jonathan Cammisuli a2f7ae7f22 fix(core): prioritize nxignore for watcher updates (#20975) 2024-01-04 12:41:20 +00:00
Jason Jean e31c179c02 fix(web): fix webpack + playwright config issues (#20991) 2024-01-03 17:42:58 -05:00
Jonathan Cammisuli 985676041e fix(core): handle "." project roots properly for hashing (#20979) 2024-01-03 15:15:26 -05:00
Katerina Skroumpelou 688b83f66a feat(vite): recognize all vite.config file extensions (#20971) 2024-01-03 08:06:13 -07:00
James Henry 423dd3c565 chore(repo): update to nx 17.2.7 (#20916) 2024-01-03 09:06:21 -05:00
Leosvel Pérez Espinosa 914465379b cleanup(web): kill process and open port in e2e test case (#20987) 2024-01-03 18:03:28 +04:00
Katerina Skroumpelou 1d1d465d12 feat(misc): align version of @types/node throughout repo (#20883) 2024-01-02 18:59:03 +02:00
Katerina Skroumpelou f7d179522f fix(vite): include vitest config in nodes plugin (#20887) 2024-01-02 16:17:58 +02:00
Igor Katsuba d99e8e6aa5 fix(angular): add named export for moduleFederationDevServerExecutor (#20944) 2024-01-02 09:30:06 +01:00
Jack Hsu 51c039b252 feat(linter): make init generator public 2023-12-28 20:58:06 +01:00
Nicholas Cunningham 8a8dbb381e fix(nextjs): Missing deps for image and css optimization (#20941) 2023-12-28 10:33:35 -07:00
James Henry 3a697405a8 fix(linter): only update overrides when applicable (#20917) 2023-12-28 14:10:24 +00:00
Nicholas Cunningham f1849a792d fix(nextjs): Playwright should work with workspace libs (#20933) 2023-12-27 13:13:53 -07:00
Jack Hsu d1a2d455a0 fix(nextjs): update migration to handle projects without eslintrc (#20932) 2023-12-27 14:03:24 -05:00
Miroslav Jonaš cbb26cb368 fix(repo): update nightly matrix with new packages (#20911) 2023-12-26 21:51:54 +01:00
Miroslav Jonaš cb09f25c8a chore(repo): update nightly node version matrix (#20907) 2023-12-22 17:09:14 +01:00
Miroslav Jonaš a851c13517 fix(repo): add missing packages to nightly (#20908) 2023-12-22 17:09:02 +01:00
Miroslav Jonaš 148ddfb30c fix(linter): flat config should always set path to config when using API (#20867) 2023-12-22 09:40:10 +01:00
James Henry d819e6cee8 fix(release): capture all release titles during parse (#20864) 2023-12-21 23:22:23 +00:00
James Henry 0cdaf6f37e fix(release): publish error handling, dry-run in dependsOn (#20889) 2023-12-22 01:10:50 +04:00
Jack Hsu 029f73d3b7 fix(nextjs): correct inferred outputs for root Next.js projects (#20891) 2023-12-21 11:16:55 -05:00
Isaac Mann cb86dcbaeb docs(core): fix columns (#20888) 2023-12-21 14:18:28 +00:00
Katerina Skroumpelou 84c9533d9a fix(vite): dist and coverage paths for root projects (#20878) 2023-12-21 14:07:17 +00:00
Juri Strumpflohner 7578d00e66 feat(nx-dev): adjust highlighting of tagline (#20877) 2023-12-21 09:05:10 -05:00
Isaac Mann 8fb60ab996 docs(core): fix home page dte link (#20870) 2023-12-21 05:56:27 -08:00
Miroslav Jonaš fc176d3eec fix(angular): fix standalone eslint config generation (#20885) 2023-12-21 14:28:10 +01:00
Leosvel Pérez Espinosa 18ddc74f4f feat(testing): add option to allow filtering test files in playwright executor (#20862) 2023-12-21 01:49:56 -08:00
Leosvel Pérez Espinosa 737c75fd0b fix(testing): set correct type for ignoreTestFiles option in cypress executor (#20853) 2023-12-21 09:10:43 +01:00
Craigory Coppola 2374d8eaba feat(testing): add create-nodes plugin for playwright e2e targets (#20099) 2023-12-20 16:34:32 -05:00
Miroslav Jonaš 3981c90fe8 fix(linter): ensure angular entry point checks are correct (#20859) 2023-12-20 18:16:58 +01:00
Miroslav Jonaš 696d04862a fix(nextjs): remove temporary patch for next eslint rules (#20863) 2023-12-20 15:52:51 +01:00
Leosvel Pérez Espinosa 9e25c91072 fix(testing): safely handle circular deps in component testing plugin (#20852) 2023-12-20 14:48:23 +01:00
Leosvel Pérez Espinosa dcb4bee925 fix(testing): run playwright with the correct project option for multiple values (#20850) 2023-12-20 14:48:13 +01:00
Austin Fahsl 82fb2da5d2 fix(release): add overall nx release command (#20535)
Co-authored-by: James Henry <james@henry.sc>
Co-authored-by: Isaac Mann <isaacplmann@gmail.com>
2023-12-20 08:42:20 -05:00
Miroslav Jonaš 72898896a7 cleanup(js): remove reference to nx/workspace for getSourceNodes (#20858) 2023-12-20 17:28:36 +04:00
Juri Strumpflohner c74fce4fdd docs(core): embed convert to monorepo vid (#20857) 2023-12-20 04:12:59 -08:00
Juri Strumpflohner 037fe40e16 chore(nx-dev): hide announcement banner (#20860) 2023-12-20 04:12:47 -08:00
Rares Matei 2f9060ee4a docs(nx-cloud): enterprise release notes (#20856)
Co-authored-by: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
2023-12-20 11:12:45 +02:00
Yann Thibodeau b40773c915 fix(bundling): added back code to handle skipTypeField option of rollup executor options + tests (#20460) 2023-12-19 14:05:46 -05:00
Nicholas Cunningham 2b4f7b86f1 chore(react): Update react e2e tests to be more lean (#20834) 2023-12-19 12:43:30 -05:00
Katerina Skroumpelou e0579f2a4a docs(nuxt): deploy to vercel guide (#20851) 2023-12-19 12:28:04 -05:00
Colum Ferry 8abf1c631a chore(react): split module federation tests into their own e2e project (#20824) 2023-12-19 12:01:28 -05:00
Katerina Skroumpelou dd44ad9778 fix(vite): more properly resolve arguments from configurations (#20825) 2023-12-19 17:36:16 +02:00
James Henry f2f5b517e3 chore(repo): fix e2e log (#20846) 2023-12-19 09:37:45 -05:00
Nicholas Cunningham 9d7a724bd3 feat(nextjs): Add support for experimental-https when running dev server (#20836) 2023-12-18 14:18:05 -07:00
James Henry 743a8cbb3d chore(repo): update to nx 17.2.6 (#20835) 2023-12-19 00:27:01 +04:00
Nicholas Cunningham fbefd06136 fix(node): E2E test port conflicts (#20826) 2023-12-18 10:10:13 -07:00
Nicholas Cunningham bebdf51435 fix(nextjs): enhance page generator to work when --project is not supplied (#20778) 2023-12-18 09:36:34 -07:00
Leosvel Pérez Espinosa 626605ef97 chore(angular): skip formatting generated code when not needed in unit tests (#20819) 2023-12-18 11:05:44 -05:00
Katerina Skroumpelou de0d238e13 fix(vite): vitest migration add reporters (#20823) 2023-12-18 17:54:58 +02:00
Colum Ferry 6b34847bea docs(module-federation): update existing documentation (#20822) 2023-12-18 15:23:09 +00:00
James Henry 1b464d8ce6 fix(release): ensure leading v is stripped from provided semver version (#20815) 2023-12-18 07:58:57 -05:00
James Henry 32baa4dab1 fix(release): changelog renderer should prefer breaking change explanation text (#20798) 2023-12-17 13:48:31 -05:00
Juri Strumpflohner 71ce32a121 feat(nx-dev): update documentation dropdown menu links (#20792) 2023-12-15 13:52:23 -08:00
Juri Strumpflohner 4aea1fa737 feat(nx-dev): adjust related section title padding (#20803) 2023-12-15 13:28:12 -08:00
Juri Strumpflohner 9d63b03fb7 docs(misc): link e2e distribution video on CI docs (#20791) 2023-12-15 13:27:43 -08:00
Juri Strumpflohner 3099547de6 feat(nx-dev): improve related docs section (#20796) 2023-12-15 15:49:11 -05:00
Nicholas Cunningham 2346aaf78e chore(react): Update unit tests to be faster (#20797) 2023-12-15 13:27:49 -07:00
Isaac Mann ba35bf19c3 fix(nx-dev): dynamic classes not allowed (#20800) 2023-12-15 15:07:43 -05:00
James Henry 171c90db3b chore(repo): use nx 17.2.5 (#20795) 2023-12-15 21:24:16 +04:00
Benjamin Cabanes ebd897072a chore(nx-dev): update nx-dev banner (#20794) 2023-12-15 11:12:22 -05:00
Colum Ferry a9a676a570 fix(module-federation): support buildable libs (#20786) 2023-12-15 11:07:13 -05:00
Benjamin Cabanes bba1f43032 chore(repo): update nx banners (#20793) 2023-12-15 10:58:27 -05:00
Leosvel Pérez Espinosa 3a15b434c2 chore(repo): set specific packages to install in testing tools e2e tests (#20759) 2023-12-15 09:43:17 -06:00
Katerina Skroumpelou 6199c20113 docs(vite): explain how to set env vars (#20790) 2023-12-15 10:28:26 -05:00
Katerina Skroumpelou ff624a36d5 fix(js): fixing output based on test runner selection (#20788)
Co-authored-by: Alyssa Evans <alyda@me.com>
2023-12-15 17:03:41 +02:00
Miroslav Jonaš d8beed9874 fix(linter): fix workspace-rule naming with flat config (#20782) 2023-12-15 16:00:50 +01:00
Katerina Skroumpelou 7641f73278 fix(vite): only dynamically import vite (#20774) 2023-12-15 15:24:05 +02:00
Juri Strumpflohner df6f99a707 chore(core): list new @gnuechtel/nx-cucumber plugin (#20785)
Co-authored-by: Christian Gnüchtel <christian@gnuechtel.com>
2023-12-15 13:12:45 +00:00
MaxKless bb1744c261 cleanup(core): optimize core e2e tests (#20739) 2023-12-15 11:58:13 +01:00
James Henry ca32d1440d feat(release): support Revert commits in changelog renderer (#20663) 2023-12-14 18:24:06 -05:00
Nicholas Cunningham aaf3e54d52 fix(nextjs): Page generator should work out of the box (#20775) 2023-12-14 14:04:40 -07:00
Colum Ferry 439a31c66b fix(module-federation): allow relative remote paths (#20763) 2023-12-14 17:18:11 +00:00
Leosvel Pérez Espinosa 6129d31847 fix(misc): disallow path segments and allow scoped package name in --newProjectName option of move generator (#20768) 2023-12-14 18:12:32 +01:00
Craigory Coppola d047ad5927 fix(testing): avoid overwriting environment variables in nx cypress preset (#20748) 2023-12-14 11:47:57 -05:00
Katerina Skroumpelou cac2c173c5 feat(vite): update to vitest v1 (#20747) 2023-12-14 19:55:08 +04:00
Katerina Skroumpelou 85fa68b181 fix(storybook): do not throw for versions >=7 (#20770) 2023-12-14 17:35:59 +02:00
Isaac Mann 998d8d8e3f fix(nx-dev): fix plugin stats (#20741) 2023-12-14 10:15:07 -05:00
Isaac Mann 4aeff79bc4 fix(nx-dev): typo on the homepage (#20767) 2023-12-14 10:14:57 -05:00
Jack Hsu 80a987ee7d docs(core): show default values for boolean options in executor schema explorer (#20765) 2023-12-14 09:01:19 -05:00
Leosvel Pérez Espinosa 0392e0d6b8 chore(repo): set specific packages to install in expo e2e tests (#20758) 2023-12-14 14:51:54 +02:00
Katerina Skroumpelou c9832f4750 fix(vite): allow vitest to be v1 (#20760) 2023-12-14 14:32:28 +02:00
Katerina Skroumpelou bbec5cfe54 fix(core): correctly move project and target strings (#20726) 2023-12-14 15:01:13 +04:00
Nicholas Cunningham dc03c3790a fix(nextjs): Add missing setParserOptionProject (#20754) 2023-12-13 13:40:22 -07:00
Nicholas Cunningham 1045ab7439 fix(nextjs): empty port should not overwrite env port (#20751) 2023-12-13 15:03:16 -05:00
Jack Hsu f4569efe0a fix(react): update default webpack config for component testing (#20749) 2023-12-13 15:02:45 -05:00
Jack Hsu f0402b04d7 fix(react): remove <base> tag from generated index.html (#20750) 2023-12-13 15:02:34 -05:00
Nicholas Cunningham da6ae9b8c5 feat(nextjs): Update @nx/next to Next.js 14 (#20703) 2023-12-13 12:31:37 -07:00
KozelAnatoliy f42f7a2f7c chore(core): nx plugin submission @routineless/nx-aws-cdk (#20167) 2023-12-13 12:01:52 -05:00
James Henry a30888b92e chore(repo): add packages to e2e-release and explicit error for flakiness (#20740) 2023-12-13 11:55:46 -05:00
James Henry dba679ec47 chore(repo): add CODEOWNERS entry for e2e-release (#20746) 2023-12-13 11:36:02 -05:00
Colum Ferry 3b5bf6d1d1 feat(remix): add remix (#20641) 2023-12-13 11:07:08 -05:00
Colum Ferry 79cab697bf chore(angular): split module-federation tests into their own project (#20721) 2023-12-13 11:00:30 -05:00
Leosvel Pérez Espinosa 5befe533fc docs(misc): update typedoc (#20603) 2023-12-13 16:49:46 +01:00
Leosvel Pérez Espinosa 593ea3d90d feat(linter): update @typescript-eslint/* package versions (#20602) 2023-12-13 16:49:27 +01:00
Miroslav Jonaš 5d9f78a848 chore(linter): optimize e2e tests (#20718) 2023-12-13 16:44:30 +01:00
Miroslav Jonaš 43141334a8 fix(linter): move should migrate all eslint configs (#20709) 2023-12-13 15:18:17 +01:00
Miroslav Jonaš e8dde9976f fix(core): fallback to checking stderr if stdout is empty on publish executor (#20737) 2023-12-13 15:00:29 +01:00
Miroslav Jonaš 39e68517b1 feat(linter): add .nx to ignored folders (#20720) 2023-12-13 14:59:48 +01:00
Leosvel Pérez Espinosa b32f530319 fix(angular): safely update task runner cacheable operations when setting up ssr (#20736) 2023-12-13 11:02:18 +00:00
Jack Hsu 3655269411 fix(webpack): fix check for standardWebpackConfigFunction (#20728) 2023-12-12 12:59:06 -05:00
Ashwin Gokhale d9540ef7cd feat(react): Treat window and var library types the same (#20597) 2023-12-12 09:15:28 -07:00
Roni Vegh 8caebc5280 docs(angular): typo in dynamic-module-federation-with-angular (#19413) 2023-12-12 10:31:24 -05:00
Tórur Zachariasen d55843cecf fix(react): skip adding comma to config when adding remote to host if… (#20620) 2023-12-12 15:15:55 +00:00
Nikita Barsukov 332b0120df docs(angular): use @nx/angular:dev-server instead of legacy @nx/angular:webpack-dev-server (#20637) 2023-12-12 09:55:06 -05:00
Katerina Skroumpelou d36f313776 fix(vite): ignore CJS build deprecated warning (#20719) 2023-12-12 16:29:13 +02:00
Jack Hsu 254ce82a1c fix(webpack): handle both nx and nrwl scoped executors when migrating config (#20714) 2023-12-12 09:10:14 -05:00
Jonathan Cammisuli f1ff0b465e fix(core): show warning if workspaceRoot starts with ! (#20705) 2023-12-12 09:10:06 -05:00
Jonathan Cammisuli 73f4829ba7 fix(core): properly handle negated paths in cache outputs (#20661) 2023-12-12 09:09:47 -05:00
Katerina Skroumpelou 7c1645e8e1 cleanup(misc): add packages option to e2e newProject function (#20713) 2023-12-12 16:05:41 +02:00
Katerina Skroumpelou 5b4305819b fix(vite): better extra args resolution (#20708) 2023-12-12 15:43:56 +02:00
Katerina Skroumpelou 1699468d91 docs(vite): small typo (#20710) 2023-12-12 15:09:01 +02:00
Colum Ferry 640d23304c chore(angular): use packages property to reduce install times (#20712) 2023-12-12 12:59:50 +00:00
Jack Hsu b527158ea3 fix(webpack): add standardWebpackConfigFunction option when users opts for a standard config function (#20702) 2023-12-11 22:18:27 -05:00
Juri Strumpflohner 99ec7d81cc docs(misc): update line about cacheable operations in Turbo migration (#20701) 2023-12-11 19:07:28 -05:00
Tycho Bokdam 38ad952713 fix(webpack): fixed isolatedConfig: false option not composing plugins (#20678) 2023-12-11 16:23:20 -05:00
Benjamin Cabanes 2eac338041 chore(repo): update legacy banner (#20696) 2023-12-11 15:56:01 -05:00
Juri Strumpflohner 7e3ab191d4 fix(nx-dev): adjust blog links (#20608)
Co-authored-by: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
2023-12-11 21:43:52 +01:00
Jack Hsu ce4889a3e9 fix(webpack): migrate projects without webpackConfig to use webpack.config.js (#20699) 2023-12-11 15:08:06 -05:00
Jack Hsu 1cd8b05486 fix(react): webpack backwards compat for @nx/react/plugin/webpack (#20697) 2023-12-11 14:39:59 -05:00
Juri Strumpflohner 31a12c409b docs(misc): adjust Nx version number in pkg json mentions (#20698) 2023-12-11 14:22:42 -05:00
Katerina Skroumpelou 679db5d584 fix(vite): config migration account for other syntaxes (#20693) 2023-12-11 11:52:27 -05:00
Benjamin Cabanes db77ddef8a chore(repo): update packages readme banner (#20695) 2023-12-11 11:32:42 -05:00
Benjamin Cabanes 6183ef84b3 chore(nx-dev): update nx-media (#20694) 2023-12-11 09:59:54 -05:00
Leosvel Pérez Espinosa b7a237b9d3 fix(angular): add missing package update for @angular/pwa (#20690) 2023-12-11 14:23:22 +01:00
Katerina Skroumpelou cec0994cd4 feat(vue): add nuxt as cnw vue framework (#20626) 2023-12-11 10:50:56 +02:00
Katerina Skroumpelou 410c1369c9 feat(nuxt): make nuxt public (#20656) 2023-12-11 10:50:39 +02:00
Caleb Ukle dbeaf92042 docs(nx-cloud): update broken image link for Google Auth (#20670) 2023-12-08 15:44:41 -06:00
Benjamin Cabanes 5d27e7b7cf fix(nx-dev): change to optimized for monorepos (#20668) 2023-12-08 16:27:30 -05:00
Jason Jean 4ec134f9d1 chore(node): decrease e2e times (#20666) 2023-12-08 16:19:47 -05:00
Benjamin Cabanes 5a305d41de feat(nx-dev): add homepage updates (#20592)
Co-authored-by: Juri <juri.strumpflohner@gmail.com>
2023-12-08 14:40:42 -05:00
Isaac Mann ec8daed487 chore(core): add write permissions to publish (#20665) 2023-12-08 14:01:55 -05:00
Jason Jean d27158ca66 chore(repo): remove the cpu benchmark from pipelines (#20660) 2023-12-08 13:04:54 -05:00
Jason Jean 283f1d7d17 chore(repo): update nx to 17.2.0-rc.2 (#20664) 2023-12-08 12:09:51 -05:00
Nicholas Cunningham 661fe4ecd3 fix(nextjs): we should not cache .next/cache/ artifact (#20658) 2023-12-08 11:48:25 -05:00
Jason Jean 9a48349b13 fix(core): have freebsd use the unix mtime function (#20662) 2023-12-08 11:35:54 -05:00
Jason Jean 8fbf915db6 fix(core): publish next versions of Nx with support for FreeBSD (#20659) 2023-12-08 10:50:15 -05:00
FrozenPandaz 64ac9a64af chore(repo): update nx to 17.2.0-rc.1 2023-12-08 07:51:27 -05:00
FrozenPandaz 6528e88aaf Revert "fix(release): do not update dependents when they already use "*" (#20607)"
This reverts commit 6d68236d46.
2023-12-08 07:51:27 -05:00
Jason Jean 1984dff295 fix(core): hash files properly by reading the whole file (#20652) 2023-12-07 19:01:37 -05:00
Jonathan Cammisuli 429eb6a60d feat(core): add task plans to --graph=file.json argument (#20643) 2023-12-07 18:30:17 -05:00
Emily Xiong 8a4dc9c10f fix(core): fix calling exec at project root (#20647) 2023-12-07 18:27:34 -05:00
James Henry d11a22bbd6 fix(core): add release.projects option to schema (#20645) 2023-12-07 22:12:53 +00:00
Victor Savkin 61429c05a6 fix(core): listen to the write stream end unpacking lite client (#20642) 2023-12-07 16:17:43 -05:00
Jason Jean c2be2ade1a fix(testing): add webServerCommands/ciWebServerCommands option for cy… (#20616) 2023-12-07 16:10:17 -05:00
Jack Hsu 01d7c82b34 fix(core): check compilerOptions exists before deleting it (#20648) 2023-12-07 14:23:03 -05:00
Jonathan Cammisuli a5a4211538 fix(core): traverse project deps properly in hash planner (#20621) 2023-12-07 14:13:17 -05:00
Jason Jean 3781b5955a chore(repo): update nx to 17.2.0-beta.15 (#20638) 2023-12-07 13:52:14 -05:00
Jack Hsu 37bcf86c8b fix(core): run-commands should handle signals correctly (#20611) 2023-12-07 13:29:07 -05:00
Miroslav Jonaš af28cc45a9 fix(testing): fix lint config generation for cypress standalone (#20606) 2023-12-07 13:04:06 -05:00
Jack Hsu 7ea83f776b chore(repo): disable failing nx-cloud test to unblock CI (#20640) 2023-12-07 12:57:26 -05:00
Isaac Mann cd96da8891 docs(core): fix manifests (#20646) 2023-12-07 20:58:47 +04:00
Isaac Mann cf976ce596 feat(nx-dev): allow custom media images (#20561) 2023-12-07 07:37:01 -08:00
Isaac Mann be821aa15e docs(core): building blocks of fast CI (#20539) 2023-12-07 06:07:18 -08:00
James Henry 308eeb706d fix(release): allow interpolating {projectName} in custom commit message when valid (#20613) 2023-12-07 09:00:16 -05:00
Katerina Skroumpelou f04ed1f24a fix(nuxt): correct outputs for nuxt and vite (#20627) 2023-12-07 08:45:08 -05:00
Jason 8badd4b101 fix(nextjs): fix crash when paths is undefined (#20598) 2023-12-07 11:17:35 +02:00
Nicholas Cunningham b8d24e6d0e feat(nextjs): Add support for create nodes for nextjs (#20193) 2023-12-06 16:52:09 -07:00
Jack Hsu 7ffc3284f6 fix(webpack): ensure webpack config is always at the latest version when running in the daemon (#20618) 2023-12-06 17:08:24 -05:00
Jack Hsu 3493c7899b fix(core): add 'dependsOn' property in when inferring build targets via plugins (#20614) 2023-12-06 16:39:06 -05:00
Jason Jean 0618ba4ee4 fix(testing): recalculate cypress targets when cypress config changes (#20593) 2023-12-06 15:53:27 -05:00
Jack Hsu bda1c7d153 fix(nextjs): apply transpilation fixes and other webpack config when running dev-server (#20615) 2023-12-06 15:14:33 -05:00
Katerina Skroumpelou 3befa3a22d chore(repo): update nx to 17.2.0-beta.14 (#20601) 2023-12-06 13:10:44 -05:00
James Henry 6d68236d46 fix(release): do not update dependents when they already use "*" (#20607) 2023-12-06 17:28:41 +04:00
Juri Strumpflohner 4502fb9b5a docs(nx-cloud): add resource classes link (#20552) 2023-12-06 01:24:32 -08:00
Jack Hsu ab8c9298be feat(core): targets inferred from plugins override targetDefaults (#20586) 2023-12-06 10:47:53 +02:00
Isaac Mann 199cf842f4 docs(core): fix home page link (#20596) 2023-12-05 23:22:57 -08:00
Isaac Mann 5a0b5d275a docs(core): fix broken image on remote caching (#20595) 2023-12-05 23:21:21 -08:00
Benjamin Cabanes a93ee1c432 fix(nx-dev): add wrapper for blog and semantic (#20594) 2023-12-05 19:44:59 -05:00
Jonathan Cammisuli 93741f133c fix(core): sort project file map and global files (#20591) 2023-12-05 18:23:03 -05:00
Jason Jean cfd8c898eb fix(repo): fix release script to look for new node auth token (#20590) 2023-12-05 23:59:34 +04:00
Austin Fahsl 38954c4094 chore(repo): add 'release' commit scope (#20537) 2023-12-05 12:00:02 -05:00
Isaac Mann 1ed44661f8 docs(core): redirect nx-workflow (#20584) 2023-12-05 11:56:44 -05:00
Miroslav Jonaš 804959a454 fix(linter): support adding plugin at a later stage (#20557) 2023-12-05 16:33:29 +01:00
Miroslav Jonaš 7e5c4598a3 fix(linter): do not allow relative import of non-project files (#20563) 2023-12-05 16:33:14 +01:00
James Henry 5e174fc67c fix(release): only early exit when no changelog changes if expecting commit (#20568) 2023-12-05 18:07:18 +04:00
Leosvel Pérez Espinosa eb481513e7 fix(angular): update schema and validate compatibility in esbuild-based executors (#20564) 2023-12-05 13:43:25 +01:00
Martin Obert e8869236eb feat(vite): Use app/lib tsconfig for buildable paths resolution (#19972) 2023-12-05 02:48:54 -07:00
James Henry 16dfccc0de feat(release): allow projects shorthand for single release group (#20560) 2023-12-04 14:58:16 -07:00
James Henry 57cef5d979 chore(repo): ignore build-freebsd from canary releases (#20566) 2023-12-04 13:23:18 -05:00
Colum Ferry 8f9ea6a8c5 Revert "fix(testing): set TS_NODE_PROJECT before running Jest so j.config.ts file transpile using the root tsconfig file (#20372)" (#20565) 2023-12-04 17:43:08 +00:00
Nicholas Cunningham e12050b3d3 fix(nextjs): When running dev server .next folder should be in source (#20536) 2023-12-04 09:40:38 -07:00
Nicholas Cunningham 84274dd49b fix(nextjs): Component generator with path provided in the component name field (#20538) 2023-12-04 11:25:49 -05:00
Isaac Mann e290a30965 docs(core): redirect ci to intro page (#20558) 2023-12-04 07:54:25 -08:00
MaxKless 75cc561e9d feat(graph): add project details view (#20466)
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2023-12-04 09:53:19 -05:00
Tycho Bokdam a08fdf0e36 fix(webpack): Fixed libraryTarget option not being set for node targets (#20505) 2023-12-04 08:39:31 -05:00
Leosvel Pérez Espinosa 43a4482482 feat(angular): add application executor (#20529) 2023-12-04 10:21:35 +01:00
Isaac Mann e8361e6771 docs(core): parallelization and distribution guide (#20435) 2023-12-03 23:17:49 -08:00
Lehoczky Zoltán 00f77ea314 docs(vue): fix typo import -> important (#19444) 2023-12-02 19:28:17 -05:00
James Henry 1b4b463b21 chore(core): add nightly canary release (#20540) 2023-12-02 00:39:04 +04:00
Jonathan Cammisuli e64ba5c11c fix(core): use target_os = "linux" instead of just linux for watch events (#20518) 2023-12-01 14:39:11 -05:00
Jonathan Cammisuli d33b4f7a34 chore(repo): update @monodon/rust (#20514) 2023-12-01 14:38:38 -05:00
Leosvel Pérez Espinosa 4926668262 fix(js): update minimum supported typescript version by js plugin (#20530) 2023-12-01 19:05:33 +01:00
Leosvel Pérez Espinosa 68d0f792e8 chore(angular): improve angular updater script helper (#20532) 2023-12-01 17:30:08 +01:00
Juri Strumpflohner 4c17667c84 docs(nx-cloud): improve nx agents docs with more details (#20531) 2023-12-01 17:02:27 +01:00
Craigory Coppola 9e322e8620 fix(linter): expose rule name when eslint requires parser options project (#20459)
Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
2023-12-01 11:49:06 +01:00
Leosvel Pérez Espinosa a831e262dd feat(angular): support providing esbuild plugins to @nx/angular:browser-esbuild (#20504) 2023-12-01 11:11:11 +01:00
Jack Hsu 7cb8aead12 fix(web): file-server falls back to outputs if outputPath is not preset (#20515) 2023-12-01 11:32:50 +02:00
Juri Strumpflohner 77b06a9653 docs(nx-cloud): add page for nx agents (#20498) 2023-11-30 23:52:44 +01:00
Juri Strumpflohner 7e1e0d91a9 feat(nx-dev): improve advent of code page (#20517) 2023-11-30 22:31:01 +01:00
Katerina Skroumpelou 83db767b27 feat(vite): nodes for build, serve, test, preview targets (#20086) 2023-11-30 15:56:16 -05:00
Juri Strumpflohner 5a47eaf684 docs(nx-cloud): improve nx enterprise on-prem page (#20490) 2023-11-30 20:31:00 +00:00
Isaac Mann aba1802570 docs(core): cache security guide (#20469) 2023-11-30 12:07:27 -08:00
Jason Jean 2cce1f5711 fix(misc): add args to command in run-commands before unparsed args (#20506) 2023-11-30 14:27:28 -05:00
Zachary DeRose c30d6726bc docs(misc): advent-of-code page simple (#20512)
Co-authored-by: Juri <juri.strumpflohner@gmail.com>
2023-11-30 14:24:48 -05:00
Jonathan Cammisuli ba7dd14a8f fix(core): use relative .nxignore when walking workspace (#20500) 2023-11-30 19:17:10 +00:00
John Wiegert 53087370f1 fix(module-federation): fix static remote port determination (#20432) 2023-11-30 12:17:09 -07:00
Jack Hsu d051abc355 fix(webpack): infer serve-static target correctly from plugin (#20511) 2023-11-30 20:52:37 +02:00
Katerina Skroumpelou 51501c57c0 fix(linter): check if eslint plugin exists before adding target (#20510) 2023-11-30 19:47:44 +01:00
Katerina Skroumpelou 468de36ad1 feat(nuxt): nodes for build, serve, test targets (#20145) 2023-11-30 13:35:02 -05:00
Jack Hsu 2d529b1a46 feat(web): support buildTarget that excludes project name (#20508) 2023-11-30 12:54:04 -05:00
Leosvel Pérez Espinosa 1692a54da6 fix(angular): set tsconfig paths relative to the workspace root in target options (#20507) 2023-11-30 17:12:31 +00:00
Jonathan Cammisuli 15c2181664 feat(core): introduce workspace file archive (#20471) 2023-11-30 15:54:28 +00:00
Leosvel Pérez Espinosa ff9d95568f fix(angular): ensure compat angular.json is read properly when creating a BuilderContext (#20499) 2023-11-30 16:28:46 +01:00
Isaac Mann f2c68a8e4a docs(core): fix broken links 2023-11-30 15:44:53 +01:00
Isaac Mann d767429c6e docs(core): fix broken links 2023-11-30 15:44:53 +01:00
Miroslav Jonaš fe63f856ec feat(linter): add create-nodes plugin (#20264) 2023-11-30 09:15:08 -05:00
James Henry a395fd3c4e fix(core): update changelog schema (#20488) 2023-11-30 09:14:04 -05:00
Isaac Mann d1e842f827 feat(nx-dev): rename nx-cloud tab to CI (#20476) 2023-11-30 08:24:24 -05:00
Colum Ferry d22e860269 feat(angular): convert module-federation-dev-server to executor (#20252) 2023-11-30 12:58:48 +00:00
Leosvel Pérez Espinosa afafb79494 fix(angular): force angular cli dev-server builder to handle nx browser-esbuild executor correctly (#20492) 2023-11-30 11:04:47 +01:00
Juri 1f4346f44e docs(core): add more realistic graph example and some other improvements 2023-11-30 09:12:16 +01:00
Juri 434dee2417 docs(nx-cloud): improve remote caching page with more details 2023-11-30 09:12:16 +01:00
Juri 642327334d docs(nx-cloud): adjust nx connect command 2023-11-30 09:12:16 +01:00
Juri f261c5b52c docs(nx-cloud): add cards to point to the tutorials from the entry page 2023-11-30 09:12:16 +01:00
Jason Jean eb0f16e5e5 fix(core): handle filesets with commas (#20483) 2023-11-29 23:12:52 +00:00
Isaac Mann 7261194da0 docs(core): reduce waste in CI (#20429) 2023-11-29 15:55:11 -05:00
James Henry b3e8fcd50a fix(core): various release fixes (#20478) 2023-11-29 23:32:00 +04:00
Phillip Barta a012e4dc5b chore(repo): remove unused dependency @parcel/watcher (#20475) 2023-11-29 14:27:51 -05:00
Jack Hsu 6317219369 chore(js): remove failing snapshot from js unit test (#20480) 2023-11-29 13:37:12 -05:00
Jason Jean acb37936fe chore(misc): remove daemon logs (#20248) 2023-11-29 12:06:59 -05:00
4343 changed files with 226984 additions and 93982 deletions
+12 -22
View File
@@ -4,9 +4,9 @@ version: 2.1
# ORBS
# -------------------------
orbs:
nx: nrwl/nx@1.6.1
nx: nrwl/nx@1.6.2
rust: circleci/rust@1.6.0
browser-tools: circleci/browser-tools@1.4.6
browser-tools: circleci/browser-tools@1.4.8
# -------------------------
# EXECUTORS
@@ -48,7 +48,7 @@ commands:
- run:
name: Install pnpm package manager (linux)
command: |
npm install --prefix=$HOME/.local -g @pnpm/exe@8.7.4
npm install --prefix=$HOME/.local -g @pnpm/exe@8
- when:
condition:
equal: [<< parameters.os >>, macos]
@@ -56,12 +56,12 @@ commands:
- run:
name: Install pnpm package manager (macos)
command: |
npm install -g @pnpm/exe@8.7.4
npm install -g @pnpm/exe@8
- run:
name: Install Dependencies
command: |
pnpm install --frozen-lockfile
pnpm playwright install --with-deps firefox webkit chrome
pnpm playwright install --with-deps
- save_cache:
name: Save pnpm Package Cache
key: node-deps-{{ arch }}-v3-{{ checksum "pnpm-lock.yaml" }}
@@ -80,29 +80,24 @@ jobs:
executor: linux
environment:
NX_E2E_CI_CACHE_KEY: e2e-circleci-linux
NX_VERBOSE_LOGGING: 'true'
NX_DAEMON: 'true'
NX_PERF_LOGGING: 'false'
NX_NATIVE_LOGGING: 'false'
NX_E2E_RUN_E2E: 'true'
NX_CI_EXECUTION_ENV: 'linux'
NX_CLOUD_DTE_V2: 'true'
steps:
- run: lscpu
- checkout
- run: npx nx-cloud@next start-ci-run --distributes-on="8 linux-medium" --stop-agents-after="e2e"
- nx/set-shas:
main-branch-name: 'master'
- run: npx nx-cloud@next start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml" --stop-agents-after="e2e"
- 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
- nx/set-shas:
main-branch-name: 'master'
- run:
name: Benchmark
command: node tools/benchmark/benchmark.js
- run:
name: Check Documentation
command: pnpm nx documentation --no-dte
@@ -120,7 +115,7 @@ jobs:
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=e2e,e2e-ci --base=$NX_BASE --head=$NX_HEAD --parallel=1) &
pids+=($!)
for pid in "${pids[@]}"; do
@@ -163,12 +158,7 @@ jobs:
- run:
name: Run E2E Tests for macOS
command: |
pnpm nx affected -t e2e-macos --parallel=1 --base=$NX_BASE --head=$NX_HEAD
no_output_timeout: 45m
- run:
name: Close CI group
command: |
pnpm nx-cloud stop-all-agents
pnpm nx affected -t e2e-macos-ci --parallel=1 --base=$NX_BASE --head=$NX_HEAD
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
+80 -121
View File
@@ -14,9 +14,10 @@ on:
env:
CYPRESS_CACHE_FOLDER: ${{ github.workspace }}/.cypress
permissions: {}
permissions: { }
jobs:
preinstall:
if: ${{ github.repository_owner == 'nrwl' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
@@ -26,22 +27,19 @@ jobs:
node_version:
- 20
- 18
- 16
exclude:
# run just node v18 on macos
# run just node v20 on macos
- os: macos-latest
node_version: 20
- os: macos-latest
node_version: 16
node_version: 18
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.7.4
npm install -g @pnpm/exe@8
- name: Set node
uses: actions/setup-node@v3
@@ -57,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
@@ -89,6 +92,7 @@ jobs:
run: npx cypress install
e2e:
if: ${{ github.repository_owner == 'nrwl' }}
needs: preinstall
permissions:
contents: read
@@ -102,39 +106,39 @@ jobs:
node_version:
- 20
- 18
- 16
package_manager:
- npm
- yarn
- pnpm
project:
- e2e-angular-core
- e2e-angular-extensions
- e2e-angular
- e2e-cypress
- e2e-detox
- e2e-esbuild
- e2e-eslint
- e2e-expo
- e2e-gradle
- e2e-jest
- e2e-js
- e2e-lerna-smoke-tests
- e2e-eslint
- e2e-next
- e2e-node
- e2e-nuxt
- e2e-nx-init
- e2e-nx-misc
- e2e-nx-plugin
- e2e-nx-run
- e2e-react-core
- e2e-react-extensions
- e2e-nx
- e2e-playwright
- e2e-plugin
- e2e-react
- e2e-react-native
- e2e-web
- 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
@@ -147,9 +151,7 @@ jobs:
- os: macos-latest
os_timeout: 90
# codeowner groups
- project: e2e-angular-core
codeowners: 'S04SS457V38'
- project: e2e-angular-extensions
- project: e2e-angular
codeowners: 'S04SS457V38'
- project: e2e-cypress
codeowners: 'S04T16BTJJY'
@@ -159,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,15 +177,13 @@ jobs:
codeowners: 'S04SJ6HHP0X'
- project: e2e-nx-init
codeowners: 'S04SYHYKGNP'
- project: e2e-nx-misc
- project: e2e-nx
codeowners: 'S04SYHYKGNP'
- project: e2e-nx-plugin
- project: e2e-plugin
codeowners: 'S04SYHYKGNP'
- project: e2e-nx-run
- project: e2e-release
codeowners: 'S04SYHYKGNP'
- project: e2e-react-core
codeowners: 'S04TNCNJG5N'
- project: e2e-react-extensions
- project: e2e-react
codeowners: 'S04TNCNJG5N'
- project: e2e-react-native
codeowners: 'S04TNCNJG5N'
@@ -191,16 +193,20 @@ jobs:
codeowners: 'S04SJ6PL98X'
- project: e2e-storybook
codeowners: 'S04SVQ8H0G5'
- project: e2e-storybook-angular
- project: e2e-playwright
codeowners: 'S04SVQ8H0G5'
- project: e2e-remix
codeowners: 'S04SVQ8H0G5'
- project: e2e-vite
codeowners: 'S04SJ6PL98X'
- project: e2e-vue
codeowners: 'S04SJ6PL98X'
- project: e2e-nuxt
codeowners: 'S04SJ6PL98X'
- project: e2e-webpack
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
@@ -210,124 +216,76 @@ jobs:
- os: ubuntu-latest
project: e2e-expo
# exclude non-CNW/Lerna tests from non-LTS node versions
- node_version: 16
project: e2e-angular-core
- node_version: 16
project: e2e-angular-extensions
- node_version: 16
- node_version: 18
project: e2e-angular
- node_version: 18
project: e2e-cypress
- node_version: 16
- node_version: 18
project: e2e-detox
- node_version: 16
- node_version: 18
project: e2e-esbuild
- node_version: 16
- node_version: 18
project: e2e-expo
- node_version: 16
- node_version: 18
project: e2e-gradle
- node_version: 18
project: e2e-jest
- node_version: 16
- node_version: 18
project: e2e-js
- node_version: 16
- node_version: 18
project: e2e-eslint
- node_version: 16
- node_version: 18
project: e2e-next
- node_version: 16
- node_version: 18
project: e2e-node
- node_version: 16
- node_version: 18
project: e2e-nuxt
- node_version: 18
project: e2e-nx-init
- node_version: 16
project: e2e-nx-misc
- node_version: 16
project: e2e-nx-plugin
- node_version: 16
project: e2e-lerna-smoke-tests
- node_version: 16
project: e2e-react-core
- node_version: 16
project: e2e-react-extensions
- node_version: 16
- node_version: 18
project: e2e-nx
- node_version: 18
project: e2e-plugin
- node_version: 18
project: e2e-playwright
- node_version: 18
project: e2e-react
- node_version: 18
project: e2e-react-native
- node_version: 16
- node_version: 18
project: e2e-web
- node_version: 16
- node_version: 18
project: e2e-remix
- node_version: 18
project: e2e-rollup
- node_version: 16
- node_version: 18
project: e2e-storybook
- node_version: 16
project: e2e-storybook-angular
- node_version: 16
- node_version: 18
project: e2e-vite
- node_version: 16
- node_version: 18
project: e2e-vue
- node_version: 18
project: e2e-webpack
- node_version: 20
project: e2e-angular-core
- node_version: 20
project: e2e-angular-extensions
- node_version: 20
project: e2e-cypress
- node_version: 20
project: e2e-detox
- node_version: 20
project: e2e-esbuild
- node_version: 20
project: e2e-expo
- node_version: 20
project: e2e-jest
- node_version: 20
project: e2e-js
- node_version: 20
project: e2e-eslint
- node_version: 20
project: e2e-next
- node_version: 20
project: e2e-node
- node_version: 20
project: e2e-nx-init
- node_version: 20
project: e2e-nx-misc
- node_version: 20
project: e2e-nx-plugin
- node_version: 20
project: e2e-lerna-smoke-tests
- node_version: 20
project: e2e-react-core
- node_version: 20
project: e2e-react-extensions
- node_version: 20
project: e2e-react-native
- node_version: 20
project: e2e-web
- node_version: 20
project: e2e-rollup
- node_version: 20
project: e2e-storybook
- node_version: 20
project: e2e-storybook-angular
- node_version: 20
project: e2e-vite
- node_version: 20
project: e2e-webpack
# run just npm v18 on macos
# run just npm v20 on macos
- os: macos-latest
package_manager: yarn
- os: macos-latest
package_manager: pnpm
- os: macos-latest
node_version: 16
- os: macos-latest
node_version: 20
node_version: 18
fail-fast: false
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
@@ -401,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
@@ -419,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() }}
@@ -449,7 +408,7 @@ jobs:
timeout-minutes: 15
process-result:
if: ${{ always() }}
if: ${{ always() && github.repository_owner == 'nrwl' }}
runs-on: ubuntu-latest
needs: e2e
outputs:
@@ -499,7 +458,7 @@ jobs:
|--------------------------------|------|-------|------|`;
failedProjects.forEach(matrix => {
const project = matrix.project !== lastProject ? matrix.project : '...';
result += `\n| ${project.padEnd(30)} | ${matrix.package_manager.padEnd(4)} | ${matrix.os_name} | v${matrix.node_version.toString().padEnd(3)} |`
result += `\n| ${project.padEnd(30)} | ${matrix.package_manager.padEnd(4)} | ${matrix.os_name} | v${matrix.node_version} |`
lastProject = matrix.project;
});
result += `\`\`\``;
+69 -102
View File
@@ -14,26 +14,26 @@ on:
env:
CYPRESS_CACHE_FOLDER: ${{ github.workspace }}/.cypress
permissions: {}
permissions: { }
jobs:
preinstall:
if: ${{ github.repository_owner == 'nrwl' }}
runs-on: windows-latest
strategy:
matrix:
node_version:
- 20
- 18
- 16
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
with:
version: 8.7.4
version: 8
run_install: false
- name: Set node
@@ -44,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'
@@ -63,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
@@ -75,44 +76,47 @@ jobs:
node_version:
- 20
- 18
- 16
package_manager:
- npm
project:
- e2e-angular-core
- e2e-angular-extensions
- e2e-angular
- e2e-cypress
- e2e-esbuild
- e2e-eslint
- e2e-jest
- e2e-js
- e2e-lerna-smoke-tests
- e2e-eslint
- e2e-next
- e2e-node
- e2e-nuxt
- e2e-nx-init
- e2e-nx-misc
- e2e-nx
- e2e-playwright
- e2e-plugin
- e2e-nx-run
- e2e-react-core
- e2e-react-extensions
- e2e-web
- 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
- 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
@@ -127,15 +131,15 @@ jobs:
codeowners: 'S04SJ6HHP0X'
- project: e2e-nx-init
codeowners: 'S04SYHYKGNP'
- project: e2e-nx-misc
- project: e2e-nx
codeowners: 'S04SYHYKGNP'
- project: e2e-plugin
codeowners: 'S04SYHYKGNP'
- project: e2e-nx-run
- project: e2e-release
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'
@@ -143,108 +147,70 @@ jobs:
codeowners: 'S04SJ6PL98X'
- project: e2e-storybook
codeowners: 'S04SVQ8H0G5'
- project: e2e-storybook-angular
- project: e2e-playwright
codeowners: 'S04SVQ8H0G5'
- project: e2e-remix
codeowners: 'S04SVQ8H0G5'
- project: e2e-vite
codeowners: 'S04SJ6PL98X'
- project: e2e-vue
codeowners: 'S04SJ6PL98X'
- project: e2e-nuxt
codeowners: 'S04SJ6PL98X'
- project: e2e-webpack
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: 16
project: e2e-angular-core
- node_version: 16
project: e2e-angular-extensions
- node_version: 16
- node_version: 18
project: e2e-angular
- node_version: 18
project: e2e-cypress
- node_version: 16
- node_version: 18
project: e2e-esbuild
- node_version: 16
- node_version: 18
project: e2e-jest
- node_version: 16
- node_version: 18
project: e2e-js
- node_version: 16
- node_version: 18
project: e2e-eslint
- node_version: 16
- node_version: 18
project: e2e-next
- node_version: 16
- node_version: 18
project: e2e-node
- node_version: 16
- node_version: 18
project: e2e-nuxt
- node_version: 18
project: e2e-nx-init
- node_version: 16
project: e2e-nx-misc
- node_version: 16
- node_version: 18
project: e2e-nx
- node_version: 18
project: e2e-plugin
- node_version: 16
project: e2e-lerna-smoke-tests
- node_version: 16
project: e2e-react-core
- node_version: 16
project: e2e-react-extensions
- node_version: 16
- node_version: 18
project: e2e-playwright
- node_version: 18
project: e2e-react
- node_version: 18
project: e2e-web
- node_version: 16
- node_version: 18
project: e2e-remix
- node_version: 18
project: e2e-rollup
- node_version: 16
- node_version: 18
project: e2e-storybook
- node_version: 16
project: e2e-storybook-angular
- node_version: 16
- node_version: 18
project: e2e-vite
- node_version: 16
project: e2e-webpack
- node_version: 20
project: e2e-angular-core
- node_version: 20
project: e2e-angular-extensions
- node_version: 20
project: e2e-cypress
- node_version: 20
project: e2e-esbuild
- node_version: 20
project: e2e-jest
- node_version: 20
project: e2e-js
- node_version: 20
project: e2e-eslint
- node_version: 20
project: e2e-next
- node_version: 20
project: e2e-node
- node_version: 20
project: e2e-nx-init
- node_version: 20
project: e2e-nx-misc
- node_version: 20
project: e2e-plugin
- node_version: 20
project: e2e-lerna-smoke-tests
- node_version: 20
project: e2e-react-core
- node_version: 20
project: e2e-react-extensions
- node_version: 20
project: e2e-web
- node_version: 20
project: e2e-rollup
- node_version: 20
project: e2e-storybook
- node_version: 20
project: e2e-storybook-angular
- node_version: 20
project: e2e-vite
- node_version: 20
- node_version: 18
project: e2e-vue
- node_version: 18
project: e2e-webpack
fail-fast: false
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
@@ -289,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
@@ -307,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() }}
@@ -336,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:
@@ -381,7 +348,7 @@ jobs:
| Failed project | Node |
|--------------------------------|------|`;
failedProjects.forEach(matrix => {
result += `\n| ${matrix.project.padEnd(30)} | v${matrix.node_version.toString().padEnd(3)} |`
result += `\n| ${matrix.project.padEnd(30)} | v${matrix.node_version} |`
});
result += `\`\`\``;
const message = result.split('\n').map(l => l.trim()).join('\n');
+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
+125 -85
View File
@@ -1,20 +1,25 @@
name: publish
on:
schedule:
- cron: "0 3 * * 2-6" # Tuesdays - Saturdays, at 3am UTC
workflow_dispatch:
release:
types: [ published ]
env:
DEBUG: napi:*
NX_RUN_GROUP: ${{ github.run_id }}-${{ github.run_attempt }}
NPM_CONFIG_PROVENANCE: true
on:
workflow_dispatch:
release:
types: [published]
CYPRESS_INSTALL_BINARY: 0
jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
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
@@ -31,13 +36,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/*;
@@ -51,8 +63,10 @@ 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: |
@@ -75,21 +89,24 @@ 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
name: stable - ${{ matrix.settings.target }} - node@18
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8.2
version: 8
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
if: ${{ !matrix.settings.docker }}
with:
node-version: 18
@@ -125,10 +142,11 @@ jobs:
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@v3
uses: actions/setup-node@v4
if: matrix.settings.target == 'i686-pc-windows-msvc'
with:
node-version: 18
@@ -152,82 +170,95 @@ jobs:
name: bindings-${{ matrix.settings.target }}
path: packages/**/*.node
if-no-files-found: error
build-freebsd:
runs-on: macos-12
name: Build FreeBSD
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
if: ${{ !contains(github.ref, '-') }}
- name: Build
id: build
if: ${{ !contains(github.ref, '-') }}
uses: cross-platform-actions/action@v0.21.1
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: ${{ !contains(github.ref, '-') }}
uses: actions/upload-artifact@v3
with:
name: bindings-freebsd
path: packages/**/*.node
if-no-files-found: error
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
NX_PREFER_TS_NODE: true
PLAYWRIGHT_BROWSERS_PATH: 0
with:
operating_system: freebsd
version: '13.2'
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 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
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 --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' }}
uses: actions/upload-artifact@v3
with:
name: bindings-freebsd
path: packages/**/*.node
if-no-files-found: error
publish:
if: ${{ github.event_name == 'release' && github.repository_owner == 'nrwl' }}
if: ${{ github.repository_owner == 'nrwl' }}
name: Publish
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
needs:
- build-freebsd
- build
env:
GH_TOKEN: ${{ github.token }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8.2
version: 8
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
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
@@ -240,18 +271,27 @@ jobs:
- name: Publish
run: |
git checkout -b publish/$GITHUB_REF_NAME
npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
pnpm nx-release --local=false $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
pnpm nx-release --local=false $VERSION $DRY_RUN
- name: 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
# The GITHUB_REF_NAME is a full version (i.e. 17.3.2). The branchName will only use the major version number.
# We will publish docs to the website branch based on the current tag (i.e. website-17)
branchName=website-${GITHUB_REF_NAME%.*.*}
# 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
env:
GH_TOKEN: ${{ github.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
git branch -f $branchName
git push -f origin $branchName
+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! 🙏
+3
View File
@@ -19,6 +19,7 @@ jest.debug.config.js
/graph/client/src/assets/generated-project-graphs
/graph/client/src/assets/generated-task-graphs
/graph/client/src/assets/generated-task-inputs
/graph/client/src/assets/generated-source-maps
/nx-dev/nx-dev/public/documentation
/nx-dev/nx-dev/public/images/open-graph
@@ -30,6 +31,7 @@ CHANGELOG.md
# Next.js
.next
out
# Angular Cache
.angular
@@ -44,6 +46,7 @@ CHANGELOG.md
# Fix for issue when working on the repo in a dev container
.pnpm-store
.nx/cache
.nx/workspace-data
.cargo/.package-cache
.cargo/bin/
+15 -19
View File
@@ -1,47 +1,43 @@
launch-templates:
linux-medium:
resource-class: 'docker_linux_amd64/medium+'
image: 'ubuntu22.04-node20.11-v3'
env:
CI: 'true'
GIT_AUTHOR_EMAIL: test@test.com
GIT_AUTHOR_NAME: Test
GIT_COMMITTER_EMAIL: test@test.com
GIT_COMMITTER_NAME: Test
NX_E2E_CI_CACHE_KEY: e2e-circleci-linux
NX_VERBOSE_LOGGING: 'true'
NX_PERF_LOGGING: 'false'
NX_NATIVE_LOGGING: 'false'
SELECTED_PM: 'pnpm'
NX_E2E_RUN_E2E: 'true'
NPM_CONFIG_PREFIX: '/home/workflows/.npm-global'
NX_CLOUD_ACCESS_TOKEN: '{{secrets.NX_CLOUD_ACCESS_TOKEN}}'
init-steps:
- name: LSCPU
script: |
lscpu
- name: Checkout
uses: 'nrwl/nx-cloud-workflows/v1.1/workflow-steps/checkout/main.yaml'
uses: 'nrwl/nx-cloud-workflows/v3.6/workflow-steps/checkout/main.yaml'
- name: Cache restore
uses: 'nrwl/nx-cloud-workflows/v1.1/workflow-steps/cache/main.yaml'
uses: 'nrwl/nx-cloud-workflows/v3.6/workflow-steps/cache/main.yaml'
env:
KEY: 'pnpm-lock.yaml'
PATHS: |
node_modules
~/.cache/Cypress
~/.cache/ms-playwright
~/.pnpm-store
BASE_BRANCH: 'master'
- name: Install e2e deps
script: |
sudo apt-get update
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: |
@@ -57,5 +53,5 @@ launch-templates:
- name: Load Cargo Env
script: echo "PATH=$HOME/.cargo/bin:$PATH" >> $NX_CLOUD_ENV
- name: Benchmark
script: node tools/benchmark/benchmark.js
- name: Install zip and unzip
script: sudo apt-get -yqq install zip unzip
+4
View File
@@ -0,0 +1,4 @@
distribute-on:
small-changeset: 8 linux-medium
medium-changeset: 10 linux-medium
large-changeset: 12 linux-medium
+6 -2
View File
@@ -16,7 +16,9 @@ packages/jest/src/schematics/**/files/**/*.json
packages/nx/src/plugins/js/lock-file/__fixtures__/**/*.*
packages/**/schematics/**/files/**/*.html
packages/**/generators/**/files/**/*.html
packages/nx/src/native/
packages/nx/src/native/**/*.rs
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
graph/client/src/assets/environment.js
@@ -37,4 +39,6 @@ CODEOWNERS
/.nx/cache
.pnpm-store
.pnpm-store
/.nx/workspace-data
+2 -1
View File
@@ -1,4 +1,5 @@
{
"singleQuote": true,
"endOfLine": "lf"
"endOfLine": "lf",
"plugins": ["prettier-plugin-tailwindcss"]
}
+18 -11
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
/graph/** @philipjfulcher @FrozenPandaz @bcabanes @MaxKless @xiongemi
/images @nrwl/nx-docs-reviewers
/nx-dev/** @nrwl/nx-docs-reviewers
/typedoc-theme @nrwl/nx-docs-reviewers
@@ -22,8 +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/** @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
@@ -34,11 +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-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
@@ -55,6 +52,11 @@ rust-toolchain @nrwl/nx-native-reviewers
/packages/react-native/** @nrwl/nx-react-reviewers
/e2e/react-native/** @nrwl/nx-react-reviewers
## remix
/docs/generated/packages/remix/** @nrwl/nx-react-reviewers @nrwl/nx-docs-reviewers @Coly010
/packages/remix/** @nrwl/nx-react-reviewers @Coly010
/e2e/remix/** @nrwl/nx-react-reviewers @Coly010
# Vue
/packages/vue/** @nrwl/nx-vue-reviewers
/e2e/vue/** @nrwl/nx-vue-reviewers
@@ -101,9 +103,11 @@ rust-toolchain @nrwl/nx-native-reviewers
## Tools
/docs/generated/packages/cypress/** @nrwl/nx-testing-tools-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/cypress/** @nrwl/nx-testing-tools-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/jest/** @nrwl/nx-testing-tools-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/jest/** @nrwl/nx-testing-tools-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/cypress/** @nrwl/nx-testing-tools-reviewers @nrwl/nx-docs-reviewers
/docs/generated/packages/playwright/** @nrwl/nx-testing-tools-reviewers @nrwl/nx-docs-reviewers
/docs/shared/packages/playwright/** @nrwl/nx-testing-tools-reviewers @nrwl/nx-docs-reviewers
/packages/cypress/** @nrwl/nx-testing-tools-reviewers
/e2e/cypress/** @nrwl/nx-testing-tools-reviewers
/packages/jest/** @nrwl/nx-testing-tools-reviewers
@@ -125,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
@@ -133,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
@@ -157,7 +163,7 @@ 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
/e2e/lerna-smoke-tests/** @vsavkin @JamesHenry
@@ -173,6 +179,7 @@ rust-toolchain @nrwl/nx-native-reviewers
# CI
/.circleci/** @nrwl/nx-pipelines-reviewers
/.nx/workflows/** @nrwl/nx-pipelines-reviewers
/.github/** @nrwl/nx-pipelines-reviewers
/.husky/** @nrwl/nx-pipelines-reviewers
/packages/workspace/src/generators/ci-workflow/** @nrwl/nx-pipelines-reviewers
+5 -4
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)
@@ -318,11 +318,12 @@ The scope must be one of the following:
- nest - anything Nest specific
- nextjs - anything Next specific
- node - anything Node specific
- nx-cloud - anything NxCloud specific
- nx-cloud - anything Nx Cloud specific
- nx-plugin - anything Nx Plugin specific
- nx-dev - anything related to docs infrastructure
- react - anything React specific
- react-native - anything React Native specific
- release - anything related to nx release
- repo - anything related to managing the Nx repo itself
- storybook - anything Storybook specific
- testing - anything testing specific (e.g., Jest or Cypress)
Generated
+739 -335
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
+8 -8
View File
@@ -1,7 +1,7 @@
<p style="text-align: center;">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
<img alt="Nx - Smart, Fast and Extensible Build System" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
<img alt="Nx - Smart Monorepos · Fast CI" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
</picture>
</p>
@@ -19,9 +19,9 @@
<hr>
# Smart, Fast and Extensible Build System
# Smart Monorepos · Fast CI
Nx is a next generation build system with first class monorepo support and powerful integrations.
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.
A few links to help you get started:
@@ -32,7 +32,7 @@ A few links to help you get started:
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
<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, Fast and Extensible Build System"></a></p>
width="100%" alt="Nx - Smart Monorepos · Fast CI"></a></p>
# Engage with the Core Team and the Community
@@ -73,7 +73,7 @@ help you get started.
| ![Emily Xiong](https://avatars.githubusercontent.com/u/16211801?s=160) | ![Miroslav Jonaš](https://avatars.githubusercontent.com/u/881612?s=160) | ![Leosvel Pérez Espinosa](https://avatars.githubusercontent.com/u/12051310?s=160) | ![Zachary DeRose](https://avatars.githubusercontent.com/u/3788405?s=160) |
| [xiongemi](https://github.com/xiongemi) | [meeroslav](https://github.com/meeroslav) | [leosvelperez](https://github.com/leosvelperez) | [ZackDeRose](https://github.com/ZackDeRose) |
| Craigory Coppola | Chau Tran | Nicholas Cunningham |
| -------------------------------------------------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| ![Craigory Coppola](https://avatars.githubusercontent.com/u/6933928?s=160) | ![Chau Tran](https://avatars.githubusercontent.com/u/25516557?s=160) | ![Nicholas Cunningham](https://avatars.githubusercontent.com/u/338948?s=160) |
| [AgentEnder](https://github.com/AgentEnder) | [nartc](https://github.com/nartc) | [ndcunningham](https://github.com/ndcunningham) |
| Craigory Coppola | Chau Tran | Nicholas Cunningham | Max Kless |
| -------------------------------------------------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| ![Craigory Coppola](https://avatars.githubusercontent.com/u/6933928?s=160) | ![Chau Tran](https://avatars.githubusercontent.com/u/25516557?s=160) | ![Nicholas Cunningham](https://avatars.githubusercontent.com/u/338948?s=160) | ![Max Kless](https://avatars.githubusercontent.com/u/34165455?s=160) |
| [AgentEnder](https://github.com/AgentEnder) | [nartc](https://github.com/nartc) | [ndcunningham](https://github.com/ndcunningham) | [MaxKless](https://github.com/MaxKless) |
+50
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.",
@@ -39,6 +44,16 @@
"description": "Nx plugin to generate a CDK stack with support for the vitest runner. Supports all CDK commands.",
"url": "https://github.com/berenddeboer/nx-plugins/tree/main/packages/nx-aws-cdk"
},
{
"name": "@nx-iac/aws-cdk",
"description": "Empowers your Nx workspace with AWS CDK capabilities ⚡",
"url": "https://github.com/joelklint/nx-aws-cdk"
},
{
"name": "@routineless/nx-aws-cdk",
"description": "Nx plugin to generate and manage aws cdk app and lambdas.",
"url": "https://github.com/KozelAnatoliy/routineless/tree/main/packages/nx-aws-cdk"
},
{
"name": "@berenddeboer/nx-sst",
"description": "Nx plugin to generate an SST stack and execute all SST commands.",
@@ -274,6 +289,16 @@
"description": "Nx plugin for deploying your resources with Pulumi",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/pulumi"
},
{
"name": "@nx-extend/react-email",
"description": "Nx plugin for developing email templates with react.email",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/react-email"
},
{
"name": "@nx-extend/shadcn-ui",
"description": "Nx plugin for working with shadcn/ui",
"url": "https://github.com/tripss/nx-extend/tree/master/packages/shadcn-ui"
},
{
"name": "@nativescript/nx",
"description": "Nx Plugin adding first class support for NativeScript in your Nx workspace",
@@ -433,5 +458,30 @@
"name": "@simondotm/nx-firebase",
"description": "Nx plugin to support Firebase Apps and Cloud Functions in Nx workspaces",
"url": "https://github.com/simondotm/nx-firebase"
},
{
"name": "@dman926/nx-python-pdm",
"description": "Use Python in NX workspaces with PDM",
"url": "https://github.com/dman926/nx-python-pdm"
},
{
"name": "@gnuechtel/nx-cucumber",
"description": "Plugin to use Cucumber within Nx workspaces",
"url": "https://gitlab.com/gnuechtel/open-source/-/tree/main/libs/nx-cucumber"
},
{
"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"
}
]
+66 -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
@@ -68,6 +74,12 @@ description: This is a custom description
---
```
### Social Media Images
You can specify a custom social media image for a page by specifying `mediaImage` in the `map.json` entry for that page. `mediaImage` is a path relative to `/docs`.
Note that you won't see the social media image in the preview generated for your PR, because it loads from the live `nx.dev` site. You can make sure the image is correct by looking at `[preview-url]/images/open-graph/[page-url].[image-extension]`.
### Custom markdown syntax
The documentation website [nx.dev](https://nx.dev) is using custom Markdown syntax to enable the authors to add functionality to its content.
@@ -82,6 +94,16 @@ Your content goes here.
{% /callout %}
```
#### Disclosure
A disclosure can be used for less important information that is initially collapsed.
```markdown
{% disclosure title="string" %}
Your content goes here.
{% /disclosure %}
```
#### Cards
Cards allow showing content in a grid system with a title, a description, a type and an url (internal/external).
@@ -270,6 +292,49 @@ Have a more decent button-like widget that you can place below sections of a tut
{% video-link link="https://youtu.be/OQ-Zc5tcxJE?t=64" /%}
```
#### Project Details View
Embed a Project Details View that is identical what is shown in Nx Console or `nx show project myproject --web`
````markdown
{% project-details title="Test" height="100px" %}
```json
{
"project": {
"name": "demo",
"data": {
"root": " packages/demo",
"projectType": "application",
"targets": {
"dev": {
"executor": "nx:run-commands",
"options": {
"command": "vite dev"
}
},
"build": {
"executor": "nx:run-commands",
"inputs": ["production", "^production"],
"outputs": ["{projectRoot}/dist"],
"options": {
"command": "vite build"
}
}
}
}
},
"sourceMap": {
"targets": ["packages/demo/vite.config.ts", "@nx/vite"],
"targets.dev": ["packages/demo/vite.config.ts", "@nx/vite"],
"targets.build": ["packages/demo/vite.config.ts", "@nx/vite"]
}
}
```
{% /project-details %}
````
#### Graph
Embed an Nx Graph visualization that can be panned by the user.
+121
View File
@@ -0,0 +1,121 @@
---
title: Nx Cloud 3.0 — Faster Cache, More Powerful DTE, Better Ergonomics
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/)
+337
View File
@@ -0,0 +1,337 @@
---
title: 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/)
+610
View File
@@ -0,0 +1,610 @@
---
title: 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/)
+20
View File
@@ -0,0 +1,20 @@
---
title: 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/)
+497
View File
@@ -0,0 +1,497 @@
---
title: 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/2023-06-29-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/)
+282
View File
@@ -0,0 +1,282 @@
---
title: 'Nx 17 has Landed'
authors: ['Juri Strumpflohner', 'Zack DeRose']
cover_image: '/blog/images/2023-10-20/featured_img.png'
tags: [nx, design]
---
{% youtube src="https://www.youtube.com/embed/1Z0iA9K1o8M?si=9XxIboXSZ5yxFpIt" /%}
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)
## 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](https://dev.to/nx/nx-conf-2023-recap-53ep) 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](https://dev.to/nx/nx-conf-2023-recap-53ep):
{% 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/)
+623
View File
@@ -0,0 +1,623 @@
---
title: 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/)
+314
View File
@@ -0,0 +1,314 @@
---
title: 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/)
+335
View File
@@ -0,0 +1,335 @@
---
title: 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/)
+214
View File
@@ -0,0 +1,214 @@
---
title: Nx 17.2 Update
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/2023-10-20-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/)
+391
View File
@@ -0,0 +1,391 @@
---
title: 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](https://blog.nrwl.io/nx-console-gets-lit-ca339743ff4f) 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](https://blog.nrwl.io/nx-docs-ai-assistant-433d238e45d4). 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](https://dev.to/nx/nx-conf-2023-recap-53ep).
## 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,187 @@
---
title: 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,189 @@
---
title: 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)
+126
View File
@@ -0,0 +1,126 @@
---
title: 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/2024-02-05-nx-18-project-crystal) 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,321 @@
---
title: 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/2024-02-05-nx-18-project-crystal).
![](/blog/images/2024-02-09/bodyimg2.webp)
It gives you some additional benefits ([you can read more here](/blog/2024-02-05-nx-18-project-crystal)), 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/)
+147
View File
@@ -0,0 +1,147 @@
---
title: 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/2024-02-05-nx-18-project-crystal)!
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/2024-02-07-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/2024-02-09-versioning-and-releasing-packages), 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/)
+104
View File
@@ -0,0 +1,104 @@
---
title: Monorepos - Why Speed Matters
authors: ['Katerina Skroumpelou']
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)
+188
View File
@@ -0,0 +1,188 @@
---
title: 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="5 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)
+217
View File
@@ -0,0 +1,217 @@
---
title: 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/)
+233
View File
@@ -0,0 +1,233 @@
---
title: Nx 19.0 Release!!
authors: ['Zack DeRose']
cover_image: '/blog/images/2024-05-08/nx-19-thumbnail.png'
tags: [nx, release]
---
{% youtube
src="https://youtu.be/U6eO8-w9DR0"
title="Nx 19.0 Has Landed!!"
width="100%" /%}
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/2024-02-05-nx-18-project-crystal)
You can read more on project crystal [here](/blog/2024-02-05-nx-18-project-crystal). 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)
## NEW PLUGIN: @nx/gradle
[![NEW PLUGIN: @nx/gradle](/blog/images/2024-04-19/featured_img.png)](/blog/2024-04-19-manage-your-gradle)
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/2024-04-19-manage-your-gradle).
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):
[![Grouped e2e tests in Nx Cloud](/blog/images/2024-05-08/nx-cloud-atomizer-groupings.gif)](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).
[![Changelog for Nx 19](/blog/images/2024-05-08/fixes.gif)](https://github.com/nrwl/nx/releases/tag/19.0.0)
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/2024-03-21-reliable-ci).
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):
[![Grouped e2e tests in Nx Cloud](/blog/images/2024-05-08/nx-cloud-atomizer-groupings.gif)](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.tools/conf)
We've got a new conference coming up: [Monorepo World 2024](https://monorepo.tools/conf)!
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/)
+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

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Some files were not shown because too many files have changed in this diff Show More