-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix(angular): support @angular/cli package update during nx migrate
#33918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
View your CI Pipeline Execution ↗ for commit b075423
☁️ Nx Cloud last updated this comment at |
bab2ada to
c064e87
Compare
c064e87 to
38aba83
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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',
},
};
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
38aba83 to
9802ee4
Compare
@angular/cli ignoring its package group during nx migrate@angular/cli package update during nx migrate
…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]>
|
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. |

Current Behavior
When migrating Angular packages the
@angular/clipackage is not updated as part of thenx migrateinitial package updates to thepackage.jsonfile. Instead, it's updated at a later stage with a migration generator. This happens for a couple of reasons:^, which can result in workspaces getting a minor version of the packages installed before Nx adds support for that minor version.nx migratecommand currently doesn't have the ability to ignore the package group or migrations of a given package.This is why the
@angular/clipackage is migrated "manually" in a migration generator.Expected Behavior
The
@angular/clipackage should be updated as part of the package updates performed by thenx migratecommand while ignoring its package group and migrations. The@nx/angularpackage already provides the same set of migrations and more.