From 1c05b9bf8022b9b4dd90c99ec829612b0165f1d1 Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Sun, 15 Mar 2026 22:54:15 +0900 Subject: [PATCH] fix(streamdown): move mermaid from devDependencies to dependencies The published type declarations (dist/index.d.ts) import MermaidConfig from the mermaid package, making it part of the public API. Having it as a devDependency meant consumers could end up resolving different mermaid versions for streamdown and @streamdown/mermaid, causing type errors due to incompatible MermaidConfig types. --- packages/streamdown/package.json | 2 +- pnpm-lock.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/streamdown/package.json b/packages/streamdown/package.json index 175c5908..c2a3a2db 100644 --- a/packages/streamdown/package.json +++ b/packages/streamdown/package.json @@ -49,7 +49,6 @@ "@vitejs/plugin-react": "^5.1.2", "@vitest/coverage-v8": "^4.0.15", "jsdom": "^27.3.0", - "mermaid": "^11.12.2", "react-markdown": "^10.1.0", "rehype-parse": "^9.0.1", "rehype-stringify": "^10.0.1", @@ -75,6 +74,7 @@ "remend": "workspace:*", "tailwind-merge": "^3.4.0", "unified": "^11.0.5", + "mermaid": "^11.12.2", "unist-util-visit": "^5.0.0", "unist-util-visit-parents": "^6.0.0" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8356458d..9c6043ae 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -322,6 +322,9 @@ importers: marked: specifier: ^17.0.1 version: 17.0.1 + mermaid: + specifier: ^11.12.2 + version: 11.12.2 react: specifier: ^18.0.0 || ^19.0.0 version: 19.2.3 @@ -392,9 +395,6 @@ importers: jsdom: specifier: ^27.3.0 version: 27.4.0 - mermaid: - specifier: ^11.12.2 - version: 11.12.2 react-dom: specifier: ^19.2.3 version: 19.2.3(react@19.2.3)