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")`.
We can't use `dayjs.duration`, because unlike `moment.duration`,
[dayjs durations always degrade to ms][3].
This causes issues with daylight savings, since it assumes that each
day is 24 hours, when some days have 23/25 hours with daylight savings.
(it also assumes that each month is 30 days).
However, `dayjs.add(1, "d");` correctly adds 1 days, even when that
day is only 23 hours long, so we can use that instead.
[1]: https://momentjs.com/docs/#/-project-status/
[2]: https://day.js.org/
[3]: https://day.js.org/docs/en/durations/durations
Co-authored-by: Alois Klink <alois@aloisklink.com>
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")`.
We can't use `dayjs.duration`, because unlike `moment.duration`,
[dayjs durations always degrade to ms][3].
This causes issues with daylight savings, since it assumes that each
day is 24 hours, when some days have 23/25 hours with daylight savings.
(it also assumes that each month is 30 days).
However, `dayjs.add(1, "d");` correctly adds 1 days, even when that
day is only 23 hours long, so we can use that instead.
[1]: https://momentjs.com/docs/#/-project-status/
[2]: https://day.js.org/
[3]: https://day.js.org/docs/en/durations/durations
* develop:
Add highlight tag info in contributing.md
chore(deps): update dependency cypress to v12
docs: fix links
Fix types
chore(deps): update dependency vite to v4
* develop: (45 commits)
Showcase section to the docs - keepings docs up to date (#4055)
bugfix: add missing d3 curves to flowchart and docs
fix(deps): update dependency dagre-d3-es to v7.0.8
build(pre-commit): cache eslint in pre-commit
build(lint): cache eslint with strategy content
Update cypress/integration/rendering/sequencediagram.spec.js
feat(er): allow leading underscore for attributes name
ci(lint): show nice error on lint failure
chore: add moment to dependencies
Update docs
Update mindmap.md
chore: remove moment-mini
docs(readme-ch): fix twitter link
build(lint): cache prettier on `pnpm run lint`
fix: moment-mini default exporter
docs(readme): update broken twitter badge
test(er): improve tests on multiple key constraints
Fixes Typo, remove console.log
doc(er): add documentation on multiple key constraints
feat(er): allow multiple constraints on attributes
...
Vitepress uses YAML frontmatter to configure Vitepress specific
settings, see https://vitepress.vuejs.org/config/frontmatter-configs
We just need to use `remark-frontmatter` to add support for it.
GitHub also renders the YAML front-matter nicely in a table
automatically, but maybe we should instead strip it, if it's only
used by Vitepress?