From b3573e27be875b7592ce045144d9fa08004fa40d Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Thu, 24 Feb 2022 19:23:44 +0100 Subject: [PATCH 01/32] chore: readme sync, 1 --- README.md | 12 ++++++++++++ docs/README.md | 30 +++++++++++++++++++++++------- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1f94027cf..3178f2add 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,18 @@ pie Sit down: 3: Me ``` +### Release + +For those who have the permission to do so: + +Update version number in `package.json`. + +```sh +npm publish +``` + +The above command generates files into the `dist` folder and publishes them to npmjs.org. + ## Related projects - [Command Line Interface](https://github.com/mermaid-js/mermaid-cli) diff --git a/docs/README.md b/docs/README.md index 16c99100e..a5ff14e6f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -268,6 +268,18 @@ npm publish The above command generates files into the `dist` folder and publishes them to npmjs.org. +## Related projects + +- [Command Line Interface](https://github.com/mermaid-js/mermaid-cli) +- [Live Editor](https://github.com/mermaid-js/mermaid-live-editor) +- [HTTP Server](https://github.com/TomWright/mermaid-server) + +## Contributors [![Good first issue](https://img.shields.io/github/labels/mermaid-js/mermaid/Good%20first%20issue%21)](https://github.com/mermaid-js/mermaid/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good+first+issue%21%22) [![Contributors](https://img.shields.io/github/contributors/mermaid-js/mermaid)](https://github.com/mermaid-js/mermaid/graphs/contributors) [![Commits](https://img.shields.io/github/commit-activity/m/mermaid-js/mermaid)](https://github.com/mermaid-js/mermaid/graphs/contributors) + +Mermaid is a growing community and is always accepting new contributors. There's a lot of different ways to help out and we're always looking for extra hands! Look at [this issue](https://github.com/mermaid-js/mermaid/issues/866) if you want to know where to start helping out. + +Detailed information about how to contribute can be found in the [contribution guide](CONTRIBUTING.md) + ## Security and safe diagrams For public sites, it can be precarious to retrieve text from users on the internet, storing that content for presentation in a browser at a later stage. The reason is that the user content can contain embedded malicious scripts that will run when the data is presented. For Mermaid this is a risk, specially as mermaid diagrams contain many characters that are used in html which makes the standard sanitation unusable as it also breaks the diagrams. We still make an effort to sanitise the incoming code and keep refining the process but it is hard to guarantee that there are no loop holes. @@ -276,13 +288,17 @@ As an extra level of security for sites with external users we are happy to intr *Unfortunately you can not have a cake and eat it at the same time which in this case means that some of the interactive functionality gets blocked along with the possible malicious code.* +## Reporting vulnerabilities +To report a vulnerability, please e-mail security@mermaid.live with a description of the issue, the steps you took to create the issue, affected versions, and if known, mitigations for the issue. -## Credits +## Appreciation +A quick note from Knut Sveidqvist: +>*Many thanks to the [d3](https://d3js.org/) and [dagre-d3](https://github.com/cpettitt/dagre-d3) projects for providing the graphical layout and drawing libraries!* +>*Thanks also to the [js-sequence-diagram](https://bramp.github.io/js-sequence-diagrams) project for usage of the grammar for the sequence diagrams. Thanks to Jessica Peter for inspiration and starting point for gantt rendering.* +>*Thank you to [Tyler Long](https://github.com/tylerlong) who has been a collaborator since April 2017.* +> +>*Thank you to the ever-growing list of [contributors](https://github.com/knsv/mermaid/graphs/contributors) that brought the project this far!* -Many thanks to the [d3](http://d3js.org/) and [dagre-d3](https://github.com/cpettitt/dagre-d3) projects for providing the graphical layout and drawing libraries! +--- -Thanks also to the [js-sequence-diagram](http://bramp.github.io/js-sequence-diagrams) project for usage of the grammar for the sequence diagrams. Thanks to Jessica Peter for the inspiration and for the starting point of gantt rendering. - -_Mermaid was created by Knut Sveidqvist for easier documentation._ - -Here is the full list of the projects [contributors](https://github.com/knsv/mermaid/graphs/contributors). +*Mermaid was created by Knut Sveidqvist for easier documentation.* \ No newline at end of file From 4ec1c608a3c0b7c794fcd9914c9f98c7460c8c26 Mon Sep 17 00:00:00 2001 From: Cory Gwin Date: Thu, 24 Feb 2022 13:31:27 -0500 Subject: [PATCH 02/32] small bug with the id on the title --- src/accessibility.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/accessibility.js b/src/accessibility.js index fe4a6e857..2b1119580 100644 --- a/src/accessibility.js +++ b/src/accessibility.js @@ -20,6 +20,6 @@ export default function addSVGAccessibilityFields(yy_parser, svg, id) { svg .insert('title', ':first-child') - .attr('id', 'chart-desc-' + id) + .attr('id', 'chart-title-' + id) .text(title_string); } From 695ca5d3f3cc2d50a19b5c1a767f0a00f36f2a63 Mon Sep 17 00:00:00 2001 From: chmahone Date: Mon, 28 Feb 2022 11:07:25 +1100 Subject: [PATCH 03/32] Add `mkdocs-material` to the integrations --- docs/integrations.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/integrations.md b/docs/integrations.md index c061d8c6a..e58cf4a63 100644 --- a/docs/integrations.md +++ b/docs/integrations.md @@ -136,6 +136,7 @@ They also serve as proof of concept, for the variety of things that can be built - [jsdoc-mermaid](https://github.com/Jellyvision/jsdoc-mermaid) - [MkDocs](https://mkdocs.org) - [mkdocs-mermaid2-plugin](https://github.com/fralau/mkdocs-mermaid2-plugin) + - [mkdocs-material](https://github.com/squidfunk/mkdocs-material), check the [docs](https://squidfunk.github.io/mkdocs-material/reference/diagrams/) - [Type Doc](https://typedoc.org/) - [typedoc-plugin-mermaid](https://www.npmjs.com/package/typedoc-plugin-mermaid) - [Docsy Hugo Theme](https://www.docsy.dev/docs/adding-content/lookandfeel/#diagrams-with-mermaid) (Native support in theme) From bc2c3cba08bf7af9c1000569017d1a00c7e506fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 08:13:03 +0100 Subject: [PATCH 04/32] chore(deps-dev): bump @percy/cli from 1.0.0-beta.75 to 1.0.0-beta.76 (#2782) Bumps [@percy/cli](https://github.com/percy/cli/tree/HEAD/packages/cli) from 1.0.0-beta.75 to 1.0.0-beta.76. - [Release notes](https://github.com/percy/cli/releases) - [Commits](https://github.com/percy/cli/commits/v1.0.0-beta.76/packages/cli) --- updated-dependencies: - dependency-name: "@percy/cli" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 176 +++++++++++++++++++++++++++++------------------------- 1 file changed, 93 insertions(+), 83 deletions(-) diff --git a/yarn.lock b/yarn.lock index fa9a86bc6..5c195cdd6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1882,94 +1882,94 @@ widest-line "^3.1.0" wrap-ansi "^6.2.0" -"@percy/cli-build@1.0.0-beta.75": - version "1.0.0-beta.75" - resolved "https://registry.yarnpkg.com/@percy/cli-build/-/cli-build-1.0.0-beta.75.tgz#4f229988da202124b52a315cd982208c28030d74" - integrity sha512-wup3ZKTNln+NvyKkz7f3EUAerjdzNPvQtxcuZxiu0qUa2gfuDPGUqQDUPoAcit4Mm9QqkcuSq0BDz0fejp50xg== +"@percy/cli-build@1.0.0-beta.76": + version "1.0.0-beta.76" + resolved "https://registry.yarnpkg.com/@percy/cli-build/-/cli-build-1.0.0-beta.76.tgz#27ce4962064d8f40d7b0565f180ed87dbbcf5a22" + integrity sha512-8NRos48C/CL8s8SahKIx/c65P6rBsSxWYojqzIL73dOCwEsWf/X8/r7Jf4DS6oK8A56g7F1KfDLsaMFdRQi5YA== dependencies: - "@percy/cli-command" "1.0.0-beta.75" - "@percy/logger" "1.0.0-beta.75" + "@percy/cli-command" "1.0.0-beta.76" + "@percy/logger" "1.0.0-beta.76" -"@percy/cli-command@1.0.0-beta.75": - version "1.0.0-beta.75" - resolved "https://registry.yarnpkg.com/@percy/cli-command/-/cli-command-1.0.0-beta.75.tgz#9e4241811bc308bd4003702f3c99910daa612a70" - integrity sha512-VxzianYAkjzDhkp3Wu7aGaB+rfPBwufUB3u3zDepKNyTFd1DBJvzev6JC9EBRLj7/98fF9jSysY1sXCV0LFfHw== +"@percy/cli-command@1.0.0-beta.76": + version "1.0.0-beta.76" + resolved "https://registry.yarnpkg.com/@percy/cli-command/-/cli-command-1.0.0-beta.76.tgz#4ab72d266d1bf0ddf2bbe1ad30283773263ab638" + integrity sha512-/ceDY2Y+l7uv+ttIxbS0+VPY4/EJpL64oXblCwz1Ecd+5yFE1Ud+wWpdAWJxqc8Vipt+eMC+E7swB1U5X99ZEA== dependencies: - "@percy/config" "1.0.0-beta.75" - "@percy/core" "1.0.0-beta.75" - "@percy/logger" "1.0.0-beta.75" + "@percy/config" "1.0.0-beta.76" + "@percy/core" "1.0.0-beta.76" + "@percy/logger" "1.0.0-beta.76" -"@percy/cli-config@1.0.0-beta.75": - version "1.0.0-beta.75" - resolved "https://registry.yarnpkg.com/@percy/cli-config/-/cli-config-1.0.0-beta.75.tgz#9292d937bca6cf5a94991433808682310aeaa653" - integrity sha512-fBIP7V6ULpkzWJ0djvpLjG9xxxp2M7tH3lxqyo8UiJYlelfNW/hI8ThYknfJBWr4CV9e+bo/dBmprtLE0gRbOA== +"@percy/cli-config@1.0.0-beta.76": + version "1.0.0-beta.76" + resolved "https://registry.yarnpkg.com/@percy/cli-config/-/cli-config-1.0.0-beta.76.tgz#61ee5e5b01660ffb362ad61ee131ddfcc38720f1" + integrity sha512-quYr2hYqeafDnHFPKZQlncy5qPkmjfPg22mv/HmABqH+GPe30gADOEqOAW0/NeprK+jq2IRxx3NdYKUBa/kZAg== dependencies: - "@percy/cli-command" "1.0.0-beta.75" - "@percy/config" "1.0.0-beta.75" + "@percy/cli-command" "1.0.0-beta.76" + "@percy/config" "1.0.0-beta.76" -"@percy/cli-exec@1.0.0-beta.75": - version "1.0.0-beta.75" - resolved "https://registry.yarnpkg.com/@percy/cli-exec/-/cli-exec-1.0.0-beta.75.tgz#e43a7a6f240f9ff880891bd337dcc81f5da80742" - integrity sha512-csCTzqSx3ItzNJh+TjRhx5ccb53ERjTSmPsZpzmnSSmQ0dwVoxf1+TmEpKOmROL2szswrPXZfV/4lhkiaXF5OQ== +"@percy/cli-exec@1.0.0-beta.76": + version "1.0.0-beta.76" + resolved "https://registry.yarnpkg.com/@percy/cli-exec/-/cli-exec-1.0.0-beta.76.tgz#afa14cdf04bcb4d4f32f9fc4c60fd3331c611b60" + integrity sha512-SJWZ8m3duNWJZzqd0m34Gnydn5vTS84jwt4+nhZ3/gqSmNN9QLX0fJJNGpRjuB7oVzEzdh1pAhaxyIM7+0pV8A== dependencies: - "@percy/cli-command" "1.0.0-beta.75" - "@percy/core" "1.0.0-beta.75" + "@percy/cli-command" "1.0.0-beta.76" + "@percy/core" "1.0.0-beta.76" cross-spawn "^7.0.3" which "^2.0.2" -"@percy/cli-snapshot@1.0.0-beta.75": - version "1.0.0-beta.75" - resolved "https://registry.yarnpkg.com/@percy/cli-snapshot/-/cli-snapshot-1.0.0-beta.75.tgz#41073bad3448fda880481aab343d29f6c344e9b0" - integrity sha512-Ww5cRtAO46o0YMhzpt5wxpQ8NgPLt5PYRxJ77GWrOv5PDQOz2twZWH9QStj+XSn24yfVGN+OwpWIS/COzpqWtg== +"@percy/cli-snapshot@1.0.0-beta.76": + version "1.0.0-beta.76" + resolved "https://registry.yarnpkg.com/@percy/cli-snapshot/-/cli-snapshot-1.0.0-beta.76.tgz#473b2316e112677016b04392ea5b835e17f70b30" + integrity sha512-C981wuC0lm0i4plbRqtlOMHx+/0lIyGGII3ypTs7pFwY1CrNiy7+bWXfdD/PHdVCVZ+YeVuqjEB1GA9A05u8oQ== dependencies: - "@percy/cli-command" "1.0.0-beta.75" - "@percy/config" "1.0.0-beta.75" - "@percy/core" "1.0.0-beta.75" + "@percy/cli-command" "1.0.0-beta.76" + "@percy/config" "1.0.0-beta.76" + "@percy/core" "1.0.0-beta.76" globby "^11.0.4" path-to-regexp "^6.2.0" picomatch "^2.3.0" serve-handler "^6.1.3" yaml "^1.10.0" -"@percy/cli-upload@1.0.0-beta.75": - version "1.0.0-beta.75" - resolved "https://registry.yarnpkg.com/@percy/cli-upload/-/cli-upload-1.0.0-beta.75.tgz#18a58dd7ba03bb5f8c91219773515d0501366b6f" - integrity sha512-Fh5eaEH8+GS582GXLcbbgvDPRBSC/xffcIVwIVnI3txVvzvCybSWDdLePzBUp1iHp1XWqbFa3qZvsoZu+6Twaw== +"@percy/cli-upload@1.0.0-beta.76": + version "1.0.0-beta.76" + resolved "https://registry.yarnpkg.com/@percy/cli-upload/-/cli-upload-1.0.0-beta.76.tgz#cf5e642643dd7357f47cecab5526d1d92c94f6f5" + integrity sha512-5hz3PCEl9MMF2Fkqn6QKUk+hJVfGZLuJLm6zYOcAF2FdLbw6CnFN8dz8K4EIrQLjH3DgTbI+YkEsr7b89V+aLA== dependencies: - "@percy/cli-command" "1.0.0-beta.75" - "@percy/client" "1.0.0-beta.75" - "@percy/logger" "1.0.0-beta.75" + "@percy/cli-command" "1.0.0-beta.76" + "@percy/client" "1.0.0-beta.76" + "@percy/logger" "1.0.0-beta.76" globby "^11.0.4" image-size "^1.0.0" "@percy/cli@^1.0.0-beta.58": - version "1.0.0-beta.75" - resolved "https://registry.yarnpkg.com/@percy/cli/-/cli-1.0.0-beta.75.tgz#1a12823c4da60b9cc539bec98ba3147dfa88efa7" - integrity sha512-BKqvdxJ3srxneqnKsmRIgpCkbEG065KRhtrQ28evSiXv/M7AtcEgdL676eAJ5joGjAfCtnZeKROR5H1hIi7Fkw== + version "1.0.0-beta.76" + resolved "https://registry.yarnpkg.com/@percy/cli/-/cli-1.0.0-beta.76.tgz#2c5ab442b7cfa00f49a8a6fd009c2335b3319a9d" + integrity sha512-X3I+28KNedv2vlitVnhu751QdxC0JMmFN51gOBNHkh4gy5rU372oQk1Y6XUQHYjq69BvZMHJnv4Pxhh2RFDZgg== dependencies: - "@percy/cli-build" "1.0.0-beta.75" - "@percy/cli-command" "1.0.0-beta.75" - "@percy/cli-config" "1.0.0-beta.75" - "@percy/cli-exec" "1.0.0-beta.75" - "@percy/cli-snapshot" "1.0.0-beta.75" - "@percy/cli-upload" "1.0.0-beta.75" - "@percy/client" "1.0.0-beta.75" - "@percy/logger" "1.0.0-beta.75" + "@percy/cli-build" "1.0.0-beta.76" + "@percy/cli-command" "1.0.0-beta.76" + "@percy/cli-config" "1.0.0-beta.76" + "@percy/cli-exec" "1.0.0-beta.76" + "@percy/cli-snapshot" "1.0.0-beta.76" + "@percy/cli-upload" "1.0.0-beta.76" + "@percy/client" "1.0.0-beta.76" + "@percy/logger" "1.0.0-beta.76" -"@percy/client@1.0.0-beta.75": - version "1.0.0-beta.75" - resolved "https://registry.yarnpkg.com/@percy/client/-/client-1.0.0-beta.75.tgz#561734472ab0acfb66bfea71345a0c51bb71fa36" - integrity sha512-QHyTQOBLj8iEminAUaIS8QV7CpGdKp6RwHLCTIHaUCGprzU+FZ8+/hhlHVbWwx0EYqeK2DrWr5ruEDdHC9C4oQ== +"@percy/client@1.0.0-beta.76": + version "1.0.0-beta.76" + resolved "https://registry.yarnpkg.com/@percy/client/-/client-1.0.0-beta.76.tgz#cc0438ec1a2129bf41e75c33e2d1a2f91d434704" + integrity sha512-vq0npya/YobIwbqrhiCXF7liwHJNmMEiAkefv5AXLmhCxIJ9eWjvgYew4xssuf+QPHfdv10EVa5kkMSr8INxeA== dependencies: - "@percy/env" "1.0.0-beta.75" - "@percy/logger" "1.0.0-beta.75" + "@percy/env" "1.0.0-beta.76" + "@percy/logger" "1.0.0-beta.76" -"@percy/config@1.0.0-beta.75": - version "1.0.0-beta.75" - resolved "https://registry.yarnpkg.com/@percy/config/-/config-1.0.0-beta.75.tgz#e86596349f15e881c8a7dbd6e090c3a80bbab686" - integrity sha512-UcbMCYlp0NpQcUJo7X6Vwo67OVa/l0XEG00OwOE+XF/aB083Zo4usXO7rRBdn3UuJ4zj5/mqpK/+hiSMdK8PPg== +"@percy/config@1.0.0-beta.76": + version "1.0.0-beta.76" + resolved "https://registry.yarnpkg.com/@percy/config/-/config-1.0.0-beta.76.tgz#71b0f8df28053769c964acae461bfd8b705a674d" + integrity sha512-e3sLzcrVlsax5q1RwO8sek2Qjqb617WFpa1+wnXqPSMSxiEBlr+lbUC/C5a1hHKEWdFz4RKSJC+2mjhT8ylm3g== dependencies: - "@percy/logger" "1.0.0-beta.75" + "@percy/logger" "1.0.0-beta.76" ajv "^8.6.2" cosmiconfig "^7.0.0" yaml "^1.10.0" @@ -1984,17 +1984,20 @@ cosmiconfig "^7.0.0" yaml "^1.10.0" -"@percy/core@1.0.0-beta.75": - version "1.0.0-beta.75" - resolved "https://registry.yarnpkg.com/@percy/core/-/core-1.0.0-beta.75.tgz#a6b07da3f493d9dcd80431f83c5718362c7fe8cd" - integrity sha512-VyaMT6DgOTvqRt55SeVXnCAyX1+4AAqzwHPWksFHPdmtuwpOw7ptDucX/503RTk6KNHsauZ1IxqPipb0fJkKJw== +"@percy/core@1.0.0-beta.76": + version "1.0.0-beta.76" + resolved "https://registry.yarnpkg.com/@percy/core/-/core-1.0.0-beta.76.tgz#7bca4b744c782e9dd8f9097b6af1c676b3eb7fbf" + integrity sha512-sTtwdNBmhX/IvKrNGT3TWrZ0ngJZ2Kh6Y4m9M9H4pciGHmiSFcMqsBB0tK6IMbfIsGqFz8ePOTj++4RLSMlK/g== dependencies: - "@percy/client" "1.0.0-beta.75" - "@percy/config" "1.0.0-beta.75" - "@percy/dom" "1.0.0-beta.75" - "@percy/logger" "1.0.0-beta.75" + "@percy/client" "1.0.0-beta.76" + "@percy/config" "1.0.0-beta.76" + "@percy/dom" "1.0.0-beta.76" + "@percy/logger" "1.0.0-beta.76" + content-disposition "^0.5.4" cross-spawn "^7.0.3" extract-zip "^2.0.1" + mime-types "^2.1.34" + path-to-regexp "^6.2.0" rimraf "^3.0.2" ws "^8.0.0" @@ -2005,25 +2008,25 @@ dependencies: "@percy/sdk-utils" "^1.0.0-beta.44" -"@percy/dom@1.0.0-beta.75": - version "1.0.0-beta.75" - resolved "https://registry.yarnpkg.com/@percy/dom/-/dom-1.0.0-beta.75.tgz#6f368d385acef68e17423993548b9d67e79f19d1" - integrity sha512-H+H8141JTTUGHh2w/VslK2Z4UxgH8YWkKTxJ3VPoqbmXoke+jbqdxW++Qe7RFe5gCJAD7u2LvcCNtYvUTckbRQ== +"@percy/dom@1.0.0-beta.76": + version "1.0.0-beta.76" + resolved "https://registry.yarnpkg.com/@percy/dom/-/dom-1.0.0-beta.76.tgz#ca0e5f639db271eda4f0826af57a25e1b62bd023" + integrity sha512-9v/yXjIe2UhAkjnO2pWT0Ki4rzgIl0Z6YyWcn1b5NfsBcMm99Hcse+otDsQJF8z0MkU4ZykiPY63zmjs45wChQ== -"@percy/env@1.0.0-beta.75": - version "1.0.0-beta.75" - resolved "https://registry.yarnpkg.com/@percy/env/-/env-1.0.0-beta.75.tgz#70ed039968cfb393ab23068fe978f4724d2c5490" - integrity sha512-hu23XMUdkhnSug9XiUgnO9ktzauqE1b+hBwpy/NPR0laFVE1e/v7qJhh8z298L2itisYoNcIBMyej1M7XsM7FQ== +"@percy/env@1.0.0-beta.76": + version "1.0.0-beta.76" + resolved "https://registry.yarnpkg.com/@percy/env/-/env-1.0.0-beta.76.tgz#079f3a1174717d8da15e7e0575ff821fdf035aa5" + integrity sha512-+Mx9K3wjFriMT0cMD5l+VRo6mhQ/XssKy77SUeWrOaGIk7Xs/FsnDUpLOCXAGUeJr1AznZM76ng99IOBM6pY4w== "@percy/logger@1.0.0-beta.71": version "1.0.0-beta.71" resolved "https://registry.yarnpkg.com/@percy/logger/-/logger-1.0.0-beta.71.tgz#03b458b1e43506c08c062f11b46aa2c9b1826fbf" integrity sha512-09MgfGbvSFgvmQ1g0AkPnRwfkJvXluj7TLVlcgBsKEdo0cKfmctvXUtRBgiueqJFSb7jF+JwzE5i17bHnLy0ng== -"@percy/logger@1.0.0-beta.75", "@percy/logger@^1.0.0-beta.36": - version "1.0.0-beta.75" - resolved "https://registry.yarnpkg.com/@percy/logger/-/logger-1.0.0-beta.75.tgz#7217f9b792ef09eb6fbce41be93b7fd6ad7cd827" - integrity sha512-/0otHJcPUAiJwOzyFwwlolp2lGz2Bx11rHy27kUYZpzMoA6mx/9uY6q2rfhuG8/dWbkgAt1Upc7fuMkaGK4P0g== +"@percy/logger@1.0.0-beta.76", "@percy/logger@^1.0.0-beta.36": + version "1.0.0-beta.76" + resolved "https://registry.yarnpkg.com/@percy/logger/-/logger-1.0.0-beta.76.tgz#1a75c583670acc078389a43d8b7410fd655c0b92" + integrity sha512-v5zIMNv1xqdcWBAOK5A6ZEO99ZBwzWS3phLEfkKbIlGIUxvjkJHSfZv/k1dnt2RRfpDNkM6X5pMg2yI8j1+d+g== "@percy/migrate@^0.11.0": version "0.11.0" @@ -3744,6 +3747,13 @@ content-disposition@0.5.3: dependencies: safe-buffer "5.1.2" +content-disposition@^0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" + content-type@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" @@ -8157,7 +8167,7 @@ mime-types@2.1.18: dependencies: mime-db "~1.33.0" -mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: +mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@^2.1.34, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: version "2.1.34" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== @@ -9635,7 +9645,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@~5.2.0: +safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== From d302380b08daa55765faacd2c3422853243100e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 08:13:18 +0100 Subject: [PATCH 05/32] chore(deps-dev): bump eslint from 8.9.0 to 8.10.0 (#2783) Bumps [eslint](https://github.com/eslint/eslint) from 8.9.0 to 8.10.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.9.0...v8.10.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5c195cdd6..2b48f1411 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1490,10 +1490,10 @@ esquery "^1.4.0" jsdoc-type-pratt-parser "~2.2.3" -"@eslint/eslintrc@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.1.0.tgz#583d12dbec5d4f22f333f9669f7d0b7c7815b4d3" - integrity sha512-C1DfL7XX4nPqGd6jcP01W9pVM1HYCuUkFk1432D7F0v3JSlUIeOYn9oCoi3eoLZ+iwBSb29BMFxxny0YrrEZqg== +"@eslint/eslintrc@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.2.0.tgz#7ce1547a5c46dfe56e1e45c3c9ed18038c721c6a" + integrity sha512-igm9SjJHNEJRiUnecP/1R5T3wKLEJ7pL6e2P+GUSfCd0dGjPYYZve08uzw8L2J8foVHFz+NGu12JxRcU2gGo6w== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -5292,11 +5292,11 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0: integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== eslint@^8.2.0: - version "8.9.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.9.0.tgz#a2a8227a99599adc4342fd9b854cb8d8d6412fdb" - integrity sha512-PB09IGwv4F4b0/atrbcMFboF/giawbBLVC7fyDamk5Wtey4Jh2K+rYaBhCAbUyEI4QzB1ly09Uglc9iCtFaG2Q== + version "8.10.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.10.0.tgz#931be395eb60f900c01658b278e05b6dae47199d" + integrity sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw== dependencies: - "@eslint/eslintrc" "^1.1.0" + "@eslint/eslintrc" "^1.2.0" "@humanwhocodes/config-array" "^0.9.2" ajv "^6.10.0" chalk "^4.0.0" From fd1cd908fe844e4ab3790715a0dc3a780ad6297e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 08:17:30 +0100 Subject: [PATCH 06/32] chore(deps): bump actions/setup-node from 2 to 3 (#2784) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2 to 3. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- .github/workflows/e2e.yml | 2 +- .github/workflows/release-preview-publish.yml | 2 +- .github/workflows/release-publish.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a530e188c..66f39f96a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: cache: yarn node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 0a01f3039..3279426ef 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v2.3.4 - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: cache: yarn node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/release-preview-publish.yml b/.github/workflows/release-preview-publish.yml index 8136ff8bd..a8bf8f39d 100644 --- a/.github/workflows/release-preview-publish.yml +++ b/.github/workflows/release-preview-publish.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: 16.x - name: Install Yarn diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 62382a882..10e22822d 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -12,7 +12,7 @@ jobs: - uses: fregante/setup-git-user@v1 - name: Setup Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: 16.x - name: Install Yarn From 4593d8742d3d431aa3c423f6d630e6cf707ce510 Mon Sep 17 00:00:00 2001 From: Neil Cuzon <58763315+NeilCuzon@users.noreply.github.com> Date: Mon, 28 Feb 2022 00:01:03 -0800 Subject: [PATCH 07/32] Update README.md --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3178f2add..1b507a275 100644 --- a/README.md +++ b/README.md @@ -18,10 +18,9 @@ Mermaid is a Javascript based diagramming and charting tool that uses Markdown-i > Doc-Rot is a Catch-22 that Mermaid helps to solve. Diagramming and documentation costs precious developer time and gets outdated quickly. -But not having diagrams or docs ruins productivity and hurts organizational learning.
-Mermaid addresses this problem by cutting the time, effort and tooling that is required to create modifiable diagrams and charts, for smarter and more reusable content. -The text definitions for Mermaid diagrams allows for it to be updated easily, it can also be made part of production scripts (and other pieces of code). -So less time needs to be spent on documenting, as a separate and laborious task.
+But not having diagrams or docs ruins productivity and hurts organizational learning.
+Mermaid addresses this problem by enabling users to create easily modifiable diagrams, it can also be made part of production scripts (and other pieces of code).
+So less time is spent on documenting as a separate task.
Even non-programmers can create diagrams through the [Mermaid Live Editor](https://mermaid-js.github.io/mermaid-live-editor/).
[Tutorials](./docs/Tutorials.md) has video tutorials. Use Mermaid with your favorite applications, check out the list of [Integrations and Usages of Mermaid](./docs/integrations.md). @@ -34,7 +33,7 @@ For a more detailed introduction to Mermaid and some of its more basic uses, loo ## Examples -__The following are some examples of the diagrams, charts and graphs that can be made using Mermaid and the Markdown-inspired text specific to it. Click here jump into the [text syntax](https://mermaid-js.github.io/mermaid/#/n00b-syntaxReference).__ +__The following are some examples of the diagrams, charts and graphs that can be made using Mermaid. Click here jump into the [text syntax](https://mermaid-js.github.io/mermaid/#/n00b-syntaxReference).__ ## Flowchart [docs - live editor] @@ -248,4 +247,4 @@ A quick note from Knut Sveidqvist: --- -*Mermaid was created by Knut Sveidqvist for easier documentation.* \ No newline at end of file +*Mermaid was created by Knut Sveidqvist for easier documentation.* From 0c6f8b58a39f923834d3c3d52d9d127bdc1292da Mon Sep 17 00:00:00 2001 From: Neil Cuzon <58763315+NeilCuzon@users.noreply.github.com> Date: Mon, 28 Feb 2022 00:03:54 -0800 Subject: [PATCH 08/32] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1b507a275..a5b512f2a 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,8 @@ Mermaid is a Javascript based diagramming and charting tool that uses Markdown-i Diagramming and documentation costs precious developer time and gets outdated quickly. But not having diagrams or docs ruins productivity and hurts organizational learning.
Mermaid addresses this problem by enabling users to create easily modifiable diagrams, it can also be made part of production scripts (and other pieces of code).
-So less time is spent on documenting as a separate task.
-Even non-programmers can create diagrams through the [Mermaid Live Editor](https://mermaid-js.github.io/mermaid-live-editor/).
+
+Mermaid allows even non-programmers to easily create detailed and diagrams through the [Mermaid Live Editor](https://mermaid-js.github.io/mermaid-live-editor/).
[Tutorials](./docs/Tutorials.md) has video tutorials. Use Mermaid with your favorite applications, check out the list of [Integrations and Usages of Mermaid](./docs/integrations.md). From b50052c07380522df35c63140dfb53817d1acc1d Mon Sep 17 00:00:00 2001 From: Neil Cuzon <58763315+NeilCuzon@users.noreply.github.com> Date: Mon, 28 Feb 2022 00:38:51 -0800 Subject: [PATCH 09/32] Update README.md --- docs/README.md | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/docs/README.md b/docs/README.md index a5ff14e6f..5a616d241 100644 --- a/docs/README.md +++ b/docs/README.md @@ -18,22 +18,19 @@ It is a Javascript based diagramming and charting tool that renders Markdown-ins -The main purpose of Mermaid is to help with Visualizing Documentation, and helping it catch up with Development. -> Documentation-Rot is a Catch-22 that Mermaid helps to solve. +Mermaid is a Javascript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. The main purpose of Mermaid is to help documentation catch up with development. -Diagramming and Documentation cost precious developer time and get outdated quickly. -However, not having diagrams or documentation ruins productivity and hampers organizational learning. +> Doc-Rot is a Catch-22 that Mermaid helps to solve. -Mermaid addresses this Catch-22 situation by reducing the time, effort and tooling that is required to create modifiable diagrams and charts which in turn results in smarter and more reusable content. -Mermaid, as a text-based diagramming tool allows for quick and easy updates and makes documentation much easier. It can also be included in production scripts and other pieces of code as per requirement. +Diagramming and documentation costs precious developer time and gets outdated quickly. +But not having diagrams or docs ruins productivity and hurts organizational learning.
+Mermaid addresses this problem by enabling users to create easily modifiable diagrams, it can also be made part of production scripts (and other pieces of code).
+
+Mermaid allows even non-programmers to easily create detailed and diagrams through the [Mermaid Live Editor](https://mermaid-js.github.io/mermaid-live-editor/).
+[Tutorials](./docs/Tutorials.md) has video tutorials. +Use Mermaid with your favorite applications, check out the list of [Integrations and Usages of Mermaid](./docs/integrations.md). -> Mermaid is a Diagramming tool for everyone. - -Even non-programmers can create diagrams through the [Mermaid Live Editor](https://github.com/mermaid-js/mermaid-live-editor), Visit the [Tutorials Page](./Tutorials.md) for the Live Editor video tutorials. - -Many editors, wikis and other tools also have mermaid integrations and plugins, making it easy to start using mermaid. A few of those are described in [Simple start to write diagrams](./n00b-gettingStarted.md). - -For a more detailed introduction to Mermaid and some of it's basic uses, refer to [Overview for Beginners](./n00b-overview.md) and [Usage](./usage.md). +For a more detailed introduction to Mermaid and some of its more basic uses, look to the [Beginner's Guide](./docs/n00b-overview.md) and [Usage](./docs/usage.md). 🌐 [CDN](https://unpkg.com/mermaid/) | 📖 [Documentation](https://mermaidjs.github.io) | 🙌 [Contribution](https://github.com/mermaid-js/mermaid/blob/develop/docs/development.md) | 📜 [Version Log](./CHANGELOG.md) | 🔌 [Plug-Ins](./integrations.md) @@ -301,4 +298,4 @@ A quick note from Knut Sveidqvist: --- -*Mermaid was created by Knut Sveidqvist for easier documentation.* \ No newline at end of file +*Mermaid was created by Knut Sveidqvist for easier documentation.* From 005fc7a765340f46e5d48666fd439f10fc1b5c18 Mon Sep 17 00:00:00 2001 From: Luke Hsiao Date: Mon, 28 Feb 2022 15:28:44 -0800 Subject: [PATCH 10/32] docs(integrations): add link to mdbook-mermaid `mdbook` is the de facto standard tool for Rust documentation. It supports third-party plugins, one of which is mdbook-mermaid. See: https://github.com/rust-lang/mdBook/wiki/Third-party-plugins --- docs/integrations.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/integrations.md b/docs/integrations.md index c061d8c6a..39f1a9aeb 100644 --- a/docs/integrations.md +++ b/docs/integrations.md @@ -141,6 +141,8 @@ They also serve as proof of concept, for the variety of things that can be built - [Docsy Hugo Theme](https://www.docsy.dev/docs/adding-content/lookandfeel/#diagrams-with-mermaid) (Native support in theme) - [Codedoc](https://codedoc.cc/) - [codedoc-mermaid-plugin](https://www.npmjs.com/package/codedoc-mermaid-plugin) +- [mdbook](https://rust-lang.github.io/mdBook/index.html) + - [mdbook-mermaid](https://github.com/badboy/mdbook-mermaid) ## Browser Extensions From 6223d3c470603263ac0a3a9977f301f2fad01130 Mon Sep 17 00:00:00 2001 From: dkkb <82504881+dkkb@users.noreply.github.com> Date: Tue, 1 Mar 2022 20:00:52 +0800 Subject: [PATCH 11/32] fix typos in doc (#2787) --- CONTRIBUTING.md | 2 +- docs/Setup.md | 2 +- docs/breakingChanges.md | 2 +- docs/developer-docs/configuration.md | 2 +- docs/development.md | 5 +++-- docs/diagrams-and-syntax-and-examples/flowchart.md | 2 +- docs/gantt.md | 6 +++--- docs/n00b-gettingStarted.md | 2 +- docs/theming.md | 2 +- 9 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d8440b1e0..e0a5ffde7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -114,7 +114,7 @@ Finally, if it is not in the documentation, no one will know about it and then * The docs are located in the docs folder and are ofc written in markdown. Just pick the right section and start typing. If you want to add to the structure as in adding a new section and new file you do that via the _navbar.md. -The changes in master is reflected in http://mermaid-js.github.io/mermaid/ once released the updates are commited to https://mermaid-js.github.io/#/ +The changes in master is reflected in http://mermaid-js.github.io/mermaid/ once released the updates are committed to https://mermaid-js.github.io/#/ ## Last words diff --git a/docs/Setup.md b/docs/Setup.md index 4ac10f130..8dd965370 100644 --- a/docs/Setup.md +++ b/docs/Setup.md @@ -1019,7 +1019,7 @@ Pushes in a directive to the configuration | Parameter | Description | Type | Required | Values | | --------- | ------------------------------------------------------------- | ---------- | -------- | -------------------------------------------- | -| conf | base set of values, which currentConfig coul be **reset** to. | Dictionary | Required | Any Values, with respect to the secure Array | +| conf | base set of values, which currentConfig could be **reset** to. | Dictionary | Required | Any Values, with respect to the secure Array | **Notes**: (default: current siteConfig ) (optional, default `getSiteConfig()`) diff --git a/docs/breakingChanges.md b/docs/breakingChanges.md index 21206dc6d..8fadbfb2b 100644 --- a/docs/breakingChanges.md +++ b/docs/breakingChanges.md @@ -36,7 +36,7 @@ or ``` -Now it is not needed to do so. And there are no more CSS files in distrubtion files. +Now it is not needed to do so. And there are no more CSS files in distribution files. You just diff --git a/docs/developer-docs/configuration.md b/docs/developer-docs/configuration.md index 5db67dd0e..a0aa89775 100644 --- a/docs/developer-docs/configuration.md +++ b/docs/developer-docs/configuration.md @@ -21,7 +21,7 @@ sequenceDiagram ## Initialize -Intialize call is calloed **only once**. It is called by the site integrator in order to override the default configuration on a site level. +Initialize call is called **only once**. It is called by the site integrator in order to override the default configuration on a site level. ## configApi.reset diff --git a/docs/development.md b/docs/development.md index 52112b27e..a152a5b6c 100644 --- a/docs/development.md +++ b/docs/development.md @@ -48,7 +48,7 @@ The docs are located in the `docs` folder and are written in Markdown. Just pick > **All the documents displayed in the github.io page are listed in [sidebar.md](https://github.com/mermaid-js/mermaid/edit/develop/docs/_sidebar.md)**. -The contents of [https://mermaid-js.github.io/mermaid/](https://mermaid-js.github.io/mermaid/) are based on the docs from the `master` branch. Updates commited to the `master` branch are reflected in the [Mermaid Docs](https://mermaid-js.github.io/mermaid/) once released. +The contents of [https://mermaid-js.github.io/mermaid/](https://mermaid-js.github.io/mermaid/) are based on the docs from the `master` branch. Updates committed to the `master` branch are reflected in the [Mermaid Docs](https://mermaid-js.github.io/mermaid/) once released. ## How to Contribute to Documentation @@ -97,7 +97,8 @@ it('should render forks and joins', () => { { logLevel: 0 } ); cy.get('svg'); -}); +}); + ``` ### Any Questions or Suggestions? diff --git a/docs/diagrams-and-syntax-and-examples/flowchart.md b/docs/diagrams-and-syntax-and-examples/flowchart.md index d1b6b5cbe..bca9113c6 100644 --- a/docs/diagrams-and-syntax-and-examples/flowchart.md +++ b/docs/diagrams-and-syntax-and-examples/flowchart.md @@ -505,7 +505,7 @@ defined in the linkStyle statement will belong to the fourth link in the graph: linkStyle 3 stroke:#ff3,stroke-width:4px,color:red; ``` -You can specify default to apply to all links, or you can give a list of link order numbers seperated by a comma. +You can specify default to apply to all links, or you can give a list of link order numbers separated by a comma. Instead of giving a styles option, you can also use custom d3 curve types with the following syntax: diff --git a/docs/gantt.md b/docs/gantt.md index 9f22047eb..952288534 100644 --- a/docs/gantt.md +++ b/docs/gantt.md @@ -6,7 +6,7 @@ Gantt Charts will record each scheduled task as one continuous bar that extends from the left to the right. The x axis represents time and the y records the different tasks and the order in which they are to be completed. - It is important to remember that when a date, day, or collection of dates specific to a task are "excluded", the Gantt Chart will accomodate those changes by extending an equal number of days, towards the right, not by creating a gap inside the task. + It is important to remember that when a date, day, or collection of dates specific to a task are "excluded", the Gantt Chart will accommodate those changes by extending an equal number of days, towards the right, not by creating a gap inside the task. As shown here ![](./img/Gantt-excluded-days-within.png) @@ -111,7 +111,7 @@ The default input date format is `YYYY-MM-DD`. You can define your custom ``date dateFormat YYYY-MM-DD ``` -The following formating options are supported: +The following formatting options are supported: ``` Input Example Description: @@ -146,7 +146,7 @@ The default output date format is YYYY-MM-DD. You can define your custom ``axisF axisFormat %Y-%m-%d ``` -The following formating strings are supported: +The following formatting strings are supported: ``` %a - abbreviated weekday name. diff --git a/docs/n00b-gettingStarted.md b/docs/n00b-gettingStarted.md index c03f263f2..4c3e09047 100644 --- a/docs/n00b-gettingStarted.md +++ b/docs/n00b-gettingStarted.md @@ -118,7 +118,7 @@ c. The `mermaid.initialize()` call, which dictates the appearance of diagrams an ``` **Notes**: -Rendering in Mermaid is initalized by `mermaid.initialize()` call. You can place `mermaid.initialize()` inside `mermaid.min.js` for brevity. However, doing the opposite lets you control when it starts looking for `
`tags inside the web page with `mermaid.initialize()`. This is useful when you think that not all `
` tags may have loaded on the execution of `mermaid.min.js` file. +Rendering in Mermaid is initialized by `mermaid.initialize()` call. You can place `mermaid.initialize()` inside `mermaid.min.js` for brevity. However, doing the opposite lets you control when it starts looking for `
`tags inside the web page with `mermaid.initialize()`. This is useful when you think that not all `
` tags may have loaded on the execution of `mermaid.min.js` file. `startOnLoad` is one of the parameters that can be defined by `mermaid.initialize()` diff --git a/docs/theming.md b/docs/theming.md index 6a6ea1507..d16016b5d 100644 --- a/docs/theming.md +++ b/docs/theming.md @@ -24,7 +24,7 @@ The following are a list of **Deployable themes**, sample `%%init%%` directives ## Site-wide Themes Site-wide themes are declared via `initialize` by site owners. -Example of `Initalize` call setting `theme` to `base`: +Example of `Initialize` call setting `theme` to `base`: ```javascript mermaidAPI.initialize({ 'securityLevel': 'loose', 'theme': 'base' From 7b0c3c3cd50a1cc9bae5fb721dd1679db2537920 Mon Sep 17 00:00:00 2001 From: Dirkjan Bussink Date: Thu, 3 Mar 2022 14:51:20 +0100 Subject: [PATCH 12/32] fix: update to latest version of sanitize-url There's been a bunch of security issues in the older versions of sanitize-url that this resolves. --- package.json | 2 +- src/diagrams/class/classDiagram.spec.js | 8 ++++---- src/utils.spec.js | 2 +- yarn.lock | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index b05377c61..06eabc1b5 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ ] }, "dependencies": { - "@braintree/sanitize-url": "^3.1.0", + "@braintree/sanitize-url": "^6.0.0", "d3": "^7.0.0", "dagre": "^0.8.5", "dagre-d3": "^0.6.4", diff --git a/src/diagrams/class/classDiagram.spec.js b/src/diagrams/class/classDiagram.spec.js index ea23f0881..6b74c3583 100644 --- a/src/diagrams/class/classDiagram.spec.js +++ b/src/diagrams/class/classDiagram.spec.js @@ -746,7 +746,7 @@ foo() parser.parse(str); const testClass = parser.yy.getClass('Class1'); - expect(testClass.link).toBe('about:blank'); //('google.com'); security needs to be set to 'loose' for this to work right + expect(testClass.link).toBe('google.com'); expect(testClass.cssClasses.length).toBe(1); expect(testClass.cssClasses[0]).toBe('clickable'); }); @@ -760,7 +760,7 @@ foo() parser.parse(str); const testClass = parser.yy.getClass('Class1'); - expect(testClass.link).toBe('about:blank'); //('google.com'); security needs to be set to 'loose' for this to work right + expect(testClass.link).toBe('google.com'); expect(testClass.cssClasses.length).toBe(1); expect(testClass.cssClasses[0]).toBe('clickable'); }); @@ -774,7 +774,7 @@ foo() parser.parse(str); const testClass = parser.yy.getClass('Class1'); - expect(testClass.link).toBe('about:blank'); //('google.com'); security needs to be set to 'loose' for this to work right + expect(testClass.link).toBe('google.com'); expect(testClass.tooltip).toBe('A tooltip'); expect(testClass.cssClasses.length).toBe(1); expect(testClass.cssClasses[0]).toBe('clickable'); @@ -789,7 +789,7 @@ foo() parser.parse(str); const testClass = parser.yy.getClass('Class1'); - expect(testClass.link).toBe('about:blank'); //('google.com'); security needs to be set to 'loose' for this to work right + expect(testClass.link).toBe('google.com'); expect(testClass.tooltip).toBe('A tooltip'); expect(testClass.cssClasses.length).toBe(1); expect(testClass.cssClasses[0]).toBe('clickable'); diff --git a/src/utils.spec.js b/src/utils.spec.js index b37c9af6d..bd35f5ccc 100644 --- a/src/utils.spec.js +++ b/src/utils.spec.js @@ -250,7 +250,7 @@ describe('when formatting urls', function () { config.securityLevel = 'strict'; result = utils.formatUrl(url, config); - expect(result).toEqual('about:blank'); + expect(result).toEqual(url); }); it('should handle mailto', function () { const url = 'mailto:user@user.user'; diff --git a/yarn.lock b/yarn.lock index 2b48f1411..3d7dc08ac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1275,10 +1275,10 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@braintree/sanitize-url@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-3.1.0.tgz#8ff71d51053cd5ee4981e5a501d80a536244f7fd" - integrity sha512-GcIY79elgB+azP74j8vqkiXz8xLFfIzbQJdlwOPisgbKT00tviJQuEghOXSMVxJ00HoYJbGswr4kcllUc4xCcg== +"@braintree/sanitize-url@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-6.0.0.tgz#fe364f025ba74f6de6c837a84ef44bdb1d61e68f" + integrity sha512-mgmE7XBYY/21erpzhexk4Cj1cyTQ9LzvnTxtzM17BJ7ERMNE6W72mQRo0I1Ud8eFJ+RVVIcBNhLFZ3GX4XFz5w== "@commitlint/cli@^16.0.0": version "16.2.1" From dd51acb6c0efee88891a5f35c5f2de73d8622bdf Mon Sep 17 00:00:00 2001 From: lexmin0412 Date: Sun, 6 Mar 2022 23:16:50 +0800 Subject: [PATCH 13/32] docs(README.zh-CN): expression optimization --- README.zh-CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.zh-CN.md b/README.zh-CN.md index b1f44fcf5..8749eea0f 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -15,7 +15,7 @@ Mermaid 是一个基于 Javascript 的图表绘制工具,通过解析类 Markdown 的文本语法来实现图表的创建和动态修改。Mermaid 诞生的主要目的是让文档的更新能够及时跟上开发进度。 -> Mermaid 致力于解决 Doc-Rot 这个令人头疼的问题。 +> Doc-Rot 是 Mermaid 致力于解决的一个难题。 绘图和编写文档花费了开发者宝贵的开发时间,而且随着业务的变更,它很快就会过期。 但是如果缺少了图表或文档,对于生产力和团队新人的业务学习都会产生巨大的阻碍。
Mermaid 通过减少创建可修改的图表所需要的时间、精力和工具来解决这一难题,从而提高了内容的智能化和可重用性。 作为一个基于文本的绘图工具, Mermaid 天生就易于维护和更新,它也可以作为生产脚本(或其他代码)的一部分,使得文档编写变得更加简单。 有了它之后,开发者可以从维护文档这个与开发割离且麻烦的任务中解放出来。
From 12d9e81bee851b444cd1077769908f3da796cefc Mon Sep 17 00:00:00 2001 From: lexmin0412 Date: Mon, 7 Mar 2022 00:12:08 +0800 Subject: [PATCH 14/32] docs(README.zh-CN): switch to real mermaid diagrams instead of images --- README.zh-CN.md | 233 +++++++++++++++++++++++++----------------------- 1 file changed, 120 insertions(+), 113 deletions(-) diff --git a/README.zh-CN.md b/README.zh-CN.md index 8749eea0f..20e7cd83a 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -34,30 +34,27 @@ U也可以查看 [Mermaid 的集成和使用](./docs/integrations.md) 这个清 __下面是一些使用 Mermaid 和类 Markdown 语法创建的图表示例。点击 [语法](https://mermaid-js.github.io/mermaid/#/n00b-syntaxReference) 查看详情__ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 流程图
- [文档 - live editor] -
-flowchart TD
+
+## 流程图 [文档 - live editor]
+
+```
+flowchart LR
 A[Hard] -->|Text| B(Round)
 B --> C{Decision}
 C -->|One| D[Result 1]
 C -->|Two| E[Result 2]
-    
- -
- 时序图
- [文档 - live editor] -
+```
+```mermaid
+flowchart LR
+A[Hard] -->|Text| B(Round)
+B --> C{Decision}
+C -->|One| D[Result 1]
+C -->|Two| E[Result 2]
+```
+
+## 时序图 [文档 - live editor]
+
+```
 sequenceDiagram
 Alice->>John: Hello John, how are you?
 loop Healthcheck
@@ -67,43 +64,48 @@ Note right of John: Rational thoughts!
 John-->>Alice: Great!
 John->>Bob: How about you?
 Bob-->>John: Jolly good!
-    
- -
- 甘特图
- [文档 - live editor] -
+```
+```mermaid
+sequenceDiagram
+Alice->>John: Hello John, how are you?
+loop Healthcheck
+    John->>John: Fight against hypochondria
+end
+Note right of John: Rational thoughts!
+John-->>Alice: Great!
+John->>Bob: How about you?
+Bob-->>John: Jolly good!
+```
+
+## 甘特图 [文档 - live editor]
+
+```
 gantt
-section Section
-Completed :done,    des1, 2014-01-06,2014-01-08
-Active        :active,  des2, 2014-01-07, 3d
-Parallel 1   :         des3, after des1, 1d
-Parallel 2   :         des4, after des1, 1d
-Parallel 3   :         des5, after des3, 1d
-Parallel 4   :         des6, after des4, 1d
-    
- -
- 类图
- [文档 - live editor] -
+    section Section
+    Completed :done,    des1, 2014-01-06,2014-01-08
+    Active        :active,  des2, 2014-01-07, 3d
+    Parallel 1   :         des3, after des1, 1d
+    Parallel 2   :         des4, after des1, 1d
+    Parallel 3   :         des5, after des3, 1d
+    Parallel 4   :         des6, after des4, 1d
+```
+```mermaid
+gantt
+    section Section
+    Completed :done,    des1, 2014-01-06,2014-01-08
+    Active        :active,  des2, 2014-01-07, 3d
+    Parallel 1   :         des3, after des1, 1d
+    Parallel 2   :         des4, after des1, 1d
+    Parallel 3   :         des5, after des3, 1d
+    Parallel 4   :         des6, after des4, 1d
+```
+
+## 类图 [文档 - live editor]
+
+```
 classDiagram
-Class01 <|-- AveryLongClass : Cool
-<<interface>> Class01
+Class01 <|-- AveryLongClass : Cool
+<> Class01
 Class09 --> C2 : Where am i?
 Class09 --* C3
 Class09 --|> Class07
@@ -113,23 +115,33 @@ Class01 : size()
 Class01 : int chimp
 Class01 : int gorilla
 class Class10 {
-  <<service>>
+  <>
   int id
   size()
 }
-
- -
- 状态图
- [文档 - live editor] -
+```
+```mermaid
+classDiagram
+Class01 <|-- AveryLongClass : Cool
+<> Class01
+Class09 --> C2 : Where am i?
+Class09 --* C3
+Class09 --|> Class07
+Class07 : equals()
+Class07 : Object[] elementData
+Class01 : size()
+Class01 : int chimp
+Class01 : int gorilla
+class Class10 {
+  <>
+  int id
+  size()
+}
+```
+
+## 状态图 [文档 - live editor]
+
+```
 stateDiagram-v2
 [*] --> Still
 Still --> [*]
@@ -137,46 +149,37 @@ Still --> Moving
 Moving --> Still
 Moving --> Crash
 Crash --> [*]
-
- -
- 饼图
- [文档 - live editor] -
+```
+```mermaid
+stateDiagram-v2
+[*] --> Still
+Still --> [*]
+Still --> Moving
+Moving --> Still
+Moving --> Crash
+Crash --> [*]
+```
+
+## 饼图 [文档 - live editor]
+
+```
 pie
 "Dogs" : 386
 "Cats" : 85
 "Rats" : 15
-
- -
- Git图
- [实验特性 - live editor] -
敬请期待!
- 用户体验旅程图
- [文档 - live editor] -
-
+```
+```mermaid
+pie
+"Dogs" : 386
+"Cats" : 85
+"Rats" : 15
+```
+
+## Git图 [实验特性 - live editor]
+
+## 用户体验旅程图 [文档 - live editor]
+
+```
   journey
     title My working day
     section Go to work
@@ -186,14 +189,18 @@ pie
     section Go home
       Go downstairs: 5: Me
       Sit down: 3: Me
-
- User Journey Diagram -
+``` +```mermaid + journey + title My working day + section Go to work + Make tea: 5: Me + Go upstairs: 3: Me + Do work: 1: Me, Cat + section Go home + Go downstairs: 5: Me + Sit down: 3: Me +``` ## 相关项目 From d886c2b6b7615a7da4fb39b91b1ef357357e1f92 Mon Sep 17 00:00:00 2001 From: lexmin0412 Date: Mon, 7 Mar 2022 00:20:52 +0800 Subject: [PATCH 15/32] docs(README.zh-CN): add release paragraph --- README.zh-CN.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.zh-CN.md b/README.zh-CN.md index 20e7cd83a..26e9735b1 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -202,6 +202,18 @@ pie Sit down: 3: Me ``` +### 发布 + +对于有权限的同学来说,你可以通过以下步骤来完成发布操作: + +更新 `package.json` 中的版本号,然后执行如下命令: + +```sh +npm publish +``` + +以上的命令会将文件打包到 `dist` 目录并发布至 npmjs.org. + ## 相关项目 - [Command Line Interface](https://github.com/mermaid-js/mermaid-cli) From ee63856483f1a66448f85b4f852722f78e9c4efe Mon Sep 17 00:00:00 2001 From: lexmin0412 Date: Mon, 7 Mar 2022 01:15:32 +0800 Subject: [PATCH 16/32] docs(README.zh-CN): add security paragraph --- README.zh-CN.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.zh-CN.md b/README.zh-CN.md index 26e9735b1..257b4a62d 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -212,7 +212,7 @@ pie npm publish ``` -以上的命令会将文件打包到 `dist` 目录并发布至 npmjs.org. +以上的命令会将文件打包到 `dist` 目录并发布至 npmjs.org. ## 相关项目 @@ -226,6 +226,14 @@ Mermaid 是一个不断发展中的社区,并且还在接收新的贡献者。 关于如何贡献的详细信息可以在 [贡献指南](CONTRIBUTING.md) 中找到。 +## 安全 + +对于公开网站来说,从互联网上的用户处检索文本、存储供后续在浏览器中展示的内容可能是不安全的,理由是用户的内容可能嵌入一些数据加载完成之后就会运行的恶意脚本,这些对于 Mermaid 来说毫无疑问是一个风险,尤其是 mermaid 图表还包含了许多在 html 中使用的字符,这意味着我们难以使用常规的手段来过滤不安全代码,因为这些常规手段会造成图表损坏。我们仍然在努力对获取到的代码进行安全过滤并不断完善我们的程序,但很难保证没有漏洞。 + +作为拥有外部用户的网站的额外安全级别,我们很高兴推出一个新的安全级别,其中的图表在沙盒 iframe 中渲染,防止代码中的 javascript 被执行,这是在安全性方面迈出的一大步。 + +*很不幸的是,鱼与熊掌不可兼得,在这个场景下它意味着在可能的恶意代码被阻止时,也会损失部分交互能力*。 + ## 报告漏洞 如果想要报告漏洞,请发送邮件到 security@mermaid.live, 并附上问题的描述、复现问题的步骤、受影响的版本,以及解决问题的方案(如果有的话)。 From 2822fd033ae7fcaebac5ee2760a5074684f9a6a7 Mon Sep 17 00:00:00 2001 From: lexmin0412 Date: Mon, 7 Mar 2022 01:34:45 +0800 Subject: [PATCH 17/32] docs(README.zh-CN): keep in pace with README --- README.zh-CN.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.zh-CN.md b/README.zh-CN.md index 257b4a62d..f51d94248 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -18,10 +18,10 @@ Mermaid 是一个基于 Javascript 的图表绘制工具,通过解析类 Markd > Doc-Rot 是 Mermaid 致力于解决的一个难题。 绘图和编写文档花费了开发者宝贵的开发时间,而且随着业务的变更,它很快就会过期。 但是如果缺少了图表或文档,对于生产力和团队新人的业务学习都会产生巨大的阻碍。
-Mermaid 通过减少创建可修改的图表所需要的时间、精力和工具来解决这一难题,从而提高了内容的智能化和可重用性。 作为一个基于文本的绘图工具, Mermaid 天生就易于维护和更新,它也可以作为生产脚本(或其他代码)的一部分,使得文档编写变得更加简单。 有了它之后,开发者可以从维护文档这个与开发割离且麻烦的任务中解放出来。
-即使是从未接触过编程的非专业人员也可以通过 [Mermaid Live Editor](https://mermaid-js.github.io/mermaid-live-editor/)来创建图表。
-你可以访问 [教程](./docs/Tutorials.md) 来查看 Live Editor 的视频教程。 -U也可以查看 [Mermaid 的集成和使用](./docs/integrations.md) 这个清单来检查你的文档工具是否已经集成了 Mermaid 支持。 +Mermaid 通过允许用户创建便于修改的图表来解决这一难题,它也可以作为生产脚本(或其他代码)的一部分。
+
+Mermaid 甚至能让非程序员也能通过 [Mermaid Live Editor](https://mermaid-js.github.io/mermaid-live-editor/) 轻松创建详细的图表。
+你可以访问 [教程](./docs/Tutorials.md) 来查看 Live Editor 的视频教程,也可以查看 [Mermaid 的集成和使用](./docs/integrations.md) 这个清单来检查你的文档工具是否已经集成了 Mermaid 支持。 如果想要查看关于 Mermaid 更详细的介绍及基础使用方式,可以查看 [入门指引](./docs/n00b-overview.md) and [用法](./docs/usage.md). @@ -31,7 +31,7 @@ U也可以查看 [Mermaid 的集成和使用](./docs/integrations.md) 这个清 ## 示例 -__下面是一些使用 Mermaid 和类 Markdown 语法创建的图表示例。点击 [语法](https://mermaid-js.github.io/mermaid/#/n00b-syntaxReference) 查看详情__ +__下面是一些可以使用 Mermaid 创建的图表示例。点击 [语法](https://mermaid-js.github.io/mermaid/#/n00b-syntaxReference) 查看详情。__ From 1de7f3e14c915eb5f7fc9435db33f356c77a7620 Mon Sep 17 00:00:00 2001 From: mmorel-35 Date: Mon, 7 Mar 2022 07:04:04 +0000 Subject: [PATCH 18/32] chore: update browsers list --- docs/Setup.md | 14 +++++++------- yarn.lock | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/Setup.md b/docs/Setup.md index 8dd965370..527bbb56a 100644 --- a/docs/Setup.md +++ b/docs/Setup.md @@ -938,9 +938,9 @@ Returns **[object][5]** The siteConfig ### Parameters -- `text` +- `text` -Returns **any** +Returns **any** ## getSiteConfig @@ -1019,7 +1019,7 @@ Pushes in a directive to the configuration | Parameter | Description | Type | Required | Values | | --------- | ------------------------------------------------------------- | ---------- | -------- | -------------------------------------------- | -| conf | base set of values, which currentConfig could be **reset** to. | Dictionary | Required | Any Values, with respect to the secure Array | +| conf | base set of values, which currentConfig coul be **reset** to. | Dictionary | Required | Any Values, with respect to the secure Array | **Notes**: (default: current siteConfig ) (optional, default `getSiteConfig()`) @@ -1049,13 +1049,13 @@ $(function () { inserted. In one is provided a hidden div will be inserted in the body of the page instead. The element will be removed when rendering is completed. -Returns **any** +Returns **any** ## updateRendererConfigs ### Parameters -- `conf` **any** +- `conf` **any** ## reinitialize @@ -1065,9 +1065,9 @@ To be removed ### Parameters -- `options` **any** +- `options` **any** -## +## ## mermaidAPI configuration defaults diff --git a/yarn.lock b/yarn.lock index 3d7dc08ac..46f7c4591 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3308,9 +3308,9 @@ camelcase@^6.2.0: integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== caniuse-lite@^1.0.30001286: - version "1.0.30001312" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001312.tgz" - integrity sha512-Wiz1Psk2MEK0pX3rUzWaunLTZzqS2JYZFzNKqAiJGiuxIjRPLgV6+VDPOg6lQOUxmDwhTlh198JsTTi8Hzw6aQ== + version "1.0.30001313" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001313.tgz" + integrity sha512-rI1UN0koZUiKINjysQDuRi2VeSCce3bYJNmDcj3PIKREiAmjakugBul1QSkg/fPrlULYl6oWfGg3PbgOSY9X4Q== caseless@~0.12.0: version "0.12.0" From efbc369b869fb5db7132625535fc1219344d7034 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 19:17:43 +0100 Subject: [PATCH 19/32] chore(deps-dev): bump eslint-config-prettier from 8.4.0 to 8.5.0 (#2798) Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.4.0 to 8.5.0. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.4.0...v8.5.0) --- updated-dependencies: - dependency-name: eslint-config-prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 46f7c4591..9217a3272 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5205,9 +5205,9 @@ escodegen@^2.0.0: source-map "~0.6.1" eslint-config-prettier@^8.3.0: - version "8.4.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.4.0.tgz#8e6d17c7436649e98c4c2189868562921ef563de" - integrity sha512-CFotdUcMY18nGRo5KGsnNxpznzhkopOcOo0InID+sgQssPrzjvsyKZPvOgymTFeHrFuC3Tzdf2YndhXtULK9Iw== + version "8.5.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" + integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== eslint-plugin-cypress@^2.12.1: version "2.12.1" From 5f3bb4aeebe7c776be408dfd9b04e73180abfc33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 19:18:05 +0100 Subject: [PATCH 20/32] chore(deps): bump actions/checkout from 2 to 3 (#2803) Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- .github/workflows/check-readme-in-sync.yml | 2 +- .github/workflows/e2e.yml | 2 +- .github/workflows/pr-labeler-config-validator.yml | 2 +- .github/workflows/release-preview-publish.yml | 2 +- .github/workflows/release-publish.yml | 2 +- .github/workflows/update-browserlist.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 66f39f96a..3f8b99807 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ jobs: matrix: node-version: [16.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 diff --git a/.github/workflows/check-readme-in-sync.yml b/.github/workflows/check-readme-in-sync.yml index 2106e0630..abc688d96 100644 --- a/.github/workflows/check-readme-in-sync.yml +++ b/.github/workflows/check-readme-in-sync.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Check for difference in README.md and docs/README.md run: | diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 3279426ef..58f3a6dd8 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -9,7 +9,7 @@ jobs: matrix: node-version: [16.x] steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v3 - name: Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 diff --git a/.github/workflows/pr-labeler-config-validator.yml b/.github/workflows/pr-labeler-config-validator.yml index c54e6d13e..2d3df02ff 100644 --- a/.github/workflows/pr-labeler-config-validator.yml +++ b/.github/workflows/pr-labeler-config-validator.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repository - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v3 - name: Validate Configuration uses: Yash-Singh1/pr-labeler-config-validator@releases/v0.0.3 with: diff --git a/.github/workflows/release-preview-publish.yml b/.github/workflows/release-preview-publish.yml index a8bf8f39d..70e9b42c0 100644 --- a/.github/workflows/release-preview-publish.yml +++ b/.github/workflows/release-preview-publish.yml @@ -9,7 +9,7 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Node.js uses: actions/setup-node@v3 with: diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 10e22822d..4a14ee74e 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -8,7 +8,7 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v3 - uses: fregante/setup-git-user@v1 - name: Setup Node.js diff --git a/.github/workflows/update-browserlist.yml b/.github/workflows/update-browserlist.yml index e14e07671..e4b56a14e 100644 --- a/.github/workflows/update-browserlist.yml +++ b/.github/workflows/update-browserlist.yml @@ -8,7 +8,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - run: npx browserslist@latest --update-db - name: Commit changes uses: EndBug/add-and-commit@v8.0.2 From 213920a7c39ec1307e2ad957eede6466eb22d441 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 19:18:28 +0100 Subject: [PATCH 21/32] chore(deps-dev): bump webpack from 5.69.1 to 5.70.0 (#2802) Bumps [webpack](https://github.com/webpack/webpack) from 5.69.1 to 5.70.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.69.1...v5.70.0) --- updated-dependencies: - dependency-name: webpack dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9217a3272..c98ced2ef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5107,10 +5107,10 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enhanced-resolve@^5.8.3: - version "5.8.3" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz#6d552d465cce0423f5b3d718511ea53826a7b2f0" - integrity sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA== +enhanced-resolve@^5.9.2: + version "5.9.2" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.9.2.tgz#0224dcd6a43389ebfb2d55efee517e5466772dd9" + integrity sha512-GIm3fQfwLJ8YZx2smuHpBKkXC1yOk+OBEmKckVyL0i/ea8mqDEykK3ld5dgH1QYPNyT/lIllxV2LULnxCHaHkA== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -11236,9 +11236,9 @@ webpack-sources@^3.2.3: integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== webpack@^5.53.0: - version "5.69.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.69.1.tgz#8cfd92c192c6a52c99ab00529b5a0d33aa848dc5" - integrity sha512-+VyvOSJXZMT2V5vLzOnDuMz5GxEqLk7hKWQ56YxPW/PQRUuKimPqmEIJOx8jHYeyo65pKbapbW464mvsKbaj4A== + version "5.70.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.70.0.tgz#3461e6287a72b5e6e2f4872700bc8de0d7500e6d" + integrity sha512-ZMWWy8CeuTTjCxbeaQI21xSswseF2oNOwc70QSKNePvmxE7XW36i7vpBMYZFAUHPwQiEbNGCEYIOOlyRbdGmxw== dependencies: "@types/eslint-scope" "^3.7.3" "@types/estree" "^0.0.51" @@ -11249,7 +11249,7 @@ webpack@^5.53.0: acorn-import-assertions "^1.7.6" browserslist "^4.14.5" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.8.3" + enhanced-resolve "^5.9.2" es-module-lexer "^0.9.0" eslint-scope "5.1.1" events "^3.2.0" From 548c18a0c074b5ae8fa4c00054e7113313966d3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 19:18:52 +0100 Subject: [PATCH 22/32] chore(deps-dev): bump lint-staged from 12.3.4 to 12.3.5 (#2799) Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.3.4 to 12.3.5. - [Release notes](https://github.com/okonet/lint-staged/releases) - [Commits](https://github.com/okonet/lint-staged/compare/v12.3.4...v12.3.5) --- updated-dependencies: - dependency-name: lint-staged dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index c98ced2ef..7dc216916 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7753,9 +7753,9 @@ linguist-languages@^7.13.0: integrity sha512-qkSSNDjDDycZ2Wcw+GziNBB3nNo3ddYUInM/PL8Amgwbd9RQ/BKGj2/1d6mdxKgBFnUqZuaDbkIwkE4KUwwmtQ== lint-staged@^12.1.2: - version "12.3.4" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-12.3.4.tgz#4b1ff8c394c3e6da436aaec5afd4db18b5dac360" - integrity sha512-yv/iK4WwZ7/v0GtVkNb3R82pdL9M+ScpIbJLJNyCXkJ1FGaXvRCOg/SeL59SZtPpqZhE7BD6kPKFLIDUhDx2/w== + version "12.3.5" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-12.3.5.tgz#8048ce048c3cac12f57200a06344a54dc91c8fa9" + integrity sha512-oOH36RUs1It7b9U/C7Nl/a0sLfoIBcMB8ramiB3nuJ6brBqzsWiUAFSR5DQ3yyP/OR7XKMpijtgKl2DV1lQ3lA== dependencies: cli-truncate "^3.1.0" colorette "^2.0.16" From 3f61993e2e465b11a38b84026226df3fa4e6b4d1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 19:19:15 +0100 Subject: [PATCH 23/32] chore(deps-dev): bump eslint-plugin-jsdoc from 37.9.4 to 37.9.7 (#2801) Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 37.9.4 to 37.9.7. - [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases) - [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v37.9.4...v37.9.7) --- updated-dependencies: - dependency-name: eslint-plugin-jsdoc dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7dc216916..4c5bc0987 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5231,9 +5231,9 @@ eslint-plugin-jest@^26.0.0: "@typescript-eslint/utils" "^5.10.0" eslint-plugin-jsdoc@^37.0.3: - version "37.9.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-37.9.4.tgz#dc645724d544be910d6554467b93a5836fa0fa06" - integrity sha512-VxCyGgUNNnj2T4bb1OqltkbsPp3ehRzR5onIfh6zGrAvISmvgX/sbxUlh3YyGqWtjOTSBCURdKdmelSXEIHnlA== + version "37.9.7" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-37.9.7.tgz#ef46141aa2e5fcbb89adfa658eef8126435e9eac" + integrity sha512-8alON8yYcStY94o0HycU2zkLKQdcS+qhhOUNQpfONHHwvI99afbmfpYuPqf6PbLz5pLZldG3Te5I0RbAiTN42g== dependencies: "@es-joy/jsdoccomment" "~0.20.1" comment-parser "1.3.0" From 4620a8816467192ab49376441efbede6ac8ec3d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 19:34:43 +0100 Subject: [PATCH 24/32] chore(deps-dev): bump cypress from 9.5.0 to 9.5.1 (#2800) Bumps [cypress](https://github.com/cypress-io/cypress) from 9.5.0 to 9.5.1. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js) - [Commits](https://github.com/cypress-io/cypress/compare/v9.5.0...v9.5.1) --- updated-dependencies: - dependency-name: cypress dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 06eabc1b5..748c5e153 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "concurrently": "^7.0.0", "coveralls": "^3.0.2", "css-to-string-loader": "^0.1.3", - "cypress": "9.5.0", + "cypress": "9.5.1", "documentation": "13.2.0", "eslint": "^8.2.0", "eslint-config-prettier": "^8.3.0", diff --git a/yarn.lock b/yarn.lock index 4c5bc0987..a1475c567 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4043,10 +4043,10 @@ cssstyle@^2.3.0: dependencies: cssom "~0.3.6" -cypress@9.5.0: - version "9.5.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-9.5.0.tgz#704a79f0d3d4e775f433334eb8f5ae065e3bea31" - integrity sha512-rC5QPolKsVjJ8QJZ7IeZ6HlKM4gswBGZc0XvoAJNL8urQCSL8zTX0A/ai/h35WfF47NQ0iSZnwIXBlHX3MOUIQ== +cypress@9.5.1: + version "9.5.1" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-9.5.1.tgz#51162f3688cedf5ffce311b914ef49a7c1ece076" + integrity sha512-H7lUWB3Svr44gz1rNnj941xmdsCljXoJa2cDneAltjI9leKLMQLm30x6jLlpQ730tiVtIbW5HdUmBzPzwzfUQg== dependencies: "@cypress/request" "^2.88.10" "@cypress/xvfb" "^1.2.4" From 4f5cab7f4cf8a31be6e7a448f29b599f1e2a83fd Mon Sep 17 00:00:00 2001 From: kerwin612 Date: Fri, 11 Mar 2022 16:32:04 +0800 Subject: [PATCH 25/32] fix: autonumber bug --- src/diagrams/sequence/sequenceDb.js | 1 + src/diagrams/sequence/sequenceDiagram.spec.js | 20 +++++++++++++++++++ src/mermaidAPI.js | 1 + 3 files changed, 22 insertions(+) mode change 100755 => 100644 src/mermaidAPI.js diff --git a/src/diagrams/sequence/sequenceDb.js b/src/diagrams/sequence/sequenceDb.js index 7492e6d11..60a07a2e3 100644 --- a/src/diagrams/sequence/sequenceDb.js +++ b/src/diagrams/sequence/sequenceDb.js @@ -139,6 +139,7 @@ export const autoWrap = () => wrapEnabled; export const clear = function () { actors = {}; messages = []; + sequenceNumbersEnabled = false; }; export const parseMessage = function (str) { diff --git a/src/diagrams/sequence/sequenceDiagram.spec.js b/src/diagrams/sequence/sequenceDiagram.spec.js index 437e0e6e9..c20dc54a4 100644 --- a/src/diagrams/sequence/sequenceDiagram.spec.js +++ b/src/diagrams/sequence/sequenceDiagram.spec.js @@ -1619,4 +1619,24 @@ participant Alice models.lastActor().y + models.lastActor().height + mermaid.sequence.boxMargin ); }); + it('it should hide sequence numbers when autonumber is removed when autonumber is enabled', function () { + const str1 = ` +sequenceDiagram +autonumber +Alice->Bob:Hello Bob, how are you? +Note right of Bob: Bob thinks +Bob-->Alice: I am good thanks!`; + + mermaidAPI.parse(str1); + expect(parser.yy.showSequenceNumbers()).toBe(true); + + const str2 = ` +sequenceDiagram +Alice->Bob:Hello Bob, how are you? +Note right of Bob: Bob thinks +Bob-->Alice: I am good thanks!`; + + mermaidAPI.parse(str2); + expect(parser.yy.showSequenceNumbers()).toBe(false); + }); }); diff --git a/src/mermaidAPI.js b/src/mermaidAPI.js old mode 100755 new mode 100644 index 06eaa3ce3..9d1b18b71 --- a/src/mermaidAPI.js +++ b/src/mermaidAPI.js @@ -94,6 +94,7 @@ function parse(text) { parser.parser.yy = flowDb; break; case 'sequence': + sequenceDb.clear(); parser = sequenceParser; parser.parser.yy = sequenceDb; break; From 50f60da0766cfc0ef4454673294e2e62e53d7367 Mon Sep 17 00:00:00 2001 From: Ronald Zielaznicki Date: Sun, 13 Mar 2022 10:51:06 -0400 Subject: [PATCH 26/32] Updated docs to use mermaid 8.14 --- docs/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index 4970cf2f9..9a0185c98 100644 --- a/docs/index.html +++ b/docs/index.html @@ -17,7 +17,7 @@ /> - + diff --git a/docs/security.md b/docs/security.md index 2d88d1aec..1ace05c42 100644 --- a/docs/security.md +++ b/docs/security.md @@ -15,3 +15,8 @@ You may also reach out to the team via our public Slack chat channels; however, Keep current with the latest Mermaid releases. We regularly update Mermaid, and these updates may fix security defects discovered in previous versions. Check the Mermaid release notes for security-related updates. Keep your application’s dependencies up to date. Make sure you upgrade your package dependencies to keep the dependencies up to date. Avoid pinning to specific versions for your dependencies and, if you do, make sure you check periodically to see if your dependencies have had security updates, and update the pin accordingly. + + +## Configuring DomPurify + +By default Mermaid uses a baseline DomPurify config. It is possible to override the options passed to dompurify by adding a `dompurifyConfig` key to the Mermaid options. This could potentially break the output of Mermaid so use this with caution. \ No newline at end of file diff --git a/src/diagrams/common/common.js b/src/diagrams/common/common.js index 961c50df6..145e29219 100644 --- a/src/diagrams/common/common.js +++ b/src/diagrams/common/common.js @@ -93,7 +93,12 @@ const sanitizeMore = (text, config) => { export const sanitizeText = (text, config) => { if (!text) return text; - const txt = DOMPurify.sanitize(sanitizeMore(text, config)); + let txt = ''; + if (config['dompurifyConfig']) { + txt = DOMPurify.sanitize(sanitizeMore(text, config), config['dompurifyConfig']); + } else { + txt = DOMPurify.sanitize(sanitizeMore(text, config)); + } return txt; }; diff --git a/src/mermaidAPI.spec.js b/src/mermaidAPI.spec.js index 414c073dc..b6ffc6be6 100644 --- a/src/mermaidAPI.spec.js +++ b/src/mermaidAPI.spec.js @@ -113,6 +113,12 @@ describe('when using mermaidAPI and ', function () { expect(mermaidAPI.defaultConfig['logLevel']).toBe(5); }); }); + describe('dompurify config', function () { + it('should allow dompurify config to be set', function () { + mermaidAPI.initialize({ dompurifyConfig: { ADD_ATTR: ['onclick'] } }); + expect(mermaidAPI.getConfig().dompurifyConfig.ADD_ATTR).toEqual(['onclick']); + }); + }); describe('checking validity of input ', function () { it('it should throw for an invalid definiton', function () { expect(() => mermaidAPI.parse('this is not a mermaid diagram definition')).toThrow(); From 1e1c3ef1a6e4241ed6551060c5663a47fafdaa56 Mon Sep 17 00:00:00 2001 From: Cory Gwin Date: Thu, 17 Mar 2022 12:41:11 -0400 Subject: [PATCH 31/32] Update docs/security.md Co-authored-by: Tali Herzka --- docs/security.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/security.md b/docs/security.md index 1ace05c42..03e4fe260 100644 --- a/docs/security.md +++ b/docs/security.md @@ -19,4 +19,4 @@ Keep your application’s dependencies up to date. Make sure you upgrade your pa ## Configuring DomPurify -By default Mermaid uses a baseline DomPurify config. It is possible to override the options passed to dompurify by adding a `dompurifyConfig` key to the Mermaid options. This could potentially break the output of Mermaid so use this with caution. \ No newline at end of file +By default Mermaid uses a baseline [DOMPurify](https://github.com/cure53/DOMPurify) config. It is possible to override the options passed to DOMPurify by adding a `dompurifyConfig` key to the Mermaid options. This could potentially break the output of Mermaid so use this with caution. \ No newline at end of file From 2a449ab773626579f21fe1c880a9fb963cae1c2c Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Thu, 17 Mar 2022 17:55:50 +0100 Subject: [PATCH 32/32] chore: disablinc sync check as the readmes have different contexts --- .github/workflows/check-readme-in-sync.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-readme-in-sync.yml b/.github/workflows/check-readme-in-sync.yml index 2106e0630..f8d39e98d 100644 --- a/.github/workflows/check-readme-in-sync.yml +++ b/.github/workflows/check-readme-in-sync.yml @@ -5,12 +5,10 @@ name: Check if README and docs/README are in sync on: push: branches: - - master - - develop + - gh-pages pull_request: branches: - - master - - develop + - gh-pages jobs: check: