Skip to content

fix(streamdown): move mermaid from devDependencies to dependencies#466

Merged
haydenbleasel merged 1 commit intovercel:mainfrom
smorimoto:fix/mermaid-dep-type
Mar 16, 2026
Merged

fix(streamdown): move mermaid from devDependencies to dependencies#466
haydenbleasel merged 1 commit intovercel:mainfrom
smorimoto:fix/mermaid-dep-type

Conversation

@smorimoto
Copy link
Copy Markdown
Contributor

@smorimoto smorimoto commented Mar 15, 2026

Summary

  • Move mermaid from devDependencies to dependencies in the streamdown package
  • The published type declarations (dist/index.d.ts) import MermaidConfig from mermaid, making it part of the public API
  • Without this change, consumers could resolve different mermaid versions for streamdown and @streamdown/mermaid, causing type errors due to incompatible MermaidConfig types

Test plan

  • pnpm build:packages succeeds
  • Verify that consumer projects no longer need mermaid overrides to avoid type mismatches

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.
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Mar 15, 2026

@smorimoto is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@haydenbleasel
Copy link
Copy Markdown
Contributor

Thanks @smorimoto 🚀

@haydenbleasel haydenbleasel merged commit b752b44 into vercel:main Mar 16, 2026
2 of 3 checks passed
@smorimoto smorimoto deleted the fix/mermaid-dep-type branch March 17, 2026 00:30
@mcuelenaere
Copy link
Copy Markdown

Due to this change, mermaid is now a forced dependency and this pulls in ~100MB of transitive dependencies. Also, this introduces a ~1MB (ungzipped) build artificat.

Can this be implemented in a different way, so mermaid is not a dependency and downstream consumers do not have to suffer from its size, if they opt to not use it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants