joanllenas / ngx-date-fns

⏳ date-fns pipes for Angular
164 stars 14 forks source link

date-fns 3.x support #401

Closed sergey-morenets closed 9 months ago

sergey-morenets commented 9 months ago

Description of the Issue and Steps to Reproduce:

Hi

I tried to upgrade my project dependencies and switched from date-fns 2.30.0 to 3.0.6. However I received a lot of errors after that:

Type 'typeof import("/node_modules/date-fns/closestTo")' provides no match for the signature '(...args: any): any'. [plugin angular-compiler]

[ERROR] TS2304: Cannot find name 'Duration'. [plugin angular-compiler]

    node_modules/ngx-date-fns/lib/format-duration.pipe.d.ts:11:24:
      11 │     transform(duration: Duration, options?: {
 [ERROR] TS2304: Cannot find name 'Locale'. [plugin angular-compiler]

    node_modules/ngx-date-fns/lib/is-match.pipe.d.ts:12:17:
      12 │         locale?: Locale;

Environment:

Please answer the following questions:

joanllenas commented 9 months ago

Hi @sergey-morenets , I've also noticed the new version. I'll review the requirements for migrating to version 3. I'll keep you posted. Thanks for reporting

sergey-morenets commented 9 months ago

Hi @sergey-morenets , I've also noticed the new version. I'll review the requirements for migrating to version 3. I'll keep you posted. Thanks for reporting

Hi @joanllenas

Thank you for the quick response. Will wait for the fixes.

sergey-morenets commented 9 months ago

List of all breaking changes: https://github.com/date-fns/date-fns/releases/tag/v3.0.0

joanllenas commented 9 months ago

@sergey-morenets you can start using date-fns v3 🎉

https://github.com/joanllenas/ngx-date-fns/releases/tag/v11.0.0

sergey-morenets commented 9 months ago

@sergey-morenets you can start using date-fns v3 🎉

https://github.com/joanllenas/ngx-date-fns/releases/tag/v11.0.0

Thank you a lot, @joanllenas