Skip to content

Conversation

@edgarpavlovsky
Copy link
Member

@edgarpavlovsky edgarpavlovsky commented Nov 26, 2025

This pull request introduces substantial updates across the monorepo, with a particular focus on streamlining the markdown renderer package (streamdown-rn), improving CI/CD workflows, and adding new documentation and tooling for AI-assisted development. The most significant changes include breaking changes to the component syntax and API, enhanced streaming and security features, improved developer experience, and the addition of a new iOS debugger app. Below are the top highlights grouped by theme:

StreamdownRN Package: Breaking Changes & New Features

  • Component syntax changed: The syntax for injecting components in markdown has been updated from {{component:"Name",props:{...}}} to a more compact [{c:"Name",p:{...}}]. This reduces token count and improves streaming performance. Layout components (Canvas, Grid, Stack, Card) have been removed from exports, and the public API is simplified to only export the core renderer, skeleton primitives, and types.
  • Progressive prop streaming & block-level memoization: Components now render field-by-field as data streams in, with skeleton placeholders for missing props. Stable blocks are parsed once and never re-render, improving both performance and perceived responsiveness.
  • Full GFM support and improved UX: The renderer now supports GitHub Flavored Markdown features (tables, strikethrough, task lists, autolinks) and provides immediate formatting feedback as users type (bold, italic, code).
  • Comprehensive security hardening: All URLs are sanitized against an allowlist, XSS vectors are blocked, component props are recursively sanitized, and raw HTML is always rendered as escaped text. Utilities for custom sanitization (sanitizeURL, sanitizeProps) are now exported.
  • Robust streaming edge case handling: The parser auto-repairs incomplete JSON, handles incomplete markdown gracefully, and detects block boundaries at the character level for consistent streaming behavior.

CI/CD and Build Workflow Improvements

  • CI workflow now only runs on relevant paths: The CI pipeline is optimized to trigger only when changes occur in packages/**, package.json, or bun.lock, reducing unnecessary builds.
  • Simplified install and test commands: The workflows for CI and publishing have been updated to use bun install (without --frozen-lockfile) and bun run test, improving reliability and consistency. [1] [2]
  • Removed redundant package structure verification: The CI no longer manually checks for built files, streamlining the build process.
  • Updated npm linking strategy: The .npmrc file now prevents Expo dependencies from being hoisted, ensuring each example app maintains its own dependency tree.

Documentation & Developer Experience

  • Added AI-assisted development guide: AGENTS.md provides a comprehensive workflow for using AI coding tools, explains the repository structure, development flow, testing commands, package guidelines, performance philosophy, security practices, and common tasks.
  • Removed outdated contributor and release docs: The old CONTRIBUTING.md and RELEASING.md files have been deleted in favor of the new agent-focused workflow and streamlined release process. [1] [2]
  • Cleaned up changelog: The verbose CHANGELOG.md has been removed, with release notes now managed via changesets.

New iOS Debugger App

  • Added apps/debugger-ios: A new iOS companion app enables testing streamdown-rn on real devices, with documentation, Expo config, Babel config, build scripts, and environment setup. This supports native rendering, streaming, and debugging workflows for iOS. [1] [2] [3] [4] [5] [6]

These changes collectively modernize the streaming markdown renderer, improve security and performance, streamline the developer workflow, and expand testing capabilities to iOS devices.

Addresses:

Co-authored by: @hodlturk

@littlejohntj
Copy link

lgtm

@edgarpavlovsky edgarpavlovsky merged commit 17a251a into main Dec 3, 2025
1 check passed
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