forked from mermaid-js/mermaid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(deps): replace
moment
with dayjs
Replace Mermaid's dependency on `moment` with `dayjs`. [Moment is now in maintenance mode][1], and they don't recommend using it. [Dayjs][2] has almost exactly the same API as moment, and is still curently being maintained. Unlike moment, dayjs objects are immutable, which makes our life much easier, but we need to do `a = a.add(1, "day")` instead of just `a.add(1, "day")`. **Issues**: - `date.add(dayjs.duration(1, "day"))` always adds 24 hours instead of 1 day (different from Moment.js). This causes issues with daylight savings, as those days have 23/25 hours. Maybe we should replace this with a different date library? [1]: https://momentjs.com/docs/#/-project-status/ [2]: https://day.js.org/
- Loading branch information
1 parent
fec193e
commit 3964cc5
Showing
9 changed files
with
156 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.