40 Commits

Author SHA1 Message Date
James Henry
7b85d912ba
feat(release): revamped nx release version implementation (#30418) 2025-04-08 18:17:19 +04: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
Leosvel Pérez Espinosa
db47dc30a5
feat(js): support esbuild and swc bundlers with the new ts solution config setup (#28409)
<!-- 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-10-14 09:30:43 +02: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
Leosvel Pérez Espinosa
49c5a73cd0
feat(js): generate experimental simplified library with ts solution setup (#27910)
<!-- 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-09-27 14:14:19 -04: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
Leosvel Pérez Espinosa
c92528f65d
feat(misc): remove derived generator paths (#27714)
<!-- 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: Nicholas Cunningham <ndcunningham@gmail.com>
2024-09-23 09:19:42 -04:00
Jack Hsu
d39624cbb1
feat(js): @nx/js:init generator does not generate prettier and tsconfig.base.json files by default (#27406)
In order to use `nx release` you must run `nx add @nx/js`. However, the
init generator will add Prettier and `tsconfig.base.json` files by
default, which is not what the user wants.

This PR adds two options:
- `addTsConfigBase` - generates `tsconfig.base.json` when `true`.
Default to`false`
- `setUpPrettier` - adds `prettier` and generates `.prettierrc` and
`.prettierignore` files when `true`. Defaults to `false`.

The programmatic `initGenerator` API defaults both options to `true` to
usages remain unaffected.

The one behavior change is if users run `nx g @nx/js:init` then the two
options default to `false`. However, since this is an internal API, the
actual usages should be through `nx add` or the programmatic API.



<!-- 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-08-14 09:08:56 -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
Austin Fahsl
b2855fd6e1
feat(release): add support for version plans (#23190) 2024-06-04 16:44:28 +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
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
Philip Fulcher
810a3b5259
docs(release): adjust description for preid to be more clear (#22569) 2024-04-14 19:26:54 +04:00
Austin Fahsl
38179ad278
feat(js): replace publish script with nx release config (#21474) 2024-03-05 17:53:07 -05:00
beeman
a9974d3f25
docs(misc): change http:// to https:// (#19534) 2024-01-30 11:33:13 -05:00
Emily Xiong
6141f44203
feat(core): add keepExistingVersions to all packages (#21169) 2024-01-17 14:22:58 -05:00
Isaac Mann
4d1e0bd7e9
docs(core): deprecation for nameAndDirectoryFormat (#19861) 2023-10-31 10:13:17 -04:00
Katerina Skroumpelou
7942ea3c83
feat(js): skipPackageJson in js lib generator (#19821) 2023-10-26 12:53:02 -04:00
Austin Fahsl
dbb73aa2eb
feat(release): add 'git-tag' currentVersionResolver and conventional commits support (#19267)
Co-authored-by: James Henry <james@henry.sc>
2023-10-26 11:52:49 +03:00
Isaac Mann
cc8d8e8f4c
docs(core): deprecate workspaceLayout (#19767) 2023-10-23 11:55:34 -04:00
James Henry
9116c29c18
feat(core): initial implementation of nx release (#19110)
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2023-09-18 15:11:44 -04:00
Isaac Mann
c2c664a055
docs(core): add directory flag to all project generators (#18977) 2023-09-07 09:36:25 -04:00
Leosvel Pérez Espinosa
730260320d
feat(js): provide a new way of generating project name and root directory for libraries (#18420) 2023-08-10 13:30:46 -04:00
Jack Hsu
8d5ef222cc
feat(testing): add support for additional environment options when generating vite config (#17560) 2023-06-13 13:30:52 -04:00
Jack Hsu
edf0b1ce20
feat(js): add setup-build generator for JS packages (#17523) 2023-06-12 12:38:26 -04:00
Jack Hsu
20359e77a6
fix(js): mark importPath option as important since it is required for publishable libs (#17509) 2023-06-09 10:21:12 +03:00
Emily Xiong
be2ccb802e
feat(js): add verdaccio executor (#16928) 2023-05-25 11:10:16 -04:00
Caleb Ukle
ad841c9048
docs(repo): update docs/schemas to use nx scoped packages - nx labs (#16865) 2023-05-09 08:30:52 -05: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
Ashley Hunter
fbf8d9c99f
feat(js): adding simpleName option to library generator (#16025) 2023-04-27 11:28:34 -04:00
Katerina Skroumpelou
16ad3086be
fix(js): libraries should be buildable by default (#15533) 2023-03-09 14:20:19 -05:00
Phillip Barta
8c1d035b0b
feat(js): added a minimal option to the library generator (#13561) 2023-03-03 19:32:57 +00:00
Katerina Skroumpelou
b84125f9dd
fix(js): integrate buildable bundler and compiler options (#15376) 2023-03-03 09:56:57 -05:00
Jason Jean
fa6e8ea987
fix(js): refactor ensurePackage (#15074) 2023-02-22 18:47:40 -05:00
Nicholas Cunningham
eb977bfd6c
fix(js): default build should work when rollup is selected (#14971) 2023-02-22 10:32:26 -07:00
Jack Hsu
71fd015f3d
fix(js): do not generate tsconfig.base.json when creating standalone projects (#15099)
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2023-02-17 20:43:03 -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
79994e9ee4
docs(js): add x-priority flags to js executors and generators (#14261) 2023-01-30 11:57:53 +01:00
Benjamin Cabanes
19fd40ddc7
docs(nxdev): refactor docs sources generation and app consumption (#13834) 2022-12-19 18:59:50 +00:00