-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
Angular: use single version in dependencies #3836
Comments
@pascalgrimaud Can you please provide more insights on this change? |
Just to warn you, it's not an easy ticket :) As you can see in this code https://github.com/jhipster/jhipster-lite/blob/main/src/main/java/tech/jhipster/lite/generator/client/angular/core/domain/AngularModuleFactory.java#L19-L28 For each lib, it will go into this https://github.com/jhipster/jhipster-lite/blob/main/src/main/resources/generator/dependencies/angular/package.json and find the version associated to the lib Because of that, dependabot will try to bump the dependencies separately so it won't work. The goal here is to find a mechanism to use a single version, but for now, I don't know how. NpmPackageVersion angularVersion = retrieveVersion("@angular/core", ANGULAR);
return ClientsModulesFactory.clientModuleBuilder(properties)
.packageJson()
.addDependency(packageName("@angular/animations"), angularVersion)
.addDependency(packageName("@angular/cdk"), ANGULAR)
.addDependency(packageName("@angular/common"), angularVersion)
.addDependency(packageName("@angular/compiler"), angularVersion)
.addDependency(packageName("@angular/core"), angularVersion) I think @DamnClin can have some better ideas as it will impact the engine of JH Lite: maybe you can help here? |
Thanks, @pascalgrimaud. Yes, it's an interesting problem and I'm up for a challenge on weekends. :) I'll get familiar with |
I think adding a signature with source and package source may be more consistent with the java ones using version slug |
I'm picking this ticket, in order to reduce the burden of manual dependencies upgrade. I'm inclined to the following API, with an additional optional PackageName corresponding to the source of the version: return ClientsModulesFactory.clientModuleBuilder(properties)
.packageJson()
.addDependency(packageName("@angular/animations"), ANGULAR, packageName("@angular/core"))
.addDependency(packageName("@angular/cdk"), ANGULAR, packageName("@angular/core"))
.addDependency(packageName("@angular/common"), ANGULAR, packageName("@angular/core"))
.addDependency(packageName("@angular/compiler"), ANGULAR, packageName("@angular/core"))
.addDependency(packageName("@angular/core"), ANGULAR) |
I just noticed that dependabot is now supporting grouping dependencies updates: dependabot/dependabot-core#1296 |
Increasing the bounty as it was more work than expected |
Bounty claimed: https://opencollective.com/generator-jhipster/expenses/160366 |
@murdos : approved |
Following #3835 and several other PRs, it would be cool to:
Pro:
The text was updated successfully, but these errors were encountered: