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

Support for filesize@10 #397

Open
amitdahan opened this issue Oct 21, 2022 · 3 comments
Open

Support for filesize@10 #397

amitdahan opened this issue Oct 21, 2022 · 3 comments

Comments

@amitdahan
Copy link
Owner

amitdahan commented Oct 21, 2022

Summary

Starting with [email protected] we now support a predefined set of filesize versions - >= 6.0.0 < 10.0.0, this is due to 10.0.0 requiring a { filesize } from 'filesize' import whereas previous versions require filesize from 'filesize'.

I could only thing of 2 ways for us to add support for filesize@10:

  1. Only support ^10.0.0 (or >= 10.0.0?) with the named-import API, maybe in [email protected]?
  2. Provide a new import { NgxFilesizeModule } from 'ngx-filesize/filesize@10 opt-in export, effectively letting us support filesize@10 but with a secondary API entrypoint.
@eXpertise7
Copy link

eXpertise7 commented Oct 26, 2022

Update to ngx-filesize 3.0.0 doesn't work in my Angular 14 project.

Having errors:

image

image

image

There's no "filesize" dependency of ngx-filesize dependency in yarn.lock file (or package-lock.json) at my side.

And I don't like having ngx-filesize v2 in my Angular 14 project, because it uses Angular's deprecated View Engine, not Ivy compiler.

Kind regards,
Robert

@amitdahan
Copy link
Owner Author

Hey @eXpertise7 !

Thanks for the feedback on 3.0.0!

Did you notice we made a breaking change moving filesize to peerDeps?

We no longer install filesize along with ngx-filesize.

Instead you have to install it:

yarn add ngx-filesize filesize@9

(Since most package managers don't auto-install peerDeps by default)

@amitdahan
Copy link
Owner Author

(This move was made because I wanted ngx-filesize to be more flexible, and let users choose their own filesize version)

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

No branches or pull requests

2 participants