Tinacms Developer Docs

21 November 2024

This meeting focused on improving TinaCMS by refining markdown handling, optimizing the build process with modern tools, and enhancing authentication security with HTTP-only cookies. The team also discussed cleaning up legacy dependencies, consolidating packages, and streamlining custom component workflows.

🤖🤖

  1. Markdown and Rich Text Handling:

    • The team explored the relationship between TinaCMS’s rich text editor and markdown parsers like remark and mdast.
    • Jeff explained the parsing and stringifying process between markdown and AST, discussing how TinaCMS transforms rich text for compatibility with its editor.
    • Issues with legacy dependencies, like outdated mdast packages, were reviewed. The discussion centered on cleaning up redundant or deprecated tools and clarifying their roles in TinaCMS.
  2. GraphQL Integration:

    • The team touched on GraphQL’s role in TinaCMS, focusing on how it facilitates rich text and markdown workflows. Customization challenges and optimizations for existing queries were highlighted.
  3. Build and Dependency Management:

    • Extensive discussion revolved around the TinaCMS build process, including the use of ESBuild and Vite for bundling.
    • Challenges related to dual publishing (CommonJS and ES Modules) were addressed, especially in light of the growing shift towards ESM by many libraries. The team explored strategies for transitioning fully to ESM while ensuring compatibility.
    • Legacy issues with specific libraries like Commander for CLI tasks were noted, with suggestions to adopt more modern tools like Clipanion.
  4. Custom Components and Syntax:

    • The meeting covered embedding custom components in TinaCMS, specifically around form configuration and rich text elements. The team discussed how StringifyProps handles custom elements during the parsing process.
    • Jeff highlighted the difficulties of working with MDX, focusing on the distinction between rich text and MDX components, and the need for streamlined handling.
  5. Internal Package Management:

    • The session reviewed the list of TinaCMS packages published to npm, identifying internal-use-only packages that could be excluded from public distribution.
    • Strategies for cleaning up the package release process and ensuring only relevant packages are exposed were explored.
  6. Authentication Storage:

    • The use of local storage for authentication tokens was questioned, with a consensus that moving to HTTP-only cookies would enhance security. Legacy dependencies on AWS Amplify for authentication were flagged for future consideration.

This session was a detailed exploration of TinaCMS’s technical underpinnings, identifying key areas for improvement in dependency management, rich text handling, and authentication security.

On this page