Skip to content

Commit

Permalink
fix(core): not install cypress when e2e is playwright for react mono…
Browse files Browse the repository at this point in the history
…repo preset (#28642)

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

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

Fixes #

Co-authored-by: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
  • Loading branch information
2 people authored and jaysoo committed Oct 31, 2024
1 parent 90b10c9 commit 2634804
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/workspace/src/generators/new/generate-preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ function getPresetDependencies({
dependencies: {},
dev: {
'@nx/react': nxVersion,
'@nx/cypress': e2eTestRunner !== 'none' ? nxVersion : undefined,
'@nx/cypress': e2eTestRunner === 'cypress' ? nxVersion : undefined,
'@nx/playwright':
e2eTestRunner === 'playwright' ? nxVersion : undefined,
'@nx/jest': bundler !== 'vite' ? nxVersion : undefined,
'@nx/vite': bundler === 'vite' ? nxVersion : undefined,
'@nx/webpack': bundler === 'webpack' ? nxVersion : undefined,
Expand Down
1 change: 0 additions & 1 deletion packages/workspace/src/generators/new/new.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ describe('new', () => {
const { devDependencies } = readJson(tree, 'my-workspace/package.json');
expect(devDependencies).toStrictEqual({
'@nx/react': nxVersion,
'@nx/cypress': nxVersion,
'@nx/vite': nxVersion,
'@nx/workspace': nxVersion,
nx: nxVersion,
Expand Down

0 comments on commit 2634804

Please sign in to comment.