From 72d60d2633584eb59bccdb6cf30b9522db645db2 Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Fri, 4 Oct 2024 17:14:23 +0200 Subject: [PATCH] Fix TypeScript dependencies The Mermaid type definitions depend on `@types/d3` and `@types/dompurify`. Without these dependencies, the Mermaid types cause a type error for users. --- .changeset/dry-students-act.md | 5 +++++ packages/mermaid/package.json | 4 ++-- pnpm-lock.yaml | 12 ++++++------ 3 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 .changeset/dry-students-act.md diff --git a/.changeset/dry-students-act.md b/.changeset/dry-students-act.md new file mode 100644 index 0000000000..43f439f2ee --- /dev/null +++ b/.changeset/dry-students-act.md @@ -0,0 +1,5 @@ +--- +'mermaid': patch +--- + +Add missing TypeScript dependencies diff --git a/packages/mermaid/package.json b/packages/mermaid/package.json index 8e06dd90d8..54c0f7b0ce 100644 --- a/packages/mermaid/package.json +++ b/packages/mermaid/package.json @@ -70,6 +70,8 @@ "@braintree/sanitize-url": "^7.0.1", "@iconify/utils": "^2.1.32", "@mermaid-js/parser": "workspace:^", + "@types/d3": "^7.4.3", + "@types/dompurify": "^3.0.5", "cytoscape": "^3.29.2", "cytoscape-cose-bilkent": "^4.1.0", "cytoscape-fcose": "^2.2.0", @@ -92,13 +94,11 @@ "@iconify/types": "^2.0.0", "@types/cytoscape": "^3.21.4", "@types/cytoscape-fcose": "^2.2.4", - "@types/d3": "^7.4.3", "@types/d3-sankey": "^0.12.4", "@types/d3-scale": "^4.0.8", "@types/d3-scale-chromatic": "^3.0.3", "@types/d3-selection": "^3.0.10", "@types/d3-shape": "^3.1.6", - "@types/dompurify": "^3.0.5", "@types/jsdom": "^21.1.6", "@types/katex": "^0.16.7", "@types/lodash-es": "^4.17.12", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2f1c0d8080..f4bbed1978 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -220,6 +220,12 @@ importers: '@mermaid-js/parser': specifier: workspace:^ version: link:../parser + '@types/d3': + specifier: ^7.4.3 + version: 7.4.3 + '@types/dompurify': + specifier: ^3.0.5 + version: 3.0.5 cytoscape: specifier: ^3.29.2 version: 3.30.1 @@ -281,9 +287,6 @@ importers: '@types/cytoscape-fcose': specifier: ^2.2.4 version: 2.2.4 - '@types/d3': - specifier: ^7.4.3 - version: 7.4.3 '@types/d3-sankey': specifier: ^0.12.4 version: 0.12.4 @@ -299,9 +302,6 @@ importers: '@types/d3-shape': specifier: ^3.1.6 version: 3.1.6 - '@types/dompurify': - specifier: ^3.0.5 - version: 3.0.5 '@types/jsdom': specifier: ^21.1.6 version: 21.1.7