12324 Commits

Author SHA1 Message Date
Phillip Barta
e9bf1a2acb
chore(misc): remove unused dependency tar-fs (#23421)
<!-- 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 -->
unused dependency `tar-fs`

## 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-16 11:28:28 -04:00
Katerina Skroumpelou
f0bfb56fae
fix(js): fix update package.json (#21415)
Co-authored-by: xiejay97 <xiejay97@gmail.com>
2024-05-16 18:13:38 +03:00
Jonathan Cammisuli
62274c958e
chore(core): fix cargo build warnings (#23436) 2024-05-16 11:01:56 -04:00
MaxKless
c7f60fcf54
fix(graph): reload graph app only when hash changes in watch mode (#23434) 2024-05-16 10:23:53 -04: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
James Henry
24060dc650
chore(repo): prepopulate verdaccio storage for e2e-ci (#23429) 2024-05-16 10:06:25 -04:00
Colum Ferry
b164569e9d
docs(angular): bring incremental build docs up to date (#23424)
<!-- 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 incremental build docs for angular are currently outdated


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Bring the incremental build docs up to date


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

Fixes #
2024-05-16 11:24:07 +01:00
Colum Ferry
34547b30d1
fix(angular): libraries should not contain tslib by default #21023 (#23423)
<!-- 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 -->
When generating buildable and publishable angular libraries, we always
add `tslib` to the `package.json#dependencies`.
These libaries may not actually use this dependency and therefore it is
redundant.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Do not add `tslib` by default.
If users need it, they can add it when they do.

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

Fixes #21023
2024-05-16 11:23:55 +01:00
Jason Jean
d581cef194
chore(js): update verdaccio to 5.30 (#23413)
<!-- 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 repo uses `verdaccio@5.14.4`

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

This repo uses `verdaccio@5.30.0`

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

Fixes https://github.com/nrwl/nx/issues/20151
2024-05-15 17:12:12 -04:00
Nicholas Cunningham
efdfb694f2
fix(js): Respect loose option provided from config (#23406)
closes: #21937
2024-05-15 14:05:17 -06:00
Craigory Coppola
425d442d44
feat(core): default show to web view when in interactive terminal (#23358)
<!-- 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
`nx show projects` shows unformatted json by default

## Expected Behavior
In a TTY we open web view by default

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

Fixes #20650
2024-05-15 13:32:27 -04:00
Jonathan Cammisuli
74a2166ca8
docs(core): add documentation about custom steps for nx cloud workflows (#23385)
<!-- 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 documentation for creating custom steps for nx cloud agents

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
There is now a section dedicated to creating custom steps. 

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

Fixes #
2024-05-15 12:19:02 -04:00
Craigory Coppola
1acbc7e555
fix(core): retry interrupted errors when writing to stdout (#23359)
<!-- 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-15 10:57:07 -04:00
MaxKless
5ce53374c7
fix(core): copy native files to tmp file location instead of .nx/cache (#23375)
## Current Behavior
Currently, the `.node` files required to load native code are saved in
`.nx/cache`. This can cause different issues:
- users on windows sometimes experience errors during `nx reset` because
it's trying to delete the entire folder and some process is still
locking the file
- `@angular-eslint` users are seeing the `.nx/cache` folder in their
workspace since it uses `@nx/devkit`

## Expected Behavior
We want no errors and for noone to be bothered by the `.node` file. This
is why we move the `.node` file to a tmp location outside the workspace
instead of `.nx/cache`. We still make sure to delete it during `nx
reset` but throw no errors if that fails. It will simply be deleted by
the next invocation of `nx reset`.

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

Fixes https://github.com/nrwl/nx/issues/23224
2024-05-15 10:46:38 -04:00
Leosvel Pérez Espinosa
9af7386d61
fix(testing): check for project eslint config file in cypress and pla… (#23401)
…ywright configuration generators

<!-- 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 #21301
2024-05-15 10:45:36 -04:00
Colum Ferry
c8c1304738
chore(gradle): use -version when logging java version in e2es (#23372)
<!-- 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 -->
Java 9 has changed the version flag to single `-`
Our e2es are trying to use `--`


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


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

Fixes #
2024-05-15 10:16:42 -04:00
MaxKless
5221103242
fix(graph): properly remove <base> tag when generating static graph file (#23399) 2024-05-15 15:31:48 +02:00
Leosvel Pérez Espinosa
c4343948ca
fix(testing): ignore jest-sequencer- paths in jest resolver (#23396)
<!-- 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 #20865
2024-05-15 14:45:07 +02:00
Barry Michael Doyle
38a947f7f8
docs(nx-dev): update define-environment-variables.md changed NX_ to… (#23397)
## Current Behavior
Incorrect environment variable prefix `NX_` in docs.

## Expected Behavior
Correct environment variable prefix `NX_PUBLIC_` in docs.

## Related Issue(s)
https://github.com/nrwl/nx/issues/23362
2024-05-15 12:32:16 +02:00
Emily Xiong
a2a7d7eaf7
fix(core): fix eslint --help command (#23274)
<!-- 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-14 21:53:58 -04:00
Jason Jean
722b2d0fac
fix(core): fix affected detection for inputs after named inputs (#23354)
<!-- 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 -->

Inputs after named inputs are not considered for affected.

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

Inputs after named inputs are considered for affected...

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

Fixes #
2024-05-14 20:23:50 -04:00
Jason Jean
09fd1bbd0c
chore(core): fix failing unit test (#23392)
<!-- 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 -->

Getting inputs sometimes may cause Nx to panic

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

Getting inputs will return an error rather than panic which should come
along with stack traces.

Also, a test which sometimes.. triggered the panic... is maybe fixed?

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

Fixes #
2024-05-14 18:51:14 -04:00
Jason Jean
cfadd7d8cf
Revert "fix(core): addPlugin should not conflict on project.json targ… (#23391)
…ets (#23264)"

This reverts commit 85c89160

<!-- 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-14 18:01:30 -04:00
castleadmin
e28d872bf6
chore(core): nx plugin submission nx-serverless-cdk (#21085)
<!-- 
_[Please make sure you have read the submission guidelines before
posting an
PR](https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#submit-pr)_

# Community Plugin Submission

Thanks for submitting your Nx Plugin to our community plugins list. Make
sure to follow these steps to ensure that your PR is approved in a
timely manner.

## Plugin Requirements

Before you submit your plugin to be listed in our registry, it needs to
meet the following requirements:
- Run some kind of automated e2e tests in your repository
- Include `@nx/devkit` as a `dependency` in the plugin's `package.json`
- List a `repository.url` in the plugin's `package.json`

i.e.

```
{
  "repository": {
    "type": "git",
    "url": "https://github.com/nrwl/nx.git",
    "directory": "packages/web"
  }
}
```

Note: We reserve the right to remove unmaintained plugins from the
registry. If the plugins become maintained again, they can be
resubmitted to the registry.

## Steps to Submit Your Plugin
- Use the following commit message template: `chore(core): nx plugin
submission [PLUGIN_NAME]`
- Update the `community/approved-plugins.json` file with a new entry for
your plugin that includes `name`, `url`, `description`:

Example:

```json
// community/approved-plugins.json

[{
    "name": "@community/plugin",
    "url": "https://github.com/community/plugin",
    "description": "This plugin provides the following capabilities."
}]
```

Once merged, your plugin will be available when running the `nx list`
command, and will also be available in the Plugin Registry on
[nx.dev](https://nx.dev/plugin-registry)
-->

# Community Plugin Submission

## nx-serverless-cdk

nx-serverless-cdk is an Nx plugin for creating AWS CDK applications and
construct libraries inside an Nx monorepo.
It offers the possibility to test and debug infrastructure code and AWS
Lambda functions locally.
The plugin provides the full flexibility of the AWS CDK CLI and the
local AWS SAM CLI commands.
It aims to make the usage of these tools as easy as possible inside an
Nx monorepo.

Author: Tobias Willig
2024-05-14 16:12:55 -04:00
Jonathan Gelin
1393679932
Nx Plugin Submission @huge-nx/conventions (#23291)
HugeNx is a toolkit designed to dynamically generate and manage [Nx
workspaces](https://nx.dev/) by adhering to established workspace
conventions.


![image](https://github.com/nrwl/nx/assets/954509/5ff5153d-eae6-4d99-a9e7-0f3c21e35353)

More info: https://github.com/jogelin/huge-nx
2024-05-14 14:30:22 -04:00
Isaac Mann
6c0ba0ee3a
docs(core): local links should not use nx.dev (#23380)
Ensure that local links start with `/` instead of `https://nx.dev/`
2024-05-14 14:19:49 -04:00
Emily Xiong
9122b85616
fix(core): not load env files when NX_LOAD_DOT_ENV_FILES is false (#23231)
<!-- 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 #23090
2024-05-14 13:54:24 -04:00
Jason Jean
a25c2f6a81
chore(misc): fix failing remove unit tests (#23373)
<!-- 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-14 13:32:17 -04:00
Nicholas Cunningham
66b910644b
feat(nextjs): Update Next & Tailwindcss Package (#23313)
Update next.js to `14.2.4`
Update tailwindcss to `3.4.3`
closes: #22918
2024-05-14 10:33:47 -06:00
MaxKless
6c36bef06b
fix(core): read socket dir on demand & load .env files on client startup (#23348)
<!-- 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
The daemon doesn't correctly read the `NX_DAEMON_SOCKET_DIR` env
variable if it's set in `.env`.
Also, the `.env` files aren't loaded if the daemon client is imported &
used directly (like it is in Nx Console).


## Expected Behavior
The daemon should correctly read the `NX_DAEMON_SOCKET_DIR` variable
regardless of where it's specified and setting it shouldn't cause any
issues with Nx Console.

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

Fixes https://github.com/nrwl/nx-console/issues/2114
2024-05-14 11:09:31 -04:00
arekkubaczkowski
d4140b06fc
feat(react-native): add optional syncDeps param to storybook executor (#22032)
closed #22009

<!-- 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
storybook executor runs syncDeps automatically without option to disable
it

## Expected Behavior
as per #22009 we might need to disable syncDeps step at some
circumstances.
2024-05-14 10:09:10 -04:00
Piotr Kuczynski
7611671994
docs(release): add configure changelogs (#23324)
## Current Behavior
Documentation is missing

## Expected Behavior
Documentation should be there...

---------

Co-authored-by: Isaac Mann <isaacplmann@gmail.com>
2024-05-14 09:51:26 -04:00
Colum Ferry
88297dd727
fix(vite): migration should handle config object correctly #20921 (#23364)
<!-- 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 migration to update vite config is incorrectly matching other object
literal and arrow functions


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Ensure more accurate updating of vite config file

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

Fixes #20921
2024-05-14 14:21:22 +01:00
Colum Ferry
3e8496721d
fix(webpack): apply-base-config should initialize options it will set #23296 (#23368)
<!-- 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/webpack/plugin` will resolve and read webpack options from user
defined config files.
However, it does not set the env vars indicating that a task is being
run, because tasks are not being run at this stage.

This means that certain config properties are not being set by
`applyBaseConfig`.

Users' webpack configs may rely on these properties being set so they
can modify them.
When not set, this throws, meaning the graph cannot be constructed.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Initialize the properties that we usually set when `applyBaseConfig` is
used.


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

Fixes #23296
2024-05-14 14:19:47 +01:00
Colum Ferry
61b7549ba9
chore(repo): e2e matrix (#23363)
## Current Behavior
<!-- This is the behavior we have today -->
E2E Matrix is not running because python 3 on macos does not come with
required modules pre-installed

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Install the required python modules before running `pnpm install`

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

Fixes #
2024-05-14 10:44:29 +01:00
Nicholas Cunningham
cc9b7f3b39
Fix/nx dev header enterprise (#23355) 2024-05-13 20:47:36 -04:00
Denis Bendrikov
b5d477580e
fix(core): properly indent command output with mixed line endings (#23321)
<!-- 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
The command output is not indented when it has mixed line endings
(`crlf` and `lf`)


![image](https://github.com/nrwl/nx/assets/1770529/5f65e9c4-ded2-4fba-a6c8-9f22297b2b35)

## Expected Behavior

![image](https://github.com/nrwl/nx/assets/1770529/c8111456-407e-47af-8129-4efa6f5792ca)

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
2024-05-13 18:53:58 -04:00
Craigory Coppola
593790d471
fix(misc): guard against failure to decode file in migration (#23069)
<!-- 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
A migration in `nx` (escape-dollar-sing-env-variables) does not guard
against non utf-8 files, and can result in a crash during the migration
run.

## Expected Behavior
If it fails to parse a file, we'll log a message and keep going.

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

Fixes #22956
2024-05-13 16:34:59 -04:00
Craigory Coppola
897578676d
feat(core): support finding matching projects with only negative patterns (#22743)
<!-- 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
Passing `--projects !tag:someTag` would select 0 projects, since the
only pattern is negative

## Expected Behavior
Passing `--projects !tag:someTag` would select X projects, where X is
the number of projects without someTag.

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

Fixes #
2024-05-13 16:33:06 -04:00
Nicholas Cunningham
d879279fc1
fix(nextjs): Moving a library using @nx/workspace:move should update … (#23311)
## Current
When you using `@nx/workspace:move` after create a Next.js library the
server path remains unchanged.

## Expected
The server path is changed as well as the main entry point for the
library path.

Fixes: #20821
2024-05-13 12:48:27 -06:00
Colum Ferry
61255ce540
fix(js): copy assets handler should correctly handle assets on windows (#23351)
<!-- 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 -->
CopyAssetsHandler was not outputting the assets in the correct location
due to issues with `path/posix`.
`path/posix` is required for some areas of this code, like `minimatch`.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
`minimatch` ignores should continue to work as expected
assets should be output to the correct location

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

Fixes #
2024-05-13 19:44:53 +01:00
Jason Jean
461b901a38
fix(linter): fix migrating projects with the eslint plugin (#23147)
<!-- 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 -->

Creating a new project with ESLint is mistakenly creating a
`eslint.base.config.js`.

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

Creating a new project with ESLint only creates a
`eslint.base.config.js` file when the repo was originally standalone and
the second project is made.

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

Fixes #
2024-05-13 14:27:56 -04:00
Leosvel Pérez Espinosa
5fea49a980
fix(vite): generate vitest cache dir scoped to each project root and normalize vite cache dir (#23330)
- Update Vitest `cache.dir` to be scoped to each project root to avoid
collisions (same as what's already done for Vite)
- Normalize Vite `cacheDir` to avoid trailing `/.` paths for root
projects
- Fix Remix & Storybook Vite `cacheDir` generation 

<!-- 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 #21775
2024-05-13 14:14:43 -04:00
Isaac Mann
0bfd75f8b3
fix(nx-dev): move table of contents down (#23350)
Move the top of the table of contents down
2024-05-13 14:02:48 -04: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
Jack Hsu
99543b5a01
docs(core): update rescope message from Nx 19 to 20 (#23349)
<!-- 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-13 12:55:21 -04:00
Leosvel Pérez Espinosa
1a981f749e
fix(testing): resolve absolute paths for ts path mappings in jest resolver (#23346)
<!-- 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 #22617
2024-05-13 18:42:16 +02:00
Jason Jean
6f197e910c
fix(core): throw a specific error for print-affected and affected graph (#23336)
<!-- 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 -->

A non-descriptive error is thrown when using the recently removed
`print-affected` and `affected:graph` commands.

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

A descriptive error is thrown when using the recently removed
`print-affected` and `affected:graph` commands.

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

Fixes #
2024-05-13 12:04:03 -04:00
Jack Hsu
0f5e14ce2c
chore(repo): update deps to remove critical vulnerabilities (#23338)
The root `package.json` has two deps that resulting critical
vulnerabilities.

```
$ pnpm audit --audit-level=critical
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ critical            │ Cross-realm object access in Webpack 5                 │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ webpack                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=5.0.0 <5.76.0                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=5.76.0                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │                                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-hc6q-2mpp-qw7j      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ critical            │ Babel vulnerable to arbitrary code execution when      │
│                     │ compiling specifically crafted malicious code          │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ @babel/traverse                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <7.23.2                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=7.23.2                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │                                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-67hx-6x53-jw92      │
└─────────────────────┴────────────────────────────────────────────────────────┘
46 vulnerabilities found
Severity: 6 low | 26 moderate | 12 high | 2 critical
```

`webpack` is caused by outdated `@nestjs/cli`, which is now `^10.0.2` in
`packages/nest/src/utils/versions.ts`. `styled-components` is not needed
so is removed.

## 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-13 12:03:36 -04:00
Colum Ferry
85c8916087
fix(core): addPlugin should not conflict on project.json targets (#23264)
<!-- 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 -->
Calculating conflicts in target names does not consider if the
project.json defined targets will actually be impacted by the plugin
that wants to be added creating false negatives

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Calculating conflicts should be more accurate

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

Fixes #22476
2024-05-13 10:53:09 -04:00