Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into fix/3184
Browse files Browse the repository at this point in the history
* origin/develop: (24 commits)
  Updated the release version to 9.1.4
  Better balance check
  chore(deps-dev): bump @commitlint/config-conventional (#3179)
  chore(deps-dev): bump lint-staged from 13.0.2 to 13.0.3 (#3177)
  chore(deps-dev): bump cypress from 10.1.0 to 10.2.0 (#3178)
  chore(deps-dev): bump @commitlint/cli from 17.0.2 to 17.0.3 (#3180)
  chore: update browsers list
  fix: typo for source
  fix: typo in cypress
  Add dev install section in contributing.md
  update doc typos/clarity (#3145)
  Update links to `mermaid.live` (#3163)
  fix #3019 Add word boundary to FK&PK. (#3168)
  Run testomatio only for PRs within org. (#3165)
  chore(deps): bump got from 11.8.3 to 11.8.5 (#3172)
  fix: De-duplicates dependencies (#3167)
  Updated allowed characters to accomodate fonts and rgba colors
  fix: Typo for documents and comments
  Sanitizsation of incoming variables that are added to the userStyles
  Only allowing a subset of characters in themeVariables
  ...
  • Loading branch information
sidharthv96 committed Jun 28, 2022
2 parents 62fc1c8 + 1509ee6 commit b55434b
Show file tree
Hide file tree
Showing 100 changed files with 2,313 additions and 857 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.json
Expand Up @@ -15,9 +15,9 @@
},
"extends": [
"eslint:recommended",
//"plugin:jsdoc/recommended",
"plugin:jsdoc/recommended",
"plugin:json/recommended",
// "plugin:markdown/recommended",
"plugin:markdown/recommended",
"plugin:prettier/recommended"
],
"plugins": ["html", "jest", "jsdoc", "json", "prettier"],
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Expand Up @@ -24,7 +24,7 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Code Sample**
If applicable, add the code sample or a link to the [live editor](https://mermaid-js.github.io/mermaid-live-editor).
If applicable, add the code sample or a link to the [live editor](https://mermaid.live).

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/checks.yml
Expand Up @@ -12,6 +12,7 @@ jobs:
test:
runs-on: ubuntu-latest
name: check tests
if: github.repository_owner == 'mermaid'
steps:
- uses: actions/checkout@v2
with:
Expand Down
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -6,6 +6,14 @@ So you want to help? That's great!

Here are a few things to know to get you started on the right path.

## Development Installation
```bash
git clone git@github.com:mermaid-js/mermaid.git
cd mermaid
yarn
yarn test
```

## Committing code

We make all changes via pull requests. As we have many pull requests from developers new to mermaid, the current approach is to have *knsv, Knut Sveidqvist* as a main reviewer of changes and merging pull requests. More precisely like this:
Expand Down
95 changes: 83 additions & 12 deletions README.md

Large diffs are not rendered by default.

75 changes: 73 additions & 2 deletions README.zh-CN.md
Expand Up @@ -20,7 +20,7 @@ Mermaid 是一个基于 Javascript 的图表绘制工具,通过解析类 Markd
绘图和编写文档花费了开发者宝贵的开发时间,而且随着业务的变更,它很快就会过期。 但是如果缺少了图表或文档,对于生产力和团队新人的业务学习都会产生巨大的阻碍。 <br/>
Mermaid 通过允许用户创建便于修改的图表来解决这一难题,它也可以作为生产脚本(或其他代码)的一部分。<br/>
<br/>
Mermaid 甚至能让非程序员也能通过 [Mermaid Live Editor](https://mermaid-js.github.io/mermaid-live-editor/) 轻松创建详细的图表。<br/>
Mermaid 甚至能让非程序员也能通过 [Mermaid Live Editor](https://mermaid.live/) 轻松创建详细的图表。<br/>
你可以访问 [教程](./docs/Tutorials.md) 来查看 Live Editor 的视频教程,也可以查看 [Mermaid 的集成和使用](./docs/integrations.md) 这个清单来检查你的文档工具是否已经集成了 Mermaid 支持。

如果想要查看关于 Mermaid 更详细的介绍及基础使用方式,可以查看 [入门指引](./docs/n00b-overview.md), [用法](./docs/usage.md)[教程](./docs/Tutorials.md).
Expand Down Expand Up @@ -139,7 +139,7 @@ class Class10 {
}
```

### 状态图 [[<a href="https://mermaid-js.github.io/mermaid/#/stateDiagram">docs</a> - <a href="https://mermaid-js.github.io/mermaid-live-editor/#/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CAxMDAlLCA5Ni4yNzQ1MDk4MDM5JSkiLCJmaWxsVHlwZTMiOiJoc2woMTI0LCAxMDAlLCA5My41Mjk0MTE3NjQ3JSkiLCJmaWxsVHlwZTQiOiJoc2woMTc2LCAxMDAlLCA5Ni4yNzQ1MDk4MDM5JSkiLCJmaWxsVHlwZTUiOiJoc2woLTQsIDEwMCUsIDkzLjUyOTQxMTc2NDclKSIsImZpbGxUeXBlNiI6ImhzbCg4LCAxMDAlLCA5Ni4yNzQ1MDk4MDM5JSkiLCJmaWxsVHlwZTciOiJoc2woMTg4LCAxMDAlLCA5My41Mjk0MTE3NjQ3JSkifX0sInVwZGF0ZUVkaXRvciI6ZmFsc2V9">live editor</a>]

```
stateDiagram-v2
Expand Down Expand Up @@ -202,6 +202,77 @@ pie
Sit down: 3: Me
```

### C4 图 [<a href="https://mermaid-js.github.io/mermaid/#/c4c">文档</a>]

```
C4Context
title System Context diagram for Internet Banking System
Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.")
Person(customerB, "Banking Customer B")
Person_Ext(customerC, "Banking Customer C")
System(SystemAA, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.")
Person(customerD, "Banking Customer D", "A customer of the bank, <br/> with personal bank accounts.")
Enterprise_Boundary(b1, "BankBoundary") {
SystemDb_Ext(SystemE, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.")
System_Boundary(b2, "BankBoundary2") {
System(SystemA, "Banking System A")
System(SystemB, "Banking System B", "A system of the bank, with personal bank accounts.")
}
System_Ext(SystemC, "E-mail system", "The internal Microsoft Exchange e-mail system.")
SystemDb(SystemD, "Banking System D Database", "A system of the bank, with personal bank accounts.")
Boundary(b3, "BankBoundary3", "boundary") {
SystemQueue(SystemF, "Banking System F Queue", "A system of the bank, with personal bank accounts.")
SystemQueue_Ext(SystemG, "Banking System G Queue", "A system of the bank, with personal bank accounts.")
}
}
BiRel(customerA, SystemAA, "Uses")
BiRel(SystemAA, SystemE, "Uses")
Rel(SystemAA, SystemC, "Sends e-mails", "SMTP")
Rel(SystemC, customerA, "Sends e-mails to")
```
```mermaid
C4Context
title System Context diagram for Internet Banking System
Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.")
Person(customerB, "Banking Customer B")
Person_Ext(customerC, "Banking Customer C")
System(SystemAA, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.")
Person(customerD, "Banking Customer D", "A customer of the bank, <br/> with personal bank accounts.")
Enterprise_Boundary(b1, "BankBoundary") {
SystemDb_Ext(SystemE, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.")
System_Boundary(b2, "BankBoundary2") {
System(SystemA, "Banking System A")
System(SystemB, "Banking System B", "A system of the bank, with personal bank accounts.")
}
System_Ext(SystemC, "E-mail system", "The internal Microsoft Exchange e-mail system.")
SystemDb(SystemD, "Banking System D Database", "A system of the bank, with personal bank accounts.")
Boundary(b3, "BankBoundary3", "boundary") {
SystemQueue(SystemF, "Banking System F Queue", "A system of the bank, with personal bank accounts.")
SystemQueue_Ext(SystemG, "Banking System G Queue", "A system of the bank, with personal bank accounts.")
}
}
BiRel(customerA, SystemAA, "Uses")
BiRel(SystemAA, SystemE, "Uses")
Rel(SystemAA, SystemC, "Sends e-mails", "SMTP")
Rel(SystemC, customerA, "Sends e-mails to")
```

## 发布

对于有权限的同学来说,你可以通过以下步骤来完成发布操作:
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/other/configuration.spec.js
Expand Up @@ -41,7 +41,7 @@ describe('Configuration', () => {
.should('exist')
.and('include', 'url(#');
});
it('should handle arrowMarkerAbsolute excplicitly set to false', () => {
it('should handle arrowMarkerAbsolute explicitly set to false', () => {
renderGraph(
`graph TD
A[Christmas] -->|Get money| B(Go shopping)
Expand All @@ -63,7 +63,7 @@ describe('Configuration', () => {
.should('exist')
.and('include', 'url(#');
});
it('should handle arrowMarkerAbsolute excplicitly set to "false" as false', () => {
it('should handle arrowMarkerAbsolute explicitly set to "false" as false', () => {
renderGraph(
`graph TD
A[Christmas] -->|Get money| B(Go shopping)
Expand Down
10 changes: 10 additions & 0 deletions cypress/e2e/other/ghsa.spec.js
@@ -0,0 +1,10 @@
import { urlSnapshotTest } from '../../helpers/util';

describe('CSS injections', () => {
it('should not allow CSS injections outside of the diagram', () => {
urlSnapshotTest('http://localhost:9000/ghsa1.html', {
logLevel: 1,
flowchart: { htmlLabels: false },
});
});
});
2 changes: 1 addition & 1 deletion cypress/e2e/other/rerender.spec.js
@@ -1,5 +1,5 @@
describe('Rerendering', () => {
it('should be able to render after an error has occured', () => {
it('should be able to render after an error has occurred', () => {
const url = 'http://localhost:9000/render-after-error.html';
cy.viewport(1440, 1024);
cy.visit(url);
Expand Down
20 changes: 10 additions & 10 deletions cypress/e2e/other/xss.spec.js
Expand Up @@ -60,52 +60,52 @@ describe('XSS', () => {
cy.wait(1000);
cy.get('#the-malware').should('not.exist');
});
it('should not allow maniplulating htmlLabels into a false positive', () => {
it('should not allow manipulating htmlLabels into a false positive', () => {
cy.visit('http://localhost:9000/xss4.html');
cy.wait(1000);
cy.get('#the-malware').should('not.exist');
});
it('should not allow maniplulating antiscript to run javascript', () => {
it('should not allow manipulating antiscript to run javascript', () => {
cy.visit('http://localhost:9000/xss5.html');
cy.wait(1000);
cy.get('#the-malware').should('not.exist');
});
it('should not allow maniplulating antiscript to run javascript using onerror', () => {
it('should not allow manipulating antiscript to run javascript using onerror', () => {
cy.visit('http://localhost:9000/xss6.html');
cy.wait(1000);
cy.get('#the-malware').should('not.exist');
});
it('should not allow maniplulating antiscript to run javascript using onerror in state diagrams with dagre wrapper', () => {
it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre wrapper', () => {
cy.visit('http://localhost:9000/xss8.html');
cy.wait(1000);
cy.get('#the-malware').should('not.exist');
});
it('should not allow maniplulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
cy.visit('http://localhost:9000/xss9.html');
cy.wait(1000);
cy.get('#the-malware').should('not.exist');
});
it('should not allow maniplulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
cy.visit('http://localhost:9000/xss10.html');
cy.wait(1000);
cy.get('#the-malware').should('not.exist');
});
it('should not allow maniplulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
cy.visit('http://localhost:9000/xss11.html');
cy.wait(1000);
cy.get('#the-malware').should('not.exist');
});
it('should not allow maniplulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
cy.visit('http://localhost:9000/xss12.html');
cy.wait(1000);
cy.get('#the-malware').should('not.exist');
});
it('should not allow maniplulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
cy.visit('http://localhost:9000/xss13.html');
cy.wait(1000);
cy.get('#the-malware').should('not.exist');
});
it('should not allow maniplulating antiscript to run javascript iframes in class diagrams', () => {
it('should not allow manipulating antiscript to run javascript iframes in class diagrams', () => {
cy.visit('http://localhost:9000/xss14.html');
cy.wait(1000);
cy.get('#the-malware').should('not.exist');
Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/rendering/classDiagram-v2.spec.js
Expand Up @@ -381,7 +381,7 @@ describe('Class diagram V2', () => {
cy.get('svg');
});

it('16b: should handle the direction statemnent with TB', () => {
it('16b: should handle the direction statement with TB', () => {
imgSnapshotTest(
`
classDiagram
Expand All @@ -406,7 +406,7 @@ describe('Class diagram V2', () => {
cy.get('svg');
});

it('18: should handle the direction statemnent with LR', () => {
it('18: should handle the direction statement with LR', () => {
imgSnapshotTest(
`
classDiagram
Expand All @@ -430,7 +430,7 @@ describe('Class diagram V2', () => {
);
cy.get('svg');
});
it('17a: should handle the direction statemnent with BT', () => {
it('17a: should handle the direction statement with BT', () => {
imgSnapshotTest(
`
classDiagram
Expand All @@ -454,7 +454,7 @@ describe('Class diagram V2', () => {
);
cy.get('svg');
});
it('17b: should handle the direction statemment with RL', () => {
it('17b: should handle the direction statement with RL', () => {
imgSnapshotTest(
`
classDiagram
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/rendering/conf-and-directives.spec.js
Expand Up @@ -16,7 +16,7 @@ describe('Configuration and directives - nodes should be light blue', () => {
);
cy.get('svg');
});
it('Settigns from intitialize - nodes should be green', () => {
it('Settings from initialize - nodes should be green', () => {
imgSnapshotTest(
`
graph TD
Expand All @@ -30,7 +30,7 @@ graph TD
);
cy.get('svg');
});
it('Settings from initialize overriding themeVariable - nodes shold be red', () => {
it('Settings from initialize overriding themeVariable - nodes should be red', () => {
imgSnapshotTest(
`
Expand Down

0 comments on commit b55434b

Please sign in to comment.