mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-18 03:34:12 +01:00
Merge branch 'develop' into MultipleUpdatesToClassDiagram
* develop: Update deps Fix unit tests
This commit is contained in:
68
package.json
68
package.json
@@ -54,38 +54,38 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@applitools/eyes-cypress": "^3.27.6",
|
"@applitools/eyes-cypress": "^3.32.0",
|
||||||
"@commitlint/cli": "^17.2.0",
|
"@commitlint/cli": "^17.6.1",
|
||||||
"@commitlint/config-conventional": "^17.2.0",
|
"@commitlint/config-conventional": "^17.6.1",
|
||||||
"@cspell/eslint-plugin": "^6.14.2",
|
"@cspell/eslint-plugin": "^6.31.1",
|
||||||
"@rollup/plugin-typescript": "^11.0.0",
|
"@rollup/plugin-typescript": "^11.1.0",
|
||||||
"@types/cors": "^2.8.13",
|
"@types/cors": "^2.8.13",
|
||||||
"@types/eslint": "^8.4.10",
|
"@types/eslint": "^8.37.0",
|
||||||
"@types/express": "^4.17.17",
|
"@types/express": "^4.17.17",
|
||||||
"@types/js-yaml": "^4.0.5",
|
"@types/js-yaml": "^4.0.5",
|
||||||
"@types/jsdom": "^21.0.0",
|
"@types/jsdom": "^21.1.1",
|
||||||
"@types/lodash": "^4.14.188",
|
"@types/lodash": "^4.14.194",
|
||||||
"@types/mdast": "^3.0.10",
|
"@types/mdast": "^3.0.11",
|
||||||
"@types/node": "^18.11.9",
|
"@types/node": "^18.16.0",
|
||||||
"@types/prettier": "^2.7.1",
|
"@types/prettier": "^2.7.2",
|
||||||
"@types/rollup-plugin-visualizer": "^4.2.1",
|
"@types/rollup-plugin-visualizer": "^4.2.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.48.2",
|
"@typescript-eslint/eslint-plugin": "^5.59.0",
|
||||||
"@typescript-eslint/parser": "^5.48.2",
|
"@typescript-eslint/parser": "^5.59.0",
|
||||||
"@vitest/coverage-c8": "^0.30.0",
|
"@vitest/coverage-c8": "^0.30.1",
|
||||||
"@vitest/spy": "^0.30.0",
|
"@vitest/spy": "^0.30.1",
|
||||||
"@vitest/ui": "^0.30.0",
|
"@vitest/ui": "^0.30.1",
|
||||||
"concurrently": "^8.0.0",
|
"concurrently": "^8.0.1",
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"coveralls": "^3.1.1",
|
"coveralls": "^3.1.1",
|
||||||
"cypress": "^12.0.0",
|
"cypress": "^12.10.0",
|
||||||
"cypress-image-snapshot": "^4.0.1",
|
"cypress-image-snapshot": "^4.0.1",
|
||||||
"esbuild": "^0.17.0",
|
"esbuild": "^0.17.18",
|
||||||
"eslint": "^8.32.0",
|
"eslint": "^8.39.0",
|
||||||
"eslint-config-prettier": "^8.6.0",
|
"eslint-config-prettier": "^8.8.0",
|
||||||
"eslint-plugin-cypress": "^2.12.1",
|
"eslint-plugin-cypress": "^2.13.2",
|
||||||
"eslint-plugin-html": "^7.1.0",
|
"eslint-plugin-html": "^7.1.0",
|
||||||
"eslint-plugin-jest": "^27.1.5",
|
"eslint-plugin-jest": "^27.2.1",
|
||||||
"eslint-plugin-jsdoc": "^43.0.0",
|
"eslint-plugin-jsdoc": "^43.0.7",
|
||||||
"eslint-plugin-json": "^3.1.0",
|
"eslint-plugin-json": "^3.1.0",
|
||||||
"eslint-plugin-lodash": "^7.4.0",
|
"eslint-plugin-lodash": "^7.4.0",
|
||||||
"eslint-plugin-markdown": "^3.0.0",
|
"eslint-plugin-markdown": "^3.0.0",
|
||||||
@@ -93,24 +93,24 @@
|
|||||||
"eslint-plugin-tsdoc": "^0.2.17",
|
"eslint-plugin-tsdoc": "^0.2.17",
|
||||||
"eslint-plugin-unicorn": "^46.0.0",
|
"eslint-plugin-unicorn": "^46.0.0",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"globby": "^13.1.2",
|
"globby": "^13.1.4",
|
||||||
"husky": "^8.0.2",
|
"husky": "^8.0.3",
|
||||||
"jest": "^29.3.1",
|
"jest": "^29.5.0",
|
||||||
"jison": "^0.4.18",
|
"jison": "^0.4.18",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"jsdom": "^21.0.0",
|
"jsdom": "^21.1.1",
|
||||||
"lint-staged": "^13.0.3",
|
"lint-staged": "^13.2.1",
|
||||||
"path-browserify": "^1.0.1",
|
"path-browserify": "^1.0.1",
|
||||||
"pnpm": "^8.0.0",
|
"pnpm": "^8.3.1",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.8.8",
|
||||||
"prettier-plugin-jsdoc": "^0.4.2",
|
"prettier-plugin-jsdoc": "^0.4.2",
|
||||||
"rimraf": "^5.0.0",
|
"rimraf": "^5.0.0",
|
||||||
"rollup-plugin-visualizer": "^5.8.3",
|
"rollup-plugin-visualizer": "^5.9.0",
|
||||||
"start-server-and-test": "^2.0.0",
|
"start-server-and-test": "^2.0.0",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^5.0.0",
|
"typescript": "^5.0.4",
|
||||||
"vite": "^4.3.1",
|
"vite": "^4.3.1",
|
||||||
"vitest": "^0.30.0"
|
"vitest": "^0.30.1"
|
||||||
},
|
},
|
||||||
"volta": {
|
"volta": {
|
||||||
"node": "18.16.0"
|
"node": "18.16.0"
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@braintree/sanitize-url": "^6.0.0",
|
"@braintree/sanitize-url": "^6.0.2",
|
||||||
"@khanacademy/simple-markdown": "^0.9.0",
|
"@khanacademy/simple-markdown": "^0.9.0",
|
||||||
"cytoscape": "^3.23.0",
|
"cytoscape": "^3.23.0",
|
||||||
"cytoscape-cose-bilkent": "^4.1.0",
|
"cytoscape-cose-bilkent": "^4.1.0",
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
"khroma": "^2.0.0",
|
"khroma": "^2.0.0",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"non-layered-tidy-tree-layout": "^2.0.2",
|
"non-layered-tidy-tree-layout": "^2.0.2",
|
||||||
"stylis": "^4.1.2",
|
"stylis": "^4.1.3",
|
||||||
"ts-dedent": "^2.2.0",
|
"ts-dedent": "^2.2.0",
|
||||||
"uuid": "^9.0.0",
|
"uuid": "^9.0.0",
|
||||||
"web-worker": "^1.2.0"
|
"web-worker": "^1.2.0"
|
||||||
@@ -73,36 +73,36 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/cytoscape": "^3.19.9",
|
"@types/cytoscape": "^3.19.9",
|
||||||
"@types/d3": "^7.4.0",
|
"@types/d3": "^7.4.0",
|
||||||
"@types/dompurify": "^3.0.0",
|
"@types/dompurify": "^3.0.2",
|
||||||
"@types/jsdom": "^21.0.0",
|
"@types/jsdom": "^21.1.1",
|
||||||
"@types/lodash-es": "^4.17.7",
|
"@types/lodash-es": "^4.17.7",
|
||||||
"@types/micromatch": "^4.0.2",
|
"@types/micromatch": "^4.0.2",
|
||||||
"@types/prettier": "^2.7.1",
|
"@types/prettier": "^2.7.2",
|
||||||
"@types/stylis": "^4.0.2",
|
"@types/stylis": "^4.0.2",
|
||||||
"@types/uuid": "^9.0.0",
|
"@types/uuid": "^9.0.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.42.1",
|
"@typescript-eslint/eslint-plugin": "^5.59.0",
|
||||||
"@typescript-eslint/parser": "^5.42.1",
|
"@typescript-eslint/parser": "^5.59.0",
|
||||||
"chokidar": "^3.5.3",
|
"chokidar": "^3.5.3",
|
||||||
"concurrently": "^8.0.0",
|
"concurrently": "^8.0.1",
|
||||||
"coveralls": "^3.1.1",
|
"coveralls": "^3.1.1",
|
||||||
"cpy-cli": "^4.2.0",
|
"cpy-cli": "^4.2.0",
|
||||||
"cspell": "^6.14.3",
|
"cspell": "^6.31.1",
|
||||||
"csstree-validator": "^3.0.0",
|
"csstree-validator": "^3.0.0",
|
||||||
"globby": "^13.1.2",
|
"globby": "^13.1.4",
|
||||||
"jison": "^0.4.18",
|
"jison": "^0.4.18",
|
||||||
"js-base64": "^3.7.2",
|
"js-base64": "^3.7.5",
|
||||||
"jsdom": "^21.0.0",
|
"jsdom": "^21.1.1",
|
||||||
"micromatch": "^4.0.5",
|
"micromatch": "^4.0.5",
|
||||||
"path-browserify": "^1.0.1",
|
"path-browserify": "^1.0.1",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.8.8",
|
||||||
"remark": "^14.0.2",
|
"remark": "^14.0.2",
|
||||||
"remark-frontmatter": "^4.0.1",
|
"remark-frontmatter": "^4.0.1",
|
||||||
"remark-gfm": "^3.0.1",
|
"remark-gfm": "^3.0.1",
|
||||||
"rimraf": "^5.0.0",
|
"rimraf": "^5.0.0",
|
||||||
"start-server-and-test": "^2.0.0",
|
"start-server-and-test": "^2.0.0",
|
||||||
"typedoc": "^0.24.4",
|
"typedoc": "^0.24.5",
|
||||||
"typedoc-plugin-markdown": "^3.15.2",
|
"typedoc-plugin-markdown": "^3.15.2",
|
||||||
"typescript": "^5.0.0",
|
"typescript": "^5.0.4",
|
||||||
"unist-util-flatmap": "^1.0.0",
|
"unist-util-flatmap": "^1.0.0",
|
||||||
"vitepress": "^1.0.0-alpha.72",
|
"vitepress": "^1.0.0-alpha.72",
|
||||||
"vitepress-plugin-search": "^1.0.4-alpha.20"
|
"vitepress-plugin-search": "^1.0.4-alpha.20"
|
||||||
|
|||||||
@@ -12,24 +12,24 @@ vi.mock('dagre-d3');
|
|||||||
|
|
||||||
// mermaidAPI.spec.ts:
|
// mermaidAPI.spec.ts:
|
||||||
import * as accessibility from './accessibility.js'; // Import it this way so we can use spyOn(accessibility,...)
|
import * as accessibility from './accessibility.js'; // Import it this way so we can use spyOn(accessibility,...)
|
||||||
vi.mock('./accessibility', () => ({
|
vi.mock('./accessibility.js', () => ({
|
||||||
setA11yDiagramInfo: vi.fn(),
|
setA11yDiagramInfo: vi.fn(),
|
||||||
addSVGa11yTitleDescription: vi.fn(),
|
addSVGa11yTitleDescription: vi.fn(),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Mock the renderers specifically so we can test render(). Need to mock draw() for each renderer
|
// Mock the renderers specifically so we can test render(). Need to mock draw() for each renderer
|
||||||
vi.mock('./diagrams/c4/c4Renderer');
|
vi.mock('./diagrams/c4/c4Renderer.js');
|
||||||
vi.mock('./diagrams/class/classRenderer');
|
vi.mock('./diagrams/class/classRenderer.js');
|
||||||
vi.mock('./diagrams/class/classRenderer-v2');
|
vi.mock('./diagrams/class/classRenderer-v2.js');
|
||||||
vi.mock('./diagrams/er/erRenderer');
|
vi.mock('./diagrams/er/erRenderer.js');
|
||||||
vi.mock('./diagrams/flowchart/flowRenderer-v2');
|
vi.mock('./diagrams/flowchart/flowRenderer-v2.js');
|
||||||
vi.mock('./diagrams/git/gitGraphRenderer');
|
vi.mock('./diagrams/git/gitGraphRenderer.js');
|
||||||
vi.mock('./diagrams/gantt/ganttRenderer');
|
vi.mock('./diagrams/gantt/ganttRenderer.js');
|
||||||
vi.mock('./diagrams/user-journey/journeyRenderer');
|
vi.mock('./diagrams/user-journey/journeyRenderer.js');
|
||||||
vi.mock('./diagrams/pie/pieRenderer');
|
vi.mock('./diagrams/pie/pieRenderer.js');
|
||||||
vi.mock('./diagrams/requirement/requirementRenderer');
|
vi.mock('./diagrams/requirement/requirementRenderer.js');
|
||||||
vi.mock('./diagrams/sequence/sequenceRenderer');
|
vi.mock('./diagrams/sequence/sequenceRenderer.js');
|
||||||
vi.mock('./diagrams/state/stateRenderer-v2');
|
vi.mock('./diagrams/state/stateRenderer-v2.js');
|
||||||
|
|
||||||
// -------------------------------------
|
// -------------------------------------
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ import assignWithDepth from './assignWithDepth.js';
|
|||||||
// --------------
|
// --------------
|
||||||
// Mocks
|
// Mocks
|
||||||
// To mock a module, first define a mock for it, then (if used explicitly in the tests) import it. Be sure the path points to exactly the same file as is imported in mermaidAPI (the module being tested)
|
// To mock a module, first define a mock for it, then (if used explicitly in the tests) import it. Be sure the path points to exactly the same file as is imported in mermaidAPI (the module being tested)
|
||||||
vi.mock('./styles', () => {
|
vi.mock('./styles.js', () => {
|
||||||
return {
|
return {
|
||||||
addStylesForDiagram: vi.fn(),
|
addStylesForDiagram: vi.fn(),
|
||||||
default: vi.fn().mockReturnValue(' .userStyle { font-weight:bold; }'),
|
default: vi.fn().mockReturnValue(' .userStyle { font-weight:bold; }'),
|
||||||
|
|||||||
3697
pnpm-lock.yaml
generated
3697
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user