Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@leosvelperez
Copy link
Member

@leosvelperez leosvelperez commented Dec 18, 2025

Current Behavior

When migrating Angular packages the @angular/cli package is not updated as part of the nx migrate initial package updates to the package.json file. Instead, it's updated at a later stage with a migration generator. This happens for a couple of reasons:

  • Angular CLI package group will update all the packages using a ^, which can result in workspaces getting a minor version of the packages installed before Nx adds support for that minor version.
  • Angular CLI migrations can error due to some assumptions that are not always correct in Nx workspaces.
  • The nx migrate command currently doesn't have the ability to ignore the package group or migrations of a given package.

This is why the @angular/cli package is migrated "manually" in a migration generator.

Expected Behavior

The @angular/cli package should be updated as part of the package updates performed by the nx migrate command while ignoring its package group and migrations. The @nx/angular package already provides the same set of migrations and more.

@leosvelperez leosvelperez self-assigned this Dec 18, 2025
@leosvelperez leosvelperez requested review from a team as code owners December 18, 2025 13:20
@vercel
Copy link

vercel bot commented Dec 18, 2025

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

Project Deployment Review Updated (UTC)
nx-dev Ready Ready Preview Dec 19, 2025 3:46am

@netlify
Copy link

netlify bot commented Dec 18, 2025

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit b075423
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/6944c9381a1220000812e878
😎 Deploy Preview https://deploy-preview-33918--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud
Copy link
Contributor

nx-cloud bot commented Dec 18, 2025

View your CI Pipeline Execution ↗ for commit b075423

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 34m 41s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 2m 31s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 12s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 3s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-19 04:19:55 UTC

@leosvelperez leosvelperez force-pushed the angular/update-ng-cli-package-updates branch from bab2ada to c064e87 Compare December 18, 2025 13:23
Copy link
Contributor

@nx-cloud nx-cloud bot left a comment

Choose a reason for hiding this comment

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

Important

A new CI pipeline execution was requested that may update the conclusion below...

Nx Cloud is proposing a fix for your failed CI:

These changes update the backward-compatible jsdom version from ~22.1.0 to ^27.1.0 for Angular 19 and 20, aligning with the PR's intent to upgrade jsdom across all supported Angular versions. This fixes test failures in angular:test, vue:test, and nuxt:test where tests expected the backward-compatible version but received the updated version.

We verified this fix by re-running angular:test.

diff --git a/packages/angular/src/utils/backward-compatible-versions.ts b/packages/angular/src/utils/backward-compatible-versions.ts
index a2efc76210..c99796d2b4 100644
--- a/packages/angular/src/utils/backward-compatible-versions.ts
+++ b/packages/angular/src/utils/backward-compatible-versions.ts
@@ -46,7 +46,7 @@ export const backwardCompatibleVersions: VersionMap = {
     jsoncEslintParserVersion: '^2.1.0',
     webpackMergeVersion: '^5.8.0',
     vitestVersion: '^3.1.1',
-    jsdomVersion: '~22.1.0',
+    jsdomVersion: '^27.1.0',
   },
   19: {
     angularVersion: '~19.2.0',
@@ -78,6 +78,6 @@ export const backwardCompatibleVersions: VersionMap = {
     jsoncEslintParserVersion: '^2.1.0',
     webpackMergeVersion: '^5.8.0',
     vitestVersion: '^3.1.1',
-    jsdomVersion: '~22.1.0',
+    jsdomVersion: '^27.1.0',
   },
 };

Apply fix via Nx Cloud  Reject fix via Nx Cloud


Or Apply changes locally with:

npx nx-cloud apply-locally bBIb-acUL

Apply fix locally with your editor ↗   View interactive diff ↗


🎓 Learn more about Self-Healing CI on nx.dev

@leosvelperez leosvelperez force-pushed the angular/update-ng-cli-package-updates branch from 38aba83 to 9802ee4 Compare December 18, 2025 16:36
@leosvelperez leosvelperez changed the title fix(angular): support updating @angular/cli ignoring its package group during nx migrate fix(angular): support @angular/cli package update during nx migrate Dec 18, 2025
@jaysoo jaysoo marked this pull request as ready for review December 18, 2025 20:42
@jaysoo jaysoo requested a review from a team as a code owner December 18, 2025 20:42
@jaysoo jaysoo requested a review from Coly010 December 18, 2025 20:42
@jaysoo jaysoo merged commit 5a4b345 into master Dec 19, 2025
19 checks passed
@jaysoo jaysoo deleted the angular/update-ng-cli-package-updates branch December 19, 2025 13:07
jaysoo added a commit that referenced this pull request Dec 19, 2025
…e` (#33918)

## Current Behavior

When migrating Angular packages the `@angular/cli` package is not
updated as part of the `nx migrate` initial package updates to the
`package.json` file. Instead, it's updated at a later stage with a
migration generator. This happens for a couple of reasons:

- Angular CLI package group will update all the packages using a `^`,
which can result in workspaces getting a minor version of the packages
installed before Nx adds support for that minor version.
- Angular CLI migrations can error due to some assumptions that are not
always correct in Nx workspaces.
- The `nx migrate` command currently doesn't have the ability to ignore
the package group or migrations of a given package.

This is why the `@angular/cli` package is migrated "manually" in a
migration generator.

## Expected Behavior

The `@angular/cli` package should be updated as part of the package
updates performed by the `nx migrate` command while ignoring its package
group and migrations. The `@nx/angular` package already provides the
same set of migrations and more.

Co-authored-by: Jack Hsu <[email protected]>
@github-actions
Copy link
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 Dec 25, 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.

4 participants