diff --git a/.changeset/README.md b/.changeset/README.md
new file mode 100644
index 000000000..e5b6d8d6a
--- /dev/null
+++ b/.changeset/README.md
@@ -0,0 +1,8 @@
+# Changesets
+
+Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
+with multi-package repos, or single-package repos to help you version and publish your code. You can
+find the full documentation for it [in our repository](https://github.com/changesets/changesets)
+
+We have a quick list of common questions to get you started engaging with this project in
+[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
diff --git a/.changeset/config.json b/.changeset/config.json
new file mode 100644
index 000000000..ffda055e8
--- /dev/null
+++ b/.changeset/config.json
@@ -0,0 +1,12 @@
+{
+ "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
+ "changelog": ["@changesets/changelog-github", { "repo": "mermaid-js/mermaid" }],
+ "commit": false,
+ "fixed": [],
+ "linked": [],
+ "access": "public",
+ "baseBranch": "master",
+ "updateInternalDependencies": "patch",
+ "bumpVersionsWithWorkspaceProtocolOnly": true,
+ "ignore": ["@mermaid-js/docs", "@mermaid-js/webpack-test", "@mermaid-js/mermaid-example-diagram"]
+}
diff --git a/.cspell/code-terms.txt b/.cspell/code-terms.txt
index 9d2f700fc..6d6dad045 100644
--- a/.cspell/code-terms.txt
+++ b/.cspell/code-terms.txt
@@ -120,6 +120,8 @@ SUBROUTINEEND
SUBROUTINESTART
Subschemas
substr
+SVGG
+SVGSVG
TAGEND
TAGSTART
techn
diff --git a/.cspell/libraries.txt b/.cspell/libraries.txt
index c185429b0..3bfec1d5f 100644
--- a/.cspell/libraries.txt
+++ b/.cspell/libraries.txt
@@ -58,6 +58,7 @@ rehype
roughjs
rscratch
shiki
+Slidev
sparkline
sphinxcontrib
ssim
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index cfd22a293..c22166619 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -15,4 +15,4 @@ Make sure you
- [ ] :book: have read the [contribution guidelines](https://mermaid.js.org/community/contributing.html)
- [ ] :computer: have added necessary unit/e2e tests.
- [ ] :notebook: have added documentation. Make sure [`MERMAID_RELEASE_VERSION`](https://mermaid.js.org/community/contributing.html#update-documentation) is used for all new features.
-- [ ] :bookmark: targeted `develop` branch
+- [ ] :butterfly: If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. Changesets that add features should be `minor` and those that fix bugs should be `patch`. Please prefix changeset messages with `feat:`, `fix:`, or `chore:`.
diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml
deleted file mode 100644
index 83138c3d4..000000000
--- a/.github/release-drafter.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-name-template: '$NEXT_PATCH_VERSION'
-tag-template: '$NEXT_PATCH_VERSION'
-categories:
- - title: 'đ¨ **Breaking Changes**'
- labels:
- - 'Breaking Change'
- - title: 'đ Features'
- labels:
- - 'Type: Enhancement'
- - 'feature' # deprecated, new PRs shouldn't have this
- - title: 'đ Bug Fixes'
- labels:
- - 'Type: Bug / Error'
- - 'fix' # deprecated, new PRs shouldn't have this
- - title: 'đ§° Maintenance'
- labels:
- - 'Type: Other'
- - 'chore' # deprecated, new PRs shouldn't have this
- - title: 'âĄī¸ Performance'
- labels:
- - 'Type: Performance'
- - title: 'đ Documentation'
- labels:
- - 'Area: Documentation'
-change-template: '- $TITLE (#$NUMBER) @$AUTHOR'
-sort-by: title
-sort-direction: ascending
-exclude-labels:
- - 'Skip changelog'
-no-changes-template: 'This release contains minor changes and bugfixes.'
-template: |
- # Release Notes
-
- $CHANGES
-
- đ **Thanks to all contributors helping with this release!** đ
diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml
index ef170fb71..6a43791ed 100644
--- a/.github/workflows/autofix.yml
+++ b/.github/workflows/autofix.yml
@@ -2,20 +2,24 @@ name: autofix.ci # needed to securely identify the workflow
on:
pull_request:
+ branches-ignore:
+ - 'renovate/**'
permissions:
contents: read
+concurrency: ${{ github.workflow }}-${{ github.ref }}
+
jobs:
autofix:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- - uses: pnpm/action-setup@v4
+ - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
# uses version from "packageManager" field in package.json
- name: Setup Node.js
- uses: actions/setup-node@v4
+ uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
cache: pnpm
node-version-file: '.node-version'
@@ -38,4 +42,4 @@ jobs:
working-directory: ./packages/mermaid
run: pnpm run docs:build
- - uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
+ - uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c # main
diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml
index 0ce778957..eb0c4594a 100644
--- a/.github/workflows/build-docs.yml
+++ b/.github/workflows/build-docs.yml
@@ -8,6 +8,8 @@ on:
pull_request:
merge_group:
+concurrency: ${{ github.workflow }}-${{ github.ref }}
+
permissions:
contents: read
@@ -16,12 +18,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- - uses: pnpm/action-setup@v4
+ - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Setup Node.js
- uses: actions/setup-node@v4
+ uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
cache: pnpm
node-version-file: '.node-version'
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
deleted file mode 100644
index c6e96912e..000000000
--- a/.github/workflows/build.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-name: Build
-
-on:
- push: {}
- merge_group:
- pull_request:
- types:
- - opened
- - synchronize
- - ready_for_review
-
-permissions:
- contents: read
-
-jobs:
- build-mermaid:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
-
- - uses: pnpm/action-setup@v4
- # uses version from "packageManager" field in package.json
-
- - name: Setup Node.js
- uses: actions/setup-node@v4
- with:
- cache: pnpm
- node-version-file: '.node-version'
-
- - name: Install Packages
- run: |
- pnpm install --frozen-lockfile
- env:
- CYPRESS_CACHE_FOLDER: .cache/Cypress
-
- - name: Run Build
- run: pnpm run build
-
- - name: Upload Mermaid Build as Artifact
- uses: actions/upload-artifact@v4
- with:
- name: mermaid-build
- path: packages/mermaid/dist
-
- - name: Upload Mermaid Mindmap Build as Artifact
- uses: actions/upload-artifact@v4
- with:
- name: mermaid-mindmap-build
- path: packages/mermaid-mindmap/dist
diff --git a/.github/workflows/check-readme-in-sync.yml b/.github/workflows/check-readme-in-sync.yml
index ad6df66b5..5c940c087 100644
--- a/.github/workflows/check-readme-in-sync.yml
+++ b/.github/workflows/check-readme-in-sync.yml
@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Check for difference in README.md and docs/README.md
run: |
diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
deleted file mode 100644
index 012fbf19d..000000000
--- a/.github/workflows/checks.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-on:
- push:
- merge_group:
- pull_request:
- types:
- - opened
- - synchronize
- - ready_for_review
-
-name: Static analysis on Test files
-
-jobs:
- check-tests:
- runs-on: ubuntu-latest
- name: check tests
- if: github.repository_owner == 'mermaid-js'
- steps:
- - uses: actions/checkout@v4
- with:
- fetch-depth: 0
- - uses: testomatio/check-tests@stable
- with:
- framework: cypress
- tests: './cypress/e2e/**/**.spec.js'
- token: ${{ secrets.GITHUB_TOKEN }}
- has-tests-label: true
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 764ec598c..65962ce64 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -11,6 +11,9 @@ on:
- synchronize
- ready_for_review
+permissions: # added using https://github.com/step-security/secure-repo
+ contents: read
+
jobs:
analyze:
name: Analyze
@@ -29,11 +32,11 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@v3
+ uses: github/codeql-action/init@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3.26.5
with:
config-file: ./.github/codeql/codeql-config.yml
languages: ${{ matrix.language }}
@@ -45,7 +48,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@v3
+ uses: github/codeql-action/autobuild@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3.26.5
# âšī¸ Command-line programs to run using the OS shell.
# đ See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -59,4 +62,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v3
+ uses: github/codeql-action/analyze@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3.26.5
diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml
index 0d4a01360..521735e6e 100644
--- a/.github/workflows/dependency-review.yml
+++ b/.github/workflows/dependency-review.yml
@@ -15,6 +15,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
- uses: actions/checkout@v4
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 'Dependency Review'
- uses: actions/dependency-review-action@v4
+ uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
diff --git a/.github/workflows/e2e-applitools.yml b/.github/workflows/e2e-applitools.yml
index 5e5407a23..6da65afe5 100644
--- a/.github/workflows/e2e-applitools.yml
+++ b/.github/workflows/e2e-applitools.yml
@@ -11,6 +11,8 @@ on:
default: master
description: 'Parent branch to use for PRs'
+concurrency: ${{ github.workflow }}-${{ github.ref }}
+
permissions:
contents: read
@@ -30,13 +32,13 @@ jobs:
run: |
echo "::error,title=Not using Applitools::APPLITOOLS_API_KEY is empty, disabling Applitools for this run."
- - uses: actions/checkout@v4
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- - uses: pnpm/action-setup@v4
+ - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
# uses version from "packageManager" field in package.json
- name: Setup Node.js
- uses: actions/setup-node@v4
+ uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version-file: '.node-version'
@@ -52,7 +54,7 @@ jobs:
APPLITOOLS_SERVER_URL: 'https://eyesapi.applitools.com'
- name: Cypress run
- uses: cypress-io/github-action@v4
+ uses: cypress-io/github-action@d79d2d530a66e641eb4a5f227e13bc985c60b964 # v4.2.2
id: cypress
with:
start: pnpm run dev
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
index 2600b3fb8..2b91d078e 100644
--- a/.github/workflows/e2e.yml
+++ b/.github/workflows/e2e.yml
@@ -2,11 +2,15 @@ name: E2E
on:
push:
- branches-ignore:
- - 'gh-readonly-queue/**'
+ branches:
+ - develop
+ - master
+ - release/**
pull_request:
merge_group:
+concurrency: ${{ github.workflow }}-${{ github.ref }}
+
permissions:
contents: read
@@ -32,15 +36,15 @@ jobs:
image: cypress/browsers:node-20.11.0-chrome-121.0.6167.85-1-ff-120.0-edge-121.0.2277.83-1
options: --user 1001
steps:
- - uses: actions/checkout@v4
- - uses: pnpm/action-setup@v4
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Setup Node.js
- uses: actions/setup-node@v4
+ uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version-file: '.node-version'
- name: Cache snapshots
id: cache-snapshot
- uses: actions/cache@v4
+ uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
save-always: true
path: ./cypress/snapshots
@@ -49,13 +53,13 @@ jobs:
# If a snapshot for a given Hash is not found, we checkout that commit, run the tests and cache the snapshots.
- name: Switch to base branch
if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }}
- uses: actions/checkout@v4
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ env.targetHash }}
- name: Install dependencies
if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }}
- uses: cypress-io/github-action@v6
+ uses: cypress-io/github-action@df7484c5ba85def7eef30db301afa688187bc378 # v6.7.2
with:
# just perform install
runTests: false
@@ -78,26 +82,26 @@ jobs:
matrix:
containers: [1, 2, 3, 4]
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- - uses: pnpm/action-setup@v4
+ - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
# uses version from "packageManager" field in package.json
- name: Setup Node.js
- uses: actions/setup-node@v4
+ uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version-file: '.node-version'
# These cached snapshots are downloaded, providing the reference snapshots.
- name: Cache snapshots
id: cache-snapshot
- uses: actions/cache/restore@v4
+ uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ./cypress/snapshots
key: ${{ runner.os }}-snapshots-${{ env.targetHash }}
- name: Install dependencies
- uses: cypress-io/github-action@v6
+ uses: cypress-io/github-action@df7484c5ba85def7eef30db301afa688187bc378 # v6.7.2
with:
runTests: false
@@ -113,7 +117,7 @@ jobs:
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
- uses: cypress-io/github-action@v6
+ uses: cypress-io/github-action@df7484c5ba85def7eef30db301afa688187bc378 # v6.7.2
id: cypress
# If CYPRESS_RECORD_KEY is set, run in parallel on all containers
# Otherwise (e.g. if running from fork), we run on a single container only
@@ -137,7 +141,7 @@ jobs:
ARGOS_PARALLEL_INDEX: ${{ matrix.containers }}
- name: Upload Coverage to Codecov
- uses: codecov/codecov-action@v4
+ uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
# Run step only pushes to develop and pull_requests
if: ${{ steps.cypress.conclusion == 'success' && (github.event_name == 'pull_request' || github.ref == 'refs/heads/develop')}}
with:
diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.yml
index 129bd62b6..87a6e958b 100644
--- a/.github/workflows/issue-triage.yml
+++ b/.github/workflows/issue-triage.yml
@@ -4,11 +4,17 @@ on:
issues:
types: [opened]
+permissions: # added using https://github.com/step-security/secure-repo
+ contents: read
+
jobs:
triage:
+ permissions:
+ issues: write # for andymckay/labeler to label issues
+ pull-requests: write # for andymckay/labeler to label PRs
runs-on: ubuntu-latest
steps:
- - uses: andymckay/labeler@1.0.4
+ - uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90 # 1.0.4
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
add-labels: 'Status: Triage'
diff --git a/.github/workflows/link-checker.yml b/.github/workflows/link-checker.yml
index bf54d7df2..0a2b74dfe 100644
--- a/.github/workflows/link-checker.yml
+++ b/.github/workflows/link-checker.yml
@@ -19,6 +19,9 @@ on:
# * is a special character in YAML so you have to quote this string
- cron: '30 8 * * *'
+permissions: # added using https://github.com/step-security/secure-repo
+ contents: read
+
jobs:
link-checker:
runs-on: ubuntu-latest
@@ -26,17 +29,17 @@ jobs:
# lychee only uses the GITHUB_TOKEN to avoid rate-limiting
contents: read
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Restore lychee cache
- uses: actions/cache@v4
+ uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
- name: Link Checker
- uses: lycheeverse/lychee-action@v1.9.3
+ uses: lycheeverse/lychee-action@c053181aa0c3d17606addfe97a9075a32723548a # v1.9.3
with:
args: >-
--config .github/lychee.toml
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 632cd6ddc..9cb58f0ea 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -4,12 +4,10 @@ on:
push:
merge_group:
pull_request:
- types:
- - opened
- - synchronize
- - ready_for_review
workflow_dispatch:
+concurrency: ${{ github.workflow }}-${{ github.ref }}
+
permissions:
contents: write
@@ -17,13 +15,13 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- - uses: pnpm/action-setup@v4
+ - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
# uses version from "packageManager" field in package.json
- name: Setup Node.js
- uses: actions/setup-node@v4
+ uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
cache: pnpm
node-version-file: '.node-version'
@@ -82,3 +80,10 @@ jobs:
working-directory: ./packages/mermaid
continue-on-error: ${{ github.event_name == 'push' }}
run: pnpm run docs:verify
+
+ - uses: testomatio/check-tests@stable
+ with:
+ framework: cypress
+ tests: './cypress/e2e/**/**.spec.js'
+ token: ${{ secrets.GITHUB_TOKEN }}
+ has-tests-label: true
diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml
index 096590346..c9faaa062 100644
--- a/.github/workflows/pr-labeler.yml
+++ b/.github/workflows/pr-labeler.yml
@@ -22,7 +22,7 @@ jobs:
pull-requests: write # write permission is required to label PRs
steps:
- name: Label PR
- uses: release-drafter/release-drafter@v6
+ uses: release-drafter/release-drafter@3f0f87098bd6b5c5b9a36d49c41d998ea58f9348 # v6.0.0
with:
config-name: pr-labeler.yml
disable-autolabeler: false
diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml
index 4ff5f4117..ecb411b5c 100644
--- a/.github/workflows/publish-docs.yml
+++ b/.github/workflows/publish-docs.yml
@@ -23,12 +23,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- - uses: pnpm/action-setup@v4
+ - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Setup Node.js
- uses: actions/setup-node@v4
+ uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
cache: pnpm
node-version-file: '.node-version'
@@ -37,13 +37,13 @@ jobs:
run: pnpm install --frozen-lockfile
- name: Setup Pages
- uses: actions/configure-pages@v4
+ uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4.0.0
- name: Run Build
run: pnpm --filter mermaid run docs:build:vitepress
- name: Upload artifact
- uses: actions/upload-pages-artifact@v3
+ uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: packages/mermaid/src/vitepress/.vitepress/dist
@@ -56,4 +56,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
- uses: actions/deploy-pages@v4
+ uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
diff --git a/.github/workflows/release-draft.yml b/.github/workflows/release-draft.yml
deleted file mode 100644
index 657bc767a..000000000
--- a/.github/workflows/release-draft.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-name: Draft Release
-
-on:
- push:
- branches:
- - master
-
-permissions:
- contents: read
-
-jobs:
- draft-release:
- runs-on: ubuntu-latest
- permissions:
- contents: write # write permission is required to create a GitHub release
- pull-requests: read # required to read PR titles/labels
- steps:
- - name: Draft Release
- uses: release-drafter/release-drafter@v6
- with:
- disable-autolabeler: true
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/release-preview-publish.yml b/.github/workflows/release-preview-publish.yml
index 91e3ac981..a9332d9a1 100644
--- a/.github/workflows/release-preview-publish.yml
+++ b/.github/workflows/release-preview-publish.yml
@@ -9,14 +9,14 @@ jobs:
publish-preview:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- - uses: pnpm/action-setup@v4
+ - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Setup Node.js
- uses: actions/setup-node@v4
+ uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
cache: pnpm
node-version-file: '.node-version'
diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml
deleted file mode 100644
index 4dcf709c0..000000000
--- a/.github/workflows/release-publish.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-name: Publish release
-
-on:
- release:
- types: [published]
-
-jobs:
- publish:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - uses: fregante/setup-git-user@v2
-
- - uses: pnpm/action-setup@v4
- # uses version from "packageManager" field in package.json
-
- - name: Setup Node.js
- uses: actions/setup-node@v4
- with:
- cache: pnpm
- node-version-file: '.node-version'
-
- - name: Install Packages
- run: |
- pnpm install --frozen-lockfile
- npm i json --global
- env:
- CYPRESS_CACHE_FOLDER: .cache/Cypress
-
- - name: Prepare release
- run: |
- VERSION=${GITHUB_REF:10}
- echo "Preparing release $VERSION"
- git checkout -t origin/release/$VERSION
- npm version --no-git-tag-version --allow-same-version $VERSION
- git add package.json
- git commit -nm "Bump version $VERSION"
- git checkout -t origin/master
- git merge -m "Release $VERSION" --no-ff release/$VERSION
- git push --no-verify
-
- - name: Publish
- run: |
- npm set //registry.npmjs.org/:_authToken $NPM_TOKEN
- npm publish
- env:
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 000000000..91153084e
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,44 @@
+name: Release
+
+on:
+ push:
+ branches:
+ - master
+
+concurrency: ${{ github.workflow }}-${{ github.ref }}
+
+permissions: # added using https://github.com/step-security/secure-repo
+ contents: read
+
+jobs:
+ release:
+ permissions:
+ contents: write # for changesets/action to push to the repo
+ pull-requests: write # for changesets/action to create PRs
+ name: Release
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Repo
+ uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
+
+ - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
+
+ - name: Setup Node.js
+ uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
+ with:
+ cache: pnpm
+ node-version-file: '.node-version'
+
+ - name: Install Packages
+ run: pnpm install --frozen-lockfile
+
+ - name: Create Release Pull Request or Publish to npm
+ id: changesets
+ uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 # v1.4.7
+ with:
+ version: pnpm changeset:version
+ publish: pnpm changeset:publish
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+ NPM_CONFIG_PROVENANCE: true
diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml
new file mode 100644
index 000000000..0dee2e666
--- /dev/null
+++ b/.github/workflows/scorecard.yml
@@ -0,0 +1,37 @@
+name: Scorecard supply-chain security
+on:
+ branch_protection_rule:
+ push:
+ branches:
+ - develop
+ schedule:
+ - cron: 29 15 * * 0
+permissions: read-all
+jobs:
+ analysis:
+ name: Scorecard analysis
+ permissions:
+ id-token: write
+ security-events: write
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+ with:
+ persist-credentials: false
+ - name: Run analysis
+ uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
+ with:
+ results_file: results.sarif
+ results_format: sarif
+ publish_results: true
+ - name: Upload artifact
+ uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
+ with:
+ name: SARIF file
+ path: results.sarif
+ retention-days: 5
+ - name: Upload to code-scanning
+ uses: github/codeql-action/upload-sarif@f0f3afee809481da311ca3a6ff1ff51d81dbeb24 # v3.26.4
+ with:
+ sarif_file: results.sarif
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index a0b284a68..375d5fada 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -9,13 +9,13 @@ jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- - uses: pnpm/action-setup@v4
+ - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
# uses version from "packageManager" field in package.json
- name: Setup Node.js
- uses: actions/setup-node@v4
+ uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
cache: pnpm
node-version-file: '.node-version'
@@ -39,7 +39,7 @@ jobs:
pnpm exec vitest run ./packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts --coverage
- name: Upload Coverage to Codecov
- uses: codecov/codecov-action@v4
+ uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
# Run step only pushes to develop and pull_requests
if: ${{ github.event_name == 'pull_request' || github.ref == 'refs/heads/develop' }}
with:
diff --git a/.github/workflows/unlock-reopened-issues.yml b/.github/workflows/unlock-reopened-issues.yml
index 4c5379729..b854eeb4b 100644
--- a/.github/workflows/unlock-reopened-issues.yml
+++ b/.github/workflows/unlock-reopened-issues.yml
@@ -8,6 +8,6 @@ jobs:
triage:
runs-on: ubuntu-latest
steps:
- - uses: Dunning-Kruger/unlock-issues@v1
+ - uses: Dunning-Kruger/unlock-issues@b06b7f7e5c3f2eaa1c6d5d89f40930e4d6d9699e # v1
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
diff --git a/.github/workflows/update-browserlist.yml b/.github/workflows/update-browserlist.yml
index f8f7696cd..1b26271f7 100644
--- a/.github/workflows/update-browserlist.yml
+++ b/.github/workflows/update-browserlist.yml
@@ -8,18 +8,18 @@ jobs:
update-browser-list:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
- - uses: pnpm/action-setup@v4
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- run: npx update-browserslist-db@latest
- name: Commit changes
- uses: EndBug/add-and-commit@v9
+ uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
with:
author_name: ${{ github.actor }}
author_email: ${{ github.actor }}@users.noreply.github.com
message: 'chore: update browsers list'
push: false
- name: Create Pull Request
- uses: peter-evans/create-pull-request@v6
+ uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with:
branch: update-browserslist
title: Update Browserslist
diff --git a/README.md b/README.md
index 8d5eebfeb..4a092f137 100644
--- a/README.md
+++ b/README.md
@@ -36,6 +36,7 @@ Try Live Editor previews of future releases:
diff --git a/cypress/integration/rendering/flowchart-handDrawn.spec.js b/cypress/integration/rendering/flowchart-handDrawn.spec.js
index d2e3edde0..10d6dde87 100644
--- a/cypress/integration/rendering/flowchart-handDrawn.spec.js
+++ b/cypress/integration/rendering/flowchart-handDrawn.spec.js
@@ -12,7 +12,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
flowchart: { htmlLabels: false },
fontFamily: 'courier',
}
@@ -30,7 +30,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
flowchart: { htmlLabels: true },
fontFamily: 'courier',
}
@@ -47,7 +47,7 @@ describe('Flowchart HandDrawn', () => {
C -->|Two| E[iPhone]
C -->|Three| F[Car]
`,
- { look: 'handDrawn', handDrawnSeed: 0, fontFamily: 'courier' }
+ { look: 'handDrawn', handDrawnSeed: 1, fontFamily: 'courier' }
);
});
@@ -62,7 +62,7 @@ describe('Flowchart HandDrawn', () => {
C -->|Two| E[\\iPhone\\]
C -->|Three| F[Car]
`,
- { look: 'handDrawn', handDrawnSeed: 0, fontFamily: 'courier' }
+ { look: 'handDrawn', handDrawnSeed: 1, fontFamily: 'courier' }
);
});
@@ -78,7 +78,7 @@ describe('Flowchart HandDrawn', () => {
classDef processHead fill:#888888,color:white,font-weight:bold,stroke-width:3px,stroke:#001f3f
class 1A,1B,D,E processHead
`,
- { look: 'handDrawn', handDrawnSeed: 0, fontFamily: 'courier' }
+ { look: 'handDrawn', handDrawnSeed: 1, fontFamily: 'courier' }
);
});
@@ -107,7 +107,7 @@ describe('Flowchart HandDrawn', () => {
35(SAM.CommonFA.PopulationFME)-->39(SAM.CommonFA.ChargeDetails)
36(SAM.CommonFA.PremetricCost)-->39(SAM.CommonFA.ChargeDetails)
`,
- { look: 'handDrawn', handDrawnSeed: 0, fontFamily: 'courier' }
+ { look: 'handDrawn', handDrawnSeed: 1, fontFamily: 'courier' }
);
});
@@ -178,7 +178,7 @@ describe('Flowchart HandDrawn', () => {
9a072290_1ec3_e711_8c5a_005056ad0002-->d6072290_1ec3_e711_8c5a_005056ad0002
9a072290_1ec3_e711_8c5a_005056ad0002-->71082290_1ec3_e711_8c5a_005056ad0002
`,
- { look: 'handDrawn', handDrawnSeed: 0, fontFamily: 'courier' }
+ { look: 'handDrawn', handDrawnSeed: 1, fontFamily: 'courier' }
);
});
@@ -187,7 +187,7 @@ describe('Flowchart HandDrawn', () => {
`
graph TB;subgraph "number as labels";1;end;
`,
- { look: 'handDrawn', handDrawnSeed: 0, fontFamily: 'courier' }
+ { look: 'handDrawn', handDrawnSeed: 1, fontFamily: 'courier' }
);
});
@@ -199,7 +199,7 @@ describe('Flowchart HandDrawn', () => {
a1-->a2
end
`,
- { look: 'handDrawn', handDrawnSeed: 0, fontFamily: 'courier' }
+ { look: 'handDrawn', handDrawnSeed: 1, fontFamily: 'courier' }
);
});
@@ -211,7 +211,7 @@ describe('Flowchart HandDrawn', () => {
a1-->a2
end
`,
- { look: 'handDrawn', handDrawnSeed: 0, fontFamily: 'courier' }
+ { look: 'handDrawn', handDrawnSeed: 1, fontFamily: 'courier' }
);
});
@@ -246,7 +246,7 @@ describe('Flowchart HandDrawn', () => {
style foo fill:#F99,stroke-width:2px,stroke:#F0F,color:darkred
style bar fill:#999,stroke-width:10px,stroke:#0F0,color:blue
`,
- { look: 'handDrawn', handDrawnSeed: 0, fontFamily: 'courier' }
+ { look: 'handDrawn', handDrawnSeed: 1, fontFamily: 'courier' }
);
});
@@ -348,7 +348,7 @@ describe('Flowchart HandDrawn', () => {
sid-7CE72B24-E0C1-46D3-8132-8BA66BE05AA7-->sid-4DA958A0-26D9-4D47-93A7-70F39FD7D51A;
sid-7CE72B24-E0C1-46D3-8132-8BA66BE05AA7-->sid-4FC27B48-A6F9-460A-A675-021F5854FE22;
`,
- { look: 'handDrawn', handDrawnSeed: 0, fontFamily: 'courier' }
+ { look: 'handDrawn', handDrawnSeed: 1, fontFamily: 'courier' }
);
});
@@ -364,7 +364,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
listUrl: false,
listId: 'color styling',
fontFamily: 'courier',
@@ -390,7 +390,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
listUrl: false,
listId: 'color styling',
fontFamily: 'courier',
@@ -411,7 +411,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
flowchart: { htmlLabels: false },
fontFamily: 'courier',
}
@@ -435,7 +435,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
flowchart: { htmlLabels: false },
fontFamily: 'courier',
}
@@ -457,7 +457,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
flowchart: { htmlLabels: false },
fontFamily: 'courier',
}
@@ -471,7 +471,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
flowchart: { htmlLabels: false },
fontFamily: 'courier',
}
@@ -485,7 +485,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
flowchart: { htmlLabels: false },
fontFamily: 'courier',
}
@@ -500,7 +500,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
flowchart: { htmlLabels: false },
fontFamily: 'courier',
}
@@ -527,7 +527,7 @@ describe('Flowchart HandDrawn', () => {
class A someclass;`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
flowchart: { htmlLabels: false },
fontFamily: 'courier',
}
@@ -544,7 +544,7 @@ describe('Flowchart HandDrawn', () => {
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
- { look: 'handDrawn', handDrawnSeed: 0, flowchart: { nodeSpacing: 50 }, fontFamily: 'courier' }
+ { look: 'handDrawn', handDrawnSeed: 1, flowchart: { nodeSpacing: 50 }, fontFamily: 'courier' }
);
});
@@ -560,7 +560,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
flowchart: { rankSpacing: '100' },
fontFamily: 'courier',
}
@@ -578,7 +578,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
flowchart: { htmlLabels: false },
fontFamily: 'courier',
}
@@ -603,7 +603,7 @@ describe('Flowchart HandDrawn', () => {
click E "notes://do-your-thing/id" "other protocol test"
click F "javascript:alert('test')" "script test"
`,
- { look: 'handDrawn', handDrawnSeed: 0, securityLevel: 'loose', fontFamily: 'courier' }
+ { look: 'handDrawn', handDrawnSeed: 1, securityLevel: 'loose', fontFamily: 'courier' }
);
});
@@ -623,7 +623,7 @@ describe('Flowchart HandDrawn', () => {
click B "index.html#link-clicked" "link test"
click D testClick "click test"
`,
- { look: 'handDrawn', handDrawnSeed: 0, flowchart: { htmlLabels: true } }
+ { look: 'handDrawn', handDrawnSeed: 1, flowchart: { htmlLabels: true } }
);
});
@@ -645,7 +645,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
flowchart: { htmlLabels: false },
fontFamily: 'courier',
}
@@ -664,7 +664,7 @@ describe('Flowchart HandDrawn', () => {
class A myClass1
class D myClass2
`,
- { look: 'handDrawn', handDrawnSeed: 0, flowchart: { htmlLabels: true } }
+ { look: 'handDrawn', handDrawnSeed: 1, flowchart: { htmlLabels: true } }
);
});
@@ -682,7 +682,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
flowchart: { htmlLabels: false },
fontFamily: 'courier',
}
@@ -711,7 +711,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
flowchart: { htmlLabels: false },
fontFamily: 'courier',
}
@@ -728,7 +728,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
flowchart: { htmlLabels: false },
fontFamily: 'courier',
}
@@ -752,7 +752,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
flowchart: { htmlLabels: false },
fontFamily: 'courier',
}
@@ -769,7 +769,7 @@ describe('Flowchart HandDrawn', () => {
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
- { look: 'handDrawn', handDrawnSeed: 0, flowchart: { diagramPadding: 0 } }
+ { look: 'handDrawn', handDrawnSeed: 1, flowchart: { diagramPadding: 0 } }
);
});
@@ -778,7 +778,7 @@ describe('Flowchart HandDrawn', () => {
`graph TD
A[Christmas]
`,
- { look: 'handDrawn', handDrawnSeed: 0 }
+ { look: 'handDrawn', handDrawnSeed: 1 }
);
});
@@ -796,7 +796,7 @@ describe('Flowchart HandDrawn', () => {
C -----> E4
C ======> E5
`,
- { look: 'handDrawn', handDrawnSeed: 0 }
+ { look: 'handDrawn', handDrawnSeed: 1 }
);
});
it('FDH36: should render escaped without html labels', () => {
@@ -804,7 +804,7 @@ describe('Flowchart HandDrawn', () => {
`graph TD
a["Haiya"]-->b
`,
- { look: 'handDrawn', handDrawnSeed: 0, htmlLabels: false, flowchart: { htmlLabels: false } }
+ { look: 'handDrawn', handDrawnSeed: 1, htmlLabels: false, flowchart: { htmlLabels: false } }
);
});
it('FDH37: should render non-escaped with html labels', () => {
@@ -814,7 +814,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
htmlLabels: true,
flowchart: { htmlLabels: true },
securityLevel: 'loose',
@@ -830,7 +830,7 @@ describe('Flowchart HandDrawn', () => {
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
- { look: 'handDrawn', handDrawnSeed: 0, flowchart: { useMaxWidth: true } }
+ { look: 'handDrawn', handDrawnSeed: 1, flowchart: { useMaxWidth: true } }
);
cy.get('svg').should((svg) => {
expect(svg).to.have.attr('width', '100%');
@@ -853,7 +853,7 @@ describe('Flowchart HandDrawn', () => {
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
- { look: 'handDrawn', handDrawnSeed: 0, flowchart: { useMaxWidth: false } }
+ { look: 'handDrawn', handDrawnSeed: 1, flowchart: { useMaxWidth: false } }
);
cy.get('svg').should((svg) => {
// const height = parseFloat(svg.attr('height'));
@@ -874,7 +874,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
htmlLabels: true,
flowchart: { htmlLabels: true },
securityLevel: 'loose',
@@ -904,7 +904,7 @@ describe('Flowchart HandDrawn', () => {
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
htmlLabels: true,
flowchart: { htmlLabels: true },
securityLevel: 'loose',
@@ -919,7 +919,7 @@ graph TD
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
htmlLabels: true,
flowchart: { htmlLabels: true },
securityLevel: 'loose',
@@ -937,7 +937,7 @@ graph TD
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
htmlLabels: true,
flowchart: { htmlLabels: true },
securityLevel: 'loose',
@@ -977,7 +977,7 @@ graph TD
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
htmlLabels: true,
flowchart: { htmlLabels: true },
securityLevel: 'loose',
@@ -999,7 +999,7 @@ graph TD
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
htmlLabels: true,
flowchart: { htmlLabels: true },
securityLevel: 'loose',
@@ -1016,7 +1016,7 @@ graph TD
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
htmlLabels: true,
flowchart: { htmlLabels: true },
securityLevel: 'loose',
@@ -1027,12 +1027,12 @@ graph TD
imgSnapshotTest(
`
graph TD
- classDef default fill:#a34,stroke:#000,stroke-width:4px,color:#fff
+ classDef default fill:#a34,stroke:#000,stroke-width:4px,color:#fff
hello --> default
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
htmlLabels: true,
flowchart: { htmlLabels: true },
securityLevel: 'loose',
@@ -1051,7 +1051,7 @@ graph TD
`,
{
look: 'handDrawn',
- handDrawnSeed: 0,
+ handDrawnSeed: 1,
flowchart: { htmlLabels: true },
securityLevel: 'loose',
}
diff --git a/cypress/integration/rendering/flowchart-v2.spec.js b/cypress/integration/rendering/flowchart-v2.spec.js
index c2fd0b011..452cdb5a0 100644
--- a/cypress/integration/rendering/flowchart-v2.spec.js
+++ b/cypress/integration/rendering/flowchart-v2.spec.js
@@ -99,7 +99,7 @@ describe('Flowchart v2', () => {
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
- expect(maxWidthValue).to.be.within(446 * 0.95 - 1, 446 * 1.05);
+ expect(maxWidthValue).to.be.within(417 * 0.95, 417 * 1.05);
});
});
it('8: should render a flowchart when useMaxWidth is false', () => {
@@ -118,7 +118,7 @@ describe('Flowchart v2', () => {
const width = parseFloat(svg.attr('width'));
// use within because the absolute value can be slightly different depending on the environment Âą5%
// expect(height).to.be.within(446 * 0.95, 446 * 1.05);
- expect(width).to.be.within(446 * 0.95 - 1, 446 * 1.05);
+ expect(width).to.be.within(417 * 0.95, 417 * 1.05);
expect(svg).to.not.have.attr('style');
});
});
diff --git a/cypress/platform/flowchart-refactor.html b/cypress/platform/flowchart-refactor.html
index 034e79a52..6d9ce423f 100644
--- a/cypress/platform/flowchart-refactor.html
+++ b/cypress/platform/flowchart-refactor.html
@@ -822,7 +822,7 @@ flowchart LR