r-hannuschka / ngx-fileupload

angular x fileupload
MIT License
18 stars 7 forks source link

Support for angular 15 & 16 #789

Closed Austinb closed 11 months ago

Austinb commented 1 year ago

Describe the bug When trying to upgrade a current angular project to 15 there are compatibility notices for core and ui with

To Reproduce Steps to reproduce the behavior:

  1. Update npm dependencies for an angular project (i.e. npm update webpack)
  2. During update an error will be shown saying @ngx-file-upload/core could not resolve dependency @angular/common@"^14.0.0"

Expected behavior The npm module installs without errors

Desktop (please complete the following information):

Additional context Dependencies for this project need to be updated to support angular 14 and 15. You can still install the modules using --force.

r-hannuschka commented 1 year ago

Sry for late Response i working most of my time on an other project currently, i will do this asap:

Angular 15 Angular 16

this will become 2 Versions then

Austinb commented 1 year ago

Thank you. I would assume you could do one release version that supports both 15 and 16 using the or | version syntax. This is assuming there are not issues preventing a version working on angular 15 from working on 16 other than changing the dependencies.

Just as an aside to allow you to keep using the older version you can override the versions in your package.json file so you do not have to use --force or something similar when installing. If you are using 16 just change the versions to 16. Obviously supported versions are better but we had to do something to remove the --force flag from our stack.

"overrides": {
    "@ngx-file-upload/core": {
      "@angular/common": "^15.0.0",
      "@angular/compiler": "^15.0.0",
      "@angular/compiler-cli": "^15.0.0",
      "@angular/core": "^15.0.0",
      "@angular/platform-browser": "^15.0.0",
      "@angular/platform-browser-dynamic": "^15.0.0"
    },
    "@ngx-file-upload/ui": {
      "@angular/common": "^15.0.0",
      "@angular/compiler": "^15.0.0",
      "@angular/compiler-cli": "^15.0.0",
      "@angular/core": "^15.0.0",
      "@angular/platform-browser": "^15.0.0",
      "@angular/platform-browser-dynamic": "^15.0.0"
    }
  },
r-hannuschka commented 1 year ago

Updated to angular 15 / 16

For Angular@15 use @ngx-file-upload/(core/ui)@7 For Angular@16 use @ngx-file-upload/(core/ui)@8