Skip to content

Angular 14 compatibility? #1973

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

Closed
ghost opened this issue Jul 6, 2022 · 1 comment · Fixed by #1979
Closed

Angular 14 compatibility? #1973

ghost opened this issue Jul 6, 2022 · 1 comment · Fixed by #1979
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Jul 6, 2022

Is your feature request related to a problem? Please describe.

@jsonforms/angular has a peer-dependency on Angular 12 or 13, but the project I'm working in has already upgraded to Angular 14. This means I can't install jsonforms without --force or --legacy-peer-deps which are both pretty crude tools, that could mask other problems I need to see.

>npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/core
npm ERR!   @angular/core@"14.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/core@"^12.0.0 || ^13.0.0" from @jsonforms/[email protected]
npm ERR! node_modules/@jsonforms/angular
npm ERR!   @jsonforms/angular@"3.0.0-beta.5" from the root project

The other package @jsonforms/angular-material also depends on angular 12 or 13, but I wouldn't be using that myself. (I'm making custom renderers, so I don't need the default material ones.) These are specified here and here respectively.

Describe the solution you'd like

Widen the Angular dependencies for @jsonforms/angular (and @jsonforms/angular-material) to "^12.0.0 || ^13.0.0 || ^14.0.0"? After a cursory search through the code, I only see some @NgModule, @Component, @Directive decorator usage, or other simple-looking things, so I think this would just work without any other changes needed? (But I'm not an expert in angular or jsonforms! 😅 My experiment branch seems to work OK in the project I work in.)

Describe alternatives you've considered

Npm install with --force or --legacy-peer-deps, but that can mask real problems. 😬

Framework

Angular

RendererSet

Other (please specify in the Additional context field)

Additional context

I'd be making my own renderers, since our project isn't just using vanilla material, so I don't think I'd depend on any of the default renderers? (But I don't know if the parent JsonFormsControl counts as a 'renderer' for the 'RendererSet' question.) Like this:

// more imports here...
import { JsonFormsAngularService, JsonFormsControl } from '@jsonforms/angular';

@Component({
  selector: 'app-my-jsonforms-text-renderer',
  template: `<!-- my template in here... -->`,
})
export class MyJsonformsTextRenderer extends JsonFormsControl implements OnInit, OnChanges {
  constructor(jsonformsService: JsonFormsAngularService) {
    super(jsonformsService);
  }

  static tester: RankedTester = rankWith(42, isStringControl);

  // other code here...
}
@sdirix sdirix added the angular label Jul 12, 2022
@sdirix sdirix linked a pull request Jul 15, 2022 that will close this issue
@sdirix
Copy link
Member

sdirix commented Jul 15, 2022

Fixed with #1979

@sdirix sdirix closed this as completed Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants