Commit Graph

2195 Commits

Author SHA1 Message Date
Daniel Bartholomae 65c73f2eec
Introduce shape list in test 2022-09-03 20:38:09 +02:00
Daniel Bartholomae 2414435641
Add tests for C4 System 2022-09-03 20:38:09 +02:00
Daniel Bartholomae 2afcd54184
Make test grouping more explicit 2022-09-03 20:38:09 +02:00
Daniel Bartholomae 700e25382b
Copy tests from Person to PersonExt 2022-09-03 20:38:09 +02:00
Daniel Bartholomae db0d6075ca
Add test for link to Person_Ext 2022-09-03 20:38:09 +02:00
Daniel Bartholomae a196aeb29b
Add question on Person_Ext 2022-09-03 20:38:09 +02:00
Daniel Bartholomae 92f0c8f8b1
Add test for structure of Person_Ext 2022-09-03 20:38:09 +02:00
Daniel Bartholomae 3bc5cfa554
Add test for alias 2022-09-03 20:38:09 +02:00
Daniel Bartholomae 6f7ae17fc6
Add test for label 2022-09-03 20:38:09 +02:00
Daniel Bartholomae be5b8012bd
Add test for description 2022-09-03 20:38:09 +02:00
Daniel Bartholomae 90d472042b
Add test for $tags 2022-09-03 20:38:08 +02:00
Daniel Bartholomae 5378316cc3
Add test for $link 2022-09-03 20:38:08 +02:00
Daniel Bartholomae 8ee534f7fb
Add test for $sprite 2022-09-03 20:38:08 +02:00
Daniel Bartholomae aee1a87347
Move test for basic Person to separate file 2022-09-03 20:38:08 +02:00
Daniel Bartholomae e9fb2c8a54
Fix test and variable names that were copied from flowchart 2022-09-03 20:38:08 +02:00
Daniel Bartholomae b79eaae002
Fix typo 2022-09-03 20:36:14 +02:00
Daniel Bartholomae 3b571fc9b3
Fix typo in documentation 2022-09-03 20:33:50 +02:00
Sidharth Vinod e718c5bf6c
Fix doc 2022-09-03 15:00:12 +05:30
Sidharth Vinod 636017fdd7
Add files only when running from lint-staged 2022-09-03 15:00:02 +05:30
Sidharth Vinod 85dc16df0a
Add files only when running from lint-staged 2022-09-03 14:51:28 +05:30
Sidharth Vinod 0caf372685
Fix configuration doc 2022-09-03 14:43:35 +05:30
Sidharth Vinod c49c15ab7c
Add dotfiles 2022-09-03 13:35:23 +05:30
Sidharth Vinod b84511b314
Prettier 2022-09-03 13:31:13 +05:30
Sidharth Vinod f6d69b33b3
Prettier 2022-09-03 13:30:16 +05:30
Sidharth Vinod 787cf9395e
Prettier options 2022-09-03 13:15:55 +05:30
Sidharth Vinod 6167eda6b6
Prettier 2022-09-03 13:05:47 +05:30
Sidharth Vinod c702e12a42
Fix edit page url 2022-09-03 12:25:18 +05:30
Sidharth Vinod 42a2cabc7b
Remove "Edit this page" 2022-09-03 12:21:42 +05:30
Sidharth Vinod 074f30ed1f
Fix double rendering in docsify 2022-09-03 11:14:13 +05:30
Sidharth Vinod 3833dcd0d8
Add verification for doc change 2022-09-03 10:06:21 +05:30
Sidharth Vinod 829e1c2390
Fix typo 2022-09-03 09:56:47 +05:30
Sidharth Vinod c3da6c10fb
Add generated file to git 2022-09-03 09:55:52 +05:30
Sidharth Vinod 017fdfa552
Fail commit if docs changed 2022-09-03 09:53:46 +05:30
Sidharth Vinod cc38667df3
Add generated file to git 2022-09-03 09:53:42 +05:30
Sidharth Vinod b6d0d7fe15
Fail commit if docs changed 2022-09-03 09:52:29 +05:30
Sidharth Vinod f45c0e3617
Fail commit if docs changed 2022-09-03 09:45:59 +05:30
Sidharth Vinod 9d5c50a36f
Update doc test 2022-09-03 09:16:54 +05:30
Sidharth Vinod d01de850eb
Update doc test 2022-09-03 09:11:46 +05:30
Sidharth Vinod 3b88150e11
Move docs to src 2022-09-03 09:06:42 +05:30
Sidharth Vinod cfae2b6a40
Doc transformer 2022-09-03 02:13:21 +05:30
Knut Sveidqvist 5584fef1b0 #3395 Renabling the error graph which is rendered on error 2022-09-02 14:05:31 +02:00
Knut Sveidqvist 98f37d64ea #3395 Fix for lopp stopping at first failure 2022-09-02 12:45:22 +02:00
Knut Sveidqvist ccb16e5f5a Adding cloud and bang shapes 2022-09-02 11:08:26 +02:00
Sidharth Vinod f28c86326d
Introduce stricter linting 2022-09-02 11:50:41 +05:30
Sidharth Vinod 269722fb65
Introduce stricter linting 2022-09-02 11:44:06 +05:30
Alois Klink b3c0c57c6d
fix: fix passing a single Node to mermaid.init()
Passing a single Node to mermaid.init() results in an error, as it
calls `new NodeList()`, which causes `TypeError: Illegal constructor`.

See 5597cf45bf/src/mermaid.ts (L73)

If we instead use the `ArrayLike` interface, we can just use a simple
array, instead of a NodeList.

I've also added a basic test case, by mocking the `mermaidAPI.render()`
function so it isn't called, as the d3 functions don't work in Node.JS.
The mocks are a bit messy, since
 a) Jest doesn't fully support ESM yet, and
 b) mermaidAPI is frozen with `Object.freeze()`,
but the mermaidAPI mocks work as long as we keep them simple.

Fixes: c68ec54fdd
2022-09-02 04:39:58 +01:00
Sidharth Vinod f1fa91a51c
fix flowchart jison 2022-09-02 00:46:02 +05:30
Sidharth Vinod 6be05e9948
Esbuild with types 2022-09-02 00:34:03 +05:30
Sidharth Vinod 84bf79f72b
Fix export 2022-09-01 23:39:30 +05:30
Sidharth Vinod 01562528b7
Typescript 2022-09-01 22:45:10 +05:30
Alois Klink 0dca4d3393
fix(git): support numeric branch names
gitGraph does not support branch names that start with a number,
because the gitGraph.jison file parses these as NUM (number) instead.

To fix this, I've changed the NUM parser to only accept strings that
end with whitespace (e.g 1234 is a NUM, but 1234abc is not a NUM).
To do this, I had to move the "skip all whitespace" step to the
end of the parser, but this doesn't seem to have caused any issues,
so it's probably fine.
2022-09-01 17:24:00 +01:00
Sidharth Vinod 7aeb60f42a
Merge branch 'develop' into sidv/esbuild
* develop: (50 commits)
  Typo fix
  Fix repo URL
  Revert flowchart change
  Revert flowchart change
  Fix TODO Qs
  chore(deps-dev): bump @commitlint/cli from 17.1.1 to 17.1.2
  chore(deps-dev): bump terser-webpack-plugin from 5.3.5 to 5.3.6
  chore(deps-dev): bump webpack-dev-server from 4.10.0 to 4.10.1
  Fix gitGraph findLane function error
  Update dependabot.yml
  Replacing replaceAll with replace
  Rework 'parseDuration' as a pure duration parsing
  Supports duration in decimal
  Create a more consistent 'parseDuration'
  Remove `@ts-ignore`s.
  Fix svgDraw return types
  ...
2022-09-01 20:38:21 +05:30
Sidharth Vinod 1ced01c7f6
Typo fix 2022-09-01 20:21:13 +05:30
Sidharth Vinod e46d9c1173
Merge branch 'develop' into sidv/typescript
* develop:
  chore(deps-dev): bump @commitlint/cli from 17.1.1 to 17.1.2
  chore(deps-dev): bump terser-webpack-plugin from 5.3.5 to 5.3.6
  chore(deps-dev): bump webpack-dev-server from 4.10.0 to 4.10.1
  Fix gitGraph findLane function error
  Replacing replaceAll with replace
  Rework 'parseDuration' as a pure duration parsing
  Supports duration in decimal
  Create a more consistent 'parseDuration'
  Fix svgDraw return types
  Add more tests
  Fix nested types
  Fix nested types
  Add nested test
  Updating to version to 9.1.6
2022-09-01 20:06:42 +05:30
Knut Sveidqvist ac76fb73a8
Merge pull request #3360 from vallsv/feature-ms-duration
Feature decimal duration in second for gantt diagram
2022-09-01 16:23:42 +02:00
Knut Sveidqvist 694692fb5d
Merge pull request #3354 from mermaid-js/sidv/tsAnnotation
Add nested test for parseGenericTypes
2022-09-01 16:21:46 +02:00
Knut Sveidqvist 3502fb46f8
Merge pull request #3383 from hughli-git/fix_git_stack_exceeded
Fix gitGraph findLane function error
2022-09-01 16:00:43 +02:00
Knut Sveidqvist bacdd49176
Merge pull request #3380 from mermaid-js/3056_Chrome_Compatibility
3056 chrome compatibility
2022-09-01 15:59:46 +02:00
Knut Sveidqvist 065a3176b8
Merge pull request #3379 from mermaid-js/3238_Gitgraph_merge_commits
3238 gitgraph merge commits
2022-09-01 15:57:43 +02:00
Sidharth Vinod 4fa0d366db
Revert flowchart change 2022-09-01 19:17:31 +05:30
Sidharth Vinod 36be8114d0
Revert flowchart change 2022-09-01 19:16:15 +05:30
Sidharth Vinod 8c85c10212
Fix TODO Qs 2022-09-01 18:40:28 +05:30
Knut Sveidqvist 2fbdfdbf6a Fix for unit tests after refactoring 2022-09-01 14:31:26 +02:00
Knut Sveidqvist 558ef8a2db #448 Size calculations 2022-09-01 14:25:47 +02:00
Knut Sveidqvist 68f8010ab9 Merge branch 'develop' into minmaps 2022-09-01 13:42:21 +02:00
Knut Sveidqvist 654dfa6b3d #448 Fixing issue with icon size for the root node 2022-09-01 13:39:00 +02:00
Sidharth Vinod 965df4fdf4
ESBuild 2022-08-31 23:59:32 +05:30
hughligit 9d5e855e8e
Fix gitGraph findLane function error
findLane may infinite loop after recursive call, then cause RangeError: Maximum call stack size exceeded.
2022-08-31 16:51:36 +08:00
Sidharth Vinod 9b319a55f6
Merge branch 'develop' into sidv/typescript
* develop:
  chore(deps-dev): bump @commitlint/cli from 17.0.3 to 17.1.1 (#3376)
  chore(deps-dev): bump eslint from 8.22.0 to 8.23.0 (#3378)
  chore(deps): bump dompurify from 2.3.10 to 2.4.0 (#3375)
  chore(deps-dev): bump @commitlint/config-conventional (#3370)
  chore(deps-dev): bump @babel/core from 7.18.10 to 7.18.13 (#3373)
  chore(deps-dev): bump eslint-plugin-jest from 26.8.7 to 27.0.1 (#3372)
  chore(deps-dev): bump jest-environment-jsdom from 28.1.3 to 29.0.1 (#3369)
  chore(deps-dev): bump babel-jest from 28.1.3 to 29.0.1 (#3368)
  Updating docs to latest mermaid version
  build: add eslint --cache file
  Adjusting size and test
  Updated viewBox settings
  Border
  feat(git): allow custom merge commit ids
  Document line curve options
  Added 'ms' duration
  Fix font weight for messages in sequence diagrams
  Added lollipop feature for updated codebase
2022-08-31 11:34:59 +05:30
Knut Sveidqvist 3400c19277 Merge branch 'minmaps' of github.com:mermaid-js/mermaid into minmaps 2022-08-30 21:38:48 +02:00
Knut Sveidqvist f14971e908 Some theming/styling fixes 2022-08-30 21:37:26 +02:00
Knut Sveidqvist 18d95e479c Fix for issue with comments 2022-08-30 21:35:21 +02:00
Knut Sveidqvist 6966ca47d1 Size updates 2022-08-30 21:33:09 +02:00
ashishj 8f107026a9 Merge branch 'develop' into 3056_Chrome_Compatibility 2022-08-30 19:57:38 +02:00
ashishj c846b48882 Replacing replaceAll with replace 2022-08-30 19:55:01 +02:00
ashishj 7068f6c08a #3238 Added test cases 2022-08-30 18:32:06 +02:00
Ashish Jain 5b63260240
Merge pull request #3311 from may4everL/1145_lollipop_interface
Added lollipop feature for updated codebase
2022-08-30 18:16:49 +02:00
ashishj d2aaf6aad9 #3238 Merge from 'develop' 2022-08-30 18:11:10 +02:00
Ashish Jain d7e0888801
Merge pull request #3361 from aloisklink/feature/3356_git_custom_merge_commit_id
feat(git): allow custom merge commit ids
2022-08-30 17:50:57 +02:00
ashishj e542339ed1 Merge branch 'develop' into 3238_Gitgraph_merge_commits 2022-08-30 17:44:02 +02:00
ashishj 2229a307a1 #3238 Enhancing the merge commit functionality 2022-08-30 17:42:42 +02:00
Knut Sveidqvist 4cdc6e4a0d Merge branch 'minmaps' of github.com:mermaid-js/mermaid into minmaps 2022-08-28 14:25:15 +02:00
Knut Sveidqvist f350ff9852 Merge branch 'minmaps' of github.com:mermaid-js/mermaid into minmaps 2022-08-28 14:25:02 +02:00
Knut Sveidqvist 6ab0eef6f3 Merge branch 'develop'
Conflicts:
	cypress/platform/knsv.html
2022-08-28 14:22:56 +02:00
Knut Sveidqvist e6e7bdcb55 #2824 Size changes and updated regressionstest afters diagram sizing changes 2022-08-28 11:25:09 +02:00
Knut Sveidqvist 3b93c39249 Adjusting size and test 2022-08-27 15:11:43 +02:00
Knut Sveidqvist 2968b400c4 Updated viewBox settings 2022-08-27 15:03:29 +02:00
Knut Sveidqvist d0d5739ab0 Merge branch 'develop' into minmaps 2022-08-27 12:35:30 +02:00
Alois Klink b2f5ba3ee8
feat(git): allow custom merge commit ids
Currently, merge commits can have a git tag, but they cannot have a
custom git commit ID.

This commit allows modifying the default merge commit id.
It also displays all merge commits IDs, which undoes
3ccf027f42
2022-08-25 23:42:39 +01:00
Valentin Valls ba4f7d2ceb Rework 'parseDuration' as a pure duration parsing 2022-08-25 23:15:28 +02:00
Valentin Valls 3315ae8382 Supports duration in decimal 2022-08-25 23:15:28 +02:00
Valentin Valls f7b8d1ac07 Create a more consistent 'parseDuration'
- Remove 'durationToDate' which was not a usable function
2022-08-25 23:15:28 +02:00
Sidharth Vinod a3dfc4c0e8
Remove `@ts-ignore`s.
Co-authored-by: Yash Singh <saiansh2525@gmail.com>
2022-08-25 21:53:36 +05:30
Sidharth Vinod 15b160c553
Fix svgDraw return types
Co-authored-by: FlorianWoelki <FlorianWoelki@gmx.de>
2022-08-25 12:41:32 +05:30
Sidharth Vinod 39980322bd
Add more tests 2022-08-25 11:59:01 +05:30
Sidharth Vinod 2f7930efb7
Fix nested types
Co-authored-by: FlorianWoelki <FlorianWoelki@gmx.de>
2022-08-25 11:58:43 +05:30
Sidharth Vinod 5996e1e69d
Fix nested types
Co-authored-by: FlorianWoelki <FlorianWoelki@gmx.de>
2022-08-25 08:49:20 +05:30
Yash Singh cde3a7cf70
Merge pull request #3355 from vallsv/feature-ms-duration 2022-08-24 16:07:45 -07:00
Valentin Valls 0583c4fa25 Added 'ms' duration 2022-08-24 22:26:39 +02:00
Fabien Savy a3ace00ed4 Fix font weight for messages in sequence diagrams 2022-08-24 17:07:56 +02:00
Sidharth Vinod c37ff47ee3
Add nested test 2022-08-24 12:33:32 +05:30
Sidharth Vinod 84148d4891
Remove failing test 2022-08-24 12:32:15 +05:30
Sidharth Vinod 60651fdfe0
Merge branch 'develop' into sidv/typescript
* develop: (22 commits)
  Fix for build by revering jsdoc
  Revert "chore(deps-dev): bump documentation from 13.2.0 to 14.0.0"
  Review comments.
  Add test for handling parameter names that are "default"
  Add test for handling parameter names that are keywords
  Add test for handling trailing whitespaces
  Add first C4 parser test
  chore(deps-dev): bump eslint-plugin-jest from 26.8.2 to 26.8.7
  chore(deps-dev): bump documentation from 13.2.0 to 14.0.0
  chore(deps-dev): bump terser-webpack-plugin from 5.3.4 to 5.3.5
  chore(deps-dev): bump prettier-plugin-jsdoc from 0.3.38 to 0.4.1
  test(e2e): add array and generic attributes erDiagram test
  test(common): add generic parser test
  test(parser): add tests for generics and arrays in erDiagram
  feat: add array and generic symbols for erDiagram
  Lint markdown
  Fix prettier formatting in vscode
  Prettier
  Fix `securityLevel` docs
  Update README.md
  ...
2022-08-24 11:38:23 +05:30
Sidharth Vinod 1efd5c7d58
Cleanup 2022-08-24 11:32:27 +05:30
Knut Sveidqvist fd70b862ed
Merge pull request #3332 from lorint/docs/grammatical_touch_ups
Grammatical touch-ups to documentation
2022-08-23 20:18:03 +02:00
Knut Sveidqvist 11809e799b
Merge pull request #3334 from mermaid-js/sidv/fixDoc
Add `sandbox` to `securityLevel` docs
2022-08-23 20:10:06 +02:00
Knut Sveidqvist c50745323a
Merge pull request #3335 from FlorianWoelki/feature/3171_erDiagram_more_symbols
Add generic and array symbols to `erDiagram`
2022-08-23 20:07:06 +02:00
Sidharth Vinod 248a7aff7a
Review comments. 2022-08-23 21:49:01 +05:30
Sidharth Vinod a8042f622f
Merge branch 'sidv/typescript' of https://github.com/mermaid-js/mermaid into sidv/typescript
* 'sidv/typescript' of https://github.com/mermaid-js/mermaid:
  Update src/config.ts
2022-08-23 21:35:43 +05:30
Sidharth Vinod 32ba2d5ffe
Remove console.logs 2022-08-23 21:35:33 +05:30
Daniel Bartholomae 8c56f68a06 Add test for handling parameter names that are "default" 2022-08-23 16:15:38 +02:00
Daniel Bartholomae 2cf9348f53 Add test for handling parameter names that are keywords 2022-08-23 16:12:16 +02:00
Daniel Bartholomae d97ce7eab8 Add test for handling trailing whitespaces 2022-08-23 16:12:16 +02:00
Daniel Bartholomae 0c8f7163db Add first C4 parser test 2022-08-23 16:12:16 +02:00
Knut Sveidqvist 0e0802a588
Update src/config.ts
Agree!

Co-authored-by: Sidharth Vinod <sidharthv96@gmail.com>
2022-08-22 17:48:09 +02:00
Sidharth Vinod 9a0d5e31b7
fix: review comments 2022-08-22 17:12:05 +05:30
Sidharth Vinod 6291e4dcdd
fix detectType 2022-08-22 13:30:10 +05:30
Sidharth Vinod 9f49259bca
fix detectType 2022-08-22 13:29:55 +05:30
Sidharth Vinod 4885e7b7f1
fix detectType 2022-08-22 13:29:25 +05:30
Sidharth Vinod 1549eb20df
tsConversion: fix DiagramAPI 2022-08-22 13:18:50 +05:30
Sidharth Vinod c245a2da07
tsConversion: rename DiagramAPI 2022-08-22 12:59:23 +05:30
Sidharth Vinod d365dacbf7
tsConversion: mermaidAPI 2022-08-22 11:10:30 +05:30
Sidharth Vinod 39aaf2f813
tsConversion: fix paths, add d.ts to output 2022-08-21 22:27:13 +05:30
Sidharth Vinod d97b3807b9
fix: startOnLoad 2022-08-21 19:32:21 +05:30
Sidharth Vinod a51d8e844b
Merge branch 'develop' into sidv/typescript
* develop:
  Fix #3009 Update main
  #3243 Adding disabled testcase for diagram with leading \n
2022-08-21 19:24:15 +05:30
Sidharth Vinod c68ec54fdd
tsConversion: mermaid main 2022-08-21 18:37:27 +05:30
Knut Sveidqvist 280c7e8da1 #3243 Adding disabled testcase for diagram with leading \n 2022-08-21 11:05:13 +02:00
Sidharth Vinod cd4b1ea245
fix: codeScanning vuln 2022-08-21 11:45:20 +05:30
Sidharth Vinod 4710f67baf
fix: sanitization bug 2022-08-21 11:26:45 +05:30
Sidharth Vinod f14f0d9857
tsConversion: config & common 2022-08-21 11:00:22 +05:30
Sidharth Vinod 238cbd14ca
tsConversion: styles 2022-08-21 08:54:27 +05:30
Sidharth Vinod d9bace053b
Add `trace` logLevel 2022-08-21 08:45:17 +05:30
Sidharth Vinod fab9688135
tsConversion: flowchartStyles 2022-08-21 01:21:47 +05:30
Sidharth Vinod 896154d89f
tsConversion: logger 2022-08-21 00:59:54 +05:30
Sidharth Vinod c9cd56914f
tsConversion: errorRenderer 2022-08-21 00:59:27 +05:30
Sidharth Vinod 95dbbb350b
tsConversion: DetectType 2022-08-21 00:38:26 +05:30
Sidharth Vinod 88e17bf1b4
Typescript init 2022-08-20 23:40:52 +05:30
FlorianWoelki e19581b540 test(common): add generic parser test 2022-08-20 14:08:53 +02:00
FlorianWoelki ecf62e3b7a test(parser): add tests for generics and arrays in erDiagram 2022-08-20 13:56:39 +02:00
FlorianWoelki ea3573c989 feat: add array and generic symbols for erDiagram 2022-08-20 13:42:51 +02:00
Lorin Thwaits e1977dd889 Remove duplicate spec 2022-08-19 21:27:22 +01:00
Lorin Thwaits 6635d4bc97 Grammatical touch-ups 2022-08-19 21:27:13 +01:00
Knut Sveidqvist 02fc68a3f6
Merge pull request #3330 from mermaid-js/3306_Fix_Gitgraph_Parsing_Issue
Fix for GitGraphs not working for Mermaid Live Editor
2022-08-18 19:43:17 +02:00
ashishj a9e798c399 Making sure to addDiagrams before detectType call 2022-08-18 19:39:32 +02:00
Knut Sveidqvist 1befbe08ff #3308 Allowing br tags in tooltips 2022-08-18 19:11:33 +02:00
ashishj b21cb43639 Moved diagram registration out of initialize func 2022-08-18 17:54:42 +02:00
Ashish Jain 52fcb92f51
Merge pull request #3277 from alguerocode/clean-code-1
code syntax improvment (initialize func)
2022-08-18 17:01:02 +02:00
Knut Sveidqvist cb4b60e8e4
Merge pull request #3310 from hrgui/fix/3305-subsequent-diagrams-issue
fix(Diagram): fix persisted data due to db not being cleared before parsing
2022-08-11 18:55:23 +02:00
Knut Sveidqvist bf4272102d #3313 Packaging the thrown error in reconised structure 2022-08-11 18:24:14 +02:00
may4everL 7257bba3f3 Added lollipop feature for updated codebase 2022-08-09 22:44:11 -07:00