44 Commits

Author SHA1 Message Date
Isaac Mann
84387f3611
feat(nx-dev): generate migration detail pages (#29580)
Generates list of migrations on the plugin overview page and a
standalone `/migrations` page.

To add sample code changes for a migration that has an implementation
file, create a `.md` file with the same name as the implementation file
in the same folder as the implementation file. i.e.
`move-cache-directory.md` for `move-cache-directory.ts`.

Migrations that have `packages` defined will have a table generated with
the package updates listed.

Separate PRs will be created to add sample code changes for each
migration with an implementation.

The migration list on the plugin overview page: [Angular
migrations](https://nx-dev-git-docs-migration-details-nrwl.vercel.app/nx-api/angular#migrations)
Standalone migration list page: [Angular
migrations](https://nx-dev-git-docs-migration-details-nrwl.vercel.app/nx-api/angular/migrations)
Sample migration with added markdown file details:
[17.0.0-move-cache-directory](https://nx-dev-git-docs-migration-details-nrwl.vercel.app/nx-api/nx#1700movecachedirectory)
Sample migration with only package updates: [Angular
20.4.0](https://nx-dev-git-docs-migration-details-nrwl.vercel.app/nx-api/angular#2040packageupdates)
Sample migration without any markdown file details:
[update-angular-cli-version-19-1-0](https://nx-dev-git-docs-migration-details-nrwl.vercel.app/nx-api/angular#updateangularcliversion1910)
- This last sample is very bare-bones and the reason why we need these
pages in the first place. People don't know what migrations are actually
doing. Follow up PRs will address pages like this.
2025-01-27 13:17:36 -05:00
Jack Hsu
42d9e8bcb3
feat(web): add support for TS solution setup for @nx/web (#29583)
This PR adds the new TS setup support to `@nx/web:app` generator.
Previously it errored out since it was not handled.

## Current Behavior
Cannot generate webapp in new setup/

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Can generate webapp in new setup

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

Fixes #
2025-01-10 13:52:36 -05:00
Aidan Temple
f98ae78734
feat(web): support custom cors headers (#29382)
## Current Behavior

It is not possible to pass custom cors headers to the
`@nx/web:file-server` executor despite `http-server` supporting it.

## Expected Behavior

`@nx/web:file-server` should pass-through a string of custom cors
headers to `http-server`.

## Related Issue(s)
2025-01-09 11:59:46 +01:00
Leosvel Pérez Espinosa
dc67660fec
fix(misc): update artifact generator option descriptions and cleanup leftovers (#29077)
- Update artifact generator schemas:
- Clarify `path` is the artifact file path relative to the current
working directory
  - Clarify `name` is the artifact symbol name
- Remove prompt for `name` and remove it from the important options
(won't be displayed by default in Nx Console generation UI, it will be
part of the collapsed options) given that most of the time, it's meant
to match the filename (last segment of the `path`)
- Remove some leftover options related to the name and path formats that
were previously missed
- Fix an issue with NestJS generators
- Fix an issue with Next `page` 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 -->

## Expected Behavior
<!-- This is the behavior we should expect 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-11-28 09:44:44 -05:00
Jack Hsu
27edf71cef
feat(misc): make directory a required option for generators (#28093)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/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: Colum Ferry <cferry09@gmail.com>
Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
2024-10-01 09:29:44 -04:00
Jack Hsu
8fa7065cf1
docs(misc): update generator examples to use new directory/path positional args (#28144)
This PR updates examples in `.md` files (both docs and blog posts) to
use positional args. Nx 20 changes the position arg to be either
`directory` for apps/libs or `path` for artifacts (e.g. components).

So before you'd do this:

```
nx g app myapp --directory=apps/myapp
nx g lib mylib --directory=libs/mylib
nx g lib mylib --directory=libs/nested/mylib
nx g lib @acme/foo --directory=libs/@acme/foo --importPath=@acme/foo
nx g component foo --directory=libs/ui/src/foo --pascalCaseFiles
```

Will now be simplified to

```
nx g app apps/myapp
nx g lib libs/mylib
nx g lib libs/nested/mylib
nx g lib libs/@acme/foo # name and import path are both "@acme/foo"
nx g component libs/ui/src/foo/Foo
```

For cases where `name` and `importPath` need to be changed, you can
always manually specify them.

```
nx g lib libs/nested/foo # name is foo
nx g lib libs/nested/foo --name=nested-foo # specify name with prefix
nx g lib libs/@acme/foo --name # use "foo" as name and don't match importPath
nx g lib libs/@internal/foo --importPath=@acme/foo # different importPath from name

<!-- 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-30 13:20:10 -04:00
Jack Hsu
85877e3e18
feat(react): make vitest the default test runner since it supports ESM and different moduleResolution better (#28153)
This PR updates the default test runner for React/Web apps to be
`vitest`. It aligned better with our emphasis on modern tooling, and the
lack of ESM and proper TS support (using `module` other than `commonjs`)
in Jest makes it hard to use in some workspaces.

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/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-30 09:00:01 -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
Nicholas Cunningham
d289134bb0
fix(web): Add strict mode for @nx/web (#23497) 2024-05-17 20:29:32 +04:00
James Henry
c560b2bba6
Revert "fix(web): Add strict mode" (#23472)
Reverts nrwl/nx#23457
2024-05-17 15:05:29 +02: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
Colum Ferry
739e2e7115
feat(testing): make playwright default e2e test runner option (#22511) 2024-04-23 11:27:09 -04:00
Colum Ferry
29c80a33de
fix(web): spa flag should correctly define redirect (#22487) 2024-03-26 16:51:03 +00: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
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
beeman
a9974d3f25
docs(misc): change http:// to https:// (#19534) 2024-01-30 11:33:13 -05:00
Aditya Mathur
dd5f3c8d17
docs(misc): standardize all the install commands with different pm (#21226) 2024-01-19 15:21:42 +01:00
Emily Xiong
6141f44203
feat(core): add keepExistingVersions to all packages (#21169) 2024-01-17 14:22:58 -05:00
Leosvel Pérez Espinosa
047dc22aed
cleanup(misc): clean up init generators (#21088) 2024-01-16 15:29:44 +01:00
Colum Ferry
a73e9fd562
feat(module-federation): use single file-server for static remotes (#20006) 2023-11-10 11:25:09 -05:00
Isaac Mann
4d1e0bd7e9
docs(core): deprecation for nameAndDirectoryFormat (#19861) 2023-10-31 10:13:17 -04:00
Isaac Mann
cc8d8e8f4c
docs(core): deprecate workspaceLayout (#19767) 2023-10-23 11:55:34 -04:00
Katerina Skroumpelou
3df85295a1
fix(react): respect unitTestRunner none and inform about vitest (#19676) 2023-10-18 16:29:29 -04:00
Isaac Mann
d1fe398ea0
docs(core): packages to api (#19281) 2023-09-22 14:24:35 -04:00
Isaac Mann
4f3988cb2c
docs(core): sync nx package versions (#18973) 2023-09-08 08:25:19 -04:00
Isaac Mann
c2c664a055
docs(core): add directory flag to all project generators (#18977) 2023-09-07 09:36:25 -04:00
Isaac Mann
1ac034ba60 docs(core): move package recipes 2023-08-25 14:32:13 +02:00
Leosvel Pérez Espinosa
6640c32748
feat(web): use helper to determine project name and root in application generator (#18737) 2023-08-22 15:25:33 +01:00
Caleb Ukle
27923fd2d8
feat(web): add playwright e2eTestRunner option (#18284) 2023-08-01 10:53:06 -04:00
Jack Hsu
08339ee49f
feat(js): do not generate root babel.config.json for babel projects (#17289) 2023-06-06 15:45:33 -04:00
Isaac Mann
afa5eb59fa
docs(core): document the @nrwl => @nx rescope (#16403)
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2023-04-27 18:14:59 -04:00
Jack Hsu
ae8c47b75a
feat(web): expose cache, compression options for file-server (#16546)
Co-authored-by: Ryan Diehl <rydiehl@cisco.com>
2023-04-25 13:32:46 -04:00
Miroslav Jonaš
cafb49ac84
feat(core): remove @nrwl/workspace:lib (#16122) 2023-04-12 15:28:09 -04:00
Emily Xiong
3eede1c7de
feat(react): deprecate styl from react and next for 17 (#16135) 2023-04-12 08:23:13 -04:00
Colum Ferry
597832e88f
fix(angular): use @nrwl/web:file-server (#15849) 2023-03-27 09:42:53 +01:00
Jack Hsu
e772ee22bd
feat(web): remove hard dependencies on cypress, rollup, jest, and linter (#15797) 2023-03-21 11:46:12 -04:00
Caleb Ukle
3a4b108dd8
feat(web): add a generator to add @nrwl/web:file-server target (#15434) 2023-03-07 13:09:57 -06:00
Craigory Coppola
73bc2e1c91
fix(bundling): libs generated with @nrwl/js:lib --bundler rollup should build (#15179) 2023-02-22 17:05:04 -05:00
Emily Xiong
a97212b601
feat(core): move tsconfig.base.json to @nrwl/js:init (#14467) 2023-02-16 11:17:30 -05:00
Chau Tran
d0c978e898
docs(web): add prioritize flags to web packages (#14281) 2023-02-01 08:20:57 -06:00
Jack Hsu
d7536aa7e3 feat(core): clean up workspace configuration code 2023-01-23 19:35:15 -05:00
Jack Hsu
fcc02d1932
feat(webpack): remove support for legacy browsers (#14190) 2023-01-09 12:15:37 +02:00
Caleb Ukle
e96dfe575a
fix(web): dynamic default unitTestRunner based on bundler for @nrwl/web:app (#14188)
Fixes https://github.com/nrwl/nx/issues/14167
2023-01-06 10:36:46 -06:00
Benjamin Cabanes
19fd40ddc7
docs(nxdev): refactor docs sources generation and app consumption (#13834) 2022-12-19 18:59:50 +00:00