Skip to content

Commit 5735efa

Browse files
authored
Merge pull request #3911 from mermaid-js/release/9.3.0
Release/9.3.0
2 parents e2a0c43 + 774512d commit 5735efa

File tree

454 files changed

+13051
-33886
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

454 files changed

+13051
-33886
lines changed

.eslintrc.json

+74-13
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,27 @@
1616
"extends": [
1717
"eslint:recommended",
1818
"plugin:@typescript-eslint/recommended",
19-
"plugin:jsdoc/recommended",
2019
"plugin:json/recommended",
2120
"plugin:markdown/recommended",
21+
"plugin:@cspell/recommended",
2222
"prettier"
2323
],
24-
"plugins": ["@typescript-eslint", "html", "jest", "jsdoc", "json"],
24+
"plugins": [
25+
"@typescript-eslint",
26+
"no-only-tests",
27+
"html",
28+
"jest",
29+
"jsdoc",
30+
"json",
31+
"@cspell",
32+
"lodash",
33+
"unicorn"
34+
],
2535
"rules": {
36+
"curly": "error",
2637
"no-console": "error",
2738
"no-prototype-builtins": "off",
2839
"no-unused-vars": "off",
29-
"jsdoc/check-indentation": "off",
30-
"jsdoc/check-alignment": "off",
31-
"jsdoc/check-line-alignment": "off",
32-
"jsdoc/multiline-blocks": "off",
33-
"jsdoc/newline-after-description": "off",
34-
"jsdoc/tag-lines": "off",
35-
"jsdoc/require-param-description": "off",
36-
"jsdoc/require-param-type": "off",
37-
"jsdoc/require-returns": "off",
38-
"jsdoc/require-returns-description": "off",
3940
"cypress/no-async-tests": "off",
4041
"@typescript-eslint/ban-ts-comment": [
4142
"error",
@@ -48,7 +49,44 @@
4849
}
4950
],
5051
"json/*": ["error", "allowComments"],
51-
"no-empty": ["error", { "allowEmptyCatch": true }]
52+
"@cspell/spellchecker": [
53+
"error",
54+
{
55+
"checkIdentifiers": false,
56+
"checkStrings": false,
57+
"checkStringTemplates": false
58+
}
59+
],
60+
"no-empty": [
61+
"error",
62+
{
63+
"allowEmptyCatch": true
64+
}
65+
],
66+
"no-only-tests/no-only-tests": "error",
67+
"lodash/import-scope": ["error", "method"],
68+
"unicorn/better-regex": "error",
69+
"unicorn/no-abusive-eslint-disable": "error",
70+
"unicorn/no-array-push-push": "error",
71+
"unicorn/no-for-loop": "error",
72+
"unicorn/no-instanceof-array": "error",
73+
"unicorn/no-typeof-undefined": "error",
74+
"unicorn/no-unnecessary-await": "error",
75+
"unicorn/no-unsafe-regex": "warn",
76+
"unicorn/no-useless-promise-resolve-reject": "error",
77+
"unicorn/prefer-array-find": "error",
78+
"unicorn/prefer-array-flat-map": "error",
79+
"unicorn/prefer-array-index-of": "error",
80+
"unicorn/prefer-array-some": "error",
81+
"unicorn/prefer-default-parameters": "error",
82+
"unicorn/prefer-includes": "error",
83+
"unicorn/prefer-negative-index": "error",
84+
"unicorn/prefer-object-from-entries": "error",
85+
"unicorn/prefer-string-starts-ends-with": "error",
86+
"unicorn/prefer-string-trim-start-end": "error",
87+
"unicorn/string-content": "error",
88+
"unicorn/prefer-spread": "error",
89+
"unicorn/no-lonely-if": "error"
5290
},
5391
"overrides": [
5492
{
@@ -57,6 +95,29 @@
5795
"no-console": "off"
5896
}
5997
},
98+
{
99+
"files": ["*.{js,jsx,mjs,cjs}"],
100+
"extends": ["plugin:jsdoc/recommended"],
101+
"rules": {
102+
"jsdoc/check-indentation": "off",
103+
"jsdoc/check-alignment": "off",
104+
"jsdoc/check-line-alignment": "off",
105+
"jsdoc/multiline-blocks": "off",
106+
"jsdoc/newline-after-description": "off",
107+
"jsdoc/tag-lines": "off",
108+
"jsdoc/require-param-description": "off",
109+
"jsdoc/require-param-type": "off",
110+
"jsdoc/require-returns": "off",
111+
"jsdoc/require-returns-description": "off"
112+
}
113+
},
114+
{
115+
"files": ["*.{ts,tsx}"],
116+
"plugins": ["tsdoc"],
117+
"rules": {
118+
"tsdoc/syntax": "error"
119+
}
120+
},
60121
{
61122
"files": ["*.spec.{ts,js}", "cypress/**", "demos/**", "**/docs/**"],
62123
"rules": {

.github/ISSUE_TEMPLATE/config.yml

-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ contact_links:
33
- name: GitHub Discussions
44
url: https://github.com/mermaid-js/mermaid/discussions
55
about: Ask the Community questions or share your own graphs in our discussions.
6-
- name: Security Vulnerability
7-
url: https://github.com/mermaid-js/.github/blob/main/SECURITY.md
8-
about: Report security issues confidentially.
96
- name: Slack
107
url: https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE
118
about: Join our Community on Slack for Help and a casual chat.

.github/dependabot.yml

-18
This file was deleted.

.github/workflows/docs.yml

-28
This file was deleted.

.github/workflows/link-checker.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This Link Checker is run on all documentation files once per week.
2+
3+
# references:
4+
# - https://github.com/lycheeverse/lychee-action
5+
# - https://github.com/lycheeverse/lychee
6+
7+
name: Link Checker
8+
9+
on:
10+
push:
11+
branches:
12+
- develop
13+
- master
14+
pull_request:
15+
branches:
16+
- develop
17+
- master
18+
schedule:
19+
# * is a special character in YAML so you have to quote this string
20+
- cron: '30 8 * * 5'
21+
22+
jobs:
23+
linkChecker:
24+
runs-on: ubuntu-latest
25+
permissions:
26+
# lychee only uses the GITHUB_TOKEN to avoid rate-limiting
27+
contents: read
28+
steps:
29+
- uses: actions/checkout@v3
30+
31+
- name: Restore lychee cache
32+
uses: actions/cache@v3
33+
with:
34+
path: .lycheecache
35+
key: cache-lychee-${{ github.sha }}
36+
restore-keys: cache-lychee-
37+
38+
- name: Link Checker
39+
uses: lycheeverse/[email protected]
40+
with:
41+
args: --verbose --no-progress --cache --max-cache-age 1d packages/mermaid/src/docs/**/*.md README.md README.zh-CN.md
42+
fail: true
43+
jobSummary: true
44+
env:
45+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/lint.yml

+16-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- ready_for_review
1010

1111
permissions:
12-
contents: read
12+
contents: write
1313

1414
jobs:
1515
lint:
@@ -39,4 +39,19 @@ jobs:
3939
run: pnpm run lint
4040

4141
- name: Verify Docs
42+
id: verifyDocs
43+
working-directory: ./packages/mermaid
44+
continue-on-error: ${{ github.event_name == 'push' }}
4245
run: pnpm run docs:verify
46+
47+
- name: Rebuild Docs
48+
if: ${{ steps.verifyDocs.outcome == 'failure' && github.event_name == 'push' }}
49+
working-directory: ./packages/mermaid
50+
run: pnpm run docs:build
51+
52+
- name: Commit changes
53+
uses: EndBug/add-and-commit@v9
54+
if: ${{ steps.verifyDocs.outcome == 'failure' && github.event_name == 'push' }}
55+
with:
56+
message: 'Update docs'
57+
add: 'docs/*'

.github/workflows/publish-docs.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Deploy Vitepress docs to Pages
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches:
7+
- master
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow one concurrent deployment
19+
concurrency:
20+
group: 'pages'
21+
cancel-in-progress: true
22+
23+
jobs:
24+
# Build job
25+
build:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v3
30+
31+
- uses: pnpm/action-setup@v2
32+
33+
- name: Setup Node.js
34+
uses: actions/setup-node@v3
35+
with:
36+
cache: pnpm
37+
node-version: 18
38+
39+
- name: Install Packages
40+
run: pnpm install --frozen-lockfile
41+
42+
- name: Setup Pages
43+
uses: actions/configure-pages@v2
44+
45+
- name: Run Build
46+
run: pnpm --filter mermaid run docs:build:vitepress
47+
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v1
50+
with:
51+
path: packages/mermaid/src/vitepress/.vitepress/dist
52+
53+
# Deployment job
54+
deploy:
55+
environment:
56+
name: github-pages
57+
runs-on: ubuntu-latest
58+
needs: build
59+
steps:
60+
- name: Deploy to GitHub Pages
61+
id: deployment
62+
uses: actions/deploy-pages@v1

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cypress/snapshots/
3232
.eslintcache
3333
.tsbuildinfo
3434
tsconfig.tsbuildinfo
35-
knsv*.html
3635

36+
knsv*.html
3737
local*.html
38+
stats/

.lintstagedrc.json

-6
This file was deleted.

.lintstagedrc.mjs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default {
2+
'!(docs/**/*)*.{ts,js,json,html,md,mts}': ['eslint --fix', 'prettier --write'],
3+
'cSpell.json': ['ts-node-esm scripts/fixCSpell.ts'],
4+
'**/*.jison': ['pnpm -w run lint:jison'],
5+
};

.lycheeignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# These links are ignored by our link checker https://github.com/lycheeverse/lychee
2+
# The file allows you to list multiple regular expressions for exclusion (one pattern per line).
3+
4+
# Network error: Forbidden
5+
https://codepen.io
6+
7+
# Network error: The certificate was not trusted
8+
https://mkdocs.org/
9+
https://osawards.com/javascript/#nominees
10+
https://osawards.com/javascript/2019
11+
12+
# Don't check files that are generated during the build via `pnpm docs:code`
13+
packages/mermaid/src/docs/config/setup/*

.npmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
auto-install-peers=true
22
strict-peer-dependencies=false
3-
use-inline-specifiers-lockfile-format=true
3+
use-inline-specifiers-lockfile-format=true

.prettierignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ cypress/platform/xss3.html
33
.cache
44
coverage
55
# Autogenerated by PNPM
6-
pnpm-lock.yaml
6+
pnpm-lock.yaml
7+
stats

0 commit comments

Comments
 (0)