Repository navigation
Conversation
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 44053af9b5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
storybook prevents this update at the moment, |
…olution=node10 and baseUrl
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 23a0e2edc7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77068e7f1b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Angular 22 packages require ^22.22.3 || ^24.15.0 || >=26.0.0
Pull request was converted to draft
|
storybook just merged their PR and release a beta version that we could try to use. |
|
Angular will be updated in storybook by the other PR #7317 |
| "peerDependencies": { | ||
| "@angular/common": ">=21.0.0", | ||
| "@angular/core": ">=21.0.0" | ||
| }, |
There was a problem hiding this comment.
The peerDependencies I added are correct — they make this constraint explicit. The library is built with Angular 22, so it requires @angular/core ^22.0.0.
lol, the PR description is wrong. But this description sounds very AI generated is this realy the case, that an Angular v22 cannot be used in an Angular v21 project?
There was a problem hiding this comment.
@d-koppenhagen that question is for you.
There was a problem hiding this comment.
I think I've read somewhere it works now with Angular 22. You should just check it out.
At least in my personal website project on GH I am on Angular 22 with Storybook and it works (but probably the setup is slightly different).
There was a problem hiding this comment.
I think I've read somewhere it works now with Angular 22. You should just check it out. At least in my personal website project on GH I am on Angular 22 with Storybook and it works (but probably the setup is slightly different).
@d-koppenhagen thanks a lot. There might be a misunderstanding:
This question is not about whether Storybook has Angular 22 (it now does with a delay), but whether projects with up to two major versions behind the one with which components are build should still work (like in this case, could an Angular 21 project handle components that we've build with Angular 22?).
There was a problem hiding this comment.
Found the authoritative source: Angulars guide, "Ensuring library version compatibility": https://angular.dev/tools/libraries/creating-libraries#ensuring-library-version-compatibility
The Angular version used to build an application should always be the same or greater than the Angular versions used to build any of its dependent libraries. […] Angular does not support using an earlier version for the application.
So the finding is correct: a library built with Angular 22 requires consuming apps to be on Angular 22 or later — an Angular 21 project can't use it. Which makes it a policy call: if we want to keep ≤21 consumers working, we'd need to build core-web against the lowest major we want to support.
But I am unsure if the qute above is more like a rule which should be followed or a real thing which is clocked by the compiler. I think it was in the past when Angular made the switch to the new ivy compiler but in this case all versions already rely on the new compiler. Probably it is something we have to try out.
|
because of that latest finding, this is a bigger topic. We'll close this for now and need to further investigate. |
Proposed changes
This PR is about updating Angular to version 22. As aligned, we won't update the packages in the storybook part, as those still have Angular version < 22 as a peerDependency. And
output/angular, as this would be compatible with both the current, and the LTS version; we won't go back to version 20, even though that this would be the actual lowest LTS version.Angular storybook and
output/angularnow have:>=21.0.0as apeerDependencyto our Angular packagepeerDependenciesI added are correct — they make this constraint explicit. The library is built with Angular 22, so it requires@angular/core ^22.0.0.@db-ux/ngx-core-componentsworkspace dependency (which would pull in Angular 22 transitive deps)@componentstsconfig path alias pointing to../../output/angular/src@componentspath alias points to../../output/angular/src. When webpack resolvesimport { ... } from "@angular/core"within those source files, it walks up the directory tree and findsoutput/angular/node_modules/@angular/core@22.0.2before reaching the storybook's ownnode_modules/@angular/core@21.2.17. This caused Angular 21's babel loader to process Angular 22 code containing the newɵɵFactoryTarget.Serviceenum value it doesn't understand.webpackFinalto the Storybook config that prepends the storybook's ownnode_modulesdirectory to webpack'sresolve.modulesarray. This ensures all@angular/*imports resolve to Angular 21 regardless of where the importing source file lives on disk.Plus needed to adapt the following:
./src, TypeScript requires you to explicitly setrootDirto match.moduleResolution: "node"(which resolves tonode10) is deprecated and will stop working in TS 7.0.moduleResolutionisbundlernow,allowSyntheticDefaultImportsistrueby defaultOverview of Angular and TS versions
resolves #7067
Checklist
Code Quality
Validation
I have added/updated tests that cover my changesI have tested across all relevant frameworks (React, Angular, Vue) if applicableGeneral
feat:,fix:,chore:), as in Git Commit Conventionspackages/*folder, the correspondingAGENTS.mdhas been updated🔭🐙🐈 Test this branch here: https://design-system.deutschebahn.com/core-web/review/refactor-updated-to-angular-22