Commit Graph

2195 Commits

Author SHA1 Message Date
Ashley Engelund (weedySeaDragon @ github) 6376c9ae43 switch order of params so the last one can be omitted 2022-09-07 14:15:09 -07:00
Ashley Engelund (weedySeaDragon @ github) 48b0076ea5 Merge remote-tracking branch 'MERMAID/develop' into docs/3418_auto_generated_comment_html_files 2022-09-07 14:04:56 -07:00
Ashley Engelund (weedySeaDragon @ github) d18624bbe9 change references from /docs to /src/docs; rework doc section in CONTRIBUTING 2022-09-07 14:04:35 -07:00
Ashley Engelund (weedySeaDragon @ github) 7fe8f260fc minor cleanup, clarify var names, add @todos 2022-09-07 14:04:35 -07:00
Ashley Engelund (weedySeaDragon @ github) 73abcd869c fix: also check other files 2022-09-07 14:04:35 -07:00
Ashley Engelund (weedySeaDragon @ github) d0074356e9 fix: cannot use __dirname with .mts and latest Node 2022-09-07 14:04:35 -07:00
Alois Klink 6e81ee9d97
Merge branch 'develop' into other/3339_forbid-console-in-src-code
Fixes merge conflict in:
  - .eslintrc.json due to 6167eda6b6
  - lint.yml due to 5674f8e675
2022-09-07 21:00:42 +01:00
Sidharth Vinod 3986f48199
fix: Tsconfig 2022-09-08 00:34:52 +05:30
Ashley Engelund (weedySeaDragon @ github) c6ce5a80fa fix: pass in doCopy param 2022-09-07 11:00:59 -07:00
Ashley Engelund (weedySeaDragon @ github) 411d641aa2 simplfy method to copy transformation to /docs; extract logging
Extract the logging so that it if later we want to turn it on/off with a --verbose flag
2022-09-07 08:35:51 -07:00
Sidharth Vinod 86cbf85358
Merge branch 'develop' into sidv/esbuild
* develop:
  Update prettier
  chore: Run postbuild with prepare
  (formatting) prettier fix
  Removed warnings in the grammar oand some console logging
  unmangle sentence about doc changes committed and showing up on docsify site
  change references from /docs to /src/docs; rework doc section in CONTRIBUTING
2022-09-07 21:03:07 +05:30
Ashley Engelund (weedySeaDragon @ github) a878edfb9b add and use constants; DRY glob patterns in main 2022-09-07 08:32:52 -07:00
Ashley Engelund (weedySeaDragon @ github) 1a0fe0abf6 (comments only) reword main docblock; clarify other comments; grammar etc. fixes 2022-09-07 08:30:13 -07:00
Ashley Engelund (weedySeaDragon @ github) b534a5c2ff Merge remote-tracking branch 'MERMAID/develop' into docs/3418_auto_generated_comment_html_files 2022-09-07 06:52:02 -07:00
Ashley Engelund (weedySeaDragon @ github) b7cf7beb22 Merge remote-tracking branch 'MERMAID/develop' into docs/bug-3417-change_src_docs_only 2022-09-07 06:36:13 -07:00
Knut Sveidqvist c50a7533f6 Removed warnings in the grammar oand some console logging 2022-09-07 12:38:26 +02:00
Sidharth Vinod a61c17c1a9
Fix doc formatting 2022-09-07 12:02:59 +05:30
Sidharth Vinod 853b676d48
Merge branch 'develop' into sidv/esbuild
* develop: (37 commits)
  fix JSDOC @param, @returns; fixed a few minor typos in comments
  Update after lint comments
  Regenerate the directive docs as I changed them
  chore(deps-dev): bump typescript from 4.7.4 to 4.8.2
  Update duplicate copy pasted directive description
  chore(deps-dev): bump babel-jest from 29.0.1 to 29.0.2
  Lint fixes
  Removing requirement to add ids for nodes with a shape
  Merged typescript changes
  Updated with cloud and bang shapes
  Adding cloud and bang shapes
  fix(git): support numeric branch names
  Fix for unit tests after refactoring
  Documenting classes and icons
  Startingpoint for the documentation
  Some theming/styling fixes
  Adding some rendering tests
  ...
2022-09-07 11:57:33 +05:30
Sidharth Vinod 51dbdb933c
Fix mermaidAPI mock
Co-authored-by: Alois Klink <alois@aloisklink.com>
2022-09-07 11:56:31 +05:30
Sidharth Vinod c0dd6f9e35
Merge pull request #3422 from weedySeaDragon/chore/3421_fix_jsdoc_lint_errors
chore: fix JSDOC @param, @returns lint errors
2022-09-06 15:16:45 +05:30
Ashley Engelund (weedySeaDragon @ github) 0832b24d66 use single quotes; use const instead of let (2); use const instead of function 2022-09-05 23:43:57 -07:00
Knut Sveidqvist 97ed63de5a
Merge pull request #3392 from aloisklink/fix/3347_support_branch_names_that_start_with_numbers
fix(git): support numeric branch names
2022-09-06 06:49:53 +02:00
Ashley Engelund (weedySeaDragon @ github) 91363f7aed fix JSDOC @param, @returns; fixed a few minor typos in comments 2022-09-05 19:45:33 -07:00
Ashley Engelund (weedySeaDragon @ github) 6554a41f6d transform HTML (insert comment); add console msgs and clarify; add file doc 2022-09-05 18:39:36 -07:00
Ashley Engelund (weedySeaDragon @ github) d38f0e9e03 adjust console log message if only verifying, if copied actually happened 2022-09-05 18:36:17 -07:00
Ashley Engelund (weedySeaDragon @ github) 703b7eb91d rename vars so intent is clearer, add doc, use constants 2022-09-05 18:33:17 -07:00
Ashley Engelund (weedySeaDragon @ github) 0c85e8ee53 eslint (mostly use double quotes) 2022-09-05 18:27:58 -07:00
Ashley Engelund (weedySeaDragon @ github) 0780668239 change references from /docs to /src/docs; rework doc section in CONTRIBUTING 2022-09-05 16:54:31 -07:00
Knut Sveidqvist 030cbb1acb Update after lint comments 2022-09-05 20:40:12 +02:00
Knut Sveidqvist 1ccd3183c4 Merge branch 'develop' into minmaps 2022-09-05 20:14:23 +02:00
Mark Crossfield 818195f2e4
Update duplicate copy pasted directive description
Looked like the description for changing the theme via a directive had been copied to a couple of other use cases.
2022-09-05 17:24:34 +01:00
Sidharth Vinod f9bf53551f
Merge branch 'develop' into sidv/esbuild
* develop: (50 commits)
  Build docs
  chore: update browsers list
  Fix pre
  Fix mermaid code formatting in html
  Prettier pass
  Fix XSS htmls
  fix #3407 Replace `div` with `pre` and format
  Add change in `src/docs`
  Fix lint issue
  build: run `build:prod` on `yarn prepare`
  Build documentation
  Fix typo
  Fix typo in documentation
  Fix doc
  Add files only when running from lint-staged
  Add files only when running from lint-staged
  Fix configuration doc
  Prettier Pass
  Add dotfiles
  Prettier
  ...
2022-09-05 20:31:44 +05:30
Sidharth Vinod d898b8a7e7
Merge branch 'develop' into sidv/typescript
* develop: (50 commits)
  Build docs
  chore: update browsers list
  Fix pre
  Fix mermaid code formatting in html
  Prettier pass
  Fix XSS htmls
  fix #3407 Replace `div` with `pre` and format
  Add change in `src/docs`
  Fix lint issue
  build: run `build:prod` on `yarn prepare`
  Build documentation
  Fix typo
  Fix typo in documentation
  Fix doc
  Add files only when running from lint-staged
  Add files only when running from lint-staged
  Fix configuration doc
  Prettier Pass
  Add dotfiles
  Prettier
  ...
2022-09-05 20:17:59 +05:30
Sidharth Vinod 5ae1bd92cd
Build docs 2022-09-05 19:48:38 +05:30
Sidharth Vinod 5e9db250bc
Merge branch 'develop' into sidv/docs
* develop:
  chore: update browsers list
  Fix pre
  Prettier pass
  Fix XSS htmls
  fix #3407 Replace `div` with `pre` and format
2022-09-05 19:30:39 +05:30
Knut Sveidqvist 47490e9820 Lint fixes 2022-09-05 15:57:12 +02:00
Knut Sveidqvist df7b5965c2
Merge branch 'develop' into minmaps 2022-09-05 15:35:24 +02:00
Knut Sveidqvist 8ad5f728c0 Removing requirement to add ids for nodes with a shape 2022-09-05 14:53:01 +02:00
Knut Sveidqvist 8b4a08eef4 #3336 Merged typescript changes 2022-09-05 14:04:39 +02:00
Knut Sveidqvist 01106caa59 Merged typescript changes 2022-09-05 11:22:17 +02:00
Knut Sveidqvist 047b7023a2 Updated with cloud and bang shapes 2022-09-05 09:54:00 +02:00
Sidharth Vinod a95f46f513
Fix mermaid code formatting in html 2022-09-05 01:25:28 +05:30
Sidharth Vinod 98e9f5751a
Prettier pass 2022-09-05 01:00:47 +05:30
Sidharth Vinod 537ce4f630
Add change in `src/docs` 2022-09-04 13:31:58 +05:30
Sidharth Vinod 22999e27f0
Merge branch 'develop' into sidv/docs
* develop:
  build: run `build:prod` on `yarn prepare`
  Build documentation
  Fix typo
  Fix typo in documentation
  added mermerd to integrations documentation
2022-09-04 13:12:44 +05:30
Alois Klink 106672bc75
refactor: remove `console.log` in c4Diagram.jison
These aren't caught by eslint, since they're in a .jison file.
2022-09-03 23:58:21 +01:00
Alois Klink cb4935258c
style: forbid using `console` in mermaid src code
Adds an eslint rule forbidding using `console` in the mermaid source
code. Instead, the `src/logger` should be used instead, so that
websites can disable logging.

This is allowed in the `cypress/` and `demos/` folder.

I've also removed the two instances on `console.log`/`console.error`
that currently exist in the mermaid source code.
2022-09-03 23:40:10 +01:00
Daniel Bartholomae 1a6305c079
Add tests for other boundary properties 2022-09-03 20:38:10 +02:00
Daniel Bartholomae b86476331f
Add first test for Boundary 2022-09-03 20:38:10 +02:00
Daniel Bartholomae 092c15a37c
Test all different types of systems 2022-09-03 20:38:10 +02:00
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