angular icon indicating copy to clipboard operation
angular copied to clipboard

[BUG] Missing compatible Angular versions

Open Tezra opened this issue 4 months ago • 3 comments

Expected behavior

Peer dependencies should include the 2 Angular versions after the compiler version.

Observed behavior

Peer dependencies are capped at compiler version.

Why is this an issue

Angular maintains backwards compatibility for at least 2 major versions, meaning a project that is compiled with Angular 20 is guaranteed to work for version 21 and 22, and varying milage after that. This 2 lead gap should be kept whenever the compiler updates as well.

Tezra avatar Oct 15 '25 15:10 Tezra

I'm not sure I am understanding. It looks like @formio/angular supports 4 major versions of angular if you look at our peer dependencies

"@angular/core": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"@angular/common": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"@angular/elements": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",

It looks like we are using "@angular-devkit/build-angular": "^19.0.6", as well. So we are maintaining backwards compatibility for the last two major versions. Could you please clarify what the issue is?

ZenMasterJacob20011 avatar Oct 21 '25 20:10 ZenMasterJacob20011

@lane-formio Angular Itself is guaranteed to be backwards compatible for at least 2 versions. So as long as no deprecated APIs are used, That means that what is compiled using Angular 19 is guaranteed to work and Angular 20 and 21 as well. So it should be ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 since the Angular 19 compiler is used.

Tezra avatar Oct 22 '25 11:10 Tezra

I am fine adding versions to the package.json that reflect Angular's policies with regards to backwards compatibility. If any PR is made to reflect this desire, then we would be happy to pull in that change.

travist avatar Oct 22 '25 14:10 travist