289 Commits

Author SHA1 Message Date
Nicholas Cunningham
b1dbf47aa2
feat(webpack): add convertConfigToWebpackPlugin (#26516)
This PR introduces functionality for users who currently use the
`withNx` and `withReact` plugins in their webpack configuration to
migrate to the `NxAppWebpackPlugin`.

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

By implementing this change, the aim is to provide a consistent method
for users opting to transition to inferred targets. This ensures a
smoother migration process, offering better integration and reducing
potential configuration complexities.
2024-06-21 08:55:23 -04:00
Leosvel Pérez Espinosa
df3c7522ea
feat(testing): add convert-to-inferred migration generator for jest (#26259)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

Fixes #
2024-06-18 05:59:30 -07:00
Colum Ferry
b36c39e331
feat(vite): add convert-to-inferred migration generator (#26249)
- feat(vite): add convert-to-inferred generator for migrating to
inference
- feat(vite): add build postTargetTransformer
- feat(vite): add serve, preview, test postTargetTransformer
- feat(vite): convert-to-inferred should clean up inputs and outputs
- docs(vite): add convert-to-inferred
- feat(vite): update outDir correctly

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

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

## Current Behavior
<!-- This is the behavior we have today -->
There is currently no generator that can migrate projects that use
`@nx/vite:*` executors to use Inference plugins.

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

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

Fixes #

---------

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-06-14 14:53:25 -04:00
Jack Hsu
8804f12450
feat(bundling): add convert-to-inferred generator for @nx/rollup (#26280)
This PR adds `@nx/rollup:convert-to-inferred` generator.


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

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

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

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

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

Which takes a config such as:

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

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

And updates it to:

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

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

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

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

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

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

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

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

Fixes #
2024-06-11 16:55:58 -04:00
Austin Fahsl
ebfd4b75ba
docs(release): publish from dist directory recipe (#26370) 2024-06-07 15:55:23 +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
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
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
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
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
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
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
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
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
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
Colum Ferry
acd0993f1a
feat(linter): add convert-to-inferred migration generator (#23142) 2024-05-03 17:23:01 +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
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
Jason Jean
a64a7e2db9
feat(core): cleanup for v19 (#22993) 2024-05-01 12:12:32 -04:00
Colum Ferry
44820f2c4b
feat(testing): add convert-to-inferred migration generator for cypress (#22884) 2024-04-30 12:47:12 -04: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
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
33008f25b5
docs(core): clean up more concepts section (#22957) 2024-04-24 10:28:53 +02:00
Jack Hsu
839e4b25fc
docs(core): remove deprecated docs page for Nx 14 and earlier (#22767) 2024-04-15 09:09:49 -04:00
Leosvel Pérez Espinosa
fb57667088
docs(misc): reorder sidebar menu items (#22746) 2024-04-11 11:40:23 +02:00
Jack Hsu
22735a011e
docs(core): remove React 18 migration (#22750) 2024-04-09 15:52:20 -04:00
Emily Xiong
07ef435127
docs(gradle): add gradle overview page (#22552) 2024-04-09 15:51:18 -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
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
Isaac Mann
81c6c72121
docs(core): remove CRA migration guide (#22696) 2024-04-05 15:37:34 -04:00
Isaac Mann
81235494a1
docs(core): remove integrated tutorial (#22666) 2024-04-04 14:44:17 -04:00
Altan Stalker
d9bb051091
docs(nx-cloud): remove server api reference (#22654) 2024-04-03 15:15:49 -04:00
Austin Fahsl
12afa20210
fix(release): respect root .npmrc registry settings for publishing 2024-04-02 13:53:14 -06: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
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
Isaac Mann
da12d87b18
docs(core): rename test atomizer (#22464) 2024-03-22 15:19:19 -04:00
Johanna Pearce
a96b53e02c docs(nx-cloud): add basic Azure DevOps setup recipe 2024-03-22 13:36:01 +00:00
Emily Xiong
a44475c1a4
feat(gradle): make gradle public (#22399) 2024-03-19 18:14:58 -04:00
Nicholas Cunningham
c7719c01f2
docs(nx-dev): Refresh /showcase/example-repos (#22320) 2024-03-15 09:52:37 -06: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
Isaac Mann
650dcf31af
docs(core): npm workspace tutorial (#22018) 2024-03-08 15:01:49 -05:00
Austin Fahsl
38179ad278
feat(js): replace publish script with nx release config (#21474) 2024-03-05 17:53:07 -05:00
Isaac Mann
62e89f68c7
docs(core): enterprise custom dte (#22143) 2024-03-05 12:14:21 -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
Isaac Mann
e9da3db560
docs(core): remove angularjs migration (#21916) 2024-02-29 15:10:49 -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