63 Commits

Author SHA1 Message Date
Leosvel Pérez Espinosa
cfe32c2560
feat(misc): add --useProjectJson flag to CNW (#30475)
## Current Behavior

Creating new workspaces since Nx 20.6.0 will generate the Nx
configuration in `package.json` files. This is intended, given that it
is part of the new setup using TypeScript Project References and Package
Manager Workspaces, but there's no way to choose to generate the Nx
configuration in `project.json` files. Project generators do allow to
choose but there's no way to do it when creating a new workspace. This
forces users who want to use `project.json` files to generate an empty
workspace and then use a project generator.

## Expected Behavior

When creating a new Nx workspace, users can provide an option
(`--use-project-json`) to generate the Nx configuration in
`project.json` files.

## Related Issue(s)

Fixes #30464
2025-03-24 08:42:18 -04:00
Nicholas Cunningham
363088a8ae
feat(react): Add react-router to create-nx-workspace and react app generator (#30316)
This pull request introduces improvements to React Router integration
and removes the Remix preset.

## Key Changes:
- Updated `create-nx-workspace` to support React Router.
- Removed the Remix option from `create-nx-workspace`, but the package
remains to support existing users.

## SSR & React Router Support
- New users who want SSR in their React apps can enable it via the React
option and select React Router for SSR support.
- The ecosystem has shifted to migrating from Remix to React Router for
SSR needs.
- This option is only available for plain React apps and uses Vite.
Other types of React apps (Micro Frontends, Webpack, Rspack, etc.)
remain unaffected.

## Default Routing Behavior
`--routing` is now enabled by default when creating a React app using
`create-nx-workspace`, aligning with Angular’s default behaviour.
2025-03-14 15:06:54 -04:00
Leosvel Pérez Espinosa
2d69aa12bf
feat(misc): enable ts solution setup by default for new workspaces (#30372)
## Current Behavior

To create a new workspace that uses the new TS solution setup the
`--workspaces` flag must be provided (Node, React, and Vue stacks).

## Expected Behavior

New workspaces should be created by default using the new TS solution
setup (Node, React, and Vue stacks). Users can opt out of it by
providing the `--no-workspaces` flag.

## Related Issue(s)

Fixes #
2025-03-14 17:42:31 +01:00
Leosvel Pérez Espinosa
8d9234b385
feat(misc): prompt for unit test runner when creating a workspace using --workspaces flag (#29743)
## Current Behavior

Creating a new workspace does not prompt for the unit test runner.

## Expected Behavior

Creating a new workspace should prompt for the unit test runner.

For now, this new behavior will be behind the `--workspaces` flag.

## Related Issue(s)

Fixes #
2025-01-24 10:03:57 -05:00
Isaac Mann
520706b10b
feat(nx-dev): show arg aliases (#29653)
List aliases of command arguments
2025-01-16 17:13:02 -05:00
Jack Hsu
ec5a5e6360
feat(react): update app and lib generators to support new TS solution setup (#28808)
This PR updates app and lib generators in the following packages such
that they will generate files with the TS solution setup if it is
detected.

- `@nx/react`
- `@nx/next`
- `@nx/remix`
- `@nx/expo`
- `@nx/react-native`

React apps and libs will be linked using npm/pnpm/yarn/bun workspaces
feature rather than through tsconfig paths. This means that local
aliases like `@/` will work with Next.js and Remix apps.

Note: This will be behind `--workspaces` flag when using `npx
create-nx-workspace` and choosing React stack. If you use the None/TS
stack then adding plugins like `nx add @nx/react` then generating apps,
it will automatically pick up the new TS solution setup.


<!-- 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
React generators are not compatible with TS solution setup (i.e.
workspaces + TS project references).

## Expected Behavior
React generators work with new TS solution setup (Plain, Next.js, Remix,
Expo, React Native).

## Related Issue(s)
#28322

---------

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
2024-11-28 22:18:45 -05:00
James Henry
ddec7ad4b0
chore(repo): add valid-command-object lint rule (#27777) 2024-09-05 13:14:04 +04:00
Isaac Mann
83a387a105
docs(core): create commands landing page (#27660)
Creates a [custom landing page for Nx
commands](https://nx-dev-git-docs-commands-landing-page-nrwl.vercel.app/reference/nx-commands)
2024-08-29 22:43:21 -04:00
Jason Jean
77cbfa0e87
fix(core): change order of CI providers to match their popularity (#27623)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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

The order of the CI providers prompt does not match their popularity

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

The order of the CI providers prompt matches their popularity

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

Fixes #
2024-08-23 14:45:20 -04:00
Jason Jean
1cb4f65210
fix(misc): properly set the value of the bitbucket option for ci work… (#26890) 2024-07-10 16:58:34 -04:00
Jason Jean
92e09d9322
fix(misc): adjust nx cloud ab test (#26866)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

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

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

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


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


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


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


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

Fixes #
2024-07-08 18:28:59 -04:00
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
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
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
Colum Ferry
739e2e7115
feat(testing): make playwright default e2e test runner option (#22511) 2024-04-23 11:27:09 -04:00
Colum Ferry
d7cb6875f9
feat(remix): add option to create-nx-workspace (#22334) 2024-03-15 16:44:25 -04: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
Katerina Skroumpelou
33e13910b1
fix(core): accept vue as preset in cnw (#21262) 2024-01-22 12:22:33 -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
Nicholas Cunningham
c43b22dc88
feat(nextjs): Standalone projects now default to src (#21010) 2024-01-17 11:22:51 -07:00
Isaac Mann
595a7743b6
docs(core): rename distributed cache to remote cache (#21061) 2024-01-11 18:14:44 +00:00
Katerina Skroumpelou
cec0994cd4
feat(vue): add nuxt as cnw vue framework (#20626) 2023-12-11 10:50:56 +02:00
Leosvel Pérez Espinosa
25d6ec3a92
feat(angular): support angular v17 (#19689) 2023-11-07 15:45:42 -05:00
Katerina Skroumpelou
a09ad2bd62
fix(vue): remove filter from cnw (#19879) 2023-10-26 12:10:09 -04:00
Jack Hsu
188dc8f2f0
feat(core): hide vue preset options from create-nx-workspace (#19155) 2023-09-13 17:18:04 -04:00
Jack Hsu
769974b45a
feat(vue): init, app, component and lib generators (#19130)
Co-authored-by: Katerina Skroumpelou <sk.katherine@gmail.com>
2023-09-13 15:05:10 -04:00
Juri
3ddb188fa3 docs(nx-plugin): add recipe for creating and testing a create-x package
Co-authored-by: AgentEnder <craigorycoppola@gmail.com>
2023-08-11 20:21:11 +02:00
Emily Xiong
ed300d5f82
feat(testing): prompt e2eTestRunner playwright (#18203) 2023-08-04 11:14:59 -04:00
Jack Hsu
a19fbb1ddb
feat(js): add preset for TS standalone workspace (#17467) 2023-06-13 14:32:06 -04:00
Isaac Mann
e693642c35
docs(core): update preset link (#17153) 2023-06-06 16:22:25 -04:00
Jack Hsu
a722302caf
feat(misc): rework create-nx-workspace prompts (#17230) 2023-05-30 18:13:42 -04:00
Colum Ferry
4106b3455b
docs(node): node-standalone should be listed not node-server (#17062) 2023-05-17 15:24:06 -04:00
Jack Hsu
95421c6945
feat(nextjs): update Next.js to 13.4.1 and default to App Router for new apps (#16948) 2023-05-12 16:09:20 -04:00
Nicholas Cunningham
338dc64d91
feat(nextjs): Add standalone Nextjs option to react selection when running CNW (#16317) 2023-04-19 15:29:31 -04:00
Jack Hsu
f04f316271
feat(react): add rspack experimental support (#16252) 2023-04-19 14:00:24 -04:00
Jack Hsu
874b6a5e49
feat(node): add --framework=none to create-nx-workspace for Node projects (#15929) 2023-03-29 11:27:25 -04:00
Emily Xiong
24cb81d9ba
feat(core): set interactive true for create-nx-workspace (#15863) 2023-03-23 16:38:39 -04:00
Emily Xiong
129cbedc66
feat(core): add entry file for create-nx-workspace (#15610) 2023-03-17 11:30:06 -04:00
Colum Ferry
e053e06679
fix(angular): allow boolean usage of the prompts (#15083) 2023-02-21 19:04:54 -05:00
Colum Ferry
4f09949383
feat(core): add standalone api prompt to CNW (#14886) 2023-02-10 15:06:41 -05:00
Colum Ferry
abece6a02d
feat(angular): add routing option to CNW (#14845) 2023-02-10 13:24:48 -05:00
Colum Ferry
762b9f336c
feat(core): remove unused CLI option from CNW (#14865) 2023-02-10 11:35:01 -05:00
Nicholas Cunningham
6093247df2
feat(node): add --docker for CNW (#14626) 2023-01-26 11:02:12 -05:00
Katerina Skroumpelou
dbe2c3b1e6
feat(core): react standalone bundler prompt (#14464) 2023-01-20 08:18:32 -05:00
Miroslav Jonaš
2b69cd5b79
feat(core): add bitbucket and gitlab to create-nx-workspace (#14400) 2023-01-16 17:46:31 +01:00
Nicholas Cunningham
00caf6ae5e
feat(node): update CNW to support generating a node server with a framework (#14313) 2023-01-13 11:39:38 -07:00
Victor Savkin
dd2c3728e4 fix(misc): rework create-nx-workspace command to show standalone presets 2022-11-24 14:13:15 -05:00
Leosvel Pérez Espinosa
70e43cdc77 feat(angular): add a preset to generate a workspace with a single app at the root 2022-11-21 11:17:03 -05:00
Victor Savkin
8d9de7f81d cleanup(core): clean up workspace creation 2022-11-15 17:22:02 -05:00
Victor Savkin
c4ebef2803 feat(react): add a preset to generate a workspace with a single app at the root 2022-11-12 17:17:58 -05:00