Skip to content
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

Need add rxjs 7 support for version 9.x.x #472

Closed
DexterIA opened this issue Jun 16, 2022 · 14 comments
Closed

Need add rxjs 7 support for version 9.x.x #472

DexterIA opened this issue Jun 16, 2022 · 14 comments
Labels

Comments

@DexterIA
Copy link

DexterIA commented Jun 16, 2022

I suggest change this to "rxjs": "^6.0.0 | ^7.0.0"
ng-dynamic-component should have no problem working on rxjs 7
Angular 12 currently support rxjs 7, but ng-dynamic-component blocks update rxjs up to 7 version.

@gund
Copy link
Owner

gund commented Jun 16, 2022

Yes I think at the time when v9 was release there probably was no rxjs v7 yet.

But you should have no problem using rxjs v7 even with v9, just disable NPM from checking peer dependencies (either via --legacy-peer-deps or --force) and install rxjs v7 manually.
Ideally you could just update the lib to v10 which includes rxjs v7 (compatible with Angular v12+).

But I'm not planning on maintaining previous major versions which means anything below v10 does not get any updates as this will increase the burden of maintenance of the library.

@gund gund closed this as completed Jun 16, 2022
@gund gund added the wontfix label Jun 16, 2022
@DexterIA
Copy link
Author

Ok, I understand you.

Unfortunately, v10 does not work with angular 12. And I can't update up to 13, because we need support IE =(

@DexterIA
Copy link
Author

@gund does v10 could work with angular 12? I try and got error in runtime, when create component.
Here https://github.com/gund/ng-dynamic-component/blob/v10.2.0-next.1/projects/ng-dynamic-component/src/lib/dynamic.component.ts#L67

Angular 12 have another signature of this method.

@gund
Copy link
Owner

gund commented Jun 16, 2022

Oh yes, I forgot about that change, I will need to add backwards compatibility for that piece of code.
I'm going to release it under next tag so you could check it if it works or something else need backwards compatibility fixes.

@DexterIA
Copy link
Author

Great! Thank you very much

gund pushed a commit that referenced this issue Jun 16, 2022
# [10.2.0-next.2](v10.2.0-next.1...v10.2.0-next.2) (2022-06-16)

### Bug Fixes

* **component:** add compatibility with Angular v12 to component rendering ([18c3922](18c3922)), closes [#472](#472)
@gund
Copy link
Owner

gund commented Jun 16, 2022

@DexterIA could you please give a try to 10.2.0-next.2 and see if it will work with Angular v12?

@DexterIA
Copy link
Author

@gund Yes, sure
Built and check in storybook, works great!

gund pushed a commit that referenced this issue Jun 16, 2022
# [10.2.0](v10.1.0...v10.2.0) (2022-06-16)

### Bug Fixes

* **component:** add compatibility with Angular v12 to component rendering ([18c3922](18c3922)), closes [#472](#472)

### Features

* **ng:** add support for Angular v14+ ([451f04e](451f04e)), closes [#469](#469)
@gund
Copy link
Owner

gund commented Jun 16, 2022

This has been released on 10.2.0

@DexterIA
Copy link
Author

@gund
Something goes wrong...

I've got error when build app, after update to 10.2.0

TypeError: Cannot create property 'message' on string '.\node_modules\ng-dynamic-component\fesm2015\ng-dynamic-component.mjs: This application depends upon a library published using Angular version 14.0.1, which requires Angular version 14.0.0 or newer to work correctly.

Consider upgrading your application to use a more recent version of Angular.
  26 | }
  27 | /** @nocollapse */ ComponentOutletInjectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: ComponentOutletInjectorDirective, deps: [{ token: i1.NgComponentOutlet, host: true }], target: i0.ɵɵFactoryTarget.Directive });
> 28 | /** @nocollapse */ ComponentOutletInjectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.1", type: ComponentOutletInjectorDirective, selector: "[ngComponentOutlet]", providers: [
     |                                                            ^
  29 |         {
  30 |             provide: DynamicComponentInjectorToken,
  31 |             useExisting: ComponentOutletInjectorDirective,'

Look's like it work only in Angular 14

Interesting, storybook build completes without errors and components work's fine.

@gund
Copy link
Owner

gund commented Jun 16, 2022

Hmm that looks strange, this seems like a specific version check during a build time as there is no hard dependency on Angular v14 in the library.
Not really sure how to resolve this issue.

@DexterIA could you please paste the details of ng version output here for debugging info?

@DexterIA
Copy link
Author

Angular CLI: 12.2.16                                             
Node: 16.14.2 (Unsupported)                                      
Package Manager: npm 8.5.0                                       
OS: win32 x64                                                    
                                                                 
Angular: 12.2.16                                                 
... animations, cli, common, compiler, compiler-cli, core, forms 
... platform-browser, platform-browser-dynamic, router, upgrade  
                                                                 
Package                         Version                          
---------------------------------------------------------        
@angular-devkit/architect       0.1400.2                         
@angular-devkit/build-angular   12.2.16                          
@angular-devkit/core            12.2.16                          
@angular-devkit/schematics      14.0.2
@angular/cdk                    12.2.13
@schematics/angular             12.2.16
rxjs                            7.5.5
typescript                      4.3.5
webpack                         5.50.0

Warning: The current version of Node (16.14.2) is not supported by Angular.

@gund
Copy link
Owner

gund commented Jun 17, 2022

Ok, from the response from Angular team it is not supported to use library compiled with newer angular in the app that is using older angular version.

This basically means that you either need to upgrade your app to angular v14 or disable peer dependencies check and keep using v9.

@DexterIA
Copy link
Author

@gund
Yes, I understand.
I will wait update to Angular 13.

This crutch is not needed anymore

@gund
Copy link
Owner

gund commented Jun 17, 2022

Yep, I just removed it from the latest release, thanks 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants