83 Commits

Author SHA1 Message Date
Isaac Mann
d477ea7b6a
docs(core): ts project references guide (#28281)
Adds a TS project references guide
2024-10-03 20:39:25 -04:00
Jack Hsu
f221a41dbd
feat(misc): remove @nrwl/ scoped packages (#27858)
This PR removes the `@nrwl/*` packages. Also cleans up references to the
legacy packages.

NOTE: The rescope page is now under `/deprecated/rescope`. There is
still >1000K monthly traffic to it, which might be due to older Nx
users.

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

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

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

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

Fixes #
2024-09-27 17:19:01 -04:00
Jason Jean
e76c7d1428
feat(rspack): move rspack into main nx repo (#27969)
- feat: add rspack plugin (#143)
- feat: add rspack plugin (#143)
- feat(rspack): update to latest rspack version (#159)
- feat(rspack): add missing features (less/sass/stylus, assets, etc.)
(#160)
- feat(rspack): add missing features (less/sass/stylus, assets, etc.)
(#160)
- feat(rspack): clean-up project setup (#161)
- feat(rspack): clean-up project setup (#161)
- fix(rspack): use correct app dir when generating non-root projects
(#162)
- fix(rspack): use correct app dir when generating non-root projects
(#162)
- chore(repo): migrate to Nx 15.8.5 (#169)
- feat(rspack): update and pin rspack to 0.1.0 (#173)
- fix(rspack): fix rspack build
- chore(rspack): remove comment (#175)
- feat(rspack): set mode in configuration and expose option (#177)
- fix(rspack): handle existing stylePreprocessorOptions (#182)
- fix(rspack): add dependency to ajv-keywords that match the version
used by rspack (#187)
- fix(rspack): pass devServer options to devServer (#193)
- fix(rspack): set externals for target node (#194)
- feat(rspack): install latest patch when configuring (#195)
- fix(rspack): add withWeb if web app (#200)
- chore(repo): fix release script (#202)
- chore(repo): fix release script (#202)
- feat(rspack): configuration generator better ux (#201)
- feat(rspack): builder returns outfile (#207)
- fix(rspack): use ensureTypescript before tsquery (#215)
- feat(rspack): simplify app generator (#212)
- feat(rspack): simplify app generator (#212)
- fix(rspack): implement watch mode (#217)
- fix(rspack): do not force cssmodules (#222)
- fix(rspack): use builtin minify instead (#172)
- fix(rspack): use built-in tsconfig paths support (#227)
- fix(rspack): add back `resolve.alias` configuration since
`resolve.tsConfigPaths` seem to be incorrect in some scenarios (#229)
- feat(misc): update to Nx 16 and rescoped packages (#235)
- feat(misc): update to Nx 16 and rescoped packages (#235)
- fix(misc): replace missed references to @nrwl scope (#239)
- chore(repo): add legacy packages for nx rescope (#238)
- chore(repo): add legacy packages for nx rescope (#238)
- fix(repo): fix publishing for legacy packages (#240)
- fix(repo): fix publishing for legacy packages (#240)
- fix(misc): target commonjs for legacy packages (#241)
- fix(repo): add json files to assets (#243)
- chore(repo): update to 16.0.3 (#244)
- chore(repo): update to nx 16.2.1 (#271)
- fix(rspack): lock version to 0.1.11 (#279)
- fix(rspack): refine output filename patterns (#280)
- chore(rspack): update to latest (#278)
- feat(rspack): Add extractLicenses option to rspack's project
configuration (#230)
- feat(rspack): Add extractLicenses option to rspack's project
configuration (#230)
- fix(rspack): add missing license-webpack-plugin dependency (#301)
- chore(repo): upgrade to nx 16.6.0 (#319)
- fix(rspack): add fileReplacements support (#231)
- chore(reop): update nx to 16.7.1 (#325)
- chore(rspack): add jest babel config to e2e (#321)
- chore: don't use rspack internal module (#328)
- chore(repo): update nx to 16.8.1 (#335)
- feat(rspack): add typecheck (#338)
- chore(repo): update nx to 17.0.1 (#342)
- feat(rspack): add generatePackageJson plugin (#341)
- feat(rspack): add generatePackageJson plugin (#341)
- feat: upgrade rspack to 0.4.4 (#352)
- fix(rspack): Add missing peer dep (#372)
- chore(repo): migrate to latest nx (#376)
- chore(repo): migrate to latest nx (#376)
- feat(rspack): update rspack to install the latest version (#379)
- feat(rspack): add option to keep existing versions of packages for
init generator (#378)
- fix(rspack): do not depend directly on ajv to allow for correct
hoisting (#384)
- fix(rspack): ensure react-refresh is installed (#385)
- fix(rspack): User port should be respected. (#387)
- feat(rspack_: update rspack to install latest version (#389)
- feat(rspack): support object configs (#402)
- feat(rspack): add crystal plugin for inferring projects (#407)
- feat(rspack): add crystal plugin for inferring projects (#407)
- feat(rspack): bump to latest rspack (#412)
- fix(rspack): add postcss-loader for css files (#415)
- feat(rspack): add module federation support (#416)
- feat(rspack): add module federation support (#416)
- fix(rspack): add hook for dev server to log when compilation completed
(#417)
- feat(rspack): add module-federation-static-server (#418)
- fix(rspack): ensure process is default import (#420)
- chore(repo): move packages/rspack to packages/rspack to prepare to be
imported
- chore(repo): move packages-legacy/rspack to packages-legacy/rspack to
prepare to be imported
- chore(repo): move e2e/rspack-e2e to e2e/rspack to prepare to be
imported
- chore(repo): fix e2e setup
- chore(repo): add rspack commit scope
- chore(rspack): configure correctly
- chore(rspack): final fixes
- docs(rspack): add docs for rspack
- chore(rspack): fix rspack e2e
- chore(react): add rspack bundler test

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

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

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

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

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

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

Fixes #
2024-09-26 14:30:11 -04:00
Isaac Mann
fb543596a7
docs(core): blog and docs edits (#28138)
Copy editing
2024-09-26 17:12:44 +02:00
Colum Ferry
27213f0c59 Merge branch 'master' into move-rspack-into-main 2024-09-26 09:37:02 +01:00
Isaac Mann
12eb5df469
docs(core): powerpack docs (#27904)
-  Activate powerpack recipe
-  Powerpack owners documentation
- [x] Powerpack custom remote cache documentation
- [x] Powerpack conformance documentation

Infrastructure for powerpack docs

- Adds the ability to generate API docs from ocean packages

To generate API documentation for plugins in the ocean repository, run
the `nx documentation` command with the `NX_OCEAN_RELATIVE_PATH`
environment variable set to the relative path to your checked out copy
of the ocean repo.

```
NX_OCEAN_RELATIVE_PATH=../ocean nx documentation
```

This will create generated API documentation in the
`docs/external-generated` folder. This API will be merged into the
normal `docs/generated` documentation when the docs site is built.

Because there are two separate output folders, if someone runs `nx
documentation` without the `NX_OCEAN_RELATIVE_PATH` environment
variable, the ocean documentation will not be overwritten. The ocean
documentation will only be updated or deleted when someone explicitly
chooses to do so.

---------

Co-authored-by: Juri Strumpflohner <juri.strumpflohner@gmail.com>
2024-09-25 10:15:47 -04:00
Colum Ferry
8290969cb7
feat(storybook): remove cypress options for e2e testing (#27850)
- feat(storybook): remove cypress options from configuration generator
- feat(react): remove cypress options from storybook-configuration
- feat(react): remove cypress options from stories generator
- feat(react): remove component-cypress-spec generator
- chore(storybook): restore @nx/cypress dep
- feat(remix): remove cypress options from storybook
- feat(angular): remove cypress options from storybook-configuration
- feat(angular): remove cypress options from stories generator
- feat(angular): remove component-cypress-spec generator
- feat(vue): remove cypress options from stories 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` -->

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

## Current Behavior
<!-- This is the behavior we have today -->
With Storybook Interaction Testing, there's no longer a need to setup
Cypress to specifically test storybook instances


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Remove cypress options for creating an e2e project specifically for
testing storybook instances.

Use Storybook Interaction Testing instead

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

Fixes #
2024-09-24 15:54:58 +01:00
Leosvel Pérez Espinosa
72cd1c15e6
feat(js): add the setup-prettier generator (#27996)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #
2024-09-24 17:24:09 +04:00
Jason Jean
7f4a8777d2
docs(core): hide documentation for activate powerpack (#27980)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

It will cause confusion if this is documented without other
documentation.

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

`activate-powerpack` is undocumented for now.

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

Fixes #
2024-09-18 20:35:59 -04:00
Jason Jean
b06f515059
feat(core): add integration with nx powerpack (#27972)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

There is no Nx Powerpack product.

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

Integration with Nx Powerpack is added. Nx Powerpack is optional, stay
tuned for more information which will be released soon.

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

Fixes #

---------

Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>
Co-authored-by: JamesHenry <james@henry.sc>
2024-09-18 13:41:24 -04:00
Colum Ferry
6c032ab800 docs(rspack): add docs for rspack 2024-09-18 10:27:05 +01:00
MaxKless
5bbaffbda8
feat(core): add metagenerator for convert-to-inferred (#27672)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
The DX to migrate to project crystal isn't great right now - people have
to run `convert-to-inferred` generators manually.

## Expected Behavior
We should provide a smoother way to migrate, so we introduced an
`@nx/workspace:infer-targets` generator that can handle multiple
conversions at once, either for the whole workspace or at a project
level.

---------

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-09-12 20:06:45 -04:00
Isaac Mann
514ce17b8c
docs(core): import documentation (#27859)
Create an import project recipe
Creates the import command API reference
Adds the import command to the command landing page
2024-09-12 09:12:24 -04:00
Isaac Mann
4517d9f721
docs(core): nx sync (#27825)
- Adds nx sync to command reference
- Updates nx.json reference
- Update project configuration reference
- Adds a sync generators concept page
- Adds a Register a Sync Generator recipe under Extending Nx Recipes

---------

Co-authored-by: James Henry <james@henry.sc>
2024-09-12 07:30:46 -04:00
Colum Ferry
2bc7d4e6e9
feat(react): add module federation static server (#27802)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

## Current Behavior
<!-- This is the behavior we have today -->
We can serve each application in a module federation setup statically,
but only individually.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Add a serve static executor for module federation hosts which will also
spin up the remotes statically

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

Fixes #
2024-09-09 12:50:52 -04:00
Louie Weng
f6f928f3b0
feat(nx-cloud): remove env variable for login (#27791)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

You need to use NX_ENABLE_LOGIN=true to connect to Nx Cloud with
nxCloudId. Documentation also is hidden for `nx login` and `nx logout`
aliases.

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

`nx connect` automatically connects via nxCloudId. Documentation shows
up for `nx login` and `nx logout` commands.

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

Fixes #
2024-09-05 13:23:54 -04:00
Louie Weng
3b0fd38066
chore(nx-cloud): add feature flag to nx login (#27698)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

- nx login and logout aliases point toward nx-cloud login and logout
- when you connect a new workspace, by default nxCloudId will be added
to your nx.json

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

- removed documentation and references to nx login and logout aliases
- when you connect a new workspace, by default nxCloudAccessToken will
be added to your nx.json


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

Fixes #
2024-09-03 11:01:21 -04:00
Louie Weng
c93f5d6f0d
feat(nx-cloud): alias for login and logout (#27358)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

N/A

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

When running `npx nx login`, a file server should open and take you to
Nx Cloud to create a new personal access token.

When running `npx nx logout`, the user should be prompted with Nx Cloud
URLs of instances that they can revoke personal access tokens to.

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

Fixes #
2024-08-26 14:26:29 -04:00
Colum Ferry
11f30dbd00
feat(storybook): add storybook 8 support (#27214)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #27175 #26914 #22941 #26531
2024-08-14 16:37:20 +01:00
Nicholas Cunningham
ab162ebb54
feat(module-federation): Update SSR enabling static serving for remotes (#27345)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

Currently, the default for remotes is to server them as development.
Which means a separate node process for each remote that is inside the
workspace.

This does not scale well and can lead to out of memory exceptions.

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

Remotes will start as static by default, which allows for better scaling
as the remotes increase.

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

TODO
- [ ] Migrations
2024-08-14 09:14:58 -04:00
Leosvel Pérez Espinosa
add5a675c3
feat(misc): add nx syncing mechanism and update the typescript-sync generator (#26793)
- Add the `nx sync` command to run sync generators and apply changes to
bring the workspace up to date according to their logic.
- Add the `nx sync:check` command to validate that the workspace is up
to date by running the sync generators without applying the changes. It
can be used on CI as a validation check.
- Update the task runner to run the sync generators (or obtain their
state from the daemon) and prompt the user whether to apply the changes,
if any
- This is only run if the `NX_ENABLE_SYNC_GENERATORS` environment
variable is set to `'true'`
  - Allow the user to configure a default value for the prompt
- Update the `@nx/js:typescript-sync` generator (keep tsconfig project
references in sync with the project graph) with misc fixes

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

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

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

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

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

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

Fixes #
2024-08-12 10:44:04 -04:00
Jack Hsu
d3747e020f
feat(react-native): add convert-to-inferred generator for Expo and React Native (#27326)
This PR adds `convert-to-inferred` generators to convert React Native an
Expo apps using executors to use the corresponding inference plugins.

Also:
1. Fixes casing for `@nx/react-native/plugin` so it is correctly set as
`upgradeTargetName` not `upgradeTargetname`
2. Migration for the above fix for existing projects
2024-08-08 14:31:19 -04:00
Nicholas Cunningham
4197a91845
feat(nextjs): Add convert-to-inferred generator (#26706)
This PR enables the ability to migrate project(s) from using nextjs
executors to inferred targets.

---------

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-06-27 11:21:35 -04:00
Leosvel Pérez Espinosa
47dfdcfc6b
feat(webpack): add convert-to-inferred generator (#26621)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

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

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

Fixes #

---------

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-06-24 21:13:24 -04:00
Colum Ferry
b1713be2c3
feat(remix): add convert-to-inferred generator (#26601)
- feat(remix): add convert-to-inferred migration
- feat(remix): add serve executor logic

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

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

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

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

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

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

Fixes #
2024-06-21 11:01:53 -04:00
Colum Ferry
18fdd9425b
feat(storybook): add convert-to-inferred generator (#26595)
- feat(storybook): add convert-to-inferred generator
- feat(storybook): add post target transformers
- feat(storybook): convert-to-inferred handles kebab case flags

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

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

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

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

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

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

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

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

By implementing this change, the aim is to provide a consistent method
for users opting to transition to inferred targets. This ensures a
smoother migration process, offering better integration and reducing
potential configuration complexities.
2024-06-21 08:55:23 -04:00
Jack Hsu
86954ae96b
fix(misc): rename @nrwl/* to @nx/* in init generator descriptions (#26610)
We forgot to rename these in the init generator descriptions. This
affects tutorials since we've been including the terminal output with
the wrong scope.


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

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

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

Fixes #
2024-06-20 13:08:39 -04:00
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
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
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
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
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
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
Colum Ferry
34c2dc13fd
docs(repo): missed autogenerated docs update (#22973) 2024-04-24 12:22:25 +01:00
Isaac Mann
33008f25b5
docs(core): clean up more concepts section (#22957) 2024-04-24 10:28:53 +02:00
Colum Ferry
739e2e7115
feat(testing): make playwright default e2e test runner option (#22511) 2024-04-23 11:27:09 -04:00
Emily Xiong
07ef435127
docs(gradle): add gradle overview page (#22552) 2024-04-09 15:51:18 -04:00
Emily Xiong
ebbbb73b32
fix(gradle): add @nx/gradle to nx migrations (#22567) 2024-03-28 15:52:39 -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
Emily Xiong
a44475c1a4
feat(gradle): make gradle public (#22399) 2024-03-19 18:14:58 -04:00