Skip to content

fix(angular): install a compatible version of jest for angular#32744

Merged
leosvelperez merged 1 commit intomasterfrom
fix/nxc-3120
Sep 16, 2025
Merged

fix(angular): install a compatible version of jest for angular#32744
leosvelperez merged 1 commit intomasterfrom
fix/nxc-3120

Conversation

@leosvelperez
Copy link
Copy Markdown
Member

@leosvelperez leosvelperez commented Sep 16, 2025

Current Behavior

Generating Angular projects with Jest results in Jest v30 being used, which is not supported by Angular and causes peer dependency errors.

Expected Behavior

Generating Angular projects with Jest should install a compatible version of Jest (Angular currently supports ^29.5.0).

@leosvelperez leosvelperez self-assigned this Sep 16, 2025
@vercel
Copy link
Copy Markdown

vercel Bot commented Sep 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Sep 16, 2025 10:43am

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Sep 16, 2025

View your CI Pipeline Execution ↗ for commit 870a819

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 28m 28s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 2m 13s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 3s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 3s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗
nx documentation ✅ Succeeded 36s View ↗
nx affected -t e2e-macos-local --parallel=1 --b... ✅ Succeeded 38m 9s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-16 11:20:05 UTC

}
}
},
"21.3.5-jest": {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot change published versions, but with this change, if users migrate to the latest from a version lower than Nx v21.3.5, it will not bump the jest-preset-angular package.

I considered adding a migration to lower the version of jest-preset-angular (and Jest), but users in this situation are already handling it somehow, and it can get complex to revert some migration changes done for Jest v30.

},
"rename-test-path-pattern": {
"version": "21.3.0-beta.3",
"requires": {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was incorrectly requiring Jest v30. Regardless of the Jest version, we renamed the executor option from that version of Nx onwards, so we need the migration to run.

@leosvelperez leosvelperez merged commit 040d7d7 into master Sep 16, 2025
16 checks passed
@leosvelperez leosvelperez deleted the fix/nxc-3120 branch September 16, 2025 12:50
FrozenPandaz pushed a commit that referenced this pull request Sep 18, 2025
## Current Behavior

Generating Angular projects with Jest results in Jest v30 being used,
which is not supported by Angular and causes peer dependency errors.

## Expected Behavior

Generating Angular projects with Jest should install a compatible
version of Jest (Angular currently supports `^29.5.0`).

(cherry picked from commit 040d7d7)
jaysoo pushed a commit that referenced this pull request Sep 19, 2025
## Current Behavior

Generating Angular projects with Jest results in Jest v30 being used,
which is not supported by Angular and causes peer dependency errors.

## Expected Behavior

Generating Angular projects with Jest should install a compatible
version of Jest (Angular currently supports `^29.5.0`).
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants