Skip to content

docs(examples): bring examples and cookbooks to Samva 0.8 and the defineTemplate model - #45

Merged
aryasaatvik merged 5 commits into
mainfrom
chore/examples-current-samva-packages
Oct 3, 2026
Merged

aryasaatvik merged 5 commits into
mainfrom
chore/examples-current-samva-packages

Conversation

@aryasaatvik

@aryasaatvik aryasaatvik commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Bring the runnable examples, cookbooks, and workspace packages up to the published Samva packages: samva 0.8, @samva/markup 0.9, @samva/vite 0.9, and @samva/cli 0.5.

What a reader now gets:

  • TSX templates. examples/tsx-template-samva and cookbooks/tsx-templates.md teach defineTemplate with an email channel, schema and named fixtures, the static profile (&&, ?:, .map, fmt, partials), a templates/ directory with theme.css, and the CLI loop (dev, check, render, snapshot, types, git push, publish). The example drops vite.config.ts because samva templates dev needs none, and carries a second template (receipt) that exercises the static-profile forms.
  • SDK 0.8 everywhere. Every example and packages/* depends on samva@^0.8.0, the Supabase import map pins npm:samva@0.8.0, and the Effect example moves to the SDK's effect@4.0.0-rc.117 peer. Call sites that 0.6 to 0.8 changed are fixed: the inbound example passes idempotencyKey as an option instead of a raw header, and test fixtures drop the removed operation error field and ruleName.
  • @samva/email-sdk. Reports DeliveryUnavailableError (Samva could not hand the send to delivery, and a retry with the same idempotency key is safe) as delivery: "not_sent", with a test and a pending Tegami changelog.

For review:

  • examples/effect-sdk/tsconfig.json now includes the DOM lib; its typecheck already failed on Request before this change.
  • bun run build and typecheck for supabase-auth-hook run deno check, which refuses samva@0.8.0 until Deno's minimum dependency age passes (24 hours by default; samva@0.8.0 was published at 2026-10-02 13:53 UTC). They pass with --minimum-dependency-age=0.

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Tegami

This repository uses Tegami to manage releases. When your changes affect published packages, add a changelog file under .tegami/ before merging.

Create a changelog → · Changelog format

Release preview

Package Bump Version
@samva/better-auth minor 0.2.0 → 0.3.0
@samva/email-sdk minor 0.2.0 → 0.3.0

Changelogs in this PR

Changelog Title
2026-10-03-align-samva-0.8.md Target the Samva 0.8 SDK

Run bun run tegami locally to create a changelog interactively.

Managed by Tegami.

@aryasaatvik
aryasaatvik marked this pull request as ready for review October 2, 2026 18:41
@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Updates examples and docs to Samva 0.8 SDK.

The PR appears safe to merge based on the reviewed changes.

Summary

The PR updates workspace integrations and examples to Samva 0.8, migrates the TSX example to defineTemplate and the CLI workflow, and adjusts Email SDK error classification and idempotency forwarding.

  • The changes since the previous review clarify arithmetic support and add publication instructions.
  • The Email SDK adapter now passes idempotencyKey as a send option.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Author defineTemplate entries] --> B[Check and render fixtures]
  B --> C[Push project to Git]
  C --> D[Publish registered templates]
  D --> E[Send using a published template]
Loading

Reviews (2) · Last reviewed commit: "docs(tsx-templates): document arithmetic..."

Comment thread packages/email-sdk/package.json
Comment thread examples/tsx-template-samva/templates/components/line-item.tsx
Comment thread examples/tsx-template-samva/README.md Outdated
@aryasaatvik
aryasaatvik merged commit d03cfd8 into main Oct 3, 2026
2 of 3 checks 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.

1 participant