Skip to content

Commit 1e8e4e4

Browse files
authored
Merge branch 'develop' into patch-2
2 parents 719685b + 742531a commit 1e8e4e4

File tree

147 files changed

+11159
-3515
lines changed

Some content is hidden

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

147 files changed

+11159
-3515
lines changed

.build/common.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
export interface PackageOptions {
2+
name: string;
3+
packageName: string;
4+
file: string;
5+
}
6+
17
/**
28
* Shared common options for both ESBuild and Vite
39
*/
@@ -27,4 +33,4 @@ export const packageOptions = {
2733
packageName: 'mermaid-layout-elk',
2834
file: 'layouts.ts',
2935
},
30-
} as const;
36+
} as const satisfies Record<string, PackageOptions>;

.changeset/add-nested-namespaces.md

-17
This file was deleted.

.changeset/chilly-hotels-mix.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'mermaid': patch
3+
---
4+
5+
fix: Jagged edge fix for icon shape

.changeset/dry-plums-glow.md

-5
This file was deleted.

.changeset/dry-students-act.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'mermaid': patch
3+
---
4+
5+
Add missing TypeScript dependencies

.changeset/heavy-cats-mate.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'mermaid': patch
3+
---
4+
5+
fix: Icon color fix for colored icons.

.changeset/witty-rabbits-hunt.md

-5
This file was deleted.

.cspell/code-terms.txt

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ concat
2626
controlx
2727
controly
2828
CSSCLASS
29+
curv
2930
CYLINDEREND
3031
CYLINDERSTART
3132
DAGA

.cspell/cspell.config.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ dictionaryDefinitions:
2828
- name: suggestions
2929
words:
3030
- none
31+
- disp
32+
- subproc
33+
- tria
3134
suggestWords:
3235
- seperator:separator
3336
- vertice:vertex

.cspell/mermaid-terms.txt

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ bmatrix
55
braintree
66
catmull
77
compositTitleSize
8+
curv
89
doublecircle
910
elems
1011
gantt
@@ -24,6 +25,7 @@ multigraph
2425
nodesep
2526
NOTEGROUP
2627
Pinterest
28+
procs
2729
rankdir
2830
ranksep
2931
rect

.esbuild/build.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ import { defaultOptions, getBuildConfig } from './util.js';
88
const shouldVisualize = process.argv.includes('--visualize');
99

1010
const buildPackage = async (entryName: keyof typeof packageOptions) => {
11-
const commonOptions: MermaidBuildOptions = { ...defaultOptions, entryName } as const;
11+
const commonOptions: MermaidBuildOptions = {
12+
...defaultOptions,
13+
options: packageOptions[entryName],
14+
} as const;
1215
const buildConfigs: MermaidBuildOptions[] = [
1316
// package.mjs
1417
{ ...commonOptions },
@@ -40,7 +43,7 @@ const buildPackage = async (entryName: keyof typeof packageOptions) => {
4043
continue;
4144
}
4245
const fileName = Object.keys(metafile.outputs)
43-
.find((file) => !file.includes('chunks') && file.endsWith('js'))
46+
.find((file) => !file.includes('chunks') && file.endsWith('js'))!
4447
.replace('dist/', '');
4548
// Upload metafile into https://esbuild.github.io/analyze/
4649
await writeFile(`stats/${fileName}.meta.json`, JSON.stringify(metafile));

.esbuild/server.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@ import { generateLangium } from '../.build/generateLangium.js';
99
import { defaultOptions, getBuildConfig } from './util.js';
1010

1111
const configs = Object.values(packageOptions).map(({ packageName }) =>
12-
getBuildConfig({ ...defaultOptions, minify: false, core: false, entryName: packageName })
12+
getBuildConfig({
13+
...defaultOptions,
14+
minify: false,
15+
core: false,
16+
options: packageOptions[packageName],
17+
})
1318
);
1419
const mermaidIIFEConfig = getBuildConfig({
1520
...defaultOptions,
1621
minify: false,
1722
core: false,
18-
entryName: 'mermaid',
23+
options: packageOptions.mermaid,
1924
format: 'iife',
2025
});
2126
configs.push(mermaidIIFEConfig);

.esbuild/util.ts

+10-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { fileURLToPath } from 'url';
33
import type { BuildOptions } from 'esbuild';
44
import { readFileSync } from 'fs';
55
import jsonSchemaPlugin from './jsonSchemaPlugin.js';
6-
import { packageOptions } from '../.build/common.js';
6+
import type { PackageOptions } from '../.build/common.js';
77
import { jisonPlugin } from './jisonPlugin.js';
88

99
const __dirname = fileURLToPath(new URL('.', import.meta.url));
@@ -13,10 +13,10 @@ export interface MermaidBuildOptions extends BuildOptions {
1313
core: boolean;
1414
metafile: boolean;
1515
format: 'esm' | 'iife';
16-
entryName: keyof typeof packageOptions;
16+
options: PackageOptions;
1717
}
1818

19-
export const defaultOptions: Omit<MermaidBuildOptions, 'entryName'> = {
19+
export const defaultOptions: Omit<MermaidBuildOptions, 'entryName' | 'options'> = {
2020
minify: false,
2121
metafile: false,
2222
core: false,
@@ -52,9 +52,14 @@ const getFileName = (fileName: string, { core, format, minify }: MermaidBuildOpt
5252
};
5353

5454
export const getBuildConfig = (options: MermaidBuildOptions): BuildOptions => {
55-
const { core, entryName, metafile, format, minify } = options;
55+
const {
56+
core,
57+
metafile,
58+
format,
59+
minify,
60+
options: { name, file, packageName },
61+
} = options;
5662
const external: string[] = ['require', 'fs', 'path'];
57-
const { name, file, packageName } = packageOptions[entryName];
5863
const outFileName = getFileName(name, options);
5964
const output: BuildOptions = buildOptions({
6065
absWorkingDir: resolve(__dirname, `../packages/${packageName}`),

.github/lychee.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ exclude = [
4444
"https://chromewebstore.google.com",
4545

4646
# Drupal 403
47-
"https://(www.)?drupal.org"
47+
"https://(www.)?drupal.org",
48+
49+
# Swimm returns 404, eventhough the link is valid
50+
"https://docs.swimm.io"
4851
]
4952

5053
# Exclude all private IPs from checking.

.github/workflows/autofix.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
# uses version from "packageManager" field in package.json
2020

2121
- name: Setup Node.js
22-
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
22+
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
2323
with:
2424
cache: pnpm
2525
node-version-file: '.node-version'

.github/workflows/build-docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
2424

2525
- name: Setup Node.js
26-
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
26+
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
2727
with:
2828
cache: pnpm
2929
node-version-file: '.node-version'

.github/workflows/codeql.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636

3737
# Initializes the CodeQL tools for scanning.
3838
- name: Initialize CodeQL
39-
uses: github/codeql-action/init@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3.26.5
39+
uses: github/codeql-action/init@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
4040
with:
4141
config-file: ./.github/codeql/codeql-config.yml
4242
languages: ${{ matrix.language }}
@@ -48,7 +48,7 @@ jobs:
4848
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4949
# If this step fails, then you should remove it and run the build manually (see below)
5050
- name: Autobuild
51-
uses: github/codeql-action/autobuild@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3.26.5
51+
uses: github/codeql-action/autobuild@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
5252

5353
# ℹ️ Command-line programs to run using the OS shell.
5454
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -62,4 +62,4 @@ jobs:
6262
# make release
6363

6464
- name: Perform CodeQL Analysis
65-
uses: github/codeql-action/analyze@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3.26.5
65+
uses: github/codeql-action/analyze@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12

.github/workflows/e2e-applitools.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
# uses version from "packageManager" field in package.json
3939

4040
- name: Setup Node.js
41-
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
41+
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
4242
with:
4343
node-version-file: '.node-version'
4444

.github/workflows/e2e-timings.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: E2E - Generate Timings
2+
3+
on:
4+
# run this workflow every night at 3am
5+
schedule:
6+
- cron: '28 3 * * *'
7+
# or when the user triggers it from GitHub Actions page
8+
workflow_dispatch:
9+
10+
concurrency: ${{ github.workflow }}-${{ github.ref }}
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
timings:
17+
runs-on: ubuntu-latest
18+
container:
19+
image: cypress/browsers:node-20.11.0-chrome-121.0.6167.85-1-ff-120.0-edge-121.0.2277.83-1
20+
options: --user 1001
21+
steps:
22+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
23+
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
24+
- name: Setup Node.js
25+
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
26+
with:
27+
node-version-file: '.node-version'
28+
- name: Install dependencies
29+
uses: cypress-io/github-action@0da3c06ed8217b912deea9d8ee69630baed1737e # v6.7.6
30+
with:
31+
runTests: false
32+
- name: Cypress run
33+
uses: cypress-io/github-action@0da3c06ed8217b912deea9d8ee69630baed1737e # v6.7.6
34+
id: cypress
35+
with:
36+
install: false
37+
start: pnpm run dev:coverage
38+
wait-on: 'http://localhost:9000'
39+
browser: chrome
40+
publish-summary: false
41+
env:
42+
VITEST_COVERAGE: true
43+
CYPRESS_COMMIT: ${{ github.sha }}
44+
SPLIT: 1
45+
SPLIT_INDEX: 0
46+
SPLIT_FILE: 'cypress/timings.json'
47+
- name: Commit changes
48+
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
49+
with:
50+
add: 'cypress/timings.json'
51+
author_name: 'github-actions[bot]'
52+
author_email: '41898282+github-actions[bot]@users.noreply.github.com'
53+
message: 'chore: update E2E timings'

.github/workflows/e2e.yml

+12-14
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ env:
2828
) ||
2929
github.event.before
3030
}}
31-
shouldRunParallel: ${{ secrets.CYPRESS_RECORD_KEY != '' && !(github.event_name == 'push' && github.ref == 'refs/heads/develop') }}
3231
jobs:
3332
cache:
3433
runs-on: ubuntu-latest
@@ -39,7 +38,7 @@ jobs:
3938
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4039
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
4140
- name: Setup Node.js
42-
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
41+
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
4342
with:
4443
node-version-file: '.node-version'
4544
- name: Cache snapshots
@@ -59,7 +58,7 @@ jobs:
5958

6059
- name: Install dependencies
6160
if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }}
62-
uses: cypress-io/github-action@df7484c5ba85def7eef30db301afa688187bc378 # v6.7.2
61+
uses: cypress-io/github-action@0da3c06ed8217b912deea9d8ee69630baed1737e # v6.7.6
6362
with:
6463
# just perform install
6564
runTests: false
@@ -80,15 +79,15 @@ jobs:
8079
strategy:
8180
fail-fast: false
8281
matrix:
83-
containers: [1, 2, 3, 4]
82+
containers: [1, 2, 3, 4, 5]
8483
steps:
8584
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
8685

8786
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
8887
# uses version from "packageManager" field in package.json
8988

9089
- name: Setup Node.js
91-
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
90+
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
9291
with:
9392
node-version-file: '.node-version'
9493

@@ -101,7 +100,7 @@ jobs:
101100
key: ${{ runner.os }}-snapshots-${{ env.targetHash }}
102101

103102
- name: Install dependencies
104-
uses: cypress-io/github-action@df7484c5ba85def7eef30db301afa688187bc378 # v6.7.2
103+
uses: cypress-io/github-action@0da3c06ed8217b912deea9d8ee69630baed1737e # v6.7.6
105104
with:
106105
runTests: false
107106

@@ -117,28 +116,27 @@ jobs:
117116
# Install NPM dependencies, cache them correctly
118117
# and run all Cypress tests
119118
- name: Cypress run
120-
uses: cypress-io/github-action@df7484c5ba85def7eef30db301afa688187bc378 # v6.7.2
119+
uses: cypress-io/github-action@0da3c06ed8217b912deea9d8ee69630baed1737e # v6.7.6
121120
id: cypress
122-
# If CYPRESS_RECORD_KEY is set, run in parallel on all containers
123-
# Otherwise (e.g. if running from fork), we run on a single container only
124-
if: ${{ env.shouldRunParallel == 'true' || ( matrix.containers == 1 ) }}
125121
with:
126122
install: false
127123
start: pnpm run dev:coverage
128124
wait-on: 'http://localhost:9000'
129125
browser: chrome
130126
# Disable recording if we don't have an API key
131127
# e.g. if this action was run from a fork
132-
record: ${{ env.shouldRunParallel == 'true' }}
133-
parallel: ${{ env.shouldRunParallel == 'true' }}
128+
record: ${{ secrets.CYPRESS_RECORD_KEY != '' }}
134129
env:
135130
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
136131
VITEST_COVERAGE: true
137132
CYPRESS_COMMIT: ${{ github.sha }}
138133
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
139-
ARGOS_PARALLEL: ${{ env.shouldRunParallel == 'true' }}
140-
ARGOS_PARALLEL_TOTAL: 4
134+
ARGOS_PARALLEL: true
135+
ARGOS_PARALLEL_TOTAL: ${{ strategy.job-total }}
141136
ARGOS_PARALLEL_INDEX: ${{ matrix.containers }}
137+
SPLIT: ${{ strategy.job-total }}
138+
SPLIT_INDEX: ${{ strategy.job-index }}
139+
SPLIT_FILE: 'cypress/timings.json'
142140

143141
- name: Upload Coverage to Codecov
144142
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
# uses version from "packageManager" field in package.json
3030

3131
- name: Setup Node.js
32-
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
32+
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
3333
with:
3434
cache: pnpm
3535
node-version-file: '.node-version'

0 commit comments

Comments
 (0)