1208 Commits

Author SHA1 Message Date
Colum Ferry
e38830415f
docs(remix): update the plugin overview to match the latest iteration of the plugin #26943 (#26977)
<!-- 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 information on the Remix Plugin Overview is out of date.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The information should be up to date

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

Fixes #26943
2024-07-18 14:36:36 +01:00
Leosvel Pérez Espinosa
58ba1ffc6d
feat(angular): support angular v18.1.0 (#26504)
<!-- 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 -->

Angular v18.1.0 is not supported.

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

Angular v18.1.0 should be supported.

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

Fixes #
2024-07-11 11:17:00 -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
LongYinan
981eb30a0f
feat(core): support compile to wasi target (#22870)
This pull request is trying to add wasm32-wasi target support for the
nx/native

To test the build, you can run the following commands:

- `rustup target add wasm32-wasip1-threads`
- `pnpm exec napi build --release --platform --package-json-path
packages/nx/package.json --manifest-path packages/nx/Cargo.toml --js
./native-bindings.js -o packages/nx/src/native --target
wasm32-wasip1-threads`

And the wasm file will be built at
packages/nx/src/native/nx.wasm32-wasi.wasm

Blocked by:

- Support @napi-rs/cli 3.0  Cammisuli/monodon#48
- https://github.com/napi-rs/napi-rs/issues/2009

The pseudo_terminal mod is excluded on the wasm32 targets, which is as
expected.

The watch mod is excluded because of the upstream `watchexec` deps
introduced by ignore-files don't support the wasi target at this moment
(but we can improve it).

## Related Issues
Fixes https://github.com/nrwl/nx/issues/21860
Fixes https://github.com/nrwl/nx/issues/23821

---------

Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2024-07-05 15:55:35 -04:00
Jack Hsu
31989c4d1e
docs(core): clean-up outdated content from docs and CNW readme (#26748)
This PR:

1. Removes the `{{getting-started}}` template string from [CNW
README.md](https://www.npmjs.com/package/create-nx-workspace), which was
removed before from generation but this file missed an update.
2. Updates docs for `run-scripts` to show `project.json` examples, not
`workspace.json` (we link to this from PDV and it's very awkward).
3. Removes unused run-script and run-commands example files from
`packages/workspace/docs`. These were moved to `packages/nx/docs` but
somehow the old files remained even though they aren't used.
4. Updates host/remotes React generators to mention `nx.json` not
`workspace.json`. The option is already renamed `--skipNxJson` but the
description does not match.

<!-- 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-28 11:15:44 -04:00
Uzhanin Egor
df83dd4c6e
feat(core): added the ability to split command property into an array in nx:run-commands executor (#20201)
<!-- 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

In projects, you can often find teams that are too long. Example here:

```json
 "run:dev": {
    "executor": "nx:run-commands",
    "options": {
      "command": "docker compose -f .docker/compose/docker-compose.services.yml -f .docker/compose/docker-compose.dev.yml --project-directory . up -d"
    },
    "dependsOn": ["update:dev"]
  }
```
## Expected Behavior

Implemented splitting of the 'command' parameter, added the ability to
pass it as an array to avoid such *huge* strings:

```json
"run:dev": {
    "executor": "nx:run-commands",
    "options": {
      "command": [
	"docker compose -f",
        ".docker/compose/docker-compose.services.yml -f",
	".docker/compose/docker-compose.dev.yml",
	"--project-directory . up -d"
      ]
    },
    "dependsOn": ["update:dev"]
  },
```
Added a couple of tests and changed schema.json to 'run-commands'
executor.
2024-06-27 12:47:27 -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
dfr-exnaton
0ca7df7495
feat(nextjs): add experimental-build-mode option to support compile only (#26465)
## Current Behavior

The nextjs build executor does not support all build flags such as
`--experimental-build-mode` (see
https://nextjs.org/docs/app/api-reference/next-cli#build).

## Expected Behavior

For certain deployment models (e.g. mult-environment builds), it is
helpful to only compile but not generate pages at build time. See
https://github.com/vercel/next.js/discussions/46544 for a discussion.

---------

Co-authored-by: Emily Xiong <xiongemi@gmail.com>
Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>
2024-06-26 14:54:49 -06:00
Katerina Skroumpelou
d928558bc4 feat(nx-cloud): updates to the new onboarding flow 2024-06-26 07:50:30 -07:00
Leosvel Pérez Espinosa
d3383caad3
fix(testing): accept a numeric value for the playwright executor's workers option (#26689)
<!-- 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 #26437
2024-06-26 10:08:39 -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
Nicholas Cunningham
c467129758
fix(nest): Add missing props (#26534)
Add missing props back to the schema so that they can be
defaulted/overwritten.


closes: #26384
2024-06-17 06:23:11 -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
Emily Xiong
c02eeac7c2
feat(core): extend option readyWhen to accept multiple strings (#26426)
<!-- 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 -->
this pr is meant to replace https://github.com/nrwl/nx/pull/17310
Option readyWhen for nx:run-commands only accepts a single string.

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

Option readyWhen for nx:run-commands accepts either a single string or
an array of strings. In case the provided value is an array of strings,
we will wait until all strings have appeared in stdout or stderr.

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

Fixes #

Co-authored-by: Karel Frederix <karelfrederix@gmail.com>
2024-06-12 16:40:34 -04:00
James Henry
2ba4cf23f6
fix(release): ensure given preid modifies conventional commits specifier (#26524) 2024-06-12 14:23:49 -04:00
Emily Xiong
471f82c991
fix(js): remove default port for verdaccio (#26502)
<!-- 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
-->
- remove default port for verdaccio so it can take port from config file

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

Fixes https://github.com/nrwl/nx/issues/23007
2024-06-12 10:06:49 -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
Colum Ferry
926d140d08
docs(module-federation): clarify --skipRemotes option #23574 (#26443)
<!-- 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 -->
Remotes not in the workspace are now skipped automatically. The
`--skipRemotes` option is now used to intentionally skip remotes in the
workspace that are served by other means

## 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 #23574
2024-06-07 13:01:15 -04:00
Nicholas Cunningham
9eebe4980a
feat(node): Add output path to setup docker (#26365)
This PR updates how we generate a DockerFile for inferred and non
inferred projects.

Now you need to provide a output path.
2024-06-06 10:42:50 -06: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
Nathanael
a01ddcea11
feat(testing): cypress autoCancelAfterFailures (#26281)
Pass autoCancelAfterFailures to cypress executor

Fixes #26264

---------

Co-authored-by: Nathanael Smith <nathanael.smith@hilton.com>
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2024-06-05 17:33:27 +02: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
Greg Westneat
260562e484
feat(expo): update expo sync-deps executor (#26086)
## Current Behavior

When running `@nx/expo:sync-deps` it includes many unexpected
dependencies.

If you add a backend project as an implicit dependency to the expo
project, then all of the backend project's dependencies are included in
the expo package.json when running `@nx/expo:sync-deps`

You can use the `exclude` option, but with hundreds of excluded
packages, this adds a lot of bloat to the targets in `project.json`

## Expected Behavior

Ideally, when using `sync-deps` as a part of the `build`, only packages
necessary in the context of the `build` would be synced.

Since the packages from `implicitDependencies` aren't typically relevant
to the expo build, we should optionally be able to not include them.

## Notes

### Default Value

I made the default `excludeImplicit: false` so that it doesn't diverge
from current behavior/expectations — but it's possible that it would
make more sense to have it be `true` by default — would defer to y'all
on that question.


## Additional Considerations

### Other Possible Options 


> [!NOTE]
> Let me know if you're interested in PRs to add any of these


<details>
  <summary>Other Possible Options</summary>

Here are some other options which might be worth considering.

- [x] `excludeImplicit` <- _added in this PR_
- [ ] `onlyNativeDependencies`*
- [ ] `onlyPodInstallDependencies`*
- [ ] `traceDependencyPaths`**
- [ ] `excludeDevDependencies`***
- [ ] `matchRootPackageJsonCatgeory`***
- [ ] `onlySrcFiles`****
- [ ] `filterByCacheInputs`****


#### Only Native / Pod Installs*
Based on the discussion in issue #18788 it seem like the primary reason
for `sync-deps`, is to support pod install.

#### Trace Dependency Paths**

When I was originally debugging "why is axios being added?" — before I'd
realized about the `implicitDependencies` — I wrote a utility to output
the trace for the included packages — that's how I realized what was
going on. Could be a useful feature addition.


![image](https://github.com/nrwl/nx/assets/2213636/e1cb1511-c518-47d8-85fb-69c6a6d88058)


#### Deps vs DevDeps***

By default, the `sync-deps` feature will find all dependencies
including(eg jest, storybook) and add them to `package.json` under the
`"dependencies":` key.

It might be useful to either match the root `package.json`'s
categorization or just exclude devDependencies altogether.

#### File aware filtering****

Currently the `findAllNpmDependencies` is filtering some hardcoded
external nodes:
```
  'npm:@nx/react-native',
  'npm:@nrwl/react-native',
  'npm:@nx/expo',
  'npm:@nrwl/expo',
```
These are in the dependency graph because they are used as executors in
`project.json` targets.

It might be useful to derive these exclusions dynamically, by only
considering relevant productions files.

A simple approach would be to only consider dependencies that stem from
files in the `src` directory

A more robust alternative would be to read the cache inputs from the
calling target, and filter dependencies based on matching files

</details>

### Fingerprinting?

<details>
  <summary>Fingerprinting</summary>

There's a related matter having to do with `@expo/fingerprint` where
having the native dependencies visible from the project-level
`package.json` is important to getting accurate project-level
fingerprints.

The more ideal solution would be to use the Nx graph to handle the
"fingerprinting" hash generation, but it would require some thought /
feature design.

So in the meantime the `sync-deps` (only need native deps) +
`@expo/fingerprint` recourse seems like the best option.

</details>

Thanks!
2024-06-05 01:04:10 -04:00
Craigory Coppola
5e39cb0019
feat(core): allow partially resetting workspace (#23381) 2024-06-04 18:55:10 -04:00
Michal Jez
6d2e7cd2cf
feat(nx-plugin): update executor generator to have context (#16982)
Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>
2024-06-04 17:49:50 -04:00
Craigory Coppola
dd6eda84b0
feat(devkit): allow to customize overwrite mode in generateFiles (#26354)
Adds a new capability to choose how to handle already existing target
files when using a generator.

See #17925

Co-authored-by: Michael Monerau <micmo@qontrol.io>
2024-06-04 16:12:15 -04:00
Austin Fahsl
b2855fd6e1
feat(release): add support for version plans (#23190) 2024-06-04 16:44:28 +04:00
Craigory Coppola
6f223005b8
fix(misc): ensure plugins are not creating workspace context while creating nodes (#26253) 2024-05-31 18:54:56 -04:00
Craigory Coppola
a308e1dc6b
fix(core): prevent graph output from being truncated (#23446)
<!-- 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
--graph stdout and --file stdout aren't documented. When printing graph
to stdout, its possible for some output to get missed.

## Expected Behavior
Existing flags are documented, and `--print` is more discoverable. We
await stdout finishing before exiting the program.

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

Fixes #18689
2024-05-31 18:05:26 -04:00
Craigory Coppola
a5682d1ca5
feat(core): add create nodes v2 for batch processing config files (#26250) 2024-05-30 15:28:59 -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
Alice Kile
e32b81961f
docs(core): elaborate output-style option (#23521)
<!-- 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 -->

`output-style` option's potential values are not explained.

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

add description to `output-style` option's potential values

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

Fixes #20159


![image](https://github.com/nrwl/nx/assets/5159834/15406dcf-80c3-444c-881a-268fcf9704e5)
2024-05-27 11:47:53 -04:00
Leosvel Pérez Espinosa
e80edfe543
docs(angular): add angular 18 to nx and angular compatibility version docs (#23905)
https://nx-dev-git-docs-update-nx-ng-matrix-nrwl.vercel.app/nx-api/angular/documents/angular-nx-version-matrix

<!-- 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. -->
<!-- NXP-757 -->

Fixes #
2024-05-25 14:51:20 -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
Leosvel Pérez Espinosa
881adfb185
docs(misc): replace angular.io links with angular.dev (#25831)
[Angular.dev](https://angular.dev/) is now the new home for Angular
developers as mentioned in the [Angular 18 release blog
post](https://blog.angular.dev/angular-v18-is-now-available-e79d5ac0affe).

<!-- 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 NXP-759 -->

Fixes #
2024-05-23 15:58:53 +02: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
Isaac Mann
aedea54624
chore(nx-dev): check for broken anchor links (#23580)
Checks for broken anchor links, except for links that go to `/nx-api` or
`/blog`
Fixes existing broken anchor links
2024-05-21 09:31:37 -04:00
Jack Hsu
53345f2241
fix(nextjs): additional experimental HTTPS options (#23334)
There are three additional flags if user wishes to generate their own
key, cert, ca files rather than the auto-generated ones by Next.js.



## Current Behavior
Cannot pass additional CLI options.

## Expected Behavior

Can  pass additional CLI options for custom files.

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

Closes https://github.com/nrwl/nx/discussions/23331
2024-05-17 14:50:47 -04:00
Nicholas Cunningham
d289134bb0
fix(web): Add strict mode for @nx/web (#23497) 2024-05-17 20:29:32 +04:00
Jason Jean
443df168c5
docs(core): update node compatibility table (#23443)
<!-- 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 node compatibility table does not have v19 listed.

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

Node compatibility table has v19 listed with Node v22 supported.

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

Fixes #
2024-05-17 10:02:04 -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
castleadmin
7f32d8643d
feat(bundling): added support for declarations (*.d.ts) (#21084)
<!-- 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
esbuild doesn't support the creation of declaration files (*.d.ts) and
probably never will (see https://github.com/evanw/esbuild/issues/95).
Since declaration files are essential for published libraries,
it would be great if @nx/esbuild:esbuild would provide an option to
output them.

## Expected Behavior

- Introduced a new boolean valued `declaration` option for the `esbuild`
executor
- If `declaration` or the tsconfig option
[declaration](https://www.typescriptlang.org/tsconfig#declaration) is
true,
then the TypeScript compiler is used before esbuild to generate the
declarations
- The output directory structure of the declarations can be influenced
by setting the TypeScript rootDir via the `declarationRootDir` option

## Related Issue(s)
https://github.com/nrwl/nx/issues/20688

### Additional Comment
Please note that the generated declaration files directory structure is
affected by the tsconfig `rootDir` property.

For a library that doesn't reference other libraries inside the
monorepo, the `rootDir` property can be changed freely.
If a library inside the monorepo is referenced the `rootDir` property
must be set to the workspace root.

The `tsc` executor has a sophisticated check that automatically sets the
`rootDir` to the workspace root if a library is referenced.

https://github.com/nrwl/nx/blob/master/packages/js/src/executors/tsc/tsc.impl.ts#L104

This check is quite complex and specific to the `tsc` executor options.
Therefore, it hasn't been included inside the esbuild implementation.

The current implementation leaves it to the user to solve the edge case
by removing the `declarationRootDir` option or by setting the
`declarationRootDir` to `.`.

In the future, it might make sense to generalize and use the `tsc`
executor check.
2024-05-16 17:16:43 +03:00