kirbydesign / designsystem

Kirby Design System
https://cookbook.kirby.design
MIT License
83 stars 22 forks source link

[BUG] Breaking changes in date-fns version 3 #3309

Closed KemalPajevic closed 8 months ago

KemalPajevic commented 8 months ago

Describe the bug

When installing Kirby in a project its peer dependencies in the project's package-lock.json file get specified like this:

"peerDependencies": {
  ...
  "date-fns": ">=2.21.1",
  "date-fns-tz": ">=1.1.4",
  ...
}

This lets npm install the latest versions of both date-fns and date-fns-tz. Recently a version 3 of date-fns has been released which introduced a lot of breakting changes in the file structure, and currently there are no versions of date-fns-tz that support these changes. This means that currently a project using Kirby will not be able to build, unless an older date-fns version is specified in either the project or one of the other dependencies.

Describe how to reproduce the bug

  1. Create a new project.
  2. Install latest Kirby version.
  3. Run the application.
  4. Errors regarding files imported from date-fns are thrown by date-fns-tz.

Which Kirby version was used?

8.11.2 and 9.0.0-rc

What was the expected behavior?

The project runs.

Please complete the following information:


Checklist:

The following tasks should be carried out in sequence in order to follow the process of contributing correctly.

Verification

To make sure the bug is not intended behaviour; it should be verified by a member of team Kirby before moving on to implementation.

Implementation

The contributor who wants to implement this issue should:

Review

Once the issue has been implemented and is ready for review: