261 Commits

Author SHA1 Message Date
Knut Sveidqvist
a1c50b8079 #4220 Parsing the text as markdown and rendering accordingly 2023-03-20 14:15:26 +01:00
renovate[bot]
8b37ceffe1 chore(deps): update pnpm to v7.30.0 2023-03-20 04:21:23 +00:00
Remco Haszing
f3bebf25ea
Merge branch 'develop' into fix-node16-module-resolution 2023-03-17 20:52:50 +01:00
Remco Haszing
8c69ecd5ac
Update @types/lodash-es
This adds support for the TypeScript `"moduleResolution": "node16"`.
2023-03-17 12:26:41 +01:00
renovate[bot]
f3a9f81bfb fix(deps): update all non-major dependencies 2023-03-13 09:45:30 +00:00
renovate[bot]
4b462d717c chore(deps): update node.js to v18.15.0 2023-03-13 04:42:20 +00:00
Remco Haszing
b7d31adda4
Support node16 module resolution
The `node16` module resolution requires imports to use the `.js` file
extension in type definitions.

`@rollup/plugin-typescript` is needed to make this work with the Vite
setup used by Mermaid.

The module option for Mermaid internally is set to `nodenext`. This is
needed to support `.json` imports. Note that setting `module` to
`node16` or `nodenext` implies a matching `moduleResolution` value.
2023-03-11 14:54:21 +01:00
Sidharth Vinod
4e4f2fcfc5
Merge branch 'master' into develop
* master:
  Updated import of cytoscape for consistent behavior
  v9.4.3
  fix: dayjs import extension
  9.4.2
  Fix mindmap demo
  9.4.2-rc.2
  chore: Rename diagram-definitions with specific names
  Use cytoscape esm
  Revert "chore: Defer elk loading"
  Revert "Split cytoscape"
  test(gantt): test daylight savings in ganttdb
  refactor(deps): replace `moment` with `dayjs`
  fix(E2E): Add cors package
  fix Server
  Fix lockfile
  Remove Readme
2023-03-08 00:13:54 +05:30
renovate[bot]
e9d49e6b98
fix(deps): update all non-major dependencies 2023-03-06 06:25:39 +00:00
renovate[bot]
6c2c28940b chore(deps): update all non-major dependencies 2023-03-06 06:22:18 +00:00
Alois Klink
704506835f
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")`.

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>
2023-02-28 19:54:27 +05:30
Alois Klink
a5db04b01c 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")`.

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
2023-02-26 22:31:12 +00:00
Sidharth Vinod
fa8a887ae1
chore: dagre-d3-es@7.0.9 2023-02-25 08:56:18 +05:30
Sidharth Vinod
00a14ee811
WIP: Contributors 2023-02-24 23:03:51 +05:30
Sidharth Vinod
d688f1fe94
fix lockfile 2023-02-24 21:16:09 +05:30
Sidharth Vinod
8c2dbafdb5
Merge branch 'develop' into sidv/contributors
* develop: (309 commits)
  Update docs
  fix Lint
  Update CHANGELOG.md
  Update CHANGELOG.md
  fix: fix exports
  Doc (typo): remove duplicate "be"
  Fix readme link
  Regenerate mermaid docs
  Add deepdwn to cspell
  Add Deepdwn to native integrations list
  docs: Fix changelog
  docs: v10 breaking changes
  Remove `null` from diagrams before render
  fix docs diagram
  Updated version
  Minor cleanup to trigger build.
  Fix spellings
  Wrap option working in test case
  Fix typos
  Minor cleanup
  ...
2023-02-24 21:14:55 +05:30
Sidharth Vinod
067b6adc20
fix(E2E): Add cors package 2023-02-20 21:23:06 +05:30
Sidharth Vinod
6ded32880d
Fix lockfile 2023-02-20 18:24:24 +05:30
Sidharth Vinod
638362baea
Merge branch 'release/10.0.0' into sidv/splitDiagrams
* release/10.0.0: (333 commits)
  10.0.0-rc.3
  Export more types
  no side effects
  10.0.0-rc.2
  skip failing elk test
  Cleanup
  Update docs
  fix(#3406, #3394): Remove init & initThrowsErrors
  chore: Rename lazy loaded diagram definitions
  Skip flowchart-elk failing test
  Fix docs
  fix Server
  Fix lint
  Remove Readme
  Fix E2E Tests
  Fix tests
  feat: Break render and parse types
  chore: Remove all non async render/parse/init
  Remove CJS builds from docs
  chore: Remove cjs from build
  ...
2023-02-19 20:18:26 +05:30
Sidharth Vinod
735aceb37a
Fix E2E Tests 2023-02-19 14:03:11 +05:30
Sidharth Vinod
c1aad5975c
Merge branch 'release/9.4.2' into release/10.0.0
* release/9.4.2:
  RC version
  Revert #4034
  Revert #4034
  fix: Vite, D3, Vitest Types
  fix(api): tree shaking package.json import
2023-02-19 00:55:23 +05:30
Sidharth Vinod
2c062d648a
Merge branch 'develop' into release/9.4.2
* 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
2023-02-19 00:04:44 +05:30
Sidharth Vinod
0f36bbf3e1
Revert #4034 2023-02-18 23:45:45 +05:30
Sidharth Vinod
3c4a6a19bb
fix: Vite, D3, Vitest Types 2023-02-18 22:35:14 +05:30
renovate[bot]
ccaa99937f
chore(deps): update dependency cypress to v12 2023-02-16 12:27:04 +00:00
Sidharth Vinod
17238c0326
Merge branch 'master' into develop
* master: (24 commits)
  docs: fix links
  Skip precommit hooks on CI
  Fix release-publish
  Fix timeline and mindmap
  Updating integration instructions for timeline and mindmap
  Remove node heap
  Revert "chore: Set node heap size"
  Revert "Remove text hint"
  Split cytoscape
  Linear build
  Remove text hint
  Fix elk import
  Dynamic elk import
  Remove heap option
  elk web-worker
  Test publish docs
  chore: Add file extension for dynamic import
  chore: Defer elk loading
  Update vitepress
  Fix links to integrations.md
  ...
2023-02-16 17:52:07 +05:30
Sidharth Vinod
ac231949f0
Merge pull request #4071 from mermaid-js/renovate/vite-4.x
chore(deps): update dependency vite to v4
2023-02-16 17:50:08 +05:30
Sidharth Vinod
83797eef38
elk web-worker 2023-02-16 14:21:33 +05:30
Sidharth Vinod
a1a252cc29
Merge branch 'master' into release/9.4.1
* master:
  Update vitepress
  Fix links to integrations.md
  chore: Set node heap size
2023-02-16 13:01:10 +05:30
Sidharth Vinod
62f7fb082e
Update vitepress 2023-02-16 12:47:00 +05:30
Knut Sveidqvist
25da0c6c8e Merge branch 'master' into develop 2023-02-15 16:31:44 +01:00
Per Brolin
a956be7bbf Release candidate 2023-02-10 11:03:25 +01:00
renovate[bot]
08ac41113f
chore(deps): update dependency vite to v4 2023-02-09 05:54:04 +00:00
Sidharth Vinod
07764348eb
Merge pull request #4069 from mermaid-js/renovate/jsdom-21.x
chore(deps): update dependency jsdom to v21
2023-02-09 11:13:03 +05:30
renovate[bot]
72e8b7fb38
chore(deps): update dependency rimraf to v4 2023-02-09 00:49:20 +00:00
renovate[bot]
3a89cc7993
chore(deps): update dependency jsdom to v21 2023-02-09 00:47:08 +00:00
renovate[bot]
d45eda1c60 chore(deps): update dependency @types/uuid to v9 2023-02-09 00:41:24 +00:00
Sidharth Vinod
f83f09d8b0
Fix vitest type 2023-02-09 01:29:41 +05:30
renovate[bot]
c4eb1608b0
chore(deps): update all non-major dependencies 2023-02-08 19:30:57 +00:00
Knut Sveidqvist
74df4a7a68 Mind map coming in from the cold. A lazy loaded diagram in the same way as timeline. 2023-02-08 17:42:58 +01:00
Knut Sveidqvist
82f7e1b754 Version updates 2023-02-08 13:50:58 +01:00
Knut Sveidqvist
580903051f Fixing broken test 2023-02-08 13:40:41 +01:00
Knut Sveidqvist
ce037a84ca Fixing build after last batch of changes 2023-02-08 13:16:33 +01:00
Sidharth Vinod
d562a81019
Merge branch 'develop' into timeline
* 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
  ...
2023-02-08 15:57:09 +05:30
renovate[bot]
ac67794fb2 fix(deps): update dependency dagre-d3-es to v7.0.8 2023-02-06 01:07:08 +00:00
Emerson Bottero
df10d64989 chore: add moment to dependencies 2023-01-29 11:24:48 -03:00
Emerson Bottero
7179f1bcba chore: remove moment-mini 2023-01-26 20:55:57 -03:00
Sidharth Vinod
0aa7da261f
Merge pull request #3962 from aloisklink/build/add-autogenerated-header-after-yaml-codeblocks
Add support for YAML frontmatter in Markdown docs (used for Vitepress config)
2023-01-25 22:50:20 +05:30
Alois Klink
b26cdb3e46 build(docs): support YAML frontmatter in markdown
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?
2023-01-22 19:21:18 +00:00
ashishj
ca22e85e55 Merge branch 'release/9.4.0' into timeline 2023-01-19 19:20:29 +01:00