Commit Graph

192 Commits

Author SHA1 Message Date
Sidharth Vinod 1b48c19897
Merge branch 'develop' into sidv/contributors
* develop:
  chore(deps): update all minor dependencies
  requested update
  Update packages/mermaid/src/docs/syntax/flowchart.md
  Update docs
  Docs: Flowchart - minor verbiage update
2023-05-08 18:51:10 +05:30
Sidharth Vinod 500efda8d6
Update pnpm-lock 2023-05-08 18:47:22 +05:30
Sidharth Vinod 8e9d1bfc35
Merge branch 'develop' into sidv/contributors
* develop:
  chore(deps): update all patch dependencies
2023-05-08 18:46:39 +05:30
Sidharth Vinod 75337287ea
Replace esno & ts-node with tsx 2023-05-08 18:46:14 +05:30
renovate[bot] b04155178a
chore(deps): update all minor dependencies 2023-05-08 10:09:26 +00:00
renovate[bot] d7e140a829 chore(deps): update all patch dependencies 2023-05-08 10:08:10 +00:00
Sidharth Vinod cb3982de7e
Remove unnecessary dependencies
Co-authored-by: Alois Klink <alois.klink@gmail.com>
2023-05-02 14:16:35 +05:30
Sidharth Vinod 110cd61c64
Fix lockfile 2023-04-29 10:17:51 +05:30
Sidharth Vinod 99abd4c31b
Fix avatar fetching 2023-04-29 10:12:47 +05:30
Sidharth Vinod b0c58a9764
Update deps 2023-04-23 23:15:26 +05:30
Sidharth Vinod bbe3909627
Update vite 2023-04-23 22:34:19 +05:30
renovate[bot] 9e58f7bd99
chore(deps): update dependency typescript to v5 2023-04-22 20:51:24 +00:00
Sidharth Vinod 5c6773a47c
Merge branch 'renovate/all-minor' of https://github.com/mermaid-js/mermaid into renovate/all-minor
* 'renovate/all-minor' of https://github.com/mermaid-js/mermaid:
  fix(deps): update all minor dependencies
  chore(deps): update pnpm to v8
  chore(deps): update fregante/setup-git-user action to v2
2023-04-23 02:04:28 +05:30
Sidharth Vinod 5634c6ca1a
fix typedoc 2023-04-23 02:03:28 +05:30
renovate[bot] 1c17f4c770
fix(deps): update all minor dependencies 2023-04-22 20:30:38 +00:00
renovate[bot] bed9e8daab
chore(deps): update pnpm to v8 2023-04-22 20:04:11 +00:00
renovate[bot] e4bc3e2269
fix(deps): update all minor dependencies 2023-04-22 20:01:25 +00:00
renovate[bot] e6d11b9443
chore(deps): update dependency start-server-and-test to v2 2023-04-22 19:26:13 +00:00
Sidharth Vinod c624cbb910
Merge pull request #4325 from mermaid-js/renovate/eslint-plugin-unicorn-46.x
chore(deps): update dependency eslint-plugin-unicorn to v46
2023-04-23 00:51:33 +05:30
renovate[bot] f597f15f82
chore(deps): update dependency rimraf to v5 2023-04-22 18:53:56 +00:00
renovate[bot] 909c063a67
chore(deps): update dependency eslint-plugin-unicorn to v46 2023-04-22 18:51:50 +00:00
renovate[bot] 8cb3318d94 chore(deps): update dependency eslint-plugin-jsdoc to v43 2023-04-22 18:46:44 +00:00
renovate[bot] ddde451915
fix(deps): update dependency dompurify to v3 2023-04-22 08:28:31 +00:00
renovate[bot] 93eb72248a
chore(deps): update dependency concurrently to v8 2023-04-20 04:15:28 +00:00
Sidharth Vinod 2fe0a1360f
Upgrade vitepress 2023-04-20 09:35:28 +05:30
Remco Haszing aa5c1a5f78
Merge branch 'develop' into fix-node16-module-resolution 2023-04-13 14:58:17 +02:00
Alois Klink b4164b6ab5 test: test that styles and themes return valid CSS
Test that `src/diagrams/*/styles.ts` module returns a valid
CSS stylesheet that can be parsed via [stylis][1] and then
becomes a valid CSS that [csstree-validator][2] validates.

We test this for every diagram and for every theme, because
many of the invalid CSS bugs are caused by missing theme vars.

There are some CSS errors that I couldn't easily fix, so I've written
the tests to ignore the following CSS errors:
  - 'Unknown property `rx`' (Valid in SVG2 draft and in some browsers)
  - 'Unknown property `ry`' (Valid in SVG2 draft and in some browsers)
  - 'Unknown property `dy`'
    - This doesn't seem to be valid CSS in any SVG version, but maybe
      some browsers support it 🤷 I feel like we should probably change
      this though.

[1]: https://github.com/thysultan/stylis
[2]: https://github.com/csstree/validator
2023-04-13 08:27:32 +01:00
Sidharth Vinod d1e369e68d
revert pnpm changes 2023-04-05 16:32:48 +05:30
chriskim-au1 3b861ab91f doc update 2023-04-05 13:11:22 +10:00
Knut Sveidqvist 89193d7360 Simple markdown in lock file 2023-03-29 09:35:42 +02:00
Knut Sveidqvist 89eec225ce Merge branch 'develop' into 4220-string-synax-and-features 2023-03-29 09:34:49 +02:00
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